This file contains hidden or 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
| public class Runner { | |
| /** | |
| * @param args | |
| */ | |
| public static void main(String[] args) { | |
| //Generate the first 100 bits from Blum-Micali PRG with p = 34319, g = 4, and seed x = 1022 | |
| long p = 34319; | |
| long g = 4; |
This file contains hidden or 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
| for(int i = 0; i < badges.length(); i++){ | |
| badgeList.add(new Badge(((JSONObject) (badges.get(i))).getString("name"), ((JSONObject) (badges.get(i))).getString("description"), ((JSONObject) (badges.get(i))).getString("id"))); | |
| } |
This file contains hidden or 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
| 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); |
This file contains hidden or 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
| 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()); | |
| } | |
| } |
This file contains hidden or 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
| 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"); | |
| } |
This file contains hidden or 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
| //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": |
NewerOlder