Skip to content

Instantly share code, notes, and snippets.

@mattmils
mattmils / gist:1047778
Created June 26, 2011 17:27
LTSA Pupazzi
const NPD = 2
const NPS = 2
const NA = 2
const C = 4
const DX = 0
const SX = 1
range ID_A = 1..NA
range ID_D = 1..NPD
@mattmils
mattmils / gist:1072865
Created July 8, 2011 21:26
Togli vocali
vocale(a).
vocale(e).
vocale(i).
vocale(o).
vocale(u).
togli_vocali([],[]).
togli_vocali([X | Xs], Ys):- vocale(X), !, togli_vocali(Xs, Ys).
togli_vocali([X | Xs],[X | Ys]):- togli_vocali(Xs, Ys).
@mattmils
mattmils / gist:1081354
Created July 13, 2011 21:14
Tema 30/06 LTSA
const NS = 4
const NUM = 3
range Ids = 1..NS
const FALSE = 0
const TRUE = 1
range BOOL = FALSE..TRUE
const IDLE = 0
@mattmils
mattmils / gist:1081525
Created July 13, 2011 22:56
Soccorritori Java
import java.util.ArrayList;
import java.util.List;
public class Soccorritori {
private static final int NUM = 4; // Numero soccorritori.
private static final int C = 3; // Capienza elicottero.
public static final int IDLE = 0;
public static final int SETTING = 1;
public static final int READY = 2;
@mattmils
mattmils / gist:1081528
Created July 13, 2011 22:57
Palestra LTS
const NU = 2
const ND = 2
const NV = 2
const UOMO = 0
const DONNA = 1
const VIP = 2
range TYPE = UOMO..VIP
const FALSE = 0
//Marzorati Claudio
//726748
public class Squadra {
private static int atleti=3,id;
public static void main(String[] args) {
Allenatore a = new Allenatore();
//Marzorati Claudio
//726748
const False = 0
const True = 1
range Boolean = False..True
const R = 3
const N = 2
// Matteo Rolla
// matr. 730928
import java.util.ArrayList;
import java.util.List;
public class Rolla730928 {
public static final int NUM = 2;
public static final int NUM_REMATE = 3;
@mattmils
mattmils / gist:1105423
Created July 25, 2011 22:34
Rematori LTSA
// Matteo Rolla
// matr. 730928
const REM = 3
const NUM = 2
range Ids = 1..NUM
const FALSE = 0
const TRUE = 1
range BOOL = FALSE..TRUE
@mattmils
mattmils / gist:1105430
Created July 25, 2011 22:36
Rematori LTSA Originale
// Matteo Rolla
// matr. 730928
const NUM = 2
range Ids = 1..NUM
const FALSE = 0
const TRUE = 1
range BOOL = FALSE..TRUE