I hereby claim:
- I am jackhftang on github.
- I am jackhftang (https://keybase.io/jackhftang) on keybase.
- I have a public key whose fingerprint is 8C74 60F5 FC28 D7A2 89CA 10E0 02FE BC30 FFA2 E954
To claim this, I am signing this object:
const cluster = require('cluster') | |
const N = 8 | |
if(cluster.isMaster){ | |
let workers = {} | |
let globals = [] | |
for(let i=0; i<N; i++) workers[i] = cluster.fork({id: i}); | |
cluster.on('message', (worker, {message, timestamp, to}) => { | |
globals.push({timestamp, message}) | |
globals.sort(function(x,y){ |
const cluster = require('cluster'); | |
const minions = ['alpha', 'beta']; | |
const tHeartBeat = 1000 | |
const tCheck = 1000 | |
const tTimeout = 3000 | |
if (cluster.isMaster) { | |
for (let id of minions) cluster.fork({id}); | |
let lastHeartbeat = {} |
I hereby claim:
To claim this, I am signing this object:
<?php | |
function register() | |
{ | |
if (empty($_POST)) { | |
return register_form(); | |
} | |
if (($msg = validate($_POST)) !== null) { | |
$_SESSION['msg'] = $msg; |
#!/usr/bin/env python3 | |
from multiprocessing import Array | |
from os import fork, wait, _exit | |
from random import randint | |
def merge_sort(type, arr): | |
N = len(arr) | |
# create shared array |
lis = {1, 2, 3, 4}; | |
all = Flatten[ | |
Outer[ List, | |
lis, lis, lis, lis, lis, | |
lis, lis, lis, lis, lis | |
], 9 | |
]; | |
q2[l_] := | |
l[[2]] == 1 && l[[5]] == 3 || |
#define FAILED(x) (!SUCCEEDED(x)) | |
HRESULT BasicFileOpen() | |
{ | |
// CoCreate the File Open Dialog object. | |
IFileDialog *pfd = NULL; | |
HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pfd)); | |
if (FAILED(hr)) return hr; | |
// Create an event handling object, and hook it up to the dialog. |
-- base table | |
CREATE TABLE IF NOT EXISTS tags ( | |
id INT PRIMARY KEY AUTO_INCREMENT, | |
tags VARCHAR(128) | |
); | |
-- prepare data | |
INSERT INTO tags(tags) VALUES (",3,47,1,5,"), ("1,2,3"), (",4,5,6,7"), ("3,4,6,"); | |
-- create procedure |
<div> | |
<ul class="list"></ul> | |
Item: <input type="text" class="input_todo"/> | |
<button class="btn_push">Push</button> | |
<button class="btn_pop">Pop Last</button> | |
<br> | |
<span class="msg"></span> | |
</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/5.4.3/Rx.min.js"></script> |
from bottle import run, post, request | |
from threading import Thread | |
from queue import Queue | |
import datetime | |
import requests | |
import shutil | |
import tempfile | |
from os.path import join | |
import time |