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.

APPLET / CATATAN</>
Applet10 Apr 2010

How do I get and display an image in Applet?

To display an image in an applet we first need to obtain the image object itself. A call to applet’s getImage(URL url, String name) method help us to create an image object from the specified URL of the image. For displaying the image on the applet’s screen we draw it in the paint() method using […]

Wayan · 1 menit baca
APPLET / CATATAN</>
Applet05 Apr 2010

How do I get Applet’s document URL?

The code snippet below show you how to get the URL of the document (HTML, JSP, etc.) where the Applet is embedded. To obtain this document URL we use the getDocumentBase() method call provided by the Applet class. In the paint() method below we use the getDocumentBase() to create a URL as a link to […]

Wayan · 1 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons31 Mar 2010

How do I move directory to another directory with its entire contents?

Below is an example to move one directory with all its child directory and files to another directory. We can use the FileUtils.moveDirectory() method to simplify the process. package org.kodejava.commons.io; import org.apache.commons.io.FileUtils; import java.io.File; import java.io.IOException; public class DirectoryMove { public static void main(String[] args) { String source = "F:/Temp/source"; File srcDir = new File(source); […]

Wayan · 1 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons31 Mar 2010

How do I copy directory with all its contents to another directory?

To copy a directory with the entire child directories and files we can use a handy method provided by the Apache Commons IO FileUtils.copyDirectory(). This method accepts two parameters, the source directory and the destination directory. The source directory should be available while if the destination directory doesn’t exist, it will be created. package org.kodejava.commons.io; […]

Wayan · 2 menit baca
APACHE COMMONS / CATATAN</>
Apache Commons28 Mar 2010

How do I copy a URL into a file?

The code snippet below shows you how to use the FileUtils.copyURLToFile(URL, File) method of the Apache Commons IO library to help you to copy the contents of a URL directly into a file. package org.kodejava.commons.io; import org.apache.commons.io.FileUtils; import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URL; public class URLToFile { public static void main(String[] args) { […]

Wayan · 1 menit baca
JDBC / CATATAN</>
JDBC28 Mar 2010

How do I set the maximum rows to read in a query?

If you want to limit the result of your query, you can call the Statement.setMaxRows(int max) method. This call will allow the ResultSet object contains a maximum number of records specified in the parameter of the setMaxRows method. Another way to limit the number of data returned in a query is to use the database-specific […]

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.