Skip to content

Instantly share code, notes, and snippets.

protocol A {}
protocol B {
typealias AType
func setAn(a: AType)
}
struct SomeB: B {
typealias AType = A
func setAn(a: AType)
@malatx
malatx / sample-dash.php
Last active January 28, 2018 06:21
Sample Indie App Dashboard via AppFigures Data
<?php
// This is sample code to draw some of the charts I blogged about here:
// https://medium.com/ios-os-x-development/keeping-your-wits-as-an-indie-app-developer-3b5b14428e1f
//
// A few disclaimers:
// 1. This assumes you have at least 30 days of sales data in order to draw the Trailing 7 Days Chart
// 2. This assumes you have over 52 consecutive weeks of data in order to draw the Trailing Year Chart
// 3. I don't really know PHP. Everything this does, I had to look it up while writing it. If you actually know PHP, sorry. There are surely better ways.
//
// the results of this PHP script is intended to be drawn using the Flot library.
<resources>
<style name="HoursTrackerTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:windowBackground">@color/white</item>
<item name="android:colorBackground">@color/white</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:actionBarItemBackground">@drawable/selectable_background_hourstracker</item>
<item name="android:popupMenuStyle">@style/PopupMenu.Hourstracker</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Hourstracker</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Hourstracker</item>
<item name="android:actionDropDownStyle">@style/DropDownNav.Hourstracker</item>