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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
// MARK : ------------------------------------------------------------ | |
// Defines the Main Contract Interface | |
contract Assignment { | |
// Actors partecipating in the contract. Entities in the real world |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
// Defines basic contract dependecies to initiate | |
contract MarkingSytem { | |
// State variables to hold the initial 3 marks | |
uint public mark1; | |
uint public mark2; | |
uint public mark3; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
contract MarkingSytem { | |
// State variables to hold the initial 3 marks | |
uint public mark1; | |
uint public mark2; | |
uint public mark3; | |
// Flag to notify if first requirement is passed! "marks are with 10 pints of each other" |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
contract MarkingSytem { | |
// State variables to hold the initial 3 marks | |
uint public mark1; | |
uint public mark2; | |
uint public mark3; | |
// Flag to notify if first requirement is passed! "marks are with 10 pints of each other" |
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
#!/bin/sh | |
# | |
if [ -e ".updated_build_number" ] ; then | |
rm ".updated_build_number" | |
fi |
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
#!/bin/sh | |
# | |
if [ ! -e ".updated_build_number" ] ; then | |
touch ".updated_build_number" | |
perl -i -pe 'BEGIN{undef $/;} s/\t<key>CFBundleVersion<\/key>\n\t<string>\K(\d+)/$1+1/em' ./xxxx/xxxx/Info.plist | |
git add ./xxxxx/xxxxx/Info.plist | |
git commit --amend | |
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
func uploadDamageImage(imageData: Data, completion: @escaping UploadDamageImageCompletion) { | |
let url = "\(Config.shared.getBaseUrl())/api/images/damages" | |
print("Uploading damage image") | |
Alamofire.upload(multipartFormData: { multipartFormData in | |
multipartFormData.append(imageData, withName: "image", fileName: "dmg_image", mimeType: "image/jpg") | |
}, to: url, | |
method: .post, | |
encodingCompletion: { result in |
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
private func updateState() { | |
// Make sure all the information is available | |
guard let rentalState = rentalState else { | |
self.state.value = .Unknown | |
return | |
} | |
let isPaymentInProgress = (paymentInProgress ?? false) | |
// Save whether address details should be shown before updating state |
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
enum BookingState: Int, Comparable { | |
// Booking states, mapped from backend state together with check-in/out status and | |
// payment progress. | |
// | |
// NOTE: Should also include review status, which is currently not yet implemented | |
// on the backend. | |
case Started = 0 | |
case CheckOutStarted = 1 |
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
// | |
// SnappCameraView.swift | |
// EdgeDetection | |
// | |
// Created by er on 11/4/17. | |
// Copyright (c) 2017 Erison Veshi | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
NewerOlder