JAVA 8 / CATATAN</>↗Java 826 Feb 2016
In the following example we will learn how to manipulate a LocalDate object. There are many methods available for us to change the value of a LocalDate object. For example, we can change the year, month and day of LocalDate object. We can use methods like withYear(), withDayOfMonth(), plusYears(), minusMonths(), etc. All these methods will […]
OS X / CATATAN</>↗OS X22 Feb 2016
I need to test FTP client codes, so I need to find an FTP server for testing my codes. After searching for a while I find out that OS X already equipped FTP server. I am currently using OS X El Capitan 10.11.*. Let’s now test the FTP server on Mac OS X with the […]
MAVEN / CATATAN</>↗Maven21 Feb 2016
The following configuration will use Google’s mirror of the Maven Central repository. Alter your ${M2_HOME}/conf/settings.xml or ${user.home}/.m2/settings.xml to add the mirror as seen in the following configuration file. <?xml version="1.0" encoding="UTF-8"?> <settings> . . <mirrors> <mirror> <id>google-maven-central</id> <name>Google Maven Central</name> <url>https://maven-central.storage.googleapis.com</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> . . </settings>
MAVEN / CATATAN</>↗Maven21 Feb 2016
When we work behind a proxy server, we need to configure Maven to be able to connect to the internet. To enable proxy we can configure Maven settings.xml file, either in ${M2_HOME}/conf/settings.xml or ${user.home}/.m2/settings.xml file. <?xml version="1.0" encoding="UTF-8"?> <settings> . . <proxies> <proxy> <id>my-proxy</id> <active>true</active> <protocol>http</protocol> <host>proxy.example.org</host> <port>8080</port> <username>username</username> <password>password</passw...
CORE API / CATATAN</>↗Core API17 Feb 2016
In the following code snippet we will learn how to load files from resource directory. Resource files can be in a form of image, audio, text, etc. Text resource file for example can be used to store application configurations, such as database configuration. To load this resource file you can use a couple methods utilizing […]
CORE API / CATATAN</>↗Core API15 Feb 2016
This code snippet will show you how to create array variable and initialized it with a non-default value. By default, when we create an array of something in Java all entries will have its default value. For primitive types like int, long, float the default value are zero (0 or 0.0). For reference types (anything […]