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 <package-name-here> | |
/** | |
* This is just a dummy listener to make a point - the inner class constructor uses interface as a type of its argument. | |
* */ | |
public interface DummyToastListener { | |
public void onToastValue(double value); | |
} |
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
StringRequest putRequest = new StringRequest(Request.Method.PUT, url, | |
new Response.Listener<String>() | |
{ | |
@Override | |
public void onResponse(String response) { | |
delegate.postNotificationSucced(); | |
} | |
}, | |
new Response.ErrorListener() | |
{ |
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 <your-package-name> | |
import com.google.gson.Gson; | |
public class LastKnownUserPosition { | |
private double latitude; | |
private double longitude; | |
public LastKnownUserPosition(){ |
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 <your package>; | |
import java.util.ArrayList; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import za.co.smartcitizens.trafficlights.spotter.models.LastKnownUserPosition; | |
import za.co.smartcitizens.trafficlights.spotter.models.TrafficLightIntersectionGeofence; | |
import android.content.Context; |
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 ishmael.academia.examples.tut.dpc401t; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** |
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 za.co.smartcitizens.trafficlights.spotter.utils; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.Date; | |
import org.apache.http.HttpEntity; | |
import org.apache.http.entity.ContentType; | |
import org.apache.http.entity.mime.MultipartEntityBuilder; |
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 za.co.pta.gdg.hashcode.delivery; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
public class DeliveryCommandProcessor { | |
//rows | |
int rows; | |
int columns; | |
//number of drones |
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 za.co.pta.gdg.hashcode.practice; | |
/** | |
* This code paints the Right Angle Hash Code Practice problem using 107 commands. | |
* It makes use of the HashCodeCommandProcessor - see this gist: https://gist.github.com/ishmaelmakitla/920632ae6c35805d9aa3 | |
* | |
* */ | |
public class RightAngleHashCodePracticeApp { | |
/** | |
* Right Angle Practice |
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 za.co.pta.gdg.hashcode.practice; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* This is a utility class for processing Paint Commands | |
* |
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 za.org.pta.gdg.gists; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.util.Date; | |
import android.content.Context; | |
import android.os.Environment; | |
import android.util.Log; |
NewerOlder