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
export PGPASSWORD=password | |
/Library/PostgreSQL/9.4/bin/psql -U postgres -f /Users/makesh/Documents/Workspace/medex/database/dbdrop.sql | |
echo "re-create database .. " | |
/Library/PostgreSQL/9.4/bin/psql -U postgres -f /Users/makesh/Documents/Workspace/medex/database/dbcreate.sql | |
echo "run dll database .. " | |
/Library/PostgreSQL/9.4/bin/psql -U postgres -d medx -f /Users/makesh/Documents/Workspace/medex/database/ddl.sql | |
echo "re-create procedures in database .. " | |
/Library/PostgreSQL/9.4/bin/psql -U postgres -d medx -f /Users/makesh/Documents/Workspace/medex/database/procedure.sql |
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
------------------ Pre Java 8 --------------------- | |
Map<Employee, File> fileMap = new HashMap<Employee, File>(); | |
int i =0; | |
for (Map.Entry<Employee, File> entry : map.entrySet()) { | |
i++; | |
// do something with i | |
} | |
------------------ Java 8 Lambda --------------------- | |
AtomicInteger counter = new AtomicInteger(0); |
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
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>2.3.2</version> | |
<configuration> | |
<source>1.8</source> | |
<target>1.8</target> | |
</configuration> | |
</plugin> |
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
#!/bin/bash | |
echo 'Starting tomcat' | |
export JPDA_ADDRESS=8000 | |
export JPDA_TRANSPORT=dt_socket | |
/Users/xyz/Documents/Tools/apache-tomcat-8.0.15/bin/catalina.sh jpda start |
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
String jsonContent = null; | |
String url = '/Users/makesh/temp/temp.json' | |
try { | |
jsonContent = new String(Files.readAllBytes(Paths.get(url))); | |
} catch (IOException e) { | |
logger.error(e.getMessage()); | |
} |
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
@GET | |
@Path("/cars") | |
@Produces(MediaType.APPLICATION_JSON) | |
public Car[] getCars() { | |
... | |
} | |
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"?> | |
<projectDescription> | |
<name>androidtest</name> | |
<comment></comment> | |
<projects> | |
</projects> | |
<buildSpec> | |
<buildCommand> | |
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> | |
<arguments> |