I hereby claim:
- I am jasdev on github.
- I am jasdev (https://keybase.io/jasdev) on keybase.
- I have a public key whose fingerprint is 711E 45E8 FF90 3997 AA07 6FD0 D107 2F37 4EB8 54D8
To claim this, I am signing this object:
| $.ajax({ | |
| url: "https://api.imgur.com/3/gallery/", | |
| /* | |
| Note: It's best to avoid placing your client-id in js, as it is exposed to the end-user. | |
| To avoid this, you could proxy requests to your own server, which makes the request directly to imgur. | |
| */ | |
| headers: {"Authorization": "Client-ID YOUR_CLIENT_ID"}, | |
| success: function(data) { | |
| for(var i = 0; i < 5; i++){ | |
| console.log(data['data'][i]['link']); |
| clonerev() { | |
| git clone $1 | |
| cd 'sed ${1}##/*/ s/.git//' | |
| git reset --hard $2 | |
| } | |
| # Usage: clonerev [url] [commit hash] |
I hereby claim:
To claim this, I am signing this object:
| extension String { | |
| func containsUpperCaseLetter() -> Bool { | |
| let beginCodePoint = Character("A").unicodeScalarCodePoint() | |
| let endCodePoint = Character("Z").unicodeScalarCodePoint() | |
| for scalar in self.unicodeScalars { | |
| if case beginCodePoint...endCodePoint = scalar.value { | |
| return true | |
| } | |
| } |
A list of presenters at the Brooklyn Swift Developers Meetup with links to videos, slides and source code: http://www.meetup.com/Brooklyn-Swift-Developers
David Grandinetti - Learning Swift the Euler Way (Video) / Slides)
| import UIKit | |
| enum Notifications { | |
| enum Categories: String { | |
| case Message | |
| } | |
| enum Actions: String { | |
| case RemindMeLater | |
| case Reply |
| //Funny code segment I hacked together | |
| private void TransportationPanel_Tap(object sender, System.Windows.Input.GestureEventArgs e) | |
| { | |
| settings["transportationMode"] = transportationOptions[(transportationOptions.IndexOf((string)settings["transportationMode"]) + 1) % 3]; | |
| switch ((string)settings["transportationMode"]) | |
| { | |
| case "bike": | |
| TransportationOption.Source = new BitmapImage(new Uri("Images/Icons/bike_icon_white.png", UriKind.Relative)); | |
| break; | |
| case "car": |
| private void RadiusPanel_Tap(object sender, System.Windows.Input.GestureEventArgs e) | |
| { | |
| settings["radius"] = ((int)settings["radius"] % 10) + 1; | |
| radiusText.Text = (int)settings["radius"] + ((int)settings["radius"] != 1 ? " miles" : " mile"); | |
| } |
| foreach (DAO daoFile in daoFiles) | |
| { | |
| StoredProcedure correspondingPoc = (from x in sProcs | |
| where x.file == daoFile.calledProc select x).FirstOrDefault(); | |
| if (correspondingPoc != null) | |
| { | |
| IEnumerable<Error> except = correspondingPoc.possibleErrors.Except(daoFile.errorsCaught, new ErrorComparer()); | |
| } | |
| } |
| TimeSpan t = TimeSpan.FromSeconds(time); | |
| f.dataString = distance + " mi" + "\n" + string.Format((t.Hours == 0 ? "" : "{0:D1}h:") + (t.Minutes > 9 ? "{1:D2}m" : "{1:D1}m"), t.Hours, t.Minutes); |