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
http://stackoverflow.com/questions/21964709/how-to-change-default-java-version | |
First run | |
/usr/libexec/java_home -V | |
Pick the version you want to be the default (1.6.0_65-b14-462 for arguments sake) then: | |
export JAVA_HOME=`/usr/libexec/java_home -v 1.6.0_65-b14-462` |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>simple</title> | |
<link rel="stylesheet" href="css/jquery.mobile-1.0.1.css" /> | |
<script src="js/libs/jquery-1.7.1.js"></script> | |
<script src="js/libs/jquery.mobile-1.0.1.js"></script> | |
</head> |
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
# Given an Excel file... iterate over each cell that has a formula | |
# and collect all the unique formula signatures | |
# formula signature are in RPN and shown as | |
# => Ref#UnaryMinus#Ref#Multiply#Int#Int#Power#Divide#Ref#Multiply | |
# => Ref#Ref#Multiply#Ref#Ref#Multiply#Subtract#Parenthesis#Ref#Multiply#Int#Int#Power#Divide#Ref#Subtract | |
# => Ref#Ref#Multiply#Ref#Ref#Multiply#Subtract#Parenthesis#Ref#Multiply#Int#Int#Power#Divide#Ref#Multiply#Ref#Subtract | |
# => Ref#Ref#Multiply#Int#Int#Power#Divide | |
# => Ref#Area#Attr#Ref#Multiply#Ref#Multiply#Parenthesis#Divide | |
# => Ref#Area#Attr#Ref#Multiply#Int#Int#Power#Divide#Ref#Multiply#Parenthesis#Divide | |
# => Ref#Area#Attr#Ref#Multiply#Int#Int#Power#Divide#Parenthesis#Divide |
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
value = 0 | |
result = [100, -20, -20, 50, 70].map((e, i) -> | |
value += e | |
).shift() | |
console.log result |
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
(\$?[A-Z]{1,}\$?[0-9]{1,}):? |
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
class CellRange | |
LETTERS = ('A'..'ZZ').to_a | |
attr_reader :max_col, :min_col, :max_row, :min_row | |
def initialize(cells) | |
@cells = cells |
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
./configure CC="gcc -arch i386 -arch x86_64" CXX="g++ -arch i386 -arch x86_64" CPP="gcc -E" CXXCPP="g++ -E" --prefix=/usr/local |
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
# HELPER FUNCTIONS | |
as.week_of_month <- function(d) { | |
day <-format(d,"%d") | |
val <- ((as(day,"numeric")-1)/7)+1 | |
val <- as(val,"integer") | |
val <- as(val,"character") | |
} | |
# then to convert to a date use |
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
" To start vim without using this .vimrc file, use: | |
" vim -u NORC | |
" | |
" To start vim without loading any .vimrc or plugins, use: | |
" vim -u NONE | |
" | |
" Use vim settings, rather then vi settings (much better!) | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible |
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
void setup() { | |
size(16,16); | |
noLoop(); | |
noStroke(); | |
colorMode(HSB,360,100,100); | |
} | |
void draw() { |
NewerOlder