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 java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.net.Socket; | |
public class Client { | |
public static void main(String[] argv) | |
{ | |
PrintWriter out; | |
BufferedReader in; |
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 "erl_nif.h" | |
// aes.h & aes_core.c & couple of other files are from openssl | |
#include "aes.h" | |
#include <memory.h> | |
#include <string.h> | |
static ERL_NIF_TERM aes_ecb_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) | |
{ | |
ErlNifBinary in, out, key; | |
unsigned char* to_encode; |
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(geometry). | |
-export([startN/1]). | |
ringAgent(Next) -> | |
receive | |
{next, N} when Next =:= undefined -> | |
ringAgent(N); | |
kill -> Next ! kill; | |
M -> | |
io:format("~p received ~p~n", [self(), M]), |
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
pipeline.addLast("encoder", new OneToOneEncoder() { | |
@Override | |
protected Object encode(ChannelHandlerContext channelHandlerContext, Channel channel, Object o) throws Exception | |
{ | |
Server.getStatisticator().increaseResponses(); | |
Response response = (Response) o; | |
byte[] bytes = response.getXML().getBytes(); | |
if (Server.isUseEncoder()) |
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
(define-syntax (lexer-src-pos-kw s) | |
(define (char->ci-pattern c) | |
(list ':or (char-downcase c) (char-upcase c))) | |
(define (string->ci-pattern s) | |
(if (symbol? s) | |
(string->ci-pattern (symbol->string s)) | |
(cons ':: (map char->ci-pattern (string->list s))))) | |
(define (token-name s) |
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 <stdlib.h> | |
#include <string.h> | |
/* Define a constant */ | |
#define NUMBER 110771 | |
int ctoi(char c) | |
{ | |
return (int)c - 48; |
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
// Tested with Opera only! | |
// | |
// ==UserScript== | |
// @name reddit sfw | |
// @description Removes reddits from /r/nsfw & with [NSFW] tag in title | |
// @include http://www.reddit.com/* | |
// ==/UserScript== | |
var items = document.getElementsByClassName("thing"); | |
for (i=0; i < items.length; i++) |
NewerOlder