Skip to content

Instantly share code, notes, and snippets.

View josedlujan's full-sized avatar

José Dimas Luján Castillo josedlujan

View GitHub Profile
@josedlujan
josedlujan / MainActivity.java
Created February 26, 2016 17:45 — forked from rajiv-singaseni/MainActivity.java
An android activity which demonstrates picking a photo from gallery and uploading it to a remote server.
package com.webile.upload;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.InputStreamReader;
import java.util.Date;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
@josedlujan
josedlujan / gist:b7f34d18075fb987b426
Created February 24, 2016 17:39 — forked from emmgfx/gist:0f018b5acfa3fd72b3f6
Android JSONArray remove before API 19
// Example of use: remove(i, savedProfiles);
public static JSONArray remove(final int idx, final JSONArray from) {
final List<JSONObject> objs = asList(from);
objs.remove(idx);
final JSONArray ja = new JSONArray();
for (final JSONObject obj : objs) {
ja.put(obj);
}
@josedlujan
josedlujan / README.md
Created November 17, 2015 05:28
A click / long press listener for RecyclerViews. Questions? https://twitter.com/lnikkila
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@josedlujan
josedlujan / DrawInsetsFrameLayout.java
Created October 22, 2015 22:13 — forked from romannurik/DrawInsetsFrameLayout.java
DrawInsetsFrameLayout — adding additional background protection for system UI chrome when using KitKat’s translucent decor flags.
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

Atajos de teclado para Eclipse (y derivados como ZendStudio)

Para editar un comando: Window → Preferences → General → Keys

Edición

Ctrl+D elimina la línea actual (en la que se encuentra el cursor)
Ctrl+Shift+F formatear código (tabulaciones, saltos de línea,…)