Type(Type) 所有的發表文章

前往頁面 ←上一頁  1 2 3 4 5 6 7 8 ... 572  下一頁→

很熱鬧的夏天場景 👍(2026-07-27 13:25)

讚讚,活動成功出展順利 😎 👍(2026-07-27 13:23)

要把蝴蝶或蛾那些「觸鬚、頭毛」都展現出來

一方面需要一定繪圖技術,

另外一方面,
需要「不怕昆蟲」的勇氣。 😎👍(2026-07-27 13:22)

看上述:「老同事相認過程」蠻有趣的 😄(2026-07-27 13:20)

長壽老貓,
辛苦您的照顧。(2026-07-27 13:17)

左虎,右貓,上鯨,左上飛馬

為什麼選這四種動物? 😀(2026-06-29 19:41)

[h2]php.exe <taxi_uber_sum_fare.php> <eml_files_folders>[/h2]

代碼:


<?php
declare(strict_types=1);

if ($argc < 2) {
    fwrite(STDERR, "Usage: php taxi_uber_sum_fare.php <eml-directory>\n");
    exit(1);
}

$dir = $argv[1];
if (!is_dir($dir)) {
    fwrite(STDERR, "Not a directory: {$dir}\n");
    exit(1);
}

$files = glob(rtrim($dir, "\\/") . DIRECTORY_SEPARATOR . '*.eml');
sort($files, SORT_NATURAL | SORT_FLAG_CASE);

if (!$files) {
    fwrite(STDERR, "No .eml files found in {$dir}\n");
    exit(1);
}

function extractHtmlPart(string $raw): ?string
{
    if (!preg_match('/Content-Type:\s*text\/html.*?\R\R(.*?)(?=\R--=|$)/si', $raw, $m)) {
        return null;
    }
    return quoted_printable_decode($m[1]);
}

function extractAmount(string $html): ?array
{
    if (!preg_match('/data-testid="total_fare_amount"[^>]*>([^<]+)/i', $html, $m)) {
        return null;
    }

    $label = html_entity_decode(trim($m[1]), ENT_QUOTES | ENT_HTML5, 'UTF-8');
    $label = preg_replace('/\s+/u', ' ', $label);

    if (!preg_match('/([A-Z]{0,3}\$)\s*([0-9,]+(?:\.[0-9]{2})?)/u', $label, $n)) {
        if (!preg_match('/([0-9,]+(?:\.[0-9]{2})?)/u', $label, $n)) {
            return null;
        }
        $currency = '';
        $number = $n[1];
    } else {
        $currency = $n[1];
        $number = $n[2];
    }

    $number = str_replace(',', '', $number);
    $cents = (int)round(((float)$number) * 100);

    return [
        'raw' => $label,
        'currency' => $currency,
        'number' => $number,
        'cents' => $cents,
    ];
}

$rows = [];
$totalCents = 0;
$failures = [];

foreach ($files as $file) {
    $raw = file_get_contents($file);
    if ($raw === false) {
        $failures[] = basename($file) . " (read error)";
        continue;
    }

    $html = extractHtmlPart($raw);
    if ($html === null) {
        $failures[] = basename($file) . " (html not found)";
        continue;
    }

    $amount = extractAmount($html);
    if ($amount === null) {
        $failures[] = basename($file) . " (amount not found)";
        continue;
    }

    $totalCents += $amount['cents'];
    $rows[] = [
        'file' => basename($file),
        'amount' => $amount['currency'] . number_format($amount['cents'] / 100, 2, '.', ''),
    ];
}

foreach ($rows as $row) {
    echo $row['file'] . "\t" . $row['amount'] . PHP_EOL;
}

echo str_repeat('-', 40) . PHP_EOL;
echo 'Count: ' . count($rows) . PHP_EOL;
echo 'Total: ' . number_format($totalCents / 100, 2, '.', '') . PHP_EOL;

if ($failures) {
    echo str_repeat('-', 40) . PHP_EOL;
    echo "Failures:" . PHP_EOL;
    foreach ($failures as $failure) {
        echo $failure . PHP_EOL;
    }
    exit(2);
}


(2026-05-31 17:33)

❤️(2026-05-28 11:27)

🥰 🥰(2026-05-21 15:21)

🐻 俊國熊帽子,太強了(2026-05-21 14:34)

👍 👍 👍(2026-05-06 17:48)

👍 👍 👍(2026-05-06 17:48)

👍 👍 👍(2026-05-06 17:48)

我的對策: 睡到自然醒,就不會有起床氣。 😋(2026-05-06 17:47)

>> 貓的恩返,不要是小強都好

貓:「勞贖可以嗎?」 🐀(2026-05-06 17:46)

yaten 寫到:
總覺得可以做中華風版本的


❤️ ❤️ ❤️(2026-05-06 17:45)

👍 👍 👍(2026-05-06 17:36)

>> 幸好,它還是靠我的草稿生成出來。
>> 這還是原創嗎?

我認為應該算;

的確,這很難定義

但原稿是你原創,那應該沒問題。(2026-05-06 17:33)

用於大量 CG 運算的 Intel SSD P3600 (已經EOL),
總使用超過 100PB (49 PB + 51PB),壽命還有一半 😁


Data Units Read: 95,956,863,851 [49.1 PB]
Data Units Written: 100,271,970,175 [51.3 PB]

代碼:


=== START OF INFORMATION SECTION ===

Model Number:                       INTEL SSDPE2ME800G4
Serial Number:                      -------------------------
Firmware Version:                   8DV10M36
PCI Vendor/Subsystem ID:            0x8086
IEEE OUI Identifier:                0x5cd2e4
Controller ID:                      0
NVMe Version:                       <1.2
Number of Namespaces:               1
Namespace 1 Size/Capacity:          800,166,076,416 [800 GB]
Namespace 1 Formatted LBA Size:     512
Local Time is:                      Tue Apr 21 11:33:42 2026 UTC
Firmware Updates (0x02):            1 Slot
Optional Admin Commands (0x0007):   Security Format Frmw_DL
Optional NVM Commands (0x0002):     Wr_Unc
Maximum Data Transfer Size:         32 Pages

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
0 +    25.00W       -        -    0  0  0  0        0       0

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
0 +     512       0         2
1 -     512       8         2
2 -     512      16         2
3 -    4096       0         0
4 -    4096       8         0
5 -    4096      64         0
6 -    4096     128         0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        38 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    42%
Data Units Read:                    95,956,863,851 [49.1 PB]
Data Units Written:                 100,271,970,175 [51.3 PB]
Host Read Commands:                 603,954,987
Host Write Commands:                458,608,867
Controller Busy Time:               976
Power Cycles:                       130
Power On Hours:                     7,314
Unsafe Shutdowns:                   150
Media and Data Integrity Errors:    0
Error Information Log Entries:      0

Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged

Self-tests not supported
(2026-04-22 13:56)

>> 她死掉是會像青蛙一樣趴在地上嗎

靈被打光就容易躺地上
類似您作品的角度。



>> 倒下應該不會露內褲吧(思考中)


今年 2026 remake,3D 建模一律有安全褲,
光榮特安全褲模。(2026-04-15 18:49)

前往頁面 ←上一頁  1 2 3 4 5 6 7 8 ... 572  下一頁→