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 API28 Jun 2007

How do I create a directories recursively?

The code below use File.mkdirs() method to create a collection of directories recursively. It will create a directory with all its necessary parent directories. package org.kodejava.io; import java.io.File; public class CreateDirs { public static void main(String[] args) { // Define a deep directory structures and create all the // directories at once. String directories = […]

Wayan · 1 min read
BASIC / NOTES</>↗
Basic28 Jun 2007

How do I compare string regardless of their case?

Here is an example of comparing two strings for equality without considering their case sensitivity. To do this we can use equalsIgnoreCase() method of the String class. Let’s see an example below: package org.kodejava.basic; public class EqualsIgnoreCase { public static void main(String[] args) { String uppercase = "ABCDEFGHI"; String mixed = "aBCdEFghI"; // To compare […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API27 Jun 2007

How do I insert a string in the StringBuilder?

package org.kodejava.lang; public class StringBuilderInsert { public static void main(String[] args) { StringBuilder alphabets = new StringBuilder("abcdfghopqrstuvwxyz"); System.out.println("alphabets = " + alphabets); // |a|b|c|d|f|g|h|i|…. // 0|1|2|3|4|5|6|7|8|… // // From the above sequence you can see that the index of the string is // started from 0, so when we insert a string in the fourth […]

Wayan · 1 min read
CORE API / NOTES</>↗
Core API25 Jun 2007

How do I remove substring from StringBuilder?

This example demonstrate you how to use the StringBuilder delete(int start, int end) and deleteCharAt(int index) to remove a substring or a single character from a StringBuilder. package org.kodejava.lang; public class StringBuilderDelete { public static void main(String[] args) { StringBuilder lipsum = new StringBuilder("Lorem ipsum dolor sit " + "amet, consectetur adipisicing elit."); System.out.println("lipsum = […]

Wayan · 1 min read
SERVLET / NOTES</>↗
Servlet25 Jun 2007

How do I read servlet context initialization parameters?

package org.kodejava.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.Enumeration; import javax.servlet.Servlet; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(urlPatterns = "/context-init-param") public class ContextInitParameter...

Wayan · 2 min read
SERVLET / NOTES</>↗
Servlet24 Jun 2007

How do I know session last access time?

package org.kodejava.servlet; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.io.PrintWriter; import java.util.Date; @WebServlet(name = "SessionLastAccessTime", urlPatterns = "/last-access-time") public class SessionLastAccessTime ext...

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.