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
// | |
// FlowersTableViewController.swift | |
// Flowers++ | |
// | |
// Created by Mohammad Azam on 6/6/14. | |
// Copyright (c) 2014 AzamSharp Consulting LLC. All rights reserved. | |
// www.azamsharp.com | |
// www.youtube.com/azamsharp |
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 PlaygroundSupport | |
typealias JSONDictionary = [String:Any] | |
struct Resource<T> { | |
let url :URL |
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
struct LoginViewModel : ViewModel { | |
var userName :String | |
var password :String | |
} | |
class UIEngine<ViewModel> { | |
var viewModel :ViewModel | |
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
[ | |
{ | |
"id":1, | |
"imageURL":"http:\/\/vignette4.wikia.nocookie.net\/pokemon\/images\/5\/5f\/025Pikachu_OS_anime_11.png", | |
"latitude":29.817841, | |
"longitude":-95.387421, | |
"name":"Pikachu" | |
}, | |
{ | |
"id":2, |
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
<html> | |
<head> | |
<script src="https://unpkg.com/react@15/dist/react.js"></script> | |
<script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script> | |
<script src="https://npmcdn.com/react-router/umd/ReactRouter.min.js"></script> | |
</head> |
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
/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=60983:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/sunec.jar |
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
let text = SCNText(string: item.label, extrusionDepth: 5.0) | |
text.firstMaterial?.diffuse.contents = UIColor.orange | |
text.firstMaterial?.specular.contents = UIColor.orange | |
text.font = UIFont(name: "Optima", size: 44) | |
text.containerFrame = CGRect(x: 0, y: 0, width: 100, height: 44) | |
let textNode = SCNNode(geometry: text) | |
textNode.position = SCNVector3(-0.2 + x, -0.9 + delta, -1) | |
x += 0.12 |
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
I am using ARKit to find horizontal plane and then cover the plane with a grid image using SCNPlane geometry. If I use the following code to update my plane extend then it works fine. | |
func update(anchor :ARPlaneAnchor) { | |
self.planeGeometry.width = CGFloat(anchor.extent.x * Float(scaleX)); // scaleX is 10 | |
self.planeGeometry.height = CGFloat(anchor.extent.z); | |
self.position = SCNVector3Make(anchor.center.x, 0, anchor.center.z); | |
let planeNode = self.childNodes.first! |
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 datetime | |
poolTables = [] | |
class PoolTable: | |
def __init__(self): | |
self.number = 0 | |
self.startDate = 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
ViewController.swift: | |
for item in response.mapItems { | |
let placeLocation = (item.placemark.location)! | |
let placeAnnotationNode = PlaceAnnotation(location: placeLocation) | |
placeAnnotationNode.scale = SCNVector3(0.1, 0.1, 0.1) | |
DispatchQueue.main.async { | |
OlderNewer