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
    
  
  
    
  | struct ContentView: View { | |
| @State private var animate = false | |
| var body: some View { | |
| AppleLogo() | |
| .trim(from: 0.0, to: animate ? 1.0 : 0.0) | |
| .stroke( | |
| LinearGradient(gradient: Gradient(colors: [.purple, .blue, .green, .orange]), | |
| startPoint: .bottomLeading, | |
| endPoint: .topTrailing), | 
  
    
      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
    
  
  
    
  | /** | |
| * SwiftShell | |
| * Copyright (c) 2017 Alberto Moral | |
| * Licensed under the MIT license, see LICENSE file | |
| */ | |
| import Foundation | |
| extension Process { | |
| public func shell(command: String) -> String { | 
  
    
      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 | |
| // StackViews | |
| // | |
| // Created by Alberto Moral on 07/05/2017. | |
| // Copyright © 2017 Alberto Moral. All rights reserved. | |
| // | |
| 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
    
  
  
    
  | var arrayA = ["1", "2", "3", "4"] | |
| let arrayB = arrayA | |
| let arrayC = arrayA | |
| print("Array B = Array A") | |
| print("Array C = Array A") | |
| print("Array A reference \(UnsafeMutableRawPointer(mutating: arrayA))") | |
| print("Array B reference \(UnsafeMutableRawPointer(mutating: arrayB))") | |
| print("Array C reference \(UnsafeMutableRawPointer(mutating: arrayC))") | |
| print("If I change the value of Array A adding:") | 
  
    
      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
    
  
  
    
  | require "thor" | |
| class MyCLI < Thor | |
| desc "hello NAME", "say hello to NAME" | |
| def hello(name, from = nil) | |
| puts "Hello #{name}" | |
| puts "from #{from}" if from | |
| end | |
| end | 
  
    
      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
    
  
  
    
  | require 'xcodeproj' | |
| project_name = "New_Project" | |
| project_path = "./New_Project.xcodeproj" | |
| project = Xcodeproj::Project.new(project_path) | |
| project.save() | |
| project.new_target(:application, "New_Project", :ios, "10.0") | |
| project.save() | 
  
    
      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
    
  
  
    
  | func marvelCharacter() { | |
| API.characters(pageSize, offset: offset) | |
| .throttle(2.0, onScheduler: QueueScheduler.mainQueueScheduler) | |
| .on(failed: { error in | |
| // Handle Server Error | |
| }) | |
| .startWithNext { [unowned self] characters in | |
| self.canReloadUI = true | |
| } | |
| } | 
  
    
      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
    
  
  
    
  | class HeroesCollectionViewController: UICollectionViewController { | |
| var viewModel = HeroesCollectionViewModel() | |
| ... | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| binding() | |
| viewModel.marvelCharacter() | 
  
    
      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
    
  
  
    
  | var publicationCell = tableView.dequeueReusableCellWithIdentifier("publicatonCell") as PublicationCell | |
| publicationCell.configureWithPublication(user) | 
  
    
      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
    
  
  
    
  | protocol Freak { | |
| func isFreak() -> Bool | |
| } | |
| class Moral: Developer, Freak { | |
| func isFreak() -> Bool { | |
| return true | |
| } | |
| } | 
NewerOlder