1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
public void Differences_press(String id) {
facade = new FacadeJDBC();
List <List <String>> resultat = facade.requete("SELECT * FROM Mesure_nom WHERE (Mesure_nom.id)=\'"+id+"\'");
//System.out.println(resultat);
List<String> result = resultat.get(0);
String première_touche_pressed = result.get(1);
String deuxième_touche_pressed = result.get(2);
String troisième_touche_pressed = result.get(3);
String quatrième_touche_pressed = result.get(4);
String cinquième_touche_pressed = result.get(5);
String sixième_touche_pressed = result.get(6);
String septième_touche_pressed = result.get(7);
String huitième_touche_pressed = result.get(8);
long[] resul = new long[8];
long première_touche_press = Long.parseLong(première_touche_pressed);
long deuxième_touche_press = Long.parseLong(deuxième_touche_pressed);
long troisième_touche_press = Long.parseLong(troisième_touche_pressed);
long quatrième_touche_press = Long.parseLong(quatrième_touche_pressed);
long cinquième_touche_press = Long.parseLong(cinquième_touche_pressed);
long sixième_touche_press = Long.parseLong(sixième_touche_pressed);
long septième_touche_press = Long.parseLong(septième_touche_pressed);
long huitième_touche_press = Long.parseLong(huitième_touche_pressed);
resul[0] = première_touche_press;
resul[1] = deuxième_touche_press;
resul[2] = troisième_touche_press;
resul[3] = quatrième_touche_press;
resul[4] = cinquième_touche_press;
resul[5] = sixième_touche_press;
resul[6] = septième_touche_press;
resul[7] = huitième_touche_press;
int res =0;
long[] resu = new long[8];
for (test1 = 0; test1 < test - 1; test1++){
resu[res] = resul[test1+1]-resul[test1];
System.out.println(resu[res]);
res = res + 1;
}
} |