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
var Gun = require( ".." ); | |
var gun = new Gun(); | |
var db = gun.get( "db" ); | |
var player1Node = gun.get( "player1" ); | |
var player2Node = gun.get( "player2" ); | |
var players = db.get( "players" ); |
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
function call | |
function { arg1: 3, arg2: 4 } | |
{ | |
arg1: 3, | |
arg2: 4 | |
} |
- when passing arrays as pointers, include passing the length.
- function handleBuffer( char*buffer, size_t length );
- conventions in C libraries typically follow
- (destination, source) as in destination = source;
- (state object, int arguments ) as in the state object for the function should be the first parameter.
(All in one) https://github.com/d3x0r/micro-C-Boost-Network
Node.JS plugin https://github.com/d3x0r/sack.vfs#sackvfs https://npmjs.com/package/sack.vfs npm install sack.vfs https://github.com/d3x0r/sack.vfs#websocket-module HTTP is a secondary to websocket, if not upgrade, check for get/etc... Although Express is a more feature-rich environment, this can serve static content and provide websocket connectivity.
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
// | |
// call initRowPerms( [], /* number of columns to permutate */, /* number from */, /*number to */ ) | |
// | |
//---------------------------------------------------------------------------- | |
// generate combinations to a callback | |
//---------------------------------------------------------------------------- | |
function getCombinations(cb, cols, from, to) { | |
var indexes = []; | |
for (var n = 0; n < cols; n++) indexes.push(from); |
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 <windows.h> // GetTickCount(); | |
struct primes { | |
int last; | |
int checkTo; | |
long long primes[100000]; | |
}; | |
struct primes * getPrimes( void ) { |
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
// make #if conditions spanning files a warning... | |
// also unbalanced #endif statements.... | |
#ifndef __GCC__ | |
//#include <conio.h> | |
#endif | |
#if defined( _WIN32 ) | |
// getmodulefilename | |
#include <windows.h> | |
#include <direct.h> | |
#endif |
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
<HTML> | |
<meta charset="utf-8"/> | |
<BODY> | |
</BODY> | |
<SCRIPT> | |
function makeNode( extra ) { | |
var svg = document.createElementNS( "http://www.w3.org/2000/svg","svg" ); |
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 <stdlib.h> | |
#include <string.h> | |
// strdup isn't 'standard'. | |
//extern char *strdup(char*); | |
/* | |
* usage: | |
* function f( char *argString ) { | |
* int argc; |