Author: Chris Lattner
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
| extension Array where Element == Float { | |
| // @see: HOW TO CREATE A SOUNDCLOUD LIKE WAVEFORM IN SWIFT 3 | |
| // (https://miguelsaldana.me/2017/03/13/how-to-create-a-soundcloud-like-waveform-in-swift-3/) | |
| func downSampled(binSize: Int, multiplier: Float = 1.0) -> [Float] { | |
| let count = self.count | |
| var processingBuffer = [Float](repeating: 0.0, | |
| count: Int(count)) | |
| let sampleCount = vDSP_Length(count) |
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
| window.Clipboard = (function(window, document, navigator) { | |
| var textArea, | |
| copy; | |
| function isOS() { | |
| return navigator.userAgent.match(/ipad|iphone/i); | |
| } | |
| function createTextArea(text) { | |
| textArea = document.createElement('textArea'); |
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
| // | |
| // ViewController.swift | |
| // MP3RecordingSample | |
| // | |
| // Created by Tadashi on 2017/10/13. | |
| // Copyright © 2017 UBUNIFU Inc. All rights reserved. | |
| // | |
| import UIKit | |
| import AVFoundation | |
| import AudioToolbox |
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
| // | |
| // MKMapView+ZoomLevel.swift | |
| // Monizze | |
| // | |
| // Created by Dylan Gyesbreghs on 23/06/2017. | |
| // Copyright © 2017 DGyesbreghs. All rights reserved. | |
| // https://oleb.net/blog/2010/05/set-the-zoom-level-of-mkmapview/ | |
| // | |
| import MapKit |
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
| // | |
| // MKMapViewZoomLevel.swift | |
| // | |
| // Created by Johannes Rudolph on 10.05.17. | |
| // Based on http://troybrant.net/blog/2010/01/set-the-zoom-level-of-an-mkmapview/ | |
| // | |
| import Foundation | |
| import MapKit |
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 | |
| enum CollectionOperator: String { | |
| case avg | |
| case count | |
| case max | |
| case min | |
| case sum |
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
| // | |
| // ContextLabel.swift | |
| // ContextLabel | |
| // | |
| // Created by Cory D. Wiles | |
| // Copyright (c) 2017 Cory D. Wiles. All rights reserved. | |
| // | |
| import Foundation | |
| import UIKit |
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 UIKit | |
| import RealmSwift | |
| class Data: Object { | |
| dynamic var name = "" | |
| ... | |
| dynamic var order = 0 // 並べ替えのためのカラムが必要 | |
| } |