SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

CORE API / NOTES</>↗
Core API01 Dec 2006

How do I get a list of country names?

Using the code below you can get a list of country names and its ISO code by using the locale class implementation in Java. package org.kodejava.util; import java.text.Collator; import java.util.*; public class CountryList { public static void main(String[] args) { // A collection to store our country object List<Country> countries = new ArrayList<>(); // Get […]

Wayan · 7 min read
SERVLET / NOTES</>↗
Servlet27 Nov 2006

How do I create a hit counter servlet?

Here we have a simple example of creating a hit counter using servlet. The servlet updates the hits counter every time a page is visited and display the number of hits as an image. The image is generated at runtime using Java’s java.awt.Graphic2D and javax.imageio.ImageIO class. To store the number of visit data we create […]

Wayan · 3 min read
SERVLET / NOTES</>↗
Servlet23 Nov 2006

How do I create a HelloWorld Servlet?

Servlet is a Java solution for creating a dynamic web application, it can be compared with the old CGI technology. Using Servlet we can create a web application that can display information from a database, receive information from a web form to be stored in the application database. This example shows the very basic of […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API19 Nov 2006

How do I shuffle elements of an array?

package org.kodejava.util; import java.util.Arrays; import java.util.Collections; import java.util.List; public class ArrayShuffle { public static void main(String[] args) { // Initialize the contents of our array String[] alphabets = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"}; // As the Collections.shuffle() method need a list for the parameter // we convert our array into […]

Wayan · 1 min read
SECURITY / NOTES</>↗
Security14 Nov 2006

How do I create an encrypted string for a password?

You are creating a user management system that will keep user profile and their credential or password. For security reason you’ll need to protect the password, to do this you can use the MessageDigest provided by Java API to encrypt the password. The code example below show you an example how to use it. package […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API09 Nov 2006

How do I use for-each in Java?

Using for-each command to iterate arrays or a list can simplified our code. Below is an example how to do it in Java. The first loop is for iterating array and the second for iterating a list containing a some names. package org.kodejava.lang; import java.util.ArrayList; import java.util.List; public class ForEachExample { public static void main(String[] […]

Wayan · 1 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.