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
<?php | |
//Found on http://www.alternateinterior.com/2007/05/multi-threading-strategies-in-php.html | |
//Modified by http://www.php-code.net | |
//Modified: add executor | |
class Thread { | |
var $pref ; // process reference | |
var $pipes; // stdio | |
var $buffer; // output buffer | |
var $output; | |
var $error; |
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
foo@bar:~/src/quadtree$ redis-cli zcard x | |
(integer) 100000 | |
foo@bar:~/src/quadtree$ redis-cli zcard y | |
(integer) 100000 | |
foo@bar:~/src/quadtree$ redis-cli hlen qt | |
(integer) 56325 | |
foo@bar:~/src/quadtree$ redis-cli script load "`cat rqtih.lua`" | |
"84f91fddf261e9a2ef14ff4b417443eed3dc4b2b" | |
foo@bar:~/src/quadtree$ redis-benchmark -n 100 -r 1000000 evalsha 84f91fddf261e9a2ef14ff4b417443eed3dc4b2b 3 x y tmp zquery __rand_int__ __rand_int__ __rand_int__ __rand_int__ | |
====== evalsha 84f91fddf261e9a2ef14ff4b417443eed3dc4b2b 3 x y tmp zquery __rand_int__ __rand_int__ __rand_int__ __rand_int__ ====== |
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
// | |
// Created by alex on 21/10/2015. | |
// | |
#include <boost/interprocess/shared_memory_object.hpp> | |
#include <boost/interprocess/mapped_region.hpp> | |
#include <boost/interprocess/sync/scoped_lock.hpp> | |
#include <iostream> | |
#include <cstring> | |
#include "shared_data.h" | |
#include "client.h" |
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
#include <iostream> | |
#include <boost/interprocess/shared_memory_object.hpp> | |
#include <boost/interprocess/mapped_region.hpp> | |
#include "shared_data.h" | |
#include "server.h" | |
using namespace std; | |
using namespace boost::interprocess; | |
class SharedMemory { |
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
<div id='intake'> | |
<img src="/sites/nishantverma/GBSRequest/SiteAssets/loading.gif" /> | |
<br/> | |
Submitting your request for approval | |
</div> | |
<script type="text/javascript" src="/sites/nishantverma/GBSRequest/SiteAssets/jquery-1.7.1.js"></script> | |
<script type="text/javascript" src="/sites/nishantverma/GBSRequest/SiteAssets/jquery.SPServices-0.7.0.min.js"></script> | |
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
#include <errno.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stropts.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <sys/signalfd.h> | |
#define __USE_GNU |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <hiredis.h> | |
int main(int argc, char **argv) { | |
redisContext *c; | |
redisReply *reply; | |
const char *hostname = (argc > 1) ? argv[1] : "127.0.0.1"; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <hiredis.h> | |
#include <sys/time.h> | |
long long elapsed(struct timeval *start, struct timeval *end) { | |
return (end->tv_sec * 1000000l + end->tv_usec) - (start->tv_sec * 1000000l + start->tv_usec); | |
} |
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
#!/usr/bin/python | |
import requests | |
sources = [ | |
'http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext', | |
'http://hosts-file.net/.%5Cad_servers.txt', | |
'https://adaway.org/hosts.txt', | |
'http://winhelp2002.mvps.org/hosts.txt', | |
'http://sysctl.org/cameleon/hosts', |
OlderNewer