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
| snippet ''' | |
| abbr '''<summary> | |
| ''' <summary>${1:#:summary}</summary> | |
| ''' <returns>${2:#:returns}</returns> | |
| ''' <remarks>${3:#:remarks} </remarks> | |
| ''' <history>${4:Created at: `strftime("%Y-%b-%d")`}</history> | |
| ${5:#:TARGET} | |
| snippet namespace |
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
| $key_codefile = $args[0] | |
| $random = new-Object random | |
| function get_random_word { | |
| $li = 'abcdefghijklmnopqrstuvwxyz' | |
| return $li[$random.next(0, 26)] | |
| } |
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
| ;; | |
| ;; An autohotkey script that provides emacs-like keybinding on Windows | |
| ;; | |
| #InstallKeybdHook | |
| #UseHook | |
| ; Ripped from http://www49.atwiki.jp/ntemacs/pages/20.html | |
| ; Thanks a lot! | |
| SetKeyDelay 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
| # -*- encoding: UTF-8 -*- | |
| require 'net/http' | |
| require 'uri' | |
| require 'rexml/document' | |
| class Weather | |
| @@signs = {"くもり" => "☁" \ |
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 compose(f_t_u, f_u_r): | |
| ''' | |
| :type f_t_u: t -> u | |
| :type f_u_r: u -> r | |
| :rtype: t -> r | |
| >>> comp(lambda a: a + 'oppai', lambda b: b + 'hoge')('') | |
| 'oppaihoge' | |
| >>> comp(comp(lambda a: a+'oppai', lambda b: b+ 'hoge'), lambda x: '[' + x + ']')('') | |
| '[oppaihoge]' |
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
| import java.io.IOException | |
| import com.leapmotion.leap._ | |
| import com.leapmotion.leap.Vector | |
| import com.leapmotion.leap.Frame | |
| ; | |
| import com.leapmotion.leap.Gesture.State | |
| ; |
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
| package main | |
| import ( | |
| "net" | |
| "os" | |
| ) | |
| const ( | |
| RECV_BUF_LEN = 1024 | |
| ) |
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
| data = ['aaa', 'bbb', 'ccc', 'aaa', 'ddd'] | |
| word_and_counts = {} | |
| for word in data: | |
| if word_and_counts.has_key(word): | |
| word_and_counts[word] += 1 | |
| else: | |
| word_and_counts[word] = 1 | |
| for w, c in sorted(word_and_counts.iteritems(), key=lambda x: x[1], reverse=True): |
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
| func routine(quit chan int) { | |
| // do stuff | |
| quit <- 1 | |
| } | |
| func main() { | |
| routineQuit := make(chan int) | |
| go routine(routineQuit) | |
| <-routineQuit // blocks until quit is written to |
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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>aaaa</title> | |
| <link rel="stylesheet" href="./css/main.css" type="text/css" media="screen" charset="utf-8"> | |
| </head> | |
| <body> | |
| <input type="text" class="reset_onfocus" placeholder="aaaaaaaaa"> | |
| <input type="text" class="reset_onfocus" placeholder="aaaaaaaab"> |