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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| ''' | |
| codecademy- Practice makes perfect- Listing Your Problems [11--15] | |
| ''' | |
| ''' | |
| def count(sequence,item): | |
| found = 0 | |
| for i in sequence: | |
| if i==item: | |
| found = found +1 |
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
| from random import randint | |
| board = [] | |
| for x in range(5): | |
| board.append(["O"] * 5) | |
| def print_board(board): | |
| for row in board: | |
| print " ".join(row) |
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
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " Maintainer: amix the lucky stiff | |
| " http://amix.dk - amix@amix.dk | |
| " | |
| " Version: 3.6 - 25/08/10 14:40:30 | |
| " | |
| " Blog_post: | |
| " http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc | |
| " Syntax_highlighted: | |
| " http://amix.dk/vim/vimrc.html |
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
| <form id="search-form"> | |
| <input id="query" type="text" placeholder="正则搜索"></input> | |
| <button type="submit" class="icon-search"></button> | |
| </form> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| var entries = null; | |
| function htmlEscape(s) { | |
| return String(s).replace(/[&<>"'\/]/g, function(s) { |