Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

CORE API / CATATAN</>
Core API15 Jun 2010

How do I get timezone ids by their milliseconds offset?

package org.kodejava.util; import java.util.TimeZone; public class TimeZoneByOffset { public static void main(String[] args) { // Gets the available IDs according to the given time zone // offset in milliseconds. int offset = 8 * 60 * 60 * 1000; String[] timezones = TimeZone.getAvailableIDs(offset); System.out.println("List of available IDs for GMT:+08:00"); System.out.println("===================================="); for (String id : timezones) […]

Wayan · 1 menit baca
JDBC / CATATAN</>
JDBC15 Jun 2010

How do I retrieve available catalogs in database?

The examples below show you how to get the available catalog names in MySQL database. The available catalog names can be obtained from the DatabaseMetaData object by calling the getCatalogs() method. This method returns a ResultSet object. We iterate it and get the schema name by calling the getString() method and pass TABLE_CAT as the […]

Wayan · 2 menit baca
CORE API / CATATAN</>
Core API12 Jun 2010

How do I create port scanner program?

In this example you’ll see how to create a simple port scanner program to check the open ports for the specified host name. package org.kodejava.net; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; public class PortScanner { public static void main(String[] args) throws Exception { String host = "localhost"; InetAddress inetAddress = InetAddress.getByName(host); String hostName = inetAddress.getHostName(); […]

Wayan · 1 menit baca
JDBC / CATATAN</>
JDBC09 Jun 2010

How do I get the maximum number of concurrent connections?

This example shows you how to get the maximum number of concurrent connections to a database that are possible. To get this information, we use the DatabaseMetaData.getMaxConnections() method call. If the return value is zero, it means that there is no limit or the limit is unknown. package org.kodejava.jdbc; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.SQLException; […]

Wayan · 2 menit baca
JDBC / CATATAN</>
JDBC07 Jun 2010

How do I check whether a driver is JDBC compliant?

package org.kodejava.jdbc; import java.sql.Driver; import java.sql.DriverManager; import java.sql.SQLException; public class JDBCCompliant { private static final String URL = "jdbc:mysql://localhost/kodejava"; public static void main(String[] args) { try { Driver driver = DriverManager.getDriver(URL); // Check if the driver is a genuine JDBC compliant driver. if (driver.jdbcCompliant()) { System.out.println("A genuine JDBC compliant driver"); } else { System.out.println("Not...

Wayan · 1 menit baca
JDBC / CATATAN</>
JDBC07 Jun 2010

How do I get JDBC driver property information?

The example below shows you how to get the information about the possible properties for the corresponding JDBC driver. package org.kodejava.jdbc; import java.sql.*; public class DriverPropertyInfoDemo { private static final String URL = "jdbc:mysql://localhost/kodejava"; public static void main(String[] args) { try { // Gets information about the possible properties for this // driver. Driver driver […]

Wayan · 2 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

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

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.