Para editar un comando: Window → Preferences → General → Keys
| 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,…) |
| 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; |
| /* | |
| * 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 |
| // 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); | |
| } |
| /* | |
| * 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 |
| 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; |