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.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; |
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
#!/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 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
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"id_schema": "1", | |
"title": "Journal nuevo", | |
"description": "persistencia en el modelo de Journal", | |
"version": "1.0.0", | |
"type": "object", | |
"definitions": { | |
"dataAuditoria": { |
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
<dependency> | |
<groupId>com.doctusoft</groupId> | |
<artifactId>json-schema-java7</artifactId> | |
<version>1.4.1</version> | |
</dependency> |
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
#include <pthread.h> | |
#include <stdio.h> | |
int *dowork(void *arg) | |
{ | |
pthread_t mythreadid = pthread_self(); | |
for (int i = 0; i < 5; i++) { | |
printf("Thread id: %lu, counter: %d, code: %s\n", mythreadid, i, (char *)arg); | |
} | |
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.devweb.constructor; | |
public class Cliente implements Cloneable { | |
int rut; | |
String nombre; | |
Cliente(int rut, String nombre) { | |
this.rut = rut; | |
this.nombre = nombre; |
OlderNewer