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
static String readFirstLineFromFile(String path) throws IOException { | |
try (BufferedReader br = new BufferedReader(new FileReader(path))) { | |
return br.readLine(); | |
} | |
} |
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
static String readFirstLineFromFileWithFinallyBlock(String path) throws IOException { | |
BufferedReader br = new BufferedReader(new FileReader(path)); | |
try { | |
return br.readLine(); | |
} finally { | |
if (br != null) br.close(); | |
} | |
} |
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
int x = 0b1100110; |
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
int x = Integer.parseInt("1100110", 2); |
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
int x = Integer.parseInt("1100110", 2); |
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
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 |
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
<dependency> | |
<groupId>org.hibernate</groupId> | |
<artifactId>hibernate-entitymanager</artifactId> | |
<version>4.3.6.Final</version> | |
</dependency> |
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
<bean id="jpaVendorAdapter" | |
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> | |
<property name="database" value="MYSQL" /> | |
<property name="showSql" value="true"/> | |
<property name="generateDdl" value="false"/> | |
<property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect" /> | |
</bean> |
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
<bean id="LocalContainerEntityManagerFactoryBean" class= | |
"org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> | |
<property name="packagesToScan" value="application.models" /> | |
<property name="dataSource" ref="dataSource" /> | |
<property name="jpaVendorAdapter" ref="jpaVendorAdapter" /> | |
</bean> |
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
<bean id="LocalEntityManagerFactoryBean" | |
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"> | |
<property name="persistenceUnitName" value="pu-name" /> | |
</bean> |