This file contains 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
// | |
// UIView+CommonDrawing.h | |
// Contacts Plus | |
// | |
// Created by Tony Arnold on 4/08/10. | |
// Copyright 2010 The CocoaBots. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.052 0.489 0.482 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.432 0.325 0.276 1</string> |
This file contains 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
/* | |
asynctask.m -- sample code that shows how to implement asynchronous stdin, stdout & stderr streams for processing data with NSTask | |
compile with: | |
gcc -Wall -O3 -x objective-c -fobjc-exceptions -framework Foundation -o asynctask asynctask.m | |
./asynctask | |
./asynctask > asynctask-output.txt 2>&1 |
This file contains 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
//Copyright (c) 2010, Allen Ding | |
//All rights reserved. | |
// | |
//Redistribution and use in source and binary forms, with or without | |
//modification, are permitted provided that the following conditions are met: | |
// | |
//1. Redistributions of source code must retain the above copyright notice, this | |
//list of conditions and the following disclaimer. | |
// |
This file contains 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
/* | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
Copyright (C) 2011-2012 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |
This file contains 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
# 適用於【鼠鬚管】0.9.13+ | |
# 位置:~/Library/Rime/squirrel.custom.yaml | |
# 用法:想要哪項生效,就刪去該行行首的#字符,但注意保留用於縮進的空格 | |
patch: | |
# us_keyboard_layout: true # 鍵盤選項:應用美式鍵盤佈局 | |
# show_notifications_when: growl_is_running # 狀態通知,默認裝有Growl時顯示,也可設爲全開(always)全關(never) | |
# style/horizontal: true # 候選窗横向顯示 | |
# style/inline_preedit: false # 非內嵌編碼行 | |
# style/font_face: "儷黑 Pro" # 我喜歡的字體名稱 |
This file contains 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
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
This file contains 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
#!/usr/bin/python | |
# fix-xcode | |
# Rob Napier <[email protected]> | |
# Script to link in all your old SDKs every time you upgrade Xcode | |
# Create a directory called /SDKs (or modify source_path). | |
# Under it, put all the platform directories: | |
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
# Under those, store the SDKs: |
This file contains 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
" Search Dash for word under cursor | |
function! SearchDash() | |
let s:browser = "/usr/bin/open" | |
let s:wordUnderCursor = expand("<cword>") | |
let s:url = "dash://".s:wordUnderCursor | |
let s:cmd ="silent ! " . s:browser . " " . s:url | |
execute s:cmd | |
redraw! | |
endfunction | |
map <leader>d :call SearchDash()<CR> |
This file contains 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
class TreeNode{ | |
int val; | |
TreeNode left, right; | |
TreeNode(int val){ | |
this.val = val; | |
} | |
} | |
public String serialize(TreeNode root){ | |
StringBuilder sb = new StringBuilder(); |
OlderNewer