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": |
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
| 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
| 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
| 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
| 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
| //Helping out a friend with a quick hack to make duplicates recursively (made in 2 mins) | |
| import java.util.LinkedList; | |
| public class Runner2 { | |
| /** | |
| * @param args | |
| */ |
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
| package com.cs4720.drinkengine_android.dummy; | |
| import java.io.BufferedReader; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; |
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
| "Sometimes when I find myself comparing myself to others and losing | |
| steam mentally/emotionally, I have to remind myself where I started, the | |
| attitude I had when I began, and how I have already achieved things I never | |
| thought possible and that there is no reason for that to change so long as I | |
| stay committed, balanced, consistent and hungry." |
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
| function postCall(data) { | |
| console.log("Data from JSON"); | |
| } | |
| $(document).ready(function () { | |
| var endpoint = //URL here | |
| $.ajax({url: endpoint, dataType: "jsonp", success: postCall}); | |
| }); |
OlderNewer