-
In the “Times of day” settings, the start time for morning tasks (which ends up also serving as the end time for evening tasks) should be configurable. Currently it always starts at midnight which doesn’t work great for those of us who often stay up past midnight.
-
Would be cool if there was a “snooze” option. Say I have my evening configured to start at 7PM because that's when I normally get home from work. If I work late one night, I would want to “snooze” the tasks until say, 9PM, such that my icon is not badged with the remaining task number until I actually get home. Alternatively, this could use geolocation to determine when I’m home and not start my evening until then.
4:48 PM] heathborders: You can do this in swift | |
[4:50 PM] heathborders: You need to make a Request protocol: | |
```protocol RequestProtocol { | |
typealias ResourceType | |
var resource: ResourceType { get } | |
} | |
``` | |
(edited) |
#!/usr/bin/env xcrun swift | |
import Foundation | |
struct Teammate { | |
let name: String | |
let weighting: Int | |
} | |
let teammates = [ |
Swift associated types are a bit confusing, and Russ Bishop’s article on the subject is top notch, the best I’ve seen. I do have a couple of questions after reading it, though:
Type parameters force everyone to know the types involved and specify them repeatedly (when you compose with them it can also lead to an explosion in the number of type parameters).
Why would this need to be the case, necessarily? In Java, a language that does allow for parameterized protocols (Java calls them “interfaces”) you can create concrete classes that conform to generic interfaces without specifying the parameterized type each time the concrete class name is referred to.
interface Food {
protocol Options { | |
} | |
class ConcreteOptions: Options { | |
func hi() -> String { | |
return "Hi" | |
} | |
} | |
protocol ResponseParser { |
Date | Artist |
---|---|
6/27/2002 | Colonel Claypool’s Fearless Flying Frog Brigade, Moe |
struct BiMultiDictionary<A: Hashable, B: Hashable> { | |
private var keysToValues = MultiDictionary<A, B>() | |
private var valuesToKeys = MultiDictionary<B, A>() | |
func allValues() -> [B] { | |
return keysToValues.allValues() | |
} | |
func valuesForKey(key: A) -> [B]? { | |
return keysToValues.valueForKey(key) |
$('li.list-group-item').each(function() { | |
var $pr = $(this); | |
$.get(window.location.origin + $pr.find('.list-group-item-name a').first().attr('href'), function (html) { | |
var message = $(html).find('.merge-branch-heading').text() | |
, mergeable = message.indexOf("can be") > -1; | |
if (!mergeable) { | |
$pr.css('backgroundColor', '#fbc0c0'); | |
} |
Say you’re in the middle of working on something and need to switch branches in order to look at something else, but then want to go right back to what you were working on. This kind of flow reminds me of using pushd and popd so I made some very simple custom git commands to do this.
First, add the following files to your PATH
(on OS X, just create them under /usr/local/bin
and make them executable). Then use the commands like this:
bryan-MacBookPro-2a5158:project bryan$ git status
On branch some-new-feature
Changes to be committed:
12:54 You have joined the channel | |
12:54 irace has joined ([email protected]) | |
12:54 Topic: TileMill and the Mapbox family -- https://www.mapbox.com/ and https://www.mapbox.com/help/ -- Logs: https://botbot.me/freenode/mapbox/ | |
12:54 kkaefer set the topic at: Dec 2, 2014, 10:47 AM | |
12:54 Mode: +cnt | |
12:54 Created at: Apr 6, 2010, 5:15 PM | |
12:54 [irace] hey incanus77 | |
13:01 [incanus77] hey irace | |
13:01 [irace] thanks for offering to help out | |
13:02 [irace] so how exactly do SHP and geoJSON differ? |