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
Create a new "java8.bat" file. | |
Add the following in the file and save. | |
``` | |
@echo off | |
set JAVA_HOME=C:\OpenJDK_1_8_RedHat\java-1.8.0-openjdk-1.8.0.232-3.b09.redhat | |
set Path=%JAVA_HOME%\bin;%Path% | |
echo Java 8 activated. | |
``` | |
Create a new "java11.bat" file. | |
Add the following in the file and save. |
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
{ | |
"chapter":{ | |
"name":"chapterName", | |
"number":1 | |
}, | |
"section":{ | |
"name":"sectionName", | |
"number":1 | |
}, | |
"kural":[ |
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
SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy"); | |
String dateString = "01-May-2017"; | |
Date date = formatter.parse(dateString); | |
LocalDateTime localDateTime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); | |
dateString = localDateTime.format(DateTimeFormatter.ofPattern("yyyy/MM/dd")); | |
localDateTime = LocalDateTime.parse(dateString, DateTimeFormatter.ofPattern("dd-MMM-yyyy")); | |
Timestamp timestamp = Timestamp.valueOf(localDateTime); | |
localDateTime = timestamp.toLocalDateTime(); |
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 | |
public EmbeddedServletContainerFactory getEmbeddedServletContainerFactory() { | |
TomcatEmbeddedServletContainerFactory containerFactory = new TomcatEmbeddedServletContainerFactory(); | |
containerFactory.addContextCustomizers(new TomcatContextCustomizer() { | |
@Override | |
public void customize(Context context) { | |
SecurityConstraint constraint = new SecurityConstraint(); | |
constraint.setUserConstraint("CONFIDENTIAL"); | |
SecurityCollection collection = new SecurityCollection(); | |
collection.addPattern("/*"); |
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 | |
public ServletWebServerFactory servletContainer() { | |
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() { | |
@Override | |
protected void postProcessContext(Context context) { | |
SecurityConstraint securityConstraint = new SecurityConstraint(); | |
securityConstraint.setUserConstraint("CONFIDENTIAL"); | |
SecurityCollection collection = new SecurityCollection(); | |
collection.addPattern("/*"); | |
securityConstraint.addCollection(collection); |
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
Note for me to remember how to set Android Home on Mac | |
Open Terminal and type in.. | |
nano ~/.bash_profile | |
Add the below paths | |
The path should be where your android installation is located | |
export ANDROID_HOME=/Users/username/Library/Android/sdk | |
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools | |
Save file and type in terminal... | |
source ~/.bash_profile |