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
import json | |
from pprint import pprint | |
json_data=open('formatted.json') | |
data = json.load(json_data) | |
# pprint(data['features']) | |
for x in data['features']: | |
print(x["properties"]["headline"]) | |
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
class Array2D<T> { | |
let columns: Int | |
let rows: Int | |
var array: Array<T?> // private | |
init(columns: Int, rows: Int) { | |
self.columns = columns | |
self.rows = rows | |
array = Array<T?>(count: rows*columns, repeatedValue: nil) | |
} |
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
import Foundation | |
class AppInfo { | |
class func appVersion () -> String{ | |
let infoDictionary = NSBundle.mainBundle().infoDictionary | |
if let versionString:AnyObject = infoDictionary["CFBundleShortVersionString"]{ | |
return "\(versionString)" | |
}else{ | |
return "No Version" | |
} |
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
// | |
// GenericDataSource.swift | |
// | |
// Created by Dan Nolan on 23/09/2014. | |
// Creative Commons blah blah just use this as however you want I release all witchcraft and magic rights to using this software or something | |
// | |
import Foundation | |
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
class MediaItem : MTLModel, MTLJSONSerializing { | |
var mediaFileName : String! | |
var mediaMD5String : String! | |
var mediaFileURL : String! | |
var mediaFileSize : Int! | |
class func documentsDirectory() -> String{ | |
return NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String | |
} |
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
enum DisplayOrientation : CGFloat{ | |
case WideScreen = 0 | |
case Portrait = 1.5707963268 | |
case UpsideDown = 3.1415926536 | |
case PortraitUpsideDown = 4.7123889804 | |
} |
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
May 4 17:10:14 iPod-touch routined[5308] <Notice>: 452416214.294107 (4/05/2015 17:10:14 AEST), [DATABASE]: failed to execute statement | |
May 4 17:10:14 iPod-touch routined[5308] <Notice>: 452416214.295157 (4/05/2015 17:10:14 AEST), [DATABASE]: statement, INSERT INTO Hint (Timestamp, Latitude, Longitude, HorizontalAccuracy) VALUES (?, ?, ?, ?), return code, 19, error, UNIQUE constraint failed: Hint.Timestamp, Hint.Latitude, Hint.Longitude | |
May 4 17:10:14 iPod-touch routined[5308] <Notice>: 452416214.307433 (4/05/2015 17:10:14 AEST), [DATABASE]: failed to finalize statement | |
May 4 17:10:14 iPod-touch routined[5308] <Notice>: 452416214.308205 (4/05/2015 17:10:14 AEST), [DATABASE]: statement, , return code, 19, error, UNIQUE constraint failed: Hint.Timestamp, Hint.Latitude, Hint.Longitude |
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
Top Spenders OVERALL | |
The Hon Tony Abbott MP - $1057673 | |
The Hon Julie Bishop MP - $866653 | |
Mr Tony Pasin MP - $851482 | |
Mr Tim Watts MP - $556863 | |
The Hon Andrew Robb AO MP - $539247 | |
The Hon Darren Chester MP - $529344 | |
Mr Wyatt Roy MP - $526258 | |
Senator the Hon Simon Birmingham - $523191 |
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
module BootstrapPaginationHelper | |
class LinkRenderer < WillPaginate::ActionView::LinkRenderer | |
protected | |
def page_number(page) | |
unless page == current_page | |
link(page, page, :rel => rel_value(page)) | |
else | |
link(page, "#", :class => 'active') | |
end |
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
$("#submitButton").on("click",function(event){ | |
var text = $("#textField").val(); | |
$(".nameClass").each(function(index,val){ | |
$(val).text(text); | |
}); | |
}); |
OlderNewer