This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$lines = file('/home/peter/php-7.4.1/Zend/zend_language_parser.c'); | |
function string_reverse($input){ | |
$temp = ''; | |
for($iter = strlen($input);$iter > 0; $iter--){ | |
$temp = $temp . $input[$iter-1]; | |
} | |
return $temp; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$lines = file('php-7.4.1/Zend/zend_language_parser.c'); | |
$started = microtime(); | |
foreach ($lines as $line) { | |
str_reverse($line); | |
} | |
$ended = microtime(); | |
echo $ended - $started; |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id,username,password,when,country,host_id | |
21,admin,7ujMko0admin,2019-02-02 10:39:27,China,0 | |
22,pi,jdd,2019-02-02 10:40:09,United Kingdom,1 | |
23,pi,kkk,2019-02-02 10:40:11,United Kingdom,1 | |
24,pi,lk,2019-02-02 10:40:13,United Kingdom,1 | |
25,pi,kk',2019-02-02 10:40:16,United Kingdom,1 | |
26,pi,kjj,2019-02-02 10:40:18,United Kingdom,1 | |
27,pi,fds,2019-02-02 10:42:55,United Kingdom,1 | |
28,pi,eee,2019-02-02 10:42:56,United Kingdom,1 | |
29,pi,fds,2019-02-02 10:42:57,United Kingdom,1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Author: Peter McDonald | |
Description: Probably not the best way to do this but gives the ability to add or remove days, weeks, | |
months or years to a DateTime date | |
""" | |
from datetime import datetime | |
MonthDays = [None, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] |