flowchart LR
%% スタイル定義
classDef introVideo fill:#fff0e6,stroke:#f57c00,stroke-width:4px,color:#000;
classDef implementationVideo fill:#e6f3ff,stroke:#1565c0,stroke-width:4px,color:#000;
classDef detailVideo fill:#f5f5f5,stroke:#424242,stroke-width:4px,color:#000;
classDef updateVideo fill:#e8f5e9,stroke:#2e7d32,stroke-width:4px,color:#000;
classDef otherVideo fill:#f5f0ff,stroke:#7b1fa2,color:#000;
This file contains hidden or 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
| import Foundation | |
| let arraySize = 1000000 | |
| let loopCount = 1000 | |
| class Values { | |
| var values = [Int](repeating: 0, count: arraySize) | |
| func foo1() { | |
| values[0] += values[0] | |
| } | |
| func foo2() { |
This file contains hidden or 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
| /// 2分探索を行います。 | |
| /// - Parameters: | |
| /// - value: 探し出す値 | |
| /// - low: 下限インデックス | |
| /// - high: 上限インデックス | |
| /// - access: インデックスの値を返すクロージャー | |
| /// - compare: 値同士を比較するクロージャー。第1引数が第2引数より小さければ負の数、大きければ正の数、同じなら0を返します。 | |
| /// - Throws: 引数に渡したクロージャーが投げたエラー | |
| /// - Returns: 結果のタプル。0番目の要素は見つかったかどうか(見つかればtrue)、1番目の要素は見つかったインデックスまたは見つからなかったときはその値を挿入するべきインデックス | |
| static func binarySearch<T>(value: T, low: Int, high: Int, access: (Int) throws -> T, compare: (T, T) throws -> Int) rethrows -> (Bool, Int) { |
This file contains hidden or 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
| // | |
| // LayoutConstraint.swift | |
| // | |
| // Copyright (c) 2020 Hironori Ichimiya <[email protected]> | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or 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
| import Cocoa | |
| let uriNs1 = "http://example.com/ns1" | |
| let uriNs2 = "http://example.com/ns2" | |
| let root = XMLNode.element(withName: "root") as! XMLElement | |
| root.addNamespace(XMLNode.namespace(withName: "ns1", stringValue: uriNs1) as! XMLNode) | |
| let element = XMLNode.element(withName: "element") as! XMLElement | |
| element.addNamespace(XMLNode.namespace(withName: "ns2", stringValue: uriNs2) as! XMLNode) |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| import 'package:my_app/BlocProvider.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| // This widget is the root of your application. |
This file contains hidden or 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
| // | |
| // CallStackReporter.swift | |
| // DramaticCrash | |
| // | |
| // Copyright (c) 2018 Hironori Ichimiya <[email protected]> | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
NewerOlder