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
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
<!-- | |
.Style1 { | |
font-family: "Courier New", Courier, mono; | |
font-size: small; | |
} | |
--> |
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
package main | |
import "fmt" | |
import "os" | |
func main() { | |
file, _ := os.Open("list.txt", os.O_RDWR, 0644) | |
var b [40000] byte | |
file.Read(&b) | |
fmt.Print(len(&b)) |
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
package main; | |
import "fmt" | |
func Each(arr []int, iterator func(int)) { | |
for i := range arr { | |
iterator(i) | |
} | |
} |
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
# Linux (default) | |
EXE = hello | |
LDFLAGS = -lGL -lGLU -lglut | |
# Windows (cygwin) | |
ifeq ($(OS), "Windows_NT") | |
EXE = hello.exe | |
LDFLAGS = -lopengl32 -lglu32 -lglut32 | |
endif |
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
ips = Array.new | |
ips.push '192.168.13.201' | |
ips.push '192.168.13.202' | |
ips.push '192.168.13.206' | |
ips.push '192.168.13.205' | |
ips.push '192.168.13.211' | |
ips.push '192.168.13.209' | |
ips.push '192.168.13.210' | |
ips.push '192.168.13.217' | |
ips.push '192.168.13.216' |
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
// this function happens on the thread pool | |
// doing v8 things in here will make bad happen. | |
static int DoSomething (eio_req *req) { | |
struct simple_request * sr = (struct simple_request *)req->data; | |
//sleep(2); // just to make it less pointless to be async. | |
//req->result = sr->x + sr->y; | |
req->result = bayesian_test(sr->x, sr->y, sr->name); | |
return 0; | |
} |
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 <iostream> | |
#include <cstring> | |
#include <string> | |
using namespace std; | |
int main() { | |
string xbn_filename; | |
string line_str; | |
string block_str; |
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
<DISTRIBUTIONS> | |
<DIST TYPE="discrete"> | |
<PRIVATE NAME="Alarm"/> | |
<CONDSET> | |
<CONDELEM NAME="Burglary"/> | |
<CONDELEM NAME="Earthquake"/> | |
</CONDSET> | |
<DPIS> | |
<DPI INDEXES="0 0 ">0.95 0.05 </DPI> |
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
corwin:naclray1 ray$ ./scons | |
scons: Reading SConscript files ... | |
scons: done reading SConscript files. | |
scons: Building targets ... | |
/Users/ray/projects/native_client_sdk_0_5_1052/toolchain/mac_x86/bin/nacl-g++ -o dbg_x86_32/naclray1.o -c -std=gnu++98 -Wno-long-long -Wall -Wswitch-enum -pthread -O0 -g -m32 -D_GNU_SOURCE=1 -D__STDC_FORMAT_MACROS=1 -D_BSD_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=600 naclray1.cc | |
naclray1.cc: In member function 'virtual void Naclray1Instance::HandleMessage(const pp::Var&)': | |
naclray1.cc:59: error: 'FileIO' is not a member of 'pp' | |
naclray1.cc:59: error: expected ';' before 'file1' | |
scons: *** [dbg_x86_32/naclray1.o] Error 1 | |
scons: building terminated because of errors. |
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
corwin:naclray1 ray$ ./scons | |
scons: Reading SConscript files ... | |
scons: done reading SConscript files. | |
scons: Building targets ... | |
/Users/ray/projects/native_client_sdk_0_5_1052/toolchain/mac_x86/bin/nacl-g++ -o dbg_x86_32/naclray1.o -c -std=gnu++98 -Wno-long-long -Wall -Wswitch-enum -pthread -O0 -g -m32 -D_GNU_SOURCE=1 -D__STDC_FORMAT_MACROS=1 -D_BSD_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=600 naclray1.cc | |
naclray1.cc: In member function 'virtual void Naclray1Instance::HandleMessage(const pp::Var&)': | |
naclray1.cc:59: error: 'FileIO' is not a member of 'pp' | |
naclray1.cc:59: error: expected ';' before 'file1' | |
scons: *** [dbg_x86_32/naclray1.o] Error 1 | |
scons: building terminated because of errors. |
OlderNewer