View Example.js
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
// NOTE: First make sure you have jquery included by placing this at the bottom of your .html file, before the </body> and </html> tags | |
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> | |
// The full url path with a difficulty of "easy" | |
url = "https://it3049c-hangman.now.sh?difficulty=easy"; | |
// Performs the ajax request using the GET method with a parameter in the provided url. An object is returned after using the "word" | |
// key to get its value | |
// @param url The url of the address | |
function getWord(url) { |
View API Module
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
' Parses a JSON response and returns an Object | |
Public Function ParseJSON(data As String) As Object | |
' First split the string at the "PlayerFirstSpawn" action | |
Dim splitArray() As String | |
splitArray() = Split(data, "PlayerFirstSpawn") | |
' Get the position of the { character which would have been on the line of "PlayerFirstSpawn" | |
Dim splitTail As String | |
splitTail = InStrRev(splitArray(0), "{ ") | |
View gist:6927604
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
/** | |
* | |
* @author Anthony | |
*/ | |
public class BankAccountDriver { |
View gist:6148729
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
2013-08-03 21:49:25.636 Runway Management System[3482:c07] response: [Array | |
( | |
[file] => Array | |
( | |
[name] => nMjas8cmdRz8USe1js1Y.jpeg | |
[type] => image/jpeg | |
[tmp_name] => /Applications/XAMPP/xamppfiles/temp/phpQ2bf8A | |
[error] => 0 | |
[size] => 20471 | |
) |
View gist:6148596
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
2013-08-03 20:55:09.985 Runway Management System[3084:c07] response: [Array | |
( | |
[oatmeal] => Array | |
( | |
[name] => oatmeal.jpeg | |
[type] => image/jpeg | |
[tmp_name] => /Applications/XAMPP/xamppfiles/temp/phpxwvK4W | |
[error] => 0 | |
[size] => 17264 | |
) |
View gist:6148538
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
2013-08-03 20:30:49.932 Runway Management System[2938:c07] response: [<br /> | |
<b>Fatal error</b>: Call to undefined function sendResponse() in <b>/Applications/XAMPP/xamppfiles/htdocs/RMS/api.php</b> on line <b>70</b><br /> | |
] |
View gist:6148518
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
function upload() | |
{ | |
$signID = isset( $_POST['signID'] ) ? $_POST['signID'] : false ; | |
$uploaddir = '/uploads/'; | |
$file = basename($_FILES['file']['name']); | |
$uploadfile = $uploaddir . $file; | |
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) { | |
sendResponse(200, 'Upload Successful'); |
View gist:6148605
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
2013-08-03 21:01:58.016 Runway Management System[3113:c07] response: [Array | |
( | |
[oatmeal] => Array | |
( | |
[name] => oatmeal.jpeg | |
[type] => image/jpeg | |
[tmp_name] => /Applications/XAMPP/xamppfiles/temp/phpAUzBVC | |
[error] => 0 | |
[size] => 17264 | |
) |
View gist:5490481
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
- (IBAction)btnConvert:(id)sender { | |
NSString *urlString = urlField.text; | |
answerData = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]]; | |
html = [[NSString alloc] initWithData:answerData encoding:NSUTF8StringEncoding]; | |
NSLog(@"Source: %@", html); | |
NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:@"((?<=ansMap\\[\\d] = ')|(?<=ansMap\\[\\d\\d] = '))\\w+" options:NSRegularExpressionAnchorsMatchLines error:NULL]; | |
NSArray *numberOfMatches = [regexp matchesInString:html options:0 range:NSMakeRange(0, [html length])]; |
View gist:5188491
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
// Calls the loadGames method in CheckInViewController | |
UITabBarController *tabBarController = (UITabBarController *)self.presentingViewController; | |
UINavigationController *navController = [tabBarController.viewControllers objectAtIndex:0]; | |
CheckInViewController *checkInViewController = [navController.viewControllers objectAtIndex:0]; | |
SettingsTableViewController *settingsTableViewController = [navController.viewControllers objectAtIndex:0]; | |
[checkInViewController loadGames]; | |
[settingsTableViewController loadSettings]; |
NewerOlder