Something something ABC
- (void)hello {
}
struct InputStreamGenerator : Generator { | |
var inputStream : NSInputStream | |
var chunkSize : Int | |
init(inputStream : NSInputStream, chunkSize : Int) { | |
self.inputStream = inputStream | |
self.chunkSize = chunkSize | |
} | |
from gevent import monkey; monkey.patch_all() | |
import socket | |
from threading import Thread | |
import time | |
import struct | |
ADDR = ('localhost', 8125) | |
closed = False |
- (void)showProfile { | |
SZNavigationController *nav = [SocializeProfileViewController profileViewControllerInNavigationController]; | |
[self presentModalViewController:nav animated:YES]; | |
} |
#!/usr/bin/env python | |
import struct | |
from binascii import a2b_hex, b2a_hex | |
import socket | |
import ssl | |
import time | |
import sys | |
fmt = '!IH32s' |
[Socialize setEntityLoaderBlock:^(UINavigationController *navigationController, id<SocializeEntity>entity) { | |
if ([[entity key] isEqualToString:@"key1"]) { | |
Loader1 *loader1 = [[[Loader1 alloc] initWithEntity:entity] autorelease]; | |
[navigationController pushViewController:loader1 animated:YES]; | |
} else if ([[entity key] isEqualToString:@"key2"]) { | |
Loader2 *loader2 = [[[Loader1 alloc] initWithEntity:entity] autorelease]; | |
[navigationController pushViewController:loader2 animated:YES]; | |
} | |
}]; |
- (void)someMethod { | |
id<SocializeEntity> newEntity = [SocializeEntity entityWithKey:@"newEntity" name:@"New Entity"]; | |
likeButton.entity = newEntity; | |
} |
// | |
// SampleEntityLoader.h | |
// SocializeSDK | |
// | |
// Created by Nathaniel Griswold on 1/11/12. | |
// Copyright (c) 2012 Socialize, Inc. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
#import <Socialize/Socialize.h> |
#import <Socialize/Socialize.h> | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
//set the FB App Id, you can find your FB app Id here: https://developers.facebook.com/apps | |
[Socialize storeFacebookAppId:@"YOUR FB APP ID"]; | |
//your extra code goes here | |
} |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
[Socialize storeUIErrorAlertsDisabled:YES]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(errorNotification:) name:SocializeUIControllerDidFailWithErrorNotification object:nil]; | |
return YES; | |
} | |
- (void)errorNotification:(NSNotification*)notification { | |
NSError *error = [[notification userInfo] objectForKey:SocializeUIControllerErrorUserInfoKey]; | |
NSLog(@"Error: %@", [error localizedDescription]); |