- Static binding happens at compile-time, dynamic binding at runtime.
- Binding of private, static and final methods always happen at compile time since these methods cannot be overridden. Binding of overridden methods happen at runtime.
- Java uses static binding for overloaded methods and dynamic binding for overridden methods.
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
FROM elixir:latest | |
# not root but rather work with regular user | |
RUN useradd -ms /bin/bash regularuser | |
USER regularuser | |
WORKDIR /home/regularuser/ | |
EXPOSE 4000 | |
# Run REPL |
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
<!--?xml version="1.0" encoding="UTF-8"?--> | |
<hibernate-configuration> | |
<session-factory> | |
<property name="hibernate.connection.driver_class">org.h2.Driver</property> | |
<property name="hibernate.connection.username">sa</property> | |
<property name="hibernate.connection.password"></property> | |
<property name="hibernate.connection.url">jdbc:h2:mem:test</property> | |
<property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property> | |
<property name="show_sql">true</property> |
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
<!--?xml version="1.0" encoding="UTF-8"?--> | |
<hibernate-configuration> | |
<session-factory> | |
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> | |
<property name="hibernate.connection.username">root</property> | |
<property name="hibernate.connection.password">newlife</property> | |
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/evidence_db</property> | |
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> | |
<property name="show_sql">true</property> |
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
package controllers; | |
import com.google.inject.Inject; | |
import core.CalculationSystem; | |
import play.libs.F; | |
import play.libs.Json; | |
import play.mvc.Controller; | |
import play.mvc.Result; | |
import java.util.HashMap; |
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
public static Thread[] getThreads() { | |
Set<Thread> threadSet = Thread.getAllStackTraces().keySet(); | |
return threadSet.toArray(new Thread[threadSet.size()]); | |
} |
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
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@NoArgsConstructor | |
@AllArgsConstructor | |
public @Data class Car { | |
private String type; | |
} |
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
# for informations | |
sudo lshw # hardware informations to standard output | |
sudo lshw -html > hw.html # hardware informations to html file | |
sudo lshw -xml > hw.xml # hardware informations to xml file | |
lsb_release -a # information about your linux distribution | |
cat /proc/cpuinfo # informations about your CPU | |
lscpu # informations about your CPU |
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
public class JavaQuestions { | |
public willCompileOrNot() { | |
https://www.github.com/peterszatmary/ | |
System.out.println("will compile or not ?"); | |
} | |
public void question1() { | |
System.out.println(null); | |
} |
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
- For Intelijj Idea install Scala plugin | |
- ./activator new # creates new application | |
- go to project folder | |
- ./activator run ( http://localhost:9000 ) |
OlderNewer