This file contains 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
CrowdparkRpc = { | |
invokeRpc: function (httpMethod, url, method, params, baseParams, callback) { | |
var method = '' + method; | |
if (!params) { | |
var params = []; | |
} | |
var rpc = { | |
method: method, | |
params: params |
This file contains 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
/** | |
* @param string $table | |
* @param array $rowInsert | |
* @param array $rowUpdate | |
* @return array | |
*/ | |
function createSqlInsertIntoTableOnDuplicateKeyUpdate($table, $rowInsert, $rowUpdate) | |
{ | |
$insertColumnTokens = array(); | |
$insertValueTokens = array(); |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
public class ClientFactory { | |
public static <T extends Client> T createClient(Class<T> clientClass, String host, Integer port) | |
{ | |
try { | |
Constructor<T> constructor = clientClass.getConstructor( | |
String.class, Integer.class | |
); | |
T client = constructor.newInstance( |
This file contains 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
public class GenericMapExample { | |
private String value; | |
public String getValue() { | |
return value; | |
} | |
public void setValue(String value) { | |
this.value = value; |
This file contains 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
task :default => 'tasklist' | |
desc "List & Describe Tasks" | |
task :tasklist do | |
sh "rake -P" | |
sh "rake -T" | |
end | |
namespace :composer do | |
composer_phar="./composer.phar" |
This file contains 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
//Example | |
//======= | |
ini_set("display_errors", true); | |
error_reporting(E_ALL|E_STRICT & ~E_NOTICE); | |
set_error_handler(function($errno, $errstr, $errfile, $errline){ | |
throw new ErrorException($errstr, 0, $errno, $errfile, $errline); | |
}); | |
$db = MySQLiDB::getInstance(); |
This file contains 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 request ... | |
================ | |
{ | |
"method":"foobar", | |
"params":["foo", "bar", "baz"] | |
} | |
This file contains 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
package com.application.rpc | |
{ | |
/** | |
* ... | |
* @author seb | |
*/ | |
public dynamic class CallbackVO extends Object | |
{ | |
This file contains 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
package com.basilicom.utils | |
{ | |
import flash.external.ExternalInterface; | |
public class FireLog | |
{ | |
public static function log(msg:String = null, data:* = null):void | |
{ | |
try |
OlderNewer