Skip to content

Instantly share code, notes, and snippets.

Jorge E. Hernández lalongooo

Block or report user

Report or block lalongooo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lalongooo / gist:95fbda3ebeaeff865438
Created May 28, 2015
Add new items to top of an android ListView
View gist:95fbda3ebeaeff865438
//Method onRefresh() from SwipeRefreshLayout.OnRefreshListener
public void onRefresh() {
// I'm using Retrofit, so this is the way I get new data from the server
new RestAdapter().get().getItems(new Callback<List<Foo>>() {
public void success(List<Foo> foos, Response response) {
// IMPORTANT: This is important to add new items at the top of the listview
View gist:370115afbfec625db967
private LatLng getLatLng(String lat, String lng){
LatLng ll = null;
if(lat.length() == 6 && lng.length() == 7){
double hoursLat = Double.valueOf(lat.substring(0,2));
double minLat = Double.valueOf(lat.substring(2,4));
double secLat = Double.valueOf(lat.substring(4,6));
double hoursLng = Double.valueOf(lng.substring(0,3));
double minLng = Double.valueOf(lng.substring(3,5));
lalongooo /
Created Jul 10, 2016
Johnson's algorithm
graph.addEdge(2889, 2781);
graph.addEdge(2889, 156);
graph.addEdge(2881, 2886);
graph.addEdge(2881, 2590);
graph.addEdge(2881, 2112);
graph.addEdge(2881, 1978);
graph.addEdge(2881, 1938);
graph.addEdge(2881, 482);
graph.addEdge(2881, 389);
graph.addEdge(2875, 2886);
View vector-drawable-1.xml
<vector xmlns:android=""
android:pathData="M 6 3 L 6 9"
You can’t perform that action at this time.