(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| - (UIImage *)pspdf_preloadedImage { | |
| CGImageRef image = self.CGImage; | |
| // make a bitmap context of a suitable size to draw to, forcing decode | |
| size_t width = CGImageGetWidth(image); | |
| size_t height = CGImageGetHeight(image); | |
| CGColorSpaceRef colourSpace = CGColorSpaceCreateDeviceRGB(); | |
| CGContextRef imageContext = CGBitmapContextCreate(NULL, width, height, 8, width*4, colourSpace, | |
| kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import Darwin | |
| let handle = dlopen("/usr/lib/libc.dylib", RTLD_NOW) | |
| let sym = dlsym(handle, "random") | |
| let functionPointer = UnsafeMutablePointer<() -> CLong>(sym) | |
| let result = functionPointer.memory() | |
| println(result) |
Let's say alice is a github.com user, with 2 or more private repositories repoN.
For this example we'll work with just two repositories named repo1 and repo2
https://github.com/alice/repo1
https://github.com/alice/repo2
You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.
| NSVisualEffectMaterial constants, and the undocumented materials they coorespond to in various modes: | |
| +----------------------+-------+----------+------+---------+ | |
| | MATERIAL # | LIGHT | LIGHT EM | DARK | DARK EM | | |
| +----------------------+-------+----------+------+---------+ | |
| | | | | | | | |
| | 0 - Appearance Based | 3 | 3 | 5 | 5 | | |
| | | | | | | | |
| | 1 - Light | 3 | 3 | 3 | 3 | | |
| | | | | | | | |
| | 2 - Dark | 4 | 4 | 4 | 4 | |
| 1. Open Terminal | |
| 2. cd to your Xcode project | |
| 3. Execute the following when inside your target project: | |
| find . -name "*.swift" -print0 | xargs -0 wc -l |
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 The Android Open Source Project | |
| ~ | |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
| ~ you may not use this file except in compliance with the License. | |
| ~ You may obtain a copy of the License at | |
| ~ | |
| ~ http://www.apache.org/licenses/LICENSE-2.0 | |
| ~ | |
| ~ Unless required by applicable law or agreed to in writing, software |
| import Swift | |
| /*: | |
| A simple type-erased sequence | |
| */ | |
| let seq = AnySequence([1,2,3]) | |
| /*: | |
| ## Who Needs Types Like That? |