<script type="text/javascript" src="http://connect.facebook.net/en/all.js"></script>
Call FB.init() when $(document).ready().
$(document).ready(function () {
// set up
FB.init({ appId: 'Your Facebook App ID' });
});drink Cocoa pet Python
<script type="text/javascript" src="http://connect.facebook.net/en/all.js"></script>
$(document).ready(function () {
// set up
FB.init({ appId: 'Your Facebook App ID' });
});dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// your code. it will be run on a new thread.
for (NSInteger index = 0; index < 1000; index++) {
// loop
}
});dispatch_get_global_queue() this queue is async. Threads will be run at the same time. You could set the priority 「DISPATCH_QUEUE_PRIORITY_HIGH, DISPATCH_QUEUE_PRIORITY_DEFAULT, DISPATCH_QUEUE_PRIORITY_LOW, DISPATCH_QUEUE_PRIORITY_BACKGROUND」 to the thread.# syntax: object.__dict__
class ClassA(object): email = '' name = '' cls = ClassA() cls.email = 'kelp[at]phate.org' cls.name = 'Kelp' cls.__dict__
# result:
{'email': 'kelp[at]phate.org', 'name': 'Kelp'}@interface TestAppDelegate : UIResponder <UIApplicationDelegate, UITabBarControllerDelegate> @property (strong, nonatomic) UIWindow *window; // ............ @end
UIImage *img = [UIImage imageNamed:@"retina_wood"]; self.view.backgroundColor = [UIColor colorWithPatternImage:img];