Getting started: http://www.sqlteaching.com/
Related tutorial: http://cd64.de/mysql-cli
SQL joins infografic: http://cd64.de/sql-joins
| <?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'); |
| %% Copyright | |
| -module(jalali). | |
| -author("jrad <[email protected]>"). | |
| -define( G_DAYS_IN_MONTH, [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ] ). | |
| -define( J_DAYS_IN_MONTH, [ 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29 ] ). | |
| %% API | |
| -export([ | |
| gregorian_to_jalali/1, |
| //Based on gulpfile.js from Google Web Starter Kit. | |
| //https://github.com/google/web-starter-kit | |
| 'use strict'; | |
| // Include Gulp & Tools We'll Use | |
| var gulp = require('gulp'); | |
| var $ = require('gulp-load-plugins')(); | |
| var del = require('del'); | |
| var runSequence = require('run-sequence'); | |
| var browserSync = require('browser-sync'); |
| <div id="insertTest"></div> | |
| <script> | |
| var wikipediaHTMLResult = function(data) { | |
| var readData = $('<div>' + data.parse.text.* + '</div>'); | |
| // handle redirects | |
| var redirect = readData.find('li:contains("REDIRECT") a').text(); | |
| if(redirect != '') { | |
| callWikipediaAPI(redirect); |
| // first of all make sure we have enough arguments (exit if not) | |
| if (process.argv.length != 5) | |
| { | |
| console.error("Usage: node csv2html.js input.csv template.ejs output.html") | |
| console.error(); | |
| console.error("Outputs the given template for each row in the given input.") | |
| console.error("Uses the first row of the CSV as column names in the template.") | |
| process.exit(1); | |
| } |
| //Javascript implementation of utf8_encode function from php. | |
| function utf8_encode(argString) { | |
| if (argString === null || typeof argString === 'undefined') { | |
| return ''; | |
| } | |
| var string = (argString + ''); // .replace(/\r\n/g, "\n").replace(/\r/g, "\n"); | |
| var utftext = '', | |
| start, end, stringl = 0; |
| <div class="someclass notip">notip</div> | |
| <div class="someclass">not notip</div> |