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
    
  
  
    
  | // Swift4 | |
| let image = UIImage(named: "sample") | |
| let data = image?.pngData() | |
| let data = image?.jpegData(compressionQuality: 0.9) | |
| let uiImage: UIImage = UIImage(data: imageData) | |
| // deprecated | |
| // var imageData: Data = UIImagePNGRepresentation(image) | 
  
    
      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 XCPlayground | |
| import CoreGraphics | |
| import PlaygroundSupport | |
| /* | |
| * Demo | |
| */ | |
| func applyPerspective(_ view: UIView, distance: CGFloat) { | |
| view.layer.transform.m34 = 1.0 / distance | 
  
    
      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
    
  
  
    
  | // | |
| // Obfuscator.swift | |
| // | |
| // Created by Dejan Atanasov on 2017-05-31. | |
| // | |
| import Foundation | |
| class Obfuscator: AnyObject { | |
  
    
      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
    
  
  
    
  | /** | |
| * ESP8266 Scanner - Scans for networks on the 2.4GHz band and prints them out to the console. | |
| * Program it onto your ESP8266, pull up miniterm, the Serial Monitor, etc, and view a list of | |
| * wireless networks on your computer. | |
| * Requres Arduino JSON (http://arduinojson.org/), downloadable from Library Manager or GitHub. | |
| * Or, set OUTPUT_JSON and consume the serial output with your favorite JSON parser. | |
| * | |
| * Created by Leonora Tindall in 2017 for the ESP8266. | |
| * This software is licensed under the GNU General Public License, Version 3.0. | |
| */ | 
  
    
      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
    
  
  
    
  | @discardableResult | |
| @inlinable | |
| private func with<T>(_ value: T, _ builder: (T) throws -> Void) rethrows -> T { | |
| try builder(value) | |
| return value | |
| } | |
| // Use | |
| class MyClass { | |
| var prop = "it's" | 
OlderNewer