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
main(); | |
//Create array of booleans | |
function main(){ | |
var length = 64, | |
cellArray = new Array(length); | |
for(var i = 0; i < cellArray.length; ++i){ | |
cellArray[i] = (i === 31); | |
} | |
//Run through 32 lines of cells |
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
// | |
// ViewController.swift | |
// BluetoothExample | |
// | |
// Created by Mark Jackson on 3/18/15. | |
// Copyright (c) 2015 Mark Jackson. All rights reserved. | |
// | |
import UIKit | |
import CoreBluetooth |
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
// | |
// CustomView.swift | |
// BluetoothExample | |
// | |
// Created by Mark Jackson on 3/18/15. | |
// Copyright (c) 2015 Mark Jackson. All rights reserved. | |
// | |
import UIKit |
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
// | |
// TimeEstimateCell.swift | |
// Routes | |
// | |
// Created by Mark Jackson on 3/21/15. | |
// Copyright (c) 2015 Mark Jackson. All rights reserved. | |
// | |
import UIKit | |
class TimeEstimateCell: UITableViewCell { |
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 fillTrafficIndicatorBase(ref : CGContextRef, rect : CGRect, cornerRadius : CGFloat, colorLight : CGColorRef, colorDark: CGColorRef, fillWidth : CGFloat){ | |
CGContextSaveGState(ref) | |
let gradient : CGGradientRef = CGGradientCreateWithColors(Colors.genericRGBSpace(), [colorLight, colorDark], nil) | |
let path = UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius) | |
path.fill() | |
path.addClip() | |
CGContextDrawLinearGradient(ref, gradient, CGPointMake(CGRectGetMidX(rect), CGRectGetMinY(rect)), CGPointMake(CGRectGetMidX(rect), CGRectGetMaxY(rect)), 0) | |
CGContextRestoreGState(ref) | |
} |
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 scrollViewWillBeginDragging(scrollView: UIScrollView) { | |
self.searchBar.resignFirstResponder() | |
} |
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
// | |
// ViewController.swift | |
// MapDirections | |
// | |
// Created by Mark Jackson on 4/5/15. | |
// Copyright (c) 2015 Mark Jackson. All rights reserved. | |
// | |
import UIKit | |
import MapKit |
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
//How to URL Encode string | |
CFURLCreateStringByAddingPercentEscapes(nil, str, nil, "!*'();:@&=+$,/?%#[]\" ", kCFStringEncodingASCII) |
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
// | |
// Constants.swift | |
// Routes | |
// | |
// Created by Mark Jackson on 3/21/15. | |
// Copyright (c) 2015 Mark Jackson. All rights reserved. | |
// | |
struct Constants{ | |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Xml.Serialization; | |
namespace JanteqTestConsoleApplication | |
{ | |
public class Program |