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 PrintFrame(frame) NSLog(@"F X:%f Y:%f W:%f H:%f", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); |
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
// Make sure you have your custom font-file under Resources/fonts | |
var webview = Ti.UI.createWebView({ | |
url: 'local_webview.html' | |
}); | |
var window = Ti.UI.createWindow(); | |
window.add(webview); |
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 "objc_id.hpp" | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
NSString *s1 = @"hello"; | |
NSString *s2 = [@"hell" stringByAppendingString: @"o"]; | |
if ((objc_id(s1) == objc_id(s2))) { | |
NSLog(@"win"); |
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
var TiDrop = { | |
touching: false, | |
position: { | |
elementYStart: 0, | |
elementXStart: 0, | |
yStart: 0, | |
xStart: 0, | |
yCurrent: 0, | |
xCurrent: 0 | |
}, |
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
Ti.API.info("Create a new Carrier Info Object"); | |
var carrierInfo = benCodingNetwork.createCarrierInfo(); | |
Ti.API.info("Get carrier name => " + carrierInfo.carrierName); | |
Ti.API.info("Get mobile country code => " + carrierInfo.mobileCountryCode); | |
Ti.API.info("Get mobile network code => " + carrierInfo.mobileNetworkCode); | |
Ti.API.info("Get ISO country code for cellular service provider => " + carrierInfo.isoCountryCode); | |
Ti.API.info("Mobile service provider supports VOIP => " + carrierInfo.allowsVOIP); |
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
IFS=$'\n' | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}") | |
versionNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${PROJECT_DIR}/${INFOPLIST_FILE}") | |
PATH=${PATH}:/usr/local/bin | |
function checkFileExists () { | |
if [[ ! -e "$1" ]]; then | |
echo "Required file unable to be found: $1" | |
exit 1 | |
fi |
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
$.child_window.open(); |
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
https://speakerdeck.com/jpsim/sourcekit-and-you ("SourceKit and you" by @jpsim) | |
https://speakerdeck.com/icanzilb/appbuilders-non-technical-ways-to-be-a-better-developer ("Non-technical ways to be a better developer" by @icanzlib) | |
https://speakerdeck.com/cesarvaliente/refactoring-wunderlist-for-android-episode-i-the-presentation-layer ("Refactoring Wunderlist for Android" by @CesarValiente) | |
https://speakerdeck.com/akosma/being-a-developer-after-40 ("Being a developer after 40" Medium Post:https://speakerdeck.com/akosma/being-a-developer-after-40 by @akosma) | |
http://seriot.ch/resources/talks_papers/20160426_error_handling.pdf ("Error Handling" by @nst021) | |
https://speakerdeck.com/vixentael/upgrading-approaches-to-the-secure-mobile-architectures ("Upgrading approaches to the secure mobile architecture" by @vixental) | |
http://de.slideshare.net/JohnSundell/dynamic-native-backenddriven-uis-app-builders-2016 ("Dynamic, native, backend-driven UIs" by @johnsundell) | |
https://speakerdeck.com/smashingmag/dirty-tricks-from-the |
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 UIKit | |
typealias TBAsyncBlock = (completionHandler: dispatch_block_t ) -> Void | |
class TBAsyncOperation: NSOperation { | |
private var block : TBAsyncBlock! | |
private var _executing : Bool = false | |
override var executing : Bool { |
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)uploadUserPhoto:(UIImage *)image | |
success:(void (^)(void))success | |
failure:(FailureBlock)failure | |
{ | |
GTSessionManager * manager = [GTSessionManager manager]; | |
NSString* tmpFilename = [NSString stringWithFormat:@"%f", [NSDate timeIntervalSinceReferenceDate]]; | |
NSURL* tmpFileUrl = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:tmpFilename]]; | |
NSString * query = [NSString stringWithFormat:@"%@user?auth_token=%@",[manager.baseURL absoluteString],[[UserManager shared] authToken]]; |
OlderNewer