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
#ifdef DEBUG | |
#define LOG(...) NSLog(__VA_ARGS__) | |
#define LOG_PRINTF(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); | |
#define LOG_FUNC NSLog(@"%s", __func__) | |
#define LOG_METHOD_AND_ABORT LOG_METHOD; abort() | |
#else | |
#define LOG(...) | |
#define LOG_PRINTF(FORMAT, ...) | |
#define LOG_FUNC | |
#define LOG_METHOD_AND_ABORT |
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
#ifdef __OBJC__ | |
#import <UIKit/UIKit.h> | |
#import <Foundation/Foundation.h> | |
#import <CoreData/CoreData.h> | |
#endif |
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
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view | |
{ | |
// MKAnnotationViewを拡張した独自Annotation | |
if ([view.annotation isMemberOfClass:[HogeAnnotationEx class]]) { | |
MapPin *pin = (HogeAnnotationEx *)view.annotation; | |
// 独自Annotationにタイプとか定義しとく | |
if (pin.type == hoge) { | |
LOG(@"user"); |
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
<link rel="stylesheet" href="/style/smart/table.css?{($smarty.now|date_format:"%Y-%m-%d %H:%M:%S")}" type="text/css" /> |
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
alias ls='ls --color' | |
export LV='-Ou8 -c' | |
export LESS='-R' | |
bindkey -e | |
bindkey '^R' history-incremental-pattern-search-backward | |
bindkey '^S' history-incremental-pattern-search-forward | |
HISTFILE=~/.zsh_history |
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
if ([UiUtil isNotLessiOS7]) { | |
//UIApplicationBackgroundFetchIntervalMinimum or NN seconds | |
[[UIApplication sharedApplication] setMinimumBackgroundFetchInterval:600]; | |
} | |
- (void)updateAppIconBadge | |
{ | |
LOG(@">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>updateAppIconBadge<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"); | |
// 設定する前に、設定済みの通知をキャンセルする |
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 UIAlertView (UIAlertView_BlocksExtension) | |
typedef void (^UIAlertViewCallback_t)(NSInteger buttonIndex); | |
- (id)initWithTitle:(NSString *)title | |
message:(NSString *)message | |
callback:(UIAlertViewCallback_t)callback | |
cancelButtonTitle:(NSString *)cancelButtonTitle | |
otherButtonTitles:(NSString *)otherButtonTitles, ...; |
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
- (NSDate *)toLocalTime | |
{ | |
NSTimeZone *tz = [NSTimeZone defaultTimeZone]; | |
NSInteger seconds = [tz secondsFromGMTForDate:self]; | |
return [NSDate dateWithTimeInterval:seconds sinceDate:self]; | |
} | |
- (NSDate *)toGlobalTime | |
{ | |
NSTimeZone *tz = [NSTimeZone defaultTimeZone]; |
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
/** | |
* Created by togu on 2013/07/23. | |
*/ | |
public class FormActivity extends Activity implements OnItemSelectedListener { | |
private Spinner birthdayPermission; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |