Getting started: http://www.sqlteaching.com/
Related tutorial: http://cd64.de/mysql-cli
SQL joins infografic: http://cd64.de/sql-joins
<?php | |
use Illuminate\Support\Contracts\ArrayableInterface; | |
use Illuminate\Support\Contracts\JsonableInterface; | |
class Excel implements ArrayableInterface, JsonableInterface{ | |
protected $objPHPExcel; | |
public function __construct($file){ | |
if($file instanceof \SplFileInfo){ | |
$filename = $file->getRealPath(); |
This build uses Google's Closure Compiler solely for its error output, allowing you to use NppExec | |
for a quick syntax sanity check while editing JavaScript files, using F6 to cycle through any syntax | |
errors the compiler flags up. | |
To add the build: | |
1. Install NppExec plugin using Plugin Manager or download it from http://bit.ly/tHIUs and restart Notepad++ | |
2. Download the Closure compiler.jar from http://code.google.com/closure/compiler/ and place it somewhere | |
on your computer. An easy place to do so is to save it directly to C:\ to avoid path issues. | |
3. On Notepad++ hit F6 |
<?php | |
/** | |
* A function to sort data array element by one or two sub keys, both directions | |
*/ | |
function sksort(&$array, $subkey = "id", $subkey2 = null ,$sort_ascending=false) | |
{ | |
if (count($array)) | |
$temp_array[key($array)] = array_shift($array); |
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
<?php | |
class Foo | |
{ | |
private $name; | |
private static $defaultInstance = null; | |
/** | |
* Public constructor: create as many instance as you want | |
*/ |
<?php | |
$curl = curl_init('http://www.livescore.com/soccer/england/'); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10'); | |
$html = curl_exec($curl); | |
curl_close($curl); | |
if (!$html) { |
Getting started: http://www.sqlteaching.com/
Related tutorial: http://cd64.de/mysql-cli
SQL joins infografic: http://cd64.de/sql-joins
<?php | |
/* | |
* PHP: Recursively Backup Files & Folders to ZIP-File | |
* (c) 2012-2014: Marvin Menzerath - http://menzerath.eu | |
* contribution: Drew Toddsby | |
*/ | |
// Make sure the script can handle large folders/files | |
ini_set('max_execution_time', 600); | |
ini_set('memory_limit','1024M'); |