for(int i=0 ; i < 5 ; i++)
{
System.out.println("i is : " + i);
}
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 cl.ejemplo.json.schema; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import org.everit.json.schema.Schema; | |
import org.everit.json.schema.loader.SchemaLoader; | |
import org.json.JSONObject; | |
import org.json.JSONTokener; |
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 static String refactoringJson(String body) { | |
// limpiar los valores nulos que con unirest kong se llaman nULLValue :/ | |
Gson gson = new Gson(); | |
Map<String, Map<String, String>> mapBody = gson.fromJson(body, Map.class); | |
Map<String, String> jsonLimpio = new HashMap(); | |
// recorrer mapa y limpiar | |
for (Map.Entry entryBody : mapBody.entrySet()) { |
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
#!/usr/bin/python | |
import sys | |
import os | |
import stashy | |
# http://bitbucket:7990/projects/TBP/ | |
# python get.py TBP : | |
stash = stashy.connect("http://test.server.cl:7990/", "german.gonzalez", "welcome1") | |
for repo in stash.projects[sys.argv[1]].repos.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
public interface Step<T> { | |
T process(T input) throws ExecutionException; | |
} | |
public class Pipeline<T> { | |
private final List<Step<T>> steps; |
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 cl.ejemplo.mimetypes; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.util.ArrayList; | |
import java.util.List; |
NewerOlder