-
merge mix
-
OOP
- extend
- augment
- aggregate
-
bind rbind
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
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a she ll session *as a function* | |
GEM_PATH=$GEM_PATH:/usr/local/rvm/gems/ruby-1.9.2-p290 | |
PATH=$PATH:/usr/local/rvm/gems/ruby-1.9.2-p290/bin | |
GIT_WORK_TREE=$HOME/octopress/ git checkout -f | |
cd $HOME/octopress/ | |
bundle install | |
bundle exec rake generate |
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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Get IP</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
</head> | |
<body> | |
<?php | |
$domains = array('api.twitter.com', 'twitter.com'); |
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
/** | |
* merge sort | |
**/ | |
var arr = [8,7,9,30,13,8,99,124, 5]; | |
//var arr = [1,10,9]; | |
var newArr = []; | |
var ii = 0; |
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
/** | |
* @description check dot whether in a triangle | |
* @author zhiyelee | |
*/ | |
/** | |
* for tri like below: | |
* A | |
* * * | |
* B * * * C |
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
node_modules |
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 animal = { eats: true } | |
var rabbit = { jumps: true } | |
rabbit.__proto__ = animal // inherit | |
console.log(rabbit.eats) // true | |
var animal = { eats: true } | |
rabbit = Object.create(animal); |
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 name="description" content="instanceof cross iframe" /> | |
<meta charset="utf-8"> | |
<title>instanceof cross iframe</title> | |
</head> | |
<body> | |
<iframe id="fr" ></iframe> | |
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
// http://codeforces.com/contest/236/problem/A | |
function judge(str) { | |
var arr = str.split(''); | |
var obj = {}; | |
var len = 0; | |
for (var i = 0; i < arr.length; i++) { | |
if (!obj[arr[i]]) { | |
obj[arr[i]] = 1; | |
len ++; |
OlderNewer