| Ctrl+KB | toggle side bar |
| Ctrl+Shift+P | command prompt |
| Ctrl+` | python console |
| Ctrl+N | new file |
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
| <phpunit bootstrap="vendor/autoload.php" | |
| colors = "true" | |
| convertErrorsToExceptions="true" | |
| convertNoticesToExceptions="true" | |
| processIsolation="false" | |
| stopOnFailure="false" | |
| syntaxcheck="false" | |
| > | |
| <testsuites> | |
| <testsuite name="App Tests"> |
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
| function csv2array($file,$head=true,$delim=",",$len=1000) { | |
| $return = false; | |
| $handle = fopen($file, "r"); | |
| if ($head) { | |
| $header = fgetcsv($handle, $len, $delim); | |
| } | |
| while (($data = fgetcsv($handle, $len, $delim)) !== FALSE) { | |
| if ($head AND isset($header)) { | |
| foreach ($header as $key=>$heading) { | |
| $row[$heading]=(isset($data[$key])) ? $data[$key] : ''; |
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 | |
| /* | |
| ----FEATURES---- | |
| 1. DOESN'T NEED A DATABASE | |
| 2. EASY TO SHARE WITH ANYBODY - ITS JUST A CSV FILE SO MANY PEOPLE CAN GIVE YOU QUOTES! | |
| 3. STRIPS ANY PROBLEMATIC CHARACTER SO YOU CAN PLAY WITH YOUR OWN QUOTE SYMBOLS ( VIA CSS) | |
| 4. CAN STYLE IT BY CSS |
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
| function is_date($date){ | |
| // date example mm-dd-year -> 09-25-2012 | |
| $datechunks = explode("-",$date); | |
| if(sizeof($datechunks)==3){ | |
| if(is_numeric($datechunks[0]) && is_numeric($datechunks[1]) && is_numeric($datechunks[2])) | |
| { | |
| // now check if its a valid date | |
| if(checkdate($datechunks[0], $datechunks[1], $datechunks[2])){ | |
| return true; | |
| }else{ |
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
| function get_jsfields($input,$begins_with,$numpos,$validation_string){ | |
| $jsfields = array(); | |
| $getkeys = array_keys($input); | |
| for($i=0;$i<sizeof($getkeys);$i++){ | |
| if(preg_match("/$begins_with/i", trim($getkeys[$i]))){ | |
| $jsfields[$begins_with.$getkeys[$i][$numpos-1]] = ''.$validation_string.''; | |
| } | |
| } | |
| return $jsfields; | |
| } |
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
| function create_load_data_file($arrayofdata,$numcolumns,$pathtofile,$dbtable){ | |
| // Create the txt structure | |
| $i = 0; | |
| foreach($arrayofdata as $column){ | |
| $txtcontent .= $column."\t"; | |
| ++$i; | |
| if(($i % $numcolumns) == 0){ $txtcontent .= "\r\n";} | |
| } |
NewerOlder