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
function fib (n) { | |
if (n==0 || n==1) { | |
return 1; | |
} else { | |
return fib(n-2) + fib(n-1); | |
} | |
} | |
console.log(fib(3)); |
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
We are all inventors, each sailing out on a voyage of discovery, guided each by a private chart, of which there is no duplicate. The world is all gates, all opportunities. |
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
entire db: | |
mysqldump -u breezelark-p mydb > mydb.sql | |
one table: | |
mysqldump -u lingxi -p mydb mytb> mytb.sql |
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://bugs.mysql.com/bug.php?id=45430 |
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 interval = document.createElement('div'); | |
interval.id = 'interval' | |
interval.style = 'margin-left: 600px;' | |
document.getElementsByClassName('code')[0].appendChild(interval); | |
var start = Date.now(); | |
setTimeout(function () { | |
var interval_time = Math.floor((Date.now() - start)/1000); | |
var minutes = Math.ceil(interval_time/60 - 1); | |
var seconds = interval_time%60; | |
interval.innerHTML = "Oh, you have been cheating: " + minutes + 'minutes ' + seconds + ' seconds!!' |
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
All Databases: | |
SELECT table_schema "Data Base Name", SUM( data_length + index_length) / 1024 / 1024 | |
"Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ; | |
Specify Database: | |
SELECT TABLE_NAME, table_rows, data_length, index_length, round(((data_length + index_length) / 1024 / 1024),2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "db_holmes_admin_dw"; |
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
select * from t where c1 = ? and c2 = ? order by c3; | |
index -- t(c1, c2, c3) | |
http://hi.baidu.com/jadmin/item/8fed8527304d2bd5a517b60a |
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
"char".charCodeAt(0); | |
String.fromCharCode(30058); |
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
Magic the Gathering |
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
时代气质 |