This file contains 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
import java.util.*; | |
import java.util.regex.Pattern; | |
import java.io.*; | |
import static java.util.Arrays.binarySearch; | |
public class NovelCompression{ | |
public enum ACTION {COMPRESS, DECOMPRESS} | |
public enum TYPE {UPPER, LOWER, FIRSTCAP} |
This file contains 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
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.text.NumberFormat; | |
import java.util.ArrayList; | |
/** | |
* Una herramienta básica para calcular los pesos en la función del PERCEPTRÓN. |
This file contains 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
import java.util.*; | |
import java.io.*; | |
import java.util.regex.Pattern; | |
/** | |
* Analiza un fichero de log en formato "Apache or Squid native common log | |
* format" y crea diferentes ficheros con distinta granularidad con los datos de | |
* interés para la práctica 3 de Administración y Evaluación de Sistemas | |
* Informáticos (UVa 2014) | |
*/ |
This file contains 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
#!/bin/bash | |
# Cambia el brillo de pantalla en todo ordenador compatible con el sistema | |
# Intel Brightness Control, en bucle con efecto de respiración. | |
# | |
# Autor: Sergio Luis Para | |
fich=/sys/class/backlight/intel_backlight/brightness | |
brillo=50 |
This file contains 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 <stdio.h> | |
#define Este main /* es para empezar suave */ | |
#define imprime /* cosas en pantalla */ ( | |
#define en /* el fondo */ "\n" /* era de esperar */ | |
#define trozo () /* tras trozo, ¿no? */ | |
#define tu /* código */ ); /* tus normas */ | |
#define codigo /* que lo que hace es */ printf /* claro */ | |
#define de /* forma ordenada y auto-documentada en tu consola */ { | |
#define consola /* o terminal */ } /* como prefieras llamarlo */ |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#define Este main /* es para empezar suave */ | |
#define un malloc( /* sirve para reservar memoria */ | |
#define Para /* recorrer índices usaremos */ for( | |
#define Entonces /* para imprimir usamos */ printf( | |
#define eh /* mira, un ejemplo */ printf("\n\n");} | |
#define cada /* linea */ i= /* de este */ | |
#define programa (){ /* y cada */ |
This file contains 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
import java.util.*; | |
import java.io.*; | |
/** | |
* Analiza un fichero Apache Common Log y crea ficheros CSV separados | |
* por punto y coma con información relevante sobre los mismos para la | |
* caracterización de la carga del servidor. | |
* | |
* @author Sergio Luis Para / @S_Luis / sergio.luis at alumnos uva es | |
*/ |
This file contains 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
/* Así de sencillo es declarar tus permisos. */ | |
Permission[] permissions = new Permission[] { | |
Permission.EMAIL, | |
}; | |
/* Así de sencillo es configurar tu cliente. */ | |
SimpleFacebookConfiguration configuration = new SimpleFacebookConfiguration.Builder() | |
.setAppId("id de tu app proporcionado por FB") | |
.setNamespace("nombre de tu app a lo largo de todas las Actividades") | |
.setPermissions(permissions) |
This file contains 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
function doWithPython(firstName, lastName, callback) { | |
var opciones = { | |
mode : 'text', | |
pythonPath : '/ruta/a/Python', // Solo necesario si no es el directorio por defecto | |
pythonOptions : <Array con flags en String>, // ['-u'], por ejemplo | |
args : [firstName, lastName], // [sys.argv[1], sys.argv[2], (...) ] | |
} | |
PythonShell.run('./ruta_relativa/parte_python.py', opciones, function(err, result) { |
This file contains 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
function pertenece1(lista, valor) { | |
Boolean pertenece = false; | |
for(int i=0; i<lista.length; i++) { | |
if (lista[i] == valor) { | |
pertenece = true; | |
} | |
} | |
return pertenece; | |
} |
OlderNewer