Skip to content

Instantly share code, notes, and snippets.

package com.example;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
@alwold
alwold / menu.json
Last active August 29, 2015 13:57
{
"status": "ok",
"menu": [
{
"order": 1,
"icon": "http://www.asu.edu/mobile/images/icon1.png",
"icon-background-position": "0 -50px",
"title": "My ASU",
"subtitle": "INFO",
"url": "https://my.asu.edu",
{
"status": "error",
"code": 123,
"message": "A database error has occurred"
}
GET /mobile/api/v1/menu.json HTTP/1.1
User-Agent: asu-mobile/1.0
Host: www.asu.edu
Accept: application/json
If-Modified-Since: Fri, 28 Mar 2014 16:51:43 GMT
HTTP/1.1 304 Not Modified
Date: Fri, 28 Mar 2014 16:54:25 GMT
GET /mobile/api/v1/menu.json HTTP/1.1
User-Agent: asu-mobile/1.0
Host: www.asu.edu
Accept: application/json
If-Modified-Since: Fri, 28 Mar 2014 16:51:43 GMT
HTTP/1.1 200 OK
Date: Fri, 28 Mar 2014 16:57:04 GMT
Last-Modified: Fri, 28 Mar 2014 16:45:00 GMT
Content-Length: xxx
<resources>
<style name="FindMyTrain" parent="Theme.Sherlock">
<item name="android:actionBarStyle">@style/FindMyTrain.ActionBar</item>
<item name="actionBarStyle">@style/FindMyTrain.ActionBar</item>
<item name="android:actionBarTabStyle">@style/FindMyTrain.ActionBar.Tab</item>
<item name="actionBarTabStyle">@style/FindMyTrain.ActionBar.Tab</item>
</style>
<style name="FindMyTrain.ActionBar" parent="Widget.Sherlock.Light.ActionBar.Solid.Inverse">
<item name="android:background">@drawable/action_bar_background</item>
// create graph
var graph = CPTXYGraph(frame: CGRectZero)
graph.title = "Hello Graph"
graph.paddingLeft = 0
graph.paddingTop = 0
graph.paddingRight = 0
graph.paddingBottom = 0
// hide the axes
var axes = graph.axisSet as CPTXYAxisSet
var lineStyle = CPTMutableLineStyle()
func numberOfRecordsForPlot(plot: CPTPlot!) -> UInt {
return 4
}
func numberForPlot(plot: CPTPlot!, field fieldEnum: UInt, recordIndex idx: UInt) -> NSNumber! {
return idx+1
}
//
// ViewController.swift
// CorePlotTest
//
// Created by Al Wold on 8/6/14.
// Copyright (c) 2014 Al Wold. All rights reserved.
//
import UIKit
@alwold
alwold / ViewController.swift
Created September 2, 2014 22:18
ViewController with code to set length
//
// ViewController.swift
// CorePlotTest
//
// Created by Al Wold on 8/6/14.
// Copyright (c) 2014 Al Wold. All rights reserved.
//
import UIKit