This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let t = (1, 2, 3) // Anonymous tuple | |
let n = (x: 1, y: 2, z: 3) // Named tuple | |
func fn(_ a : Int, _ b : Int, _ c : Int) { // Separate params | |
print(a, b, c) | |
} | |
func tfn(_ t: (a : Int, b : Int, c : Int)) { // Single param | |
print(t.a, t.b, t.c) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////// | |
// File 1 | |
public class Base { | |
public struct Overridable { // Do not store | |
private init() {} | |
} | |
public struct Protected { // OK to store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
ObjC.import('Foundation'); | |
var fm = $.NSFileManager.defaultManager; | |
var app = Application.currentApplication(); | |
app.includeStandardAdditions = true; | |
var path = $.NSString.alloc.initWithUTF8String(app.pathTo(this)).stringByDeletingLastPathComponent.js + "/"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[10, "en-US", "F", "" , "Ava" , "com.apple.ttsbundle.Ava-premium"], | |
[10, "en-US", "F", "Siri", "Nicky" , "com.apple.ttsbundle.siri_female_en-US_premium"], | |
[10, "en-US", "F", "" , "Allison" , "com.apple.ttsbundle.Allison-premium"], | |
[10, "en-US", "F", "" , "Susan" , "com.apple.ttsbundle.Susan-premium"], | |
[10, "en-US", "F", "" , "Samantha" , "com.apple.ttsbundle.Samantha-premium"], | |
[10, "en-US", "M", "Siri", "Aaron" , "com.apple.ttsbundle.siri_male_en-US_premium"], | |
[10, "en-US", "M", "" , "Tom" , "com.apple.ttsbundle.Tom-premium"], | |
[10, "en-GB", "F", "" , "Serena" , "com.apple.ttsbundle.Serena-premium"], | |
[10, "en-GB", "F", "" , "Kate" , "com.apple.ttsbundle.Kate-premium"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Server-Sent Events | |
type RequestEvent = Deno.RequestEvent; | |
type Connection = Deno.Conn; | |
type StreamController = ReadableStreamDefaultController<Uint8Array>; | |
const encoder = new TextEncoder(); | |
export class EventConnection { | |
request: RequestEvent; | |
controller: StreamController | undefined; |
OlderNewer