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 rx.internal.util.unsafe; | |
import java.lang.reflect.Field; | |
public class Unsafe { | |
public int getIntVolatile(Object obj, long offset) { | |
return 0; | |
} | |
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
var http = require('http'); | |
var sys = require('sys'); | |
server = http.createServer(function(request, response) { | |
sys.log(request.connection.remoteAddress + ": " + | |
request.method + " " + | |
request.url); | |
var proxy = http.createClient(80, request.headers['host']); |
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 <string.h> | |
#include <malloc.h> | |
char * rot(const char *origStr, int shift) { | |
char *newStr = (char*)malloc(strlen(origStr) + 1); | |
int i = 0; | |
while(origStr[i]) { | |
if('a' <= origStr[i] && origStr[i] <= 'z') { | |
newStr[i] = (origStr[i] - 'a' + shift)%26 + 'a'; |
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 <malloc.h> | |
#include <assert.h> | |
void printArray(int *array, int low, int high) { | |
while(low <= high) { | |
printf("%d ", array[low++]); | |
} | |
printf("\n"); | |
} | |
void swap(int *a, int *b) { |
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 <malloc.h> | |
int nextPrime(int i, char *sieve, int max) { | |
while(i < max && !sieve[i]) { | |
i++; | |
} | |
return i; | |
} | |
void setNotPrime(int i, char *sieve, int max) { |
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
var fs = require("fs"); | |
/** | |
* Asyncronous file appender in node js that allows you to easily append to a file | |
* without doing it all once | |
*/ | |
var Appender = function(filename) { | |
var queue = Array(); | |
var isOpen = false; | |
var curObj = this; |