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
| public static String VIDEO_URL = "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear1/fileSequence0.ts"; | |
| private volatile byte[] videoBuffer; | |
| private volatile VideoDownloadListener listener; | |
| private volatile boolean isDownloading; | |
| Runnable downloadVideoRunnable = new Runnable() { | |
| @Override | |
| public void run() { | |
| try{ |
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
| package com.jacks205.mediadatasourceexample; | |
| import android.app.Activity; | |
| import android.media.MediaPlayer; | |
| import android.os.Bundle; | |
| import android.view.SurfaceHolder; | |
| import android.view.SurfaceView; | |
| import java.io.IOException; |
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 | |
| // CirclePieViewExample | |
| // | |
| // Created by Mark Jackson on 10/8/15. | |
| // Copyright © 2015 Mark Jackson. All rights reserved. | |
| // | |
| import UIKit |
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
| // | |
| // CirclePieView.swift | |
| // CirclePieViewExample | |
| // | |
| // Created by Mark Jackson on 10/8/15. | |
| // Copyright © 2015 Mark Jackson. All rights reserved. | |
| // | |
| import UIKit |
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
| // | |
| // InflatingCircleIndicatorView.swift | |
| // Spots | |
| // | |
| // Created by Mark Jackson on 9/24/15. | |
| // Copyright © 2015 Mark Jackson. All rights reserved. | |
| // | |
| import UIKit |
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 timeAgoSinceDate(date:NSDate, numericDates:Bool) -> String { | |
| let calendar = NSCalendar.currentCalendar() | |
| let now = NSDate() | |
| let earliest = now.earlierDate(date) | |
| let latest = (earliest == now) ? date : now | |
| let components:NSDateComponents = calendar.components([NSCalendarUnit.Minute , NSCalendarUnit.Hour , NSCalendarUnit.Day , NSCalendarUnit.WeekOfYear , NSCalendarUnit.Month , NSCalendarUnit.Year , NSCalendarUnit.Second], fromDate: earliest, toDate: latest, options: NSCalendarOptions()) | |
| if (components.year >= 2) { | |
| return "\(components.year) years ago" | |
| } else if (components.year >= 1){ |
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
| 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 |
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
| // | |
| // Constants.swift | |
| // Routes | |
| // | |
| // Created by Mark Jackson on 3/21/15. | |
| // Copyright (c) 2015 Mark Jackson. All rights reserved. | |
| // | |
| struct Constants{ | |
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
| //How to URL Encode string | |
| CFURLCreateStringByAddingPercentEscapes(nil, str, nil, "!*'();:@&=+$,/?%#[]\" ", kCFStringEncodingASCII) |
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 | |
| // MapDirections | |
| // | |
| // Created by Mark Jackson on 4/5/15. | |
| // Copyright (c) 2015 Mark Jackson. All rights reserved. | |
| // | |
| import UIKit | |
| import MapKit |