This HOWTO is for Linux systems (Windows is very similar)
- install Java 8 into
/usr/java/jdk1.8.0
- install Elasticsearch 1.1.0
<?php | |
namespace igorw\lusp; | |
// all functions return a pair of [val, env] | |
function evaluate($expr, $env = []) { | |
if (is_string($expr)) { | |
if (is_numeric($expr)) { | |
$val = (float) $expr; |
# I installed phpbrew 1.3.0 since has problems with instlaing extentions using 1.3.1 | |
# see https://github.com/c9s/phpbrew/issues/214 | |
curl -O https://raw.github.com/c9s/phpbrew/master/phpbrew | |
chmod +x phpbrew | |
sudo cp phpbrew /usr/bin/phpbrew | |
phpbrew init | |
source ~/.phpbrew/bashrc |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
module Main where | |
import Control.Applicative ((<*)) | |
import qualified Data.Set as S | |
import Prelude hiding (exp) | |
import Text.Parsec |
# file: /etc/X11/xorg.conf.d/20-intel.conf | |
# source: https://wiki.archlinux.org/index.php/Intel_Graphics#Choose_acceleration_method | |
Section "Device" | |
Identifier "Intel Graphics" | |
Driver "intel" | |
Option "AccelMethod" "uxa" | |
EndSection |
<?php error_reporting(E_ALL); | |
function test() {} | |
$nIter = 1000000; | |
$argNums = [0, 1, 2, 3, 4, 5, 100]; | |
$func = 'test'; | |
foreach ($argNums as $argNum) { |
package main | |
import ( | |
"fmt" | |
) | |
func BinarySearch(target_map []int, value int) int { | |
start_index := 0 | |
end_index := len(target_map) - 1 |