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
// spidermonkey: /usr/local/spider-monkey-1.8.5/bin/js -f ./test.js | |
// rhino: java -jar /usr/local/rhino/js.jar -f ./test.js | |
// | |
var smiles_tokenize = function ( ) { | |
var PTE = [ | |
"H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", | |
"Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", | |
"V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", | |
"As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", |
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 smiles_tokenize = (function () { | |
"use strict"; | |
var PTE = [ | |
"H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", | |
"Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", | |
"V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", | |
"As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", | |
"Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", | |
"I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd", "Pm", "Sm", | |
"Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "Hf", |
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 <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <vector> | |
using namespace std; | |
int main(int argc, char* argv[]) | |
{ | |
vector<int> v = {0, 1, 2, 6, 6, 666}; |
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
; gcc sse/sse2 fpu x387 'gcc -msse2 -mfpmath=sse' | |
; | |
; bash-3.1$ gcc -fomit-frame-pointer -msse2 -mfpmath=sse -S test_c_asm-float-or-mmx.c | |
; bash-3.1$ cat test_c_asm-float-or-mmx.s | |
.file "test_c_asm-float-or-mmx.c" | |
.text | |
.globl test | |
.type test, @function | |
test: | |
subl $4, %esp |
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
#!/bin/sh | |
# | |
# /etc/rc.d/rc.local: Local system initialization script. | |
# | |
# Put any local startup commands in here. Also, if you have | |
# anything that needs to be run at shutdown time you can | |
# make an /etc/rc.d/rc.local_shutdown script and put those | |
# commands in there. | |
# | |
# |
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 "SDL.h" | |
struct { | |
SDL_Surface* gfx; | |
SDL_Rect rect; | |
SDL_Rect screen_pos; | |
int dir; | |
} guy; |
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
/* | |
http://www.suckerpunch.com | |
Problem Statement | |
The problem is to write a set of functions to manage a variable number | |
of byte queues, each with variable length, in a small, fixed amount of | |
memory. You should provide implementations of the following four | |
functions: |
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> | |
struct float4 { | |
union { | |
struct { float r, g, b, a; }; | |
struct { float x, y, z, w; }; | |
float at[4]; | |
}; | |
}; |
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 <stdint.h> | |
int main(int argc, char* argv[]) { | |
union { | |
uint8_t bytes[4]; | |
uint32_t valerie; | |
} ub_conversion; |
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> | |
enum { | |
FOO, | |
BAR, | |
LAST | |
}; | |
static void foo() { printf("foo\n"); } | |
static void bar() { printf("bar\n"); } |
OlderNewer