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
debug_testing.ccmain312STARTING UP Process thread | |
debug_testing.ccProcessRequest190 | |
2016-09-08.15:05:39ProcessDebugUserRequest{"type": "json", "client": "Chrome Canary", "counter":0} | |
"Logged from JS world" "Chrome Canary" 0 | |
debug_testing.ccProcessRequest190 | |
2016-09-08.15:05:39ProcessDebugUserRequest{"type": "json", "client": "Chrome Canary", "counter":1} | |
"Logged from JS world" "Chrome Canary" 1 | |
debug_testing.ccProcessRequest190 | |
2016-09-08.15:05:39ProcessDebugUserRequest{"type": "json", "client": "Chrome Canary", "counter":2} | |
"Logged from JS world" "Chrome Canary" 2 |
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 <cassert> | |
#include <cstdio> | |
#include <cstring> | |
#include <fstream> | |
#include <iostream> | |
#include <map> | |
#include <string> | |
#include <vector> | |
#include <include/v8.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
#!/usr/bin/env python | |
import argparse | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import datetime as dt | |
import json |
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/env escript | |
%% -*- Mode: Erlang; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ | |
%%! -smp enable | |
% Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
% use this file except in compliance with the License. You may obtain a copy of | |
% the License at | |
% | |
% http://www.apache.org/licenses/LICENSE-2.0 | |
% |
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
-module(gen_server_msg). | |
-behaviour(gen_server). | |
-export([start/0, msg/1, msg_recv/1]). | |
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). | |
start() -> | |
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []). |
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
% Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
% use this file except in compliance with the License. You may obtain a copy of | |
% the License at | |
% | |
% http://www.apache.org/licenses/LICENSE-2.0 | |
% | |
% Unless required by applicable law or agreed to in writing, software | |
% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
% License for the specific language governing permissions and limitations under |
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
ERL_NIF_TERM | |
merger_nif_heap_put(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) | |
{ | |
merger_nif_heap_t* mh = NULL; | |
ErlNifBinary keyBin, valBin; | |
int ret; | |
merger_item_t* item = (merger_item_t *) enif_alloc(sizeof(merger_item_t)); | |
if (!item) | |
return merger_make_error(env, MERGER_ATOM_INTERNAL_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
-on_load(init/0). | |
-module(merger). | |
-on_load(init/0). | |
-export([ | |
new/0, new/1, new/2, | |
out/1, | |
in/3, | |
size/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
-module(regis_server). | |
-behaviour(gen_server). | |
-include_lib("stdlib/include/ms_transform.hrl"). | |
-export([start_link/0, stop/0, register/2, unregister/1, whereis/1, | |
get_names/0, lookup/1]). | |
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, | |
code_change/3, terminate/2]). | |
start_link() -> |
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
import sys | |
import json | |
import random | |
import string | |
from couchbase import Couchbase | |
from couchbase import FMT_JSON | |
host = sys.argv[1] | |
bucket = sys.argv[2] |