Skip to content

Instantly share code, notes, and snippets.

View faloi's full-sized avatar

Federico Aloi faloi

  • Argentina
View GitHub Profile
create table Calificacion (
id bigint generated by default as identity (start with 1),
critica varchar(255),
puntaje integer not null,
partidoJugado_id bigint,
primary key (id)
)
create table Equipo1 (
Partido_id bigint not null,
observeOnScope $scope, "settings.parsimotionToken"
.filter ({newValue}) -> newValue?
.map ({newValue}) -> new Producteca newValue
.subscribe (producteca) ->
$scope.user = producteca.user()
$scope.priceLists = producteca.priceLists()
$scope.warehouses = producteca.warehouses()
@Test
public void puedeInstanciarseUnaLambdaPorElNombreDeSuClase() throws ClassNotFoundException, IllegalAccessException, InstantiationException {
Function<Integer, Integer> lambda = (num) -> num * 2;
Object lambda2 = Class.forName(lambda.getClass().getName()).newInstance();
assertEquals(lambda.getClass(), lambda2.getClass());
}
it "puede crear metodos para mensajes faltantes en todos los descendientes" do
Salchicha = Class.new(Perro)
lassie = Perro.new
lassie.ladrar
lassie.ladrar
Perro.crear_metodos_para_mensajes_faltantes(2)
expect(lassie.ladrar).to eq("Soy un Perro y me estan enviando el mensaje ladrar")
@faloi
faloi / Main.java
Last active August 29, 2015 14:07
Workspace para probar conceptos de programacion concurrente de forma simple
package edu.unq.pconc;
import java.util.Random;
import java.util.concurrent.Semaphore;
public class Main {
public static void main(String[] args) {
Semaphore semC = new Semaphore(0);
Semaphore semE = new Semaphore(0);
Semaphore semR = new Semaphore(0);
@faloi
faloi / .classpath
Created October 1, 2014 21:34
Eclipse files generated by the Gradle plugin, using https://github.com/oehme/xtend-gradle-plugin + Android
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
</classpath>
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
@faloi
faloi / push_git_repos.sh
Last active August 29, 2015 14:06
Scans all Git repositories at the given path and outputs those who have uncommited changes
#!/bin/bash
# Update all git directories below current directory or specified directory, asking for confirmation
function ask_yes_or_no() {
read -p "$1 ([y]es or [N]o): "
case $(echo $REPLY | tr '[A-Z]' '[a-z]') in
y|yes) echo "yes" ;;
*) echo "no" ;;
esac
@faloi
faloi / UnViewModel.java
Created September 8, 2014 02:50
Ejemplo simple del uso de RadioSelector en Arena
package ui;
import org.uqbar.commons.utils.Observable;
import java.util.Arrays;
import java.util.List;
@Observable
public class UnViewModel {
private String nombreSeleccionado;
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001