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
| stackoverflow.com###hot-network-questions | |
| stackoverflow.com##div.community-bulletin |
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
| git log --numstat --author="Ben Clayton" --since "1 month" -- *.m *.h | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' |
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 <UIKit/UIKit.h> | |
| @interface UIImage (AddtionalFunctionalities) | |
| //TintColor... | |
| - (UIImage *)imageWithTint:(UIColor *)tintColor; | |
| //scale and resize... | |
| -(UIImage*)scaleToSize:(CGSize)size; | |
| @end |
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
| /* SIDE BY SIDE PHRICTION EDIT */ | |
| /* add a userstyle with pattern */ | |
| /* L H S */ | |
| /* pos of left-hand editor */ | |
| .phui-box.phui-box-border.mlt.mll.mlr.phui-object-box.phui-object-box-lightblue { | |
| margin-right: 800px !important; | |
| margin-left:0 !important; |
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
| #!/bin/sh | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 (first parameter) (second parameter) e.g. $0 foo bar"; | |
| exit 1; | |
| fi | |
| foo=$1 | |
| bar=$2 |
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
| new Handler(Looper.getMainLooper()).post(new Runnable() { | |
| // stuff for main thread | |
| }); |
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 android.content.Context; | |
| import android.graphics.Canvas; | |
| import android.graphics.ColorFilter; | |
| import android.graphics.Paint; | |
| import android.graphics.RectF; | |
| import android.graphics.drawable.Drawable; | |
| import android.graphics.drawable.StateListDrawable; | |
| import android.util.StateSet; | |
| import android.view.View; |
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
| android { | |
| compileSdkVersion ... | |
| ..... | |
| // Note this section MUST appear before 'buildTypes' in the build.gradle file. | |
| signingConfigs { | |
| release { | |
| storeFile file("filename.keystore") | |
| storePassword "password" |
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
| class MyCellSubclass: UITableViewCell { | |
| @IBOutlet var myNameLabel: UILabel!; | |
| @IBOutlet var myOtherLabel: UILabel!; | |
| // Do not include any inits, or we need to implement | |
| // the required init outself | |
| // http://stackoverflow.com/questions/25126295/swift-class-does-not-implement-its-superclasss-required-members | |
| } |
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
| // Playground - noun: a place where people can play | |
| import UIKit | |
| enum State : String { | |
| case ASLEEP = "asleep", | |
| AWAKE = "awake", | |
| DRUNK = "drunk" | |
| } |