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 serial | |
| import time | |
| import sys | |
| # Create a new instance of the serial | |
| ser = serial.Serial() | |
| # Set the COM Port the DMX Pro is listening on | |
| ser.port = '/dev/tty.usbserial-EN175330' |
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
| function doGet() { | |
| var spreadsheet = SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/d/1hN_tx5IVVGJHbEhdKWgBowHwgeVTEQbl9h046ZJNyiE/edit#gid=0'); | |
| var sheet = spreadsheet.getSheets()[0]; | |
| var values = sheet.getSheetValues(1,1, sheet.getLastRow(), 9); | |
| var finalOutput = { | |
| fixtures: [] | |
| }; | |
| for (var y = 0; y < values.length; y++) { |
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 | |
| class MyClass { | |
| func startTimer() { | |
| NSTimer.scheduledTimerWithTimeInterval(2, target: self, selector: #selector(MyClass.onTimer(_:)), userInfo: nil, repeats: false) | |
| } | |
| @objc func onTimer(timer:NSTimer!) { | |
| print("Timer 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
| func makePhoneCall(phoneNumber: String) { | |
| if let phoneURL = NSURL(string: ("tel://" + phoneNumber!)) { | |
| let alert = UIAlertController(title: ("Call " + phoneNumber! + "?"), message: nil, preferredStyle: .Alert) | |
| alert.addAction(UIAlertAction(title: "Call", style: .Default, handler: { (action) in | |
| UIApplication.sharedApplication().openURL(phoneURL) | |
| })) | |
| alert.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: nil)) | |
| self.presentViewController(alert, animated: true, completion: nil) |