SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

SPRING CORE / NOTES</>↗
Spring Core22 Jul 2011

How do I declare a bean in Spring application?

In this example we will learn how to declare a bean in Spring Application. We are going to build a simple Maven project to demonstrate it. So let’s begin by setting up our Maven project. Creating a Maven Project Below is the directory structure of our Maven Project. . ├─ pom.xml └─ src └─ main […]

Wayan · 4 min read
CORE API / NOTES</>↗
Core API19 Jun 2011

How do I get print service attribute set?

This example demonstrates how to get print service’s attribute set using the javax.print API. First we find the default printer for the current machine using the PrintServiceLookup class. This will give us a PrintService object, this object might be null if no print service found. The final step is to get the print service attribute […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API15 Jun 2011

How do I get pattern string of a SimpleDateFormat?

To format a java.util.Date object we use the SimpleDateFormat class. To get back the string pattern that were used to format the date we can use the toPattern() method of this class. package org.kodejava.text; import java.text.SimpleDateFormat; import java.util.Date; public class SimpleDateFormatToPattern { public static void main(String[] args) { SimpleDateFormat format = new SimpleDateFormat("EEEE, dd/MM/yyyy"); // […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API15 Jun 2011

How do I get all available currency codes?

The example presented in this code snippet show you how to get the available currency codes. We will need the locale information and use the Currency class for this example. package org.kodejava.util; import java.util.Currency; import java.util.Locale; import java.util.Map; import java.util.TreeMap; public class CurrencySymbolDemo { public static void main(String[] args) { CurrencySymbolDemo cs = new CurrencySymbolDemo(); […]

Wayan · 2 min read
MYBATIS / NOTES</>↗
MyBatis10 Jun 2011

How do I use @Select annotation in MyBatis?

In the previous example How do I create MyBatis mapper? you’ve seen how to use a mapper to get a record from the database. In that example the select query is defined in the mapper xml file. For the same functionality MyBatis also offer a solution to use an annotation for the select query. In […]

Wayan · 2 min read
MYBATIS / NOTES</>↗
MyBatis10 Jun 2011

How do I create MyBatis mapper?

In this example you will see how to create or define a data mapper using the MyBatis. The mapper will communicate our application with the underlying databases where the data is stored. MyBatis data mapper is defined as an interface object. We can either use annotations or the xml mapper to define our database query. […]

Wayan · 4 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.