Skip to content

Instantly share code, notes, and snippets.

@ctku
ctku / initStoryboard.m
Created March 24, 2014 04:29
How to instantiate a storyboard with initial viewController.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// override point for customization after application launch
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
self.window.rootViewController = [sb instantiateInitialViewController];
[self.window makeKeyAndVisible];
@ctku
ctku / demo.py
Created August 1, 2012 21:44 — forked from bwhite/demo.py
Integrating Python + C: Ctypes and Cython
import ctypes
import time
import numpy as np
import example_cython
def mult_sum(a):
b = 0
for i in range(10000):
b += a * i