• 1 Post
  • 17 Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle
  • Sailing7@lemmy.mltoich_iel@feddit.orgich🪟iel
    link
    fedilink
    arrow-up
    2
    ·
    12 hours ago

    Ohh, okay das ist neu für mich, hört sich aber nach’m klassischen Microsoft move an.

    Wait, mit ps-exec kommst du in diesen folder rein? O.o

    Hätte erwartet, dass psexec mit dem ad user ausgeführt wird, der den command abgefeuert hat


  • Sailing7@lemmy.mltoich_iel@feddit.orgich🪟iel
    link
    fedilink
    arrow-up
    1
    ·
    12 hours ago

    Ein komplett nutzloses sudo, aber ja.

    Der user, mit dem du die shell öffnest muss bereits admin sein, weil sonst kein sudo ausgeführt werden darf. Gibt nicht so wie unter linux nen ort, wo du deinen user sudo rechte geben kannst. Hast also exakt nichts gewonnen und eher mehr hürden, als wenn du einfach deine cmd als admin ausführst. (Mal abgesehen davon, dass es noch im beta status ist und ich somit auch nichts was im entferntesten mit der PROD umgebung zu tun hat das erlauben wollen würde)


  • Sailing7@lemmy.mltoich_iel@feddit.orgich🪟iel
    link
    fedilink
    arrow-up
    10
    ·
    22 hours ago

    Dat ist der ort, wo windows die microsoft store apps hin installiert.

    Die idee ist unter anderem, dass die apps voneinander gesandboxed laufen.

    Somit soll ein ausbrechen um eiiniges erschwert werden.

    Ob das tatsächlich funzt? Kein plan.

    Absoluter abfuck, weil du nix manuell troubleshpoten kannst? Aber sowasvon.

    Wenigstens der Vorteil, das sich store apps recht angenehm automatisch updaten lassen? Joa.

    Der absolute nachteil dass der MS Store von billigen klonen von FOSS Software (nicht vom offiziellen entwickler im store announced), die weiß gott für “extra features wink, wink” dazukommen…









  • The mentioned php file:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Charging Time Calculator (PHP)</title>
      <style>
        body { font-family: Arial, sans-serif; background: #f4f4f4; color: #333; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
        .box { background: #fff; padding: 20px 30px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); width: 100%; max-width: 400px; }
        h1 { margin-top: 0; text-align: center; }
        .field { margin-bottom: 15px; }
        label { display: block; margin-bottom: 5px; font-weight: bold; }
        input[type="number"] { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
        button { width: 100%; padding: 10px; background: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer; }
        button:hover { background: #218838; }
        .result { margin-top: 20px; background: #e9ecef; padding: 15px; border-radius: 4px; }
      </style>
    </head>
    <body>
      <div class="box">
        <h1>Charging Time Calculator</h1>
    
        <?php
        // Default values at the top
        $default_capacity      = 52.0;   // kWh
        $default_current_pct   = 55.0;   // %
        $default_target_pct    = 80.0;   // %
        $default_power_kw      = 1.8;    // kW
        $default_loss_pct      = 15.2;   // Charging loss in %
    
        // I have extended the PHP script with the new field for charging loss (default 15.2%). 
        // The loss is applied immediately after calculating the net energy requirement, 
        // so the charging time is determined based on the inclusive energy requirement (net + loss). 
        // Additionally, the result view now shows the following values:
        // - Net energy required
        // - Configured charging loss
        // - Energy requirement including loss
    
        // Take from POST or use defaults
        $capacity = isset($_POST['capacity']) ? floatval($_POST['capacity']) : $default_capacity;
        $current  = isset($_POST['current'])  ? floatval($_POST['current'])  : $default_current_pct;
        $target   = isset($_POST['target'])   ? floatval($_POST['target'])   : $default_target_pct;
        $power    = isset($_POST['power'])    ? floatval($_POST['power'])    : $default_power_kw;
        $loss     = isset($_POST['loss'])     ? floatval($_POST['loss'])     : $default_loss_pct;
    
        if ($_SERVER['REQUEST_METHOD'] === 'POST') {
          // Calculation
          $percent_to_charge = max(0, $target - $current);
          // Net energy requirement
          $energy_needed_raw = ($percent_to_charge / 100) * $capacity;      // in kWh
          // Energy requirement including charging loss
          $energy_needed = $energy_needed_raw * (1 + $loss / 100);
          // Charging time based on the increased energy requirement
          $time_hours        = $power > 0 ? $energy_needed / $power : 0;    // in hours
          $hours             = floor($time_hours);
          $minutes           = round(($time_hours - $hours) * 60);
        ?>
          <div class="result">
            <p><strong>Remaining Charging Time:</strong> <?= $hours ?> h <?= $minutes ?> min</p>
            <p><strong>Percent to Charge:</strong> <?= number_format($percent_to_charge, 1) ?> %</p>
            <p><strong>Energy to Charge (net):</strong> <?= number_format($energy_needed_raw, 2) ?> kWh</p>
            <p><strong>Charging Loss:</strong> <?= number_format($loss, 1) ?> %</p>
            <p><strong>Energy to Charge (incl. loss):</strong> <?= number_format($energy_needed, 2) ?> kWh</p>
          </div>
        <?php } ?>
    
        <form method="post">
          <div class="field">
            <label for="capacity">Battery Capacity (kWh)</label>
            <input type="number" step="0.1" name="capacity" id="capacity" value="<?= htmlspecialchars($capacity) ?>" required>
          </div>
          <div class="field">
            <label for="current">Current Charge Level (%)</label>
            <input type="number" step="1" min="0" max="100" name="current" id="current" value="<?= htmlspecialchars($current) ?>" required>
          </div>
          <div class="field">
            <label for="target">Desired Charge Level (%)</label>
            <input type="number" step="1" min="0" max="100" name="target" id="target" value="<?= htmlspecialchars($target) ?>" required>
          </div>
          <div class="field">
            <label for="power">Charging Power (kW)</label>
            <input type="number" step="0.1" min="0.1" name="power" id="power" value="<?= htmlspecialchars($power) ?>" required>
          </div>
          <div class="field">
            <label for="loss">Charging Loss (%)</label>
            <input type="number" step="0.1" min="0" max="100" name="loss" id="loss" value="<?= htmlspecialchars($loss) ?>" required>
          </div>
          <button type="submit">Calculate</button>
        </form>
      </div>
    </body>
    </html>
    
    




  • […] and have been using various Linux distros as my main os for almost 20 years.

    Matey. Get into any company that has linux junior positions. You already have more experiance in linux than 90% of the average (windows) Sysadmin.

    For realzies now. Most will look weird at you if you ask them to edit a file in the shell or using a server VM that runs without graphical interface.

    Get into a linux junior position and get started.

    Learn lots and lots. After a few years moneywise you might be back your old job as experienced chemist.