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
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
// | |
// 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
// | |
// 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
// | |
// 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
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
def main(): | |
# length of unsigned 16 bit int | |
length = 65535 | |
# keep count of how many palindromic numbers there are | |
count = 0 | |
# loop through entire range | |
for i in range(0,length): | |
#cast i to a string and compare reverse | |
if(str(i) == reverseString(str(i))): | |
count += 1 |
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
static int[] bubblesort(int[] numbers) | |
{ | |
int tempVar; | |
for (int i = 0; i < numbers.length; i++) | |
{ | |
for(int j = 0; j < numbers.length; j++) | |
{ | |
if(numbers[i] > numbers[j + 1]) | |
{ | |
tempVar = numbers [j + 1]; |
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
#!/bin/bash | |
if [ $# -ge 2 ] | |
then | |
bash ~/launch.sh -k | |
if [ "$2" == "-f" ] | |
then | |
rm -r $1/ | |
git clone https://github.com/jacks205/$1.git | |
cd ~/$1 && npm install | |
cp ~/local.js ~/$1/config/ |