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
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";} | |
} |
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 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
<?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 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
<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
# Filter Manufacturers shorting by name ASC | |
FILE : administrator\components\com_virtuemart\models\manufacturer.php | |
LINE: around 103 | |
REPLACE: | |
$query = "SELECT `virtuemart_manufacturer_id` AS `value`, `mf_name` AS text, '' AS disable | |
FROM `#__virtuemart_manufacturers_".VMLANG."`"; |
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
########################################## | |
# NEW HTML5 DOC | |
########################################## | |
<!doctype html> | |
<html lang="en-US"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Default Page Title</title> | |
<link rel="shortcut icon" href="favicon.ico"> |
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
############################################################################### | |
## The Master .htaccess | |
## | |
## Version 2.5 (proposed) - May 16th, 2011 | |
## | |
## ---------- | |
## This file is designed to be the template .htaccess file to put on your new | |
## sites, increasing your site's security and performance. It is not meant to | |
## be just dropped in your site, though. You should go through all of its | |
## sections and modify it to match your site. Most notably, all instances of |
OlderNewer