Run
wget https://gist.githubusercontent.com/pyk/19a619b0763d6de06786/raw/b09ce3a6626484adb5339597dfd391d0db9fe3cb/install-oracle-java-8-on-debian-jessie.sh
sh install-oracle-java-8-on-debian-jessie.sh
See the following blog post
| /* The ziggurat method for RNOR and REXP | |
| Combine the code below with the main program in which you want | |
| normal or exponential variates. Then use of RNOR in any expression | |
| will provide a standard normal variate with mean zero, variance 1, | |
| while use of REXP in any expression will provide an exponential variate | |
| with density exp(-x),x>0. | |
| Before using RNOR or REXP in your main, insert a command such as | |
| zigset(86947731 ); | |
| with your own choice of seed value>0, rather than 86947731. | |
| (If you do not invoke zigset(...) you will get all zeros for RNOR and REXP.) |
| NEW_VERSION=206179d | |
| OLD_VERSION=cd5726e | |
| if [ ! -f "${NEW_VERSION}.tar.gz" ]; then | |
| wget https://api.github.com/repos/facebookresearch/fasttext/tarball/${NEW_VERSION} -O ${NEW_VERSION}.tar.gz | |
| else | |
| echo "fastText: ${NEW_VERSION}.tar.gz exists" | |
| fi | |
| if [ ! -d "facebookresearch-fastText-${OLD_VERSION}" ]; then |
| # http://stackoverflow.com/questions/23281050/makefile-warning-warning-file-main-cpp-has-modification-time-2-1e04-s-in-th | |
| # http://stackoverflow.com/questions/4210042/exclude-directory-from-find-command | |
| find . -path ./.git -prune -o -type f -exec touch {} + | |
| char buff[6] = {'h', 'e', 'l', 'l', 'o', '\0'}; | |
| /* or */ | |
| char *buff = "hello"; /* \0 implicitly appended */ | |
| /* or */ | |
| char buff[] = "hello"; |
| # http://llvm.org/apt/ | |
| sudo bash -c "cat >> /etc/apt/sources.list" << LLVMAPT | |
| # LLVM | |
| deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main | |
| deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main | |
| # 3.5 | |
| deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.5 main | |
| deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.5 main | |
| # 3.6 |
| public class roulette { | |
| public static void main(String [] args) { | |
| int n=4; | |
| double [] weight = new double [n]; | |
| weight[0]=0.4; | |
| weight[1]=0.3; | |
| weight[2]=1.2; | |
| weight[3]=0.1; | |
| double max_weight=1.2; | |
| int [] counter = new int[n]; |
Run
wget https://gist.githubusercontent.com/pyk/19a619b0763d6de06786/raw/b09ce3a6626484adb5339597dfd391d0db9fe3cb/install-oracle-java-8-on-debian-jessie.sh
sh install-oracle-java-8-on-debian-jessie.sh
See the following blog post
| // echoserver - A simple TCP echo server written in Go | |
| // | |
| // Build: | |
| // % go build echoserver.go | |
| // | |
| // Usage: | |
| // % ./echoserver 8080 | |
| // | |
| // License: | |
| // BSD 3-clause Revised |
| /* Alternative version of https://github.com/antirez/redis/blob/3.2/src/server.c#L3651-L3666 */ | |
| void usage(void) { | |
| fprintf(stderr, | |
| "Usage: ./redis-server [/path/to/redis.conf] [options]\n" | |
| " ./redis-server - (read config from stdin)\n" | |
| " ./redis-server -v or --version\n" | |
| " ./redis-server -h or --help\n" | |
| " ./redis-server --test-memory <megabytes>\n\n" | |
| "Examples:\n" | |
| " ./redis-server (run the server with default conf)\n" |
| /* indent(1) Profile | |
| * This is a list of options that will be used by indent(1) to formatting the | |
| * C source code. | |
| * | |
| * For complete available options | |
| * https://www.gnu.org/software/indent/manual/html_section/indent_15.html#SEC17 | |
| * | |
| * Copyright 2015 Bayu Aldi Yansyah <[email protected]> | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); |