In your command-line run the following commands:
brew doctor
brew update
In your command-line run the following commands:
brew doctor
brew update
Using MongoDB in golang with mgo |
<?xml version="1.0"?> | |
<catalog> | |
<book id="bk101"> | |
<author>Gambardella, Matthew</author> | |
<title>XML Developer's Guide</title> | |
<genre>Computer</genre> | |
<price>44.95</price> | |
<publish_date>2000-10-01</publish_date> | |
<description>An in-depth look at creating applications | |
with XML.</description> |
/*! * @class XCTestCase | |
* XCTestCase is a concrete subclass of XCTest that should be the override point for | |
* most developers creating tests for their projects. A test case subclass can have | |
* multiple test methods and supports setup and tear down that executes for every test | |
* method as well as class level setup and tear down. | |
* | |
* To define a test case: | |
* | |
* • Create a subclass of XCTestCase. | |
* • Implement -test methods. |
#!/usr/bin/ruby | |
require 'xcodeproj' | |
# ============================================ | |
# !!! I've released a ruby gem that does the same thing, but better. | |
# You can install it by running `gem install xcprovisioner` or | |
# `sudo gem install xcprovisioner` if it asks for sudo rights. | |
# | |
# For more info: https://github.com/thelvis4/XCProvisioner |
/* | |
Joseph Weizenbaum's classic ELIZA chat bot in Swift. | |
Based on the IBM PC BASIC program from CREATIVE COMPUTING by Patricia | |
Danielson and Paul Hashfield, and the Java adaptation by Jesper Juul. | |
Run this script from Terminal: | |
$ swift eliza.swift | |
Press Ctrl-C or Ctrl-D to quit. (Or type "shut up".) |
const char *sql = "SELECT username FROM users where uuid = ?"; | |
sqlite3_prepare_v2(db, sql, -1, &selectUuid, NULL); | |
sqlite3_bind_int(selectUuid, 1, uid); | |
int status = sqlite3_step(selectUuid); |
NSString *uuid = [myConnection getUUID]; | |
NSString *statement = [NSString StringWithFormat:@"SELECT username FROM users | |
where uuid = '%@'",uuid]; | |
const char *sql = [statement UTF8String]; |
+(BOOL)isJailbroken{ | |
#if !(TARGET_IPHONE_SIMULATOR) | |
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/Applications/Cydia.app"]){ | |
return YES; | |
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/Library/MobileSubstrate/MobileSubstrate.dylib"]){ | |
return YES; | |
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/bin/bash"]){ | |
return YES; |
Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.
This document is mainly targeted toward iOS development, but definitely applies to Mac as well.
NSString *foo = @"bar";