Posted on July 31, 2019, 9:41 am, by admin, under
bash.
<?php $x = 5; for($i=0; $i<10; $i++) { if($i % $x == 0) { echo ‘yes’; } }<?php $x = 5; for($i=0; $i<10; $i++) { if($i % $x == 0) { echo 'yes'; } } Result: yes yes Explanation: 5 % 5 has remainder 0 (fully divided), 10 % 5 has remainder 0 […]
Posted on July 26, 2019, 3:16 pm, by admin, under
bash.
head -n 1 upload_images.csv > header.csv; tail -n +2 upload_images.csv | split –numeric-suffixes=1 –additional-suffix=.csv -l 320 – –filter=’sh -c "{ head -n1 header.csv; cat; } > $FILE"’head -n 1 upload_images.csv > header.csv; tail -n +2 upload_images.csv | split –numeric-suffixes=1 –additional-suffix=.csv -l 320 – –filter='sh -c "{ head -n1 header.csv; cat; } > $FILE"' split filename.csv […]
Posted on July 15, 2019, 2:37 pm, by admin, under
php.
echo preg_replace("/[\W]/u", "", $str);echo preg_replace("/[\W]/u", "", $str);
Posted on July 10, 2019, 4:08 pm, by admin, under
tips.
UCS-2 is old encoding standard. It uses fixed size per encoded character and therefore is not compatible with ASCII. UTF-8 is newer standard. It uses dynamic size between 8 – 32 bits per encoded character and is compatible with ASCII. Я так понял что UCS-2 ещё называют UNICODE т.к. каждый символ это полные 2 байта […]