Set up project:
mkdir project
cd project
npm init -y
var path: NSString = NSWorkspace.sharedWorkspace().absolutePathForAppBundleWithIdentifier("com.apple.dt.xcode")! | |
var icon: NSImage = NSWorkspace.sharedWorkspace().iconForFile(path) | |
var data: NSData = icon.TIFFRepresentation! | |
var bitmap: NSBitmapImageRep = NSBitmapImageRep(data: data)! | |
data = bitmap.representationUsingType(NSBitmapImageFileType.NSPNGFileType, properties: [:])! | |
var base64: NSString = "data:image/png;base64," + data.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.allZeros) | |
println(base64) |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using System.IO; | |
public class PlatformSwitcher | |
{ | |
[MenuItem("Platform/PC, Mac and Linux Standalone")] | |
static void SwitchPlatformToDesktop() | |
{ |
import RxSwift | |
example ("Helping Sebastian Roth") { | |
let disposeBag = DisposeBag() | |
// Data model representing the current download progress | |
struct DownloadProgress { | |
var numberOfCompletedDownloads: Int | |
var progress: Float | |
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.
# Author: Zameer Ansari | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |