Skip to content

Instantly share code, notes, and snippets.

Tachibana Kaoru TachibanaKaoru

Block or report user

Report or block TachibanaKaoru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View circularasyncdo.swift
let person1 = Person(name: "🐱")
let person2 = Person(name: "🦁")
let person3 = Person(name: "🐷")
let person4 = Person(name: "🐼")
let person5 = Person(name: "🐻")
person1.normalHello()
person2.strongHello()
person3.weakHello()
person4.noescapeHello()
View circularasync.swift
class Person{
var name: String
init(name: String) {
print("--- init \(name) ---")
self.name = name
}
deinit {
View circularnoescapedo.swift
let person1 = Person(name: "🐱")
let person2 = Person(name: "🦁")
let person3 = Person(name: "🐷")
let person4 = Person(name: "🐼")
person1.normalHello()
person2.strongHello()
person3.weakHello()
person4.noescapeHello()
@TachibanaKaoru
TachibanaKaoru / circularnoescape.swift
Created Dec 11, 2018
Circular reference (noescape)
View circularnoescape.swift
class Person{
var name: String
init(name: String) {
print("--- init \(name) ---")
self.name = name
}
deinit {
View circulardo.swift
let person1 = Person(name: "🐱")
let person2 = Person(name: "🦁")
let person3 = Person(name: "🐷")
person1.normalHello()
person2.strongHello()
person3.weakHello()
//結果
View circular.swift
class Person{
var name: String
init(name: String) {
print("--- init \(name) ---")
self.name = name
}
deinit {
View gist:4ffa5dda9b86b4f0ef1a02e064ba34e9
#!/usr/bin/swift
import Foundation
let env = ProcessInfo.processInfo.environment
let manager = FileManager.default
let fileNakami = """
<?xml version="1.0" encoding=\"UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@TachibanaKaoru
TachibanaKaoru / gist:8068948
Created Dec 21, 2013
日本語の変数名
View gist:8068948
int りんご = 5;
int ばなな = 3;
int 合計 = りんご + ばなな;
NSLog(@"合計は%d",合計);
@TachibanaKaoru
TachibanaKaoru / gist:8068947
Created Dec 21, 2013
日本語の変数名その2
View gist:8068947
NSArray* クラス全員 = [[NSArray alloc] init];
for( id 選ばれた人 in クラス全員){
[選ばれた人 description];
}
@TachibanaKaoru
TachibanaKaoru / gist:8068946
Created Dec 21, 2013
タイ語の変数名
View gist:8068946
// タイ語
int แอปเปิล = 5;
int กล้วย = 3;
int รวมทั้งหมด = แอปเปิล + กล้วย;
NSLog(@"รวมทั้งหมด %d",รวมทั้งหมด);
You can’t perform that action at this time.