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
int main(int argc, char *argv[]) { | |
int retVal = -1; | |
@autoreleasepool { | |
@try { | |
retVal = UIApplicationMain(argc, argv, nil, nil); | |
} | |
@catch (NSException* exception) { | |
NSLog(@"Uncaught exception: %@", exception.description); | |
NSLog(@"Stack trace: %@", [exception callStackSymbols]); |
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
@interface WHYPerson : NSObject | |
@property (nonatomic) NSString *firstName; | |
@property (nonatomic) NSString *lastName; | |
@property (nonatomic) NSDate *dateOfBirth; | |
@property (nonatomic, readonly) NSString *fullName; | |
... | |
@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
#import "WHYPerson.h" | |
... | |
@implmentation WHYPerson | |
... | |
- (NSString *)doSomething { | |
return [NSString stringWithFormat:@"Hello, %@", [self firstName]]; | |
// Can also be done using dot syntax as it's just a wrapper around [self firstName] |
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
@implementation WHYPerson | |
... | |
// This is generated by the compiler (there is no need to put this line in your code) | |
@synthesize firstName; // Shorter version | |
// The above, according to Apple automatic naming convention for instance variables, | |
// is just doing this (add '_' prefix): | |
@synthesize firstName = _firstName; // Longer version |
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
@implementation WHYPerson | |
- (id)init { | |
self = [super init]; | |
if (self) { | |
// It is recommended to use instance variables directly to initialise the object | |
_firstName = ...; | |
_lastName = ...; | |
_dateOfBirth = ...; |
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
02-04 06:43:30.664 9206-12182/com.bjss.williamheng.office365poc W/System.err: com.google.gson.JsonSyntaxException: 2016-04-08 | |
02-04 06:43:30.664 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:81) | |
02-04 06:43:30.674 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:66) | |
02-04 06:43:30.674 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:41) | |
02-04 06:43:30.674 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:103) | |
02-04 06:43:30.674 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:196) | |
02-04 06:43:30.6 |
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
export PS1="\[\033[38;5;10m\]\u\[$(tput sgr0)\]\[\033[38;5;0m\]@\h:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;135m\]\w\[$(tput sgr0)\]\[\033[38;5;0m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]" | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
export GOPATH="$HOME/Code/Go" | |
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home" | |
export PATH="/usr/local/sbin:$GOPATH/bin:$JAVA_HOME/bin:$PATH" | |
alias ls='ls -Gfh' | |
alias mvnn='mvn -DskipTests=true' |
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
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold |
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
// | |
// ViewController.swift | |
// CacheDelegate | |
// | |
// Created by Heng, William (Mobile Developer) on 23/03/2016. | |
// Copyright © 2016 Heng, William (Mobile Developer). All rights reserved. | |
// | |
import UIKit |
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
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set number | |
let g:go_highlight_functions = 1 | |
let g:go_highlight_methods = 1 | |
let g:go_highlight_fields = 1 | |
let g:go_highlight_types = 1 |
OlderNewer