- httpbin.org
- [Post Test Server] (http://posttestserver.com/)
- [Python Simple Webserver] (https://snipt.net/raw/f8ef141069c3e7ac7e0134c6b58c25bf/?nice)
- [Another Simple Python Webserver] (http://fragments.turtlemeat.com/pythonwebserver.php)
- [Test-Http-Server] (https://npmjs.org/package/test-http-server)
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
/** | |
If you’re coming from other platforms and languages, you may be used to working with exceptions for the majority of error handling. | |
When you’re writing code with Objective-C, exceptions are used solely for programmer errors, like out-of-bounds array access or | |
invalid method arguments. | |
see https://developer.apple.com/library/ios/documentation/cocoa/conceptual/ProgrammingWithObjectiveC/ErrorHandling/ErrorHandling.html | |
-Some Delegate Methods Alert You to Errors | |
-Some Methods Pass Errors by Reference | |
-Recover if Possible or Display the Error to the User | |
-Generate your own errors | |
Many methods of the Cocoa and Cocoa Touch classes include as their last parameter a direct or indirect reference to an NSError object. |
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
#!/bin/sh | |
# Current as working as of 2012/4/17 | |
# Xcode 4.3.2 | |
PROJECT_ROOT="$HOME/SomeDirWhereYourProjectLives/XXXXXXXX" | |
WORKSPACE="$PROJECT_ROOT/XXXXXXXX.xcodeproj/project.xcworkspace" | |
CONFIG="AdHoc" | |
SCHEME="XXXXXXXX" |
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
//Singleton Object in Objective-C | |
+ (MyClass *)sharedInstance { | |
static MyClass *_sharedInstance = nil; | |
static dispatch_once_t oncePredicate; | |
dispatch_once(&oncePredicate, ^{ | |
_sharedInstance = [[self alloc] init]; | |
}); | |
return _sharedInstance; | |
} |
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
void Main() | |
{ | |
Person aPerson = new Person(); | |
aPerson.FirstName = "Joe"; | |
aPerson.Age = 21; | |
aPerson.DateOfBirth = DateTime.Now; | |
List<string> values |
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
//Web API Routing notes and example | |
routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{action}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); | |
//================ The Controller ========================================= | |
public class VTRoutingController : ApiController |
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
//In Web API, just like standard MVC project, the route configuration is called from the Global.asx file. | |
//The standard Web API project, there exists both a RouteConfig class, and a WebApiConfig class, both in the Application_Start folder: | |
//The Default MVC Route Template: | |
{controller}/{action}/{id} | |
//The Default Web API Route Template: (Note: there is no {action}) | |
api/{controller}/{id} | |
//The above will work with |
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
http://www.troyhunt.com/2013/09/for-your-security-please-email-your.html | |
http://www.troyhunt.com/2013/09/for-your-security-please-email-your.html | |
http://www.troyhunt.com/2011/11/owasp-top-10-for-net-developers-part-9.html |
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
//Use the startAccelerometerUpdatesToQueue:withHandler: instance method of CMMotionManager. | |
#import <UIKit/UIKit.h> | |
#import <CoreMotion/CoreMotion.h> | |
@interface Retrieving_Accelerometer_DataViewController : UIViewController | |
@property (nonatomic, strong) CMMotionManager *motionManager; | |
@end |