In your command-line run the following commands:
brew doctorbrew update
| sudo: required | |
| language: ruby | |
| services: | |
| - docker | |
| before_install: | |
| - echo "Testing Docker Hub credentials" | |
| - docker login -e=$DOCKER_EMAIL -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD |
In your command-line run the following commands:
brew doctorbrew update| // CalculatorView.swift | |
| // as seen in http://nshipster.com/ibinspectable-ibdesignable/ | |
| // | |
| // (c) 2015 Nate Cook, licensed under the MIT license | |
| import UIKit | |
| /// The alignment for drawing an String inside a bounding rectangle. | |
| enum NCStringAlignment { | |
| case LeftTop |
| # My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf | |
| # Scroll History | |
| set -g history-limit 50000 | |
| # show messages for 4 seconds instead | |
| set -g display-time 4000 | |
| # set first window to index 1 (not 0) to map more to the keyboard layout | |
| set-option -g renumber-windows on |
| import Foundation | |
| let size = MemoryLayout<Int16>.stride | |
| let data = Data(bytes: [1, 0, 2, 0, 3, 0]) // little endian for 16-bit values | |
| let int16s = data.withUnsafeBytes { (bytes: UnsafePointer<Int16>) in | |
| Array(UnsafeBufferPointer(start: bytes, count: data.count / size)) | |
| } | |
| let length = data.count * MemoryLayout<Int16>.stride |
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
| # Note: You MUST have curl 7.47+ with http/2 support compiled in | |
| curl -v \ | |
| -d '{"aps":{"alert":"<message>","badge":42}}' \ | |
| -H "apns-topic: <bundle id>" \ | |
| -H "apns-priority: 10" \ | |
| --http2 \ | |
| --cert <certificate file> \ | |
| https://api.development.push.apple.com/3/device/<device token> |