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 | |
abstract class MobileStreamsReqest { | |
private $_username; | |
private $_password; | |
private $_URI; | |
private $_version; | |
protected $parameters = array(); | |
protected $requestAttrbutes = array(); | |
protected $requestString; |
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
//Custom Event handling | |
Event.observe(document, 'dom:loaded', function() { | |
$('enableInputEvents').observe('click', function(e) { | |
document.fire('CheckBox:Enabled', {checked: $('enableInputEvents').checked}); | |
}); | |
}); | |
document.observe('CheckBox:Enabled', function(e) { | |
Event.stop(e); | |
if (e.memo.checked) { |
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 addGenerator(num) { | |
return function(toAdd) { | |
return num + toAdd; | |
} | |
} | |
var addFive = addGenerator(5); | |
console.log(addFive(4) == 9); |
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 | |
$lambda = function($time) { | |
echo "I am an anonymous function and being called {$times} times<br/>"; | |
}; | |
function nCallTo($n, Closure $function) { | |
for ($i = 0; $i < $n; $i++) { | |
$function($i+1); | |
} | |
return function() { |
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 | |
class ConsignmentClient extends SoapClient { | |
public function __construct($wsdl, $options) { | |
parent::__construct($wsdl, $options); | |
} | |
} | |
class Consignment { |
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
/** | |
* | |
* Base64 encode / decode | |
* http://www.webtoolkit.info/ | |
* | |
**/ | |
var Base64 = { | |
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
port=1463 | |
max_msg_per_second=2000000 | |
check_interval=3 | |
new_thread_per_category=no | |
<store> | |
type=buffer | |
category=stats* | |
max_queue_length=10 | |
buffer_send_rate=1 |
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
db.runCommand({movechunk: "test.people", find: {name: "XYZ0"}, to: "127.0.0.1:10000"}); | |
db.runCommand({split: "test.people", middle: {name: "XYZ0"}}); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
int main(int argc, char *argv[]) { | |
struct sockaddr_in addr; | |
int listenSocket, newSocket; | |
char buffer[25]; |
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
#this is more clearer than below code | |
for i,n in enumerate(x): | |
if x[i] < 0: | |
print "Found negative nunber @ index ", i |
OlderNewer