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 UIKit | |
class ViewController: UITableViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
print("Hello") | |
} | |
} |
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 UIKit | |
struct Weather: Decodable { | |
let location: Location | |
let current: Current | |
} | |
struct Location: Decodable { | |
let name: String | |
} |
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 Foundation | |
struct Game { | |
var word: String | |
var incorrectMovesRemaining: Int | |
} |
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
pragma solidity ^0.4.18; | |
contract ToothFairy { | |
address owner ; | |
address mom = 0xd2dE66A09F48A96b8cd429951ca70F79715beBCc; | |
address child = 0x80bFb3c5C9386e687936868A79f2e626F38a4AC2; | |
bool paymentStatusToChild = false; | |
enum ToothStatus {Mouth, WaitingForApproval, Fallen} |
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
pragma solidity ^0.4.18; | |
contract Course { | |
address owner; | |
uint fee; | |
struct personalInfo { | |
string name; | |
uint age; | |
bool active; |
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
pragma solidity ^0.4.18; | |
contract SavingsAccount { | |
address owner; | |
event UpdateStatus(string msg); | |
event UserStatus(string msg, address user, uint amount); | |
function SavingsAccount() public { | |
owner = msg.sender; | |
} |
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
pragma solidity ^0.4.18; | |
contract Paycheck { | |
address[] Employees = [0xd2dE66A09F48A96b8cd429951ca70F79715beBCc, 0x80bFb3c5C9386e687936868A79f2e626F38a4AC2, randomaddress, randomaddress]; | |
mapping (address => uint) WithdrawnAmount; | |
function Paycheck() public payable { | |
} | |
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
pragma solidity ^0.4.19; | |
contract Calculator { | |
Math math = new Math(); | |
function TwoPlusFour() public view returns (int) { | |
return math.add(2,4); | |
} | |
function TwoTimesFour() public view returns (int) { | |
return math.multiply(2,4); |
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
pragma solidity ^0.4.19; | |
contract mortal { | |
address public owner; | |
function mortal() { | |
owner = msg.sender; | |
} | |
modifier onlyOwner { |
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
pragma solidity ^0.4.19; | |
contract callerContract { | |
calledContract toBeCalled = new calledContract(); | |
function receive() public constant returns (uint) { | |
return toBeCalled.getNumber(); | |
} | |
} |