I hereby claim:
- I am zsiegel on github.
- I am zac_siegel (https://keybase.io/zac_siegel) on keybase.
- I have a public key ASCYByFxKK6PPTljWeUDyY0yPJ2Ynh1Go0j-IqN-T2TbNwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
task('increaseVersionCode') << { | |
def manifestFile = file("src/main/AndroidManifest.xml") | |
def pattern = Pattern.compile("versionCode=\"(\\d+)\"") | |
def manifestText = manifestFile.getText() | |
def matcher = pattern.matcher(manifestText) | |
matcher.find() | |
def versionCode = Integer.parseInt(matcher.group(1)) | |
android.defaultConfig.versionCode = versionCode + 1 | |
println "Setting version code to ${android.defaultConfig.versionCode}" | |
def manifestContent = matcher.replaceAll("versionCode=\"" + android.defaultConfig.versionCode + "\"") |
CGFloat GetLineHeightForFont(CTFontRef iFont) | |
{ | |
CGFloat lineHeight = 0.0; | |
check(iFont != NULL); | |
// Get the ascent from the font, already scaled for the font's size | |
lineHeight += CTFontGetAscent(iFont); | |
// Get the descent from the font, already scaled for the font's size |
public void setupStrictMode() { | |
StrictMode.enableDefaults(); | |
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() | |
.detectAll() | |
.penaltyLog() | |
.penaltyDeath() | |
.build()); | |
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { | |
teamSelector.getViewTreeObserver().removeOnGlobalLayoutListener(this); | |
} else { | |
teamSelector.getViewTreeObserver().removeGlobalOnLayoutListener(this); | |
} |
function (doc, req) { | |
if(doc._deleted){ return true; } | |
//YOUR CUSTOM LOGIC HERE | |
return false; | |
} |
CAShapeLayer *layer = [CAShapeLayer layer]; | |
NSUInteger cornersToRound = UIRectCornerTopLeft | UIRectCornerBottomLeft; | |
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.bounds | |
byRoundingCorners:cornersToRound | |
cornerRadii:CGSizeMake(5.0, 5.0)]; | |
layer.path = path.CGPath; | |
self.layer.mask = layer; |
CAShapeLayer *layer = [CAShapeLayer layer]; | |
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerBottomLeft) cornerRadii:CGSizeMake(5.0, 5.0)]; | |
layer.path = path.CGPath; | |
self.layer.mask = layer; | |