| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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 /> | |
| <style> | |
| .box{ | |
| width:250px; | |
| margin-left:25px; | |
| float:left; | |
| display:inline; |
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 animated(id){ | |
| var elem = document.getElementById(id); | |
| var tick = 0; | |
| var timer = setInterval(function(){ | |
| if(tick < 100){ | |
| elem.style.left = elem.style.top = tick + 'px'; | |
| tick ++; | |
| }else{ | |
| clearInterval(timer); |
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
| Very good examples for 'CSS3 Gradient'. http://css-tricks.com/examples/CSS3Gradient/ |
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 check_anagram(x,y): | |
| ''' check_anagram(string,string): check if 2 strings are anagrams''' | |
| try: | |
| if not len(x) == len(y): | |
| return False | |
| chars_dict={} |
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
| # This module includes all the functions that used for test. | |
| def testEqual(a,b): | |
| """testEqual(a,b)--- a : the expression you want to test, b: the value you expect to get""" | |
| if a == b: | |
| print True | |
| else: | |
| print False |
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
| SUFFIXES = { | |
| 1000: ['KB','MB','GB','TB','PB','EB','ZB','YB'], | |
| 1024: ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'] | |
| } | |
| def approximate_size(size, a_kilobyte_is_1024_bytes = True): | |
| '''Convert a file size to human-readable form. | |
| Keyword arguments: | |
| size --- file size in bytes |
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>JS Bin</title> | |
| <!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
| <!--[if IE 7]> <html class="lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
| <!--[if IE 8]> <html class="lt-ie9" lang="en"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> | |
| </head> |
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>JS Bin</title> | |
| <style> | |
| .pass{color:green;} | |
| .fail{color:red;} | |
| </style> | |
| </head> |
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>JS Bin</title> | |
| <style> | |
| li.pass{ | |
| color:green; | |
| } | |
| li.fail{ |