Skip to content

Instantly share code, notes, and snippets.

View KowalczykBartek's full-sized avatar

Bartek Kowalczyk KowalczykBartek

View GitHub Profile
program project1;
uses interfejs, obliczenia, pliki;
var
menuprogramu:integer;
begin
writeln('Podaj wartosc z Menu: '+#10#13+'1.szyfrowanie'+#10#13+'2.deszyfrowanie');
readln(menuprogramu);
repeat
@KowalczykBartek
KowalczykBartek / Java
Created February 15, 2015 00:19
sample1
int x = Integer.parseInt("1100110", 2);
int x = Integer.parseInt("1100110", 2);
int x = 0b1100110;
static String readFirstLineFromFileWithFinallyBlock(String path) throws IOException {
BufferedReader br = new BufferedReader(new FileReader(path));
try {
return br.readLine();
} finally {
if (br != null) br.close();
}
}
static String readFirstLineFromFile(String path) throws IOException {
try (BufferedReader br = new BufferedReader(new FileReader(path))) {
return br.readLine();
}
}
try ( ObjectInputStream in = new ObjectInputStream(new
FileInputStream("jakisPlik.bin")) ) {
//tutaj cosik
}
try ( FileInputStream fin = new FileInputStream("jakisPlik.bin");
ObjectInputStream in = new ObjectInputStream(fin) ) {
//cosik
}
switch (dzienTygodnia) {
case "Poniedzialek":
System.out.println("Początek tygodnia");
break;
case "Wtorek":
case "Sroda":
case "Czwartek":
System.out.println("Jeszcze trochę !");
break;
case "Piatek":
catch (IOException|SQLException ex) {
logger.log(ex);
throw ex;
}