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 |
#!/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".) |
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";
// CalculatorView.swift | |
// as seen in http://nshipster.com/ibinspectable-ibdesignable/ | |
// | |
// (c) 2015 Nate Cook, licensed under the MIT license | |
/// The alignment for drawing an String inside a bounding rectangle. | |
enum NCStringAlignment { | |
case LeftTop | |
case CenterTop | |
case RightTop |
// | |
// Created by Ian Dundas on 16/03/15. | |
// | |
#import "UIImagePickerController+cats.h" | |
#import <AVFoundation/AVFoundation.h> | |
#import "Photos/Photos.h" | |
/* | |
example usage: |
########################################## | |
# | |
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 | |
# | |
# Version 2.82 | |
# | |
# Latest Change: | |
# - MORE tweaks to get the iOS 10+ and 9- working | |
# - Support iOS 10+ | |
# - Corrected typo for iOS 1-10+ (thanks @stuikomma) |
MKMapRect zoomRect = MKMapRectNull; | |
for (id <MKAnnotation> annotation in mapView.annotations) { | |
MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate); | |
MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0, 0); | |
if (MKMapRectIsNull(zoomRect)) { | |
zoomRect = pointRect; | |
} else { | |
zoomRect = MKMapRectUnion(zoomRect, pointRect); | |
} | |
} |
// The trick is to link the DeviceSupport folder from the beta to the stable version. | |
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.1\ \(14B54\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
// Then restart Xcode and recommect your devices. You will need to do that for every beta of iOS 10.1+/Xcode 8. | |
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) |