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
"""Simple HTTP Server. SSL, POST, PUT | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
https://github.com/ksmith97/GzipSimpleHTTPServer | |
""" | |
__version__ = "0.6" |
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
// http://stackoverflow.com/questions/8075147/replace-all-nsnull-objects-in-an-nsdictionary | |
#import <Foundation/Foundation.h> | |
@interface NSObject (NullReplacement) | |
/// Replace all NSNull and nil objects in a dictionary or array. | |
- (id)el_replaceNullValues; | |
@end |
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
func printFonts() { | |
let fontFamilyNames = UIFont.familyNames() | |
for familyName in fontFamilyNames { | |
println("------------------------------") | |
println("Font Family Name = [\(familyName)]") | |
let names = UIFont.fontNamesForFamilyName(familyName as! String) | |
println("Font Names = [\(names)]") | |
} | |
} |
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
//tradingview.com pine script | |
study("Average Directional Index with Threshold", shorttitle="ADX") | |
adxlen = input(14, title="ADX Smoothing") | |
dilen = input(14, title="DI Length") | |
dirmov(len) => | |
up = change(high) | |
down = -change(low) | |
truerange = rma(tr, len) | |
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, len) / truerange) | |
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, len) / truerange) |
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
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:" | |
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | \ | |
xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | \ | |
perl -p -e "s/($KEYWORDS)/ warning: \$1/" |