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
public static final String SPACE = "[\\s\u3000]"; | |
public static final String NUMBER = "[0-9\uff10-\uff19]"; // 0-90-9 | |
public static final String HYPHEN = "[-\uff0d\u2212]"; | |
public static final String NOT_NUMBER_OR_HYPHEN = "[^" + NUMBER.substring(1, NUMBER.length()-1) + HYPHEN.substring(1); | |
public static final String NUMBERS = "([0-9\uff10-\uff19\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+)"; // 0-90-9一二三四五六七八九 | |
public static final String CHOUME = "\u4e01\u76ee"; // 丁目 | |
public static final String BANCHI = "\u756a\u5730?"; // 番地 | |
public static final String GOU = "\u53f7"; // 号 |
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
export ANDROID_HOME=/Applications/Android\ Studio.app/sdk/ | |
cd facebook-android-sdk-3.14 | |
gradle facebook:build | |
mv facebook/build/libs/facebook.aar facebook/build/libs/facebook-3.14.aar | |
mvn install:install-file -Dfile=facebook/build/libs/facebook-3.14.aar -DgroupId=com.facebook -DartifactId=android-sdk -Dversion=3.14 -Dpackaging=aar |
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
__author__ = 'purbo' | |
import os | |
import time | |
import threading | |
import urllib | |
import re | |
import logging | |
from pyftpdlib.authorizers import DummyAuthorizer | |
from pyftpdlib.handlers import FTPHandler |
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
# adapted from following sources: | |
# https://github.com/jverkoey/iOS-Framework | |
# http://codefriend.blogspot.jp/2011/09/creating-ios-framework-with-xcode4.html | |
# http://www.cocoanetics.com/2010/04/making-your-own-iphone-frameworks/ | |
# "No architecture.." error resolved by trying some of these: | |
# http://stackoverflow.com/questions/6151549/how-can-i-build-a-specific-architecture-using-xcodebuild | |
set -e | |
set +u |
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
# adapted from following sources: | |
# https://github.com/jverkoey/iOS-Framework | |
# http://codefriend.blogspot.jp/2011/09/creating-ios-framework-with-xcode4.html | |
# http://www.cocoanetics.com/2010/04/making-your-own-iphone-frameworks/ | |
# "No architecture.." error resolved by trying some of these: | |
# http://stackoverflow.com/questions/6151549/how-can-i-build-a-specific-architecture-using-xcodebuild | |
set -e | |
set +u |
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
#include <stdint.h> | |
uint64_t doubleToBits(double x) { | |
const union { double f; uint64_t i; } xUnion = { .f = x }; | |
return xUnion.i; | |
} | |
uint32_t floatToBits(float x) { | |
const union { float f; uint32_t i; } xUnion = { .f = x }; | |
return xUnion.i; |
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
static NSArray *objectRegistry; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
objectRegistry = [[NSArray alloc] initWithObjects:obj1, obj2, nil]; | |
}); | |
return objectRegistry[index]; |
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
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation | |
{ | |
return (interfaceOrientation == UIInterfaceOrientationPortrait); | |
} | |
- (NSUInteger)supportedInterfaceOrientations { | |
return UIInterfaceOrientationMaskPortrait; | |
} |
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
- (NSArray *)fetchRecordsForEntity:(NSString *)entityName | |
{ | |
return [self fetchRecordsForEntity:entityName orderBy:nil]; | |
} | |
- (NSArray *)fetchRecordsForEntity:(NSString *)entityName orderBy:(NSString *)column | |
{ | |
NSError *error = nil; | |
NSManagedObjectContext *managedObjectContext = [self managedObjectContext]; | |
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
/** | |
* 非同期的にユーザーを登録する。 | |
*/ | |
- (void)registerUserUsingClient:(MMGClient *)client | |
{ | |
[client registerUserWithId:@"baabaa" | |
name:@"Baa Baa Black Sheep" | |
email:@"baabaa@blacksheep.com" | |
password:@"moomoo" | |
delegate:self]; |
NewerOlder