Oscar Correa: [email protected]
- ios
- objc
- swift (no es necesario saberlo)
- uikit
| const Hapi = require('@hapi/hapi'); | |
| const MongoClient = require('mongodb').MongoClient; | |
| const server = Hapi.server({ | |
| port: 3000, | |
| debug: { | |
| request: ['*'] | |
| } | |
| }); |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "os" |
| post_install do |installer| | |
| installer.pods_project.targets.each do |target| | |
| next unless %w[NonSwift42Pod].include? target.name | |
| target.build_configurations.each do |config| | |
| config.build_settings["SWIFT_VERSION"] = "4.0" | |
| end | |
| end | |
| end |
| // | |
| // BaseGeolocable.swift | |
| // | |
| // Created by Juan Felipe Alvarez Saldarriaga on 11/11/16. | |
| // | |
| import Foundation | |
| import CoreLocation | |
| protocol BaseGeolocable: class, CLLocationManagerDelegate { |
| // objc's continue method signature: - (AWSTask *)continueWithBlock:(AWSContinuationBlock)block; | |
| // swift translate it as: .continue(block: (AWSTask<AWSCognitoIdentityUserPoolSignUpResponse>) -> Any?) | |
| // error: Ambiguous use of 'continue' | |
| pool.signUp(username, | |
| password: password, | |
| userAttributes: attrs, | |
| validationData: nil) | |
| .continue { (task) -> Any? in | |
| } |
Oscar Correa: [email protected]
Oscar Correa: [email protected]
| html2canvas(document.getElementById("an_element_id"), { | |
| onrendered: function(canvas) { | |
| var img = canvas.toDataURL("image/png"); | |
| $.post("http://blah.com", {image_data: img}, function (data, textStatus, jqXHR) { | |
| console.log(arguments); | |
| }); | |
| } | |
| }); |