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
#define NSNullObjects @[@"",@0,@{},@[]] | |
@interface NSNull (InternalNullExtention) | |
@end | |
@implementation NSNull (InternalNullExtention) | |
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
@implementation WeChatView | |
- (id)initWithFrame:(CGRect)frame | |
{ | |
self = [super initWithFrame:frame]; | |
if (self) { | |
UIImageView *logoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo.png"]]; | |
logoImageView.frame = CGRectMake(.0f, .0f, 50.0f, 50.0f); | |
self.backgroundColor = [UIColor grayColor]; | |
[self addSubview:logoImageView]; |
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
require 'formula' | |
class Tsocks < Formula | |
# The original is http://tsocks.sourceforge.net/ | |
# This GitHub repo is a maintained fork with OSX support | |
homepage 'http://github.com/pc/tsocks' | |
head 'https://github.com/pc/tsocks.git' | |
depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3 |
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
import java.lang.reflect.Field; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class AssembleR { | |
public static Map<Integer, String> assemble() { | |
Map<Integer, String> rMap = new HashMap<Integer, String>(); | |
for (Class c : R.class.getClasses()) { | |
String innerClassName = c.getName().split("\\$")[1]; |