View app.js
This file contains 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 React from 'react'; | |
import './App.css'; | |
function App() { | |
return ( | |
<div className="App"> | |
<input type="text" /> | |
</div> | |
); | |
} |
View factory-pattern-swift.swift
This file contains 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
//: Playground - noun: a place where people can play | |
import UIKit | |
protocol Human { | |
var name : String {get set} | |
func run() | |
func eat() | |
func sleep() |
View hide-login-errors.php
This file contains 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
add_filter('login_errors', create_function('$a', "return null;")); |
View war.swift
This file contains 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 WarCapable { | |
var topSpeed : Double {get set} | |
var shotsPerMinute : Int {get set} | |
} | |
protocol SpyCapable { | |
var numberOfCameras : Int {get set} | |
} | |
class WarTank : WarCapable { |
View war.swift
This file contains 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
// Spy Bike Objects | |
var sp10 = SpyBike() | |
var sp11 = SpyBike() | |
sp11.numberOfCameras = 2 |
View war.swift
This file contains 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 SpyBike : SpyCapable{ | |
var numberOfCameras: Int = 1 | |
} |
View war.swift
This file contains 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
//War tank objects | |
var t10 = WarTank() | |
var t11 = WarTank() | |
t11.topSpeed = 110.0 | |
//Spy Jeep Objects | |
var sj10 = SpyJeep() |
View war.swift
This file contains 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
// Extensions | |
extension WarCapable{ | |
func canTravelFaster(item : WarCapable)->Bool{ | |
return self.topSpeed < item.topSpeed | |
} | |
} |
View war.swift
This file contains 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
//War tank objects | |
var t10 = WarTank() | |
var t11 = WarTank() | |
t11.topSpeed = 110.0 | |
//Spy Jeep Objects | |
var sj10 = SpyJeep() |
View war.swift
This file contains 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 WarCapable { | |
var topSpeed : Double {get set} | |
var shotsPerMinute : Int {get set} | |
} | |
protocol SpyCapable { | |
var numberOfCameras : Int {get set} | |
} | |
class WarTank : WarCapable { |
NewerOlder