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
package com.example; | |
public class Complete { | |
public int i; | |
private String s; | |
public Complete(int i, String s) { | |
this.i = i; | |
this.s = s; | |
} |
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 <unistd.h> | |
#include <signal.h> | |
int signaled = 0; | |
void handler(int ignored) { | |
signaled = 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
(ns load-blancer | |
(:import [org.zeromq ZMQ ZMQ$PollItem ZMQ$Poller])) | |
; the functionality of this is same with zmq-server.clj, but we handle routing manually | |
(defn dequeue! [queue-ref] | |
(dosync | |
(let [q @queue-ref | |
result (peek q) | |
remain (if (= q []) | |
[] |
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
#!/usr/bin/env python | |
import threading, time | |
time1 = 0 | |
def get_time1(): | |
return time1 | |
def get_time2(): |
NewerOlder