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
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"eventyr" ofType:@"txt"]; | |
if (filePath) { | |
NSData *fileData = [NSData dataWithContentsOfFile:filePath]; | |
NSString* words = [[NSString alloc] initWithData:fileData encoding:NSUTF8StringEncoding]; | |
NSMutableArray *lines = [[words componentsSeparatedByString:@"\n"] mutableCopy]; | |
NSMutableArray *possibleMatches = [[NSMutableArray alloc]init]; |
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
CREATE TABLE FaceBook ( | |
uid int(15) NOT NULL, | |
id int(15) NOT NULL, | |
time int(15) NOT NULL, | |
changed_fields varchar(20) NOT NULL, | |
PRIMARY KEY (uid,changed_fields) | |
); |
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
<?php | |
define('VERIFY_TOKEN', 'yourappssecret'); | |
$method = $_SERVER['REQUEST_METHOD']; | |
if ($method == 'GET' && $_GET['hub_mode'] == 'subscribe' && $_GET['hub_verify_token'] == VERIFY_TOKEN) { | |
echo $_GET['hub_challenge']; | |
} else if ($method == 'POST') { | |
if ( isset( $_SERVER['HTTP_X_HUB_SIGNATURE'] ) ) { |
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
<?php | |
define('VERIFY_TOKEN', 'yourappssecret'); | |
$method = $_SERVER['REQUEST_METHOD']; | |
if ($method == 'GET' && $_GET['hub_mode'] == 'subscribe' && $_GET['hub_verify_token'] == VERIFY_TOKEN) { | |
echo $_GET['hub_challenge']; | |
} else if ($method == 'POST') { | |
$updates = json_decode(file_get_contents("php://input"), true); |