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
#Есть HTTP-запрос, который выполняется например из терминала | |
##Request | |
-X GET -H "Content-Type: application/x-www-form-urlencoded" -H "X-Parse-Application-Id: ad383bxkAmwAgKgPEqZHjewleWi2bLmNTlctBuky" -H "X-Parse-Master-Key: qTJ3eatgZppvAWqkb82WsCoqG9MqRog2MBXqRHHv" -d "where={\"parentID\":{\"\$exists\":false}}" https://parseapi.back4app.com/classes/category | |
#Пруф: | |
https://www.dropbox.com/s/qd0fkay5nnvf4bc/Terminal.png?dl=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
func sendRequestRequest() { | |
/** | |
Request | |
get https://parseapi.back4app.com/classes/category | |
*/ | |
// Add Headers | |
let headers = [ | |
"X-Parse-Master-Key":"qTJ3eatgZppvAWqkb82WsCoqG9MqRog2MBXqRHHv", | |
"X-Parse-Application-Id":"ad383bxkAmwAgKgPEqZHjewleWi2bLmNTlctBuky", |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import Foundation | |
//Пробовать с разными - раскоментаривать по очереди | |
var someString: String? = "bjbb" | |
//var someString: String? = "3456" | |
//var someString: Int? = 3456 |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import Foundation | |
var dictOfProductsForCategory: [Int: [[String:Any]]] = [:] | |
//I want dictOfProductsForCategory[3183] eventually to be set with 4-items Array | |
//How can I do this? | |
var result1: [[String:Any]]? = [["id":5, "title": "Some Title"], ["id":6, "title": "Another Title"]] |
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 Foundation | |
class ConnectBLE { | |
var callBackFunc: ()->() | |
init(callFunc: @escaping () -> ()){ | |
callBackFunc = callFunc | |
} | |
} |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import Foundation | |
enum MyErrors: Error { | |
case DivisionByZero | |
} | |
//MARK: Описываем функцию, которая будент выкидывать исключение, при попытке деления на ноль. | |
func divide(_ what: Float, by divider: Float) throws -> Float? { |
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
Your code here |
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 ViewControllerAdd: UIViewController { | |
var delegate : DataTableView? | |
@IBAction func exittoVC(_ sender: Any) { | |
delegate?.relodeTableView() | |
self.dismiss(animated: true, completion: nil) | |
} | |
} |
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 ViewControllerAdd: UIViewController { | |
var delegate : DataTableView? | |
@IBAction func exittoVC(_ sender: Any) { | |
delegate?.relodeTableView() | |
self.dismiss(animated: true, completion: nil) | |
} | |
} |
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 Foundation | |
import UIKit | |
class ViewControllerAdd: UIViewController { | |
var delegate : DataTableView? | |
@IBAction func exittoVC(_ sender: Any) { | |
delegate?.relodeTableView() | |
self.dismiss(animated: true, completion: nil) |