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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test 2 way data binding</title> | |
</head> | |
<body> | |
<div id="app">{{ abc }} - {{ def }} = {{ abc-def }} </div> | |
<button id='add'>add</button> | |
<button id='double'>double</button> | |
<script src='main.js'></script> |
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
// https://stackoverflow.com/questions/9272232/fft-library-in-android-sdk | |
public class FFT { | |
int n, m; | |
// Lookup tables. Only need to recompute when size of FFT changes. | |
double[] cos; | |
double[] sin; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>index</title> | |
</head> | |
<body> | |
<label for="Input">Input</label> | |
<input type="text" name="Input" value="" id="Input"> | |
<ul id="suggestions"> |
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
Ria 89.7 | http://mediacorp.rastream.com/897fm | |
Gold 90.5 FM | http://mediacorp.rastream.com/905fm | |
91.3 Hot FM | http://sph.rastream.com/913fm | |
Kiss 92.0 | http://sph.rastream.com/sph-kiss92 | |
Symphony 92.4 | http://mediacorp.rastream.com/924fm | |
Yes 93.3 | http://mediacorp.rastream.com/933fm | |
93.8 Live | http://mediacorp.rastream.com/938fm | |
Warna 94.2 | http://mediacorp.rastream.com/942fm | |
Class 95.0 | http://mediacorp.rastream.com/950fm | |
95.8 Capital | http://mediacorp.rastream.com/958fm |
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 s = new BouncingCanvasShapesStage(); | |
var option = { | |
particleWidth: 10, | |
particleHeight: 10, | |
}; | |
var benchmark = new BouncingCanvasShapesBenchmark( | |
{ | |
// controller: 'adaptive', | |
// "test-interval": 1000, | |
complexity: 200, |
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
static List<Integer> search(String pattern, String text) { | |
int[] pi = buildTable(pattern); | |
return kmpSearch(text, pattern, pi); | |
} | |
static List<Integer> kmpSearch(String text, String pattern, int[] pi) { | |
List<Integer> res = new ArrayList<>(); | |
int p = 0; | |
for (int i=0;i<text.length();i++) { | |
while (p>0 && text.charAt(i) != pattern.charAt(p)) { |
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
def list_merge_sort(l, start, end): | |
if start >= end - 1: return l | |
m = (start + end) // 2 | |
l = list_merge_sort(l, start, m) | |
l = list_merge_sort(l, m, end) | |
start_head = l | |
start_parent = None | |
mid_head = l |
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
# https://code.google.com/codejam/contest/dashboard?c=635101#s=p0 | |
def solve(inputs): | |
itr = iter(input) | |
a = int(itr.next()) | |
for i in range(a): | |
m, n = map(lambda c: int(c), itr.next().split(' ')) | |
exists = [itr.next() for j in range(m)] | |
targets = [itr.next() for k in range(n)] | |
print 'Case #{}: {}'.format(i+1, _solve(exists, targets)) |
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
[{"body":"It is indeed amazing how much of an impact art has in helping someone find their way around in life. \n\nHere is an example: Mr Barry Yeow had spent over 20 years of his life behind bars for various drug and gang-related activities. He was finally able to turn his life around after he discovered his passion for art.\n\n#SpreadYRLove\n#SecondChancesEveryday\n\nhttps://www.youtube.com/watch?v=rSkOXnHuxZE","liked":false,"link":"https://www.youtube.com/watch?v=rSkOXnHuxZE","likes":46,"from":{"name":"Yellow Ribbon Project Singapore","id":"321854601115"},"image":"https://external.xx.fbcdn.net/safe_image.php?d=AQBHsYQa46pHxS8V&w=720&h=720&url=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrSkOXnHuxZE%2Fmaxresdefault.jpg&cfs=1","create_at":"2016-05-19T23:50:00+0000","id":"321854601115_10153353945481116","shares":7,"comments":1},{"body":"Often times, we judge others without knowing the story behind their actions. This may sometimes cause us more harm, as many of our problems are caused by how we process things around us.\ |
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
[alias] | |
co = checkout | |
l = log --no-merges --pretty=medium --branches=develop,HEAD | |
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --no-merges --branches=develop,HEAD | |
s = status | |
last = log -1 HEAD | |
b = branch | |
br = branch -r | |
cb = checkout -b | |
ss = stash save |