Why rewrite URLs? Check Wikipedia
Make sure AllowOverride is on for your directory, or put in httpd.conf
# Apache (.htaccess or httpd.conf)
RewriteEngine On
<?php | |
// PHP 5.3+ Singleton Pattern | |
abstract class Singleton { | |
// Constructor | |
private function __construct() { | |
// Do nothing | |
} |
DROP PROCEDURE IF EXISTS changeIsColsToBool; | |
DELIMITER // | |
CREATE PROCEDURE changeIsColsToBool( | |
myschema VARCHAR(255), | |
defaultVal BOOL | |
) | |
BEGIN | |
DECLARE colname VARCHAR(255) default 'is\_%'; | |
DECLARE mytable VARCHAR(255); | |
DECLARE col VARCHAR(255); |
DROP PROCEDURE IF EXISTS changeIntToTimestamps; | |
DELIMITER // | |
CREATE PROCEDURE changeIntToTimestamps( | |
myschema VARCHAR(255), | |
colname VARCHAR(255), | |
autoUpdate BOOL | |
) | |
BEGIN | |
DECLARE mytable VARCHAR(255); | |
DECLARE col VARCHAR(255); |
Why rewrite URLs? Check Wikipedia
Make sure AllowOverride is on for your directory, or put in httpd.conf
# Apache (.htaccess or httpd.conf)
RewriteEngine On
DROP PROCEDURE IF EXISTS addTestData; | |
delimiter // | |
CREATE PROCEDURE addTestData(cnt INT) | |
BEGIN | |
SET @x = 0; | |
REPEAT | |
SET @x = @x + 1; | |
INSERT INTO `TABLE_NAME_HERE` (`name`) VALUES ( CONCAT( 'test_data_', @x) ); |
%s/^\(\s\+\)\$this->assertOutputSame(\n\(.\{-}\)\n\(.\{-}\)function (.*) {\n\(.\{-}\)\$this->klein_app->dispatch(\(\(\n\?.*\)\)\n\(.*\));\n.*}\n\(.*\));/\1\$this->assertSame(\r\2\r\3\$this->dispatchAndReturnOutput(\5\r\3)\r\1);/g |
from random import randint | |
board = [] | |
for x in range(5): | |
board.append(["O"] * 5) | |
def print_board(board): | |
# Print a new-line |
#!/usr/bin/env php | |
<?php | |
/** | |
* JSON/BSON encoding and decoding benchmark | |
* | |
* Now with native serializing! | |
* | |
* @copyright 2013 Trevor N Suarez | |
* @link http://blennd.com/ | |
* @author Trevor Suarez <[email protected]> |
<?php | |
class Dog { | |
public function paramSmart($val = null) { | |
if (null !== $val) { | |
return $this->paramSmart = $val; | |
} | |
return $this->paramSmart; | |
} |
import "dart:math"; | |
import "dart:io"; | |
// Declare our game variables | |
List board; | |
Random randomizer; | |
int numOfRows = 5; | |
int numOfCols = 5; | |
int shipRow; | |
int shipCol; |