Java classes and their variables and methods can use access modifiers – private, public, protected, and package-level (no keyword). These access modifiers set the classes’ visibility, constructors, and instance or class variables and methods to the other parts of the
Rust – Drop Trait To Run Codes After Instance is Destroyed
In Rust, we can run codes when an instance is about to be destroyed. This post briefly demonstrates how to perform just that.
docker-compose.yml For SFTP from Atmoz
This post demonstrates how to create an SFTP Docker container from Atmoz using docker-compose.yml with the most straightforward configuration to allow for developers. Sometimes we can’t just install any FTP servers on our machines. It may be due to corporate
Java – Block main thread until another Thread completes
Given a simple Java application with a Thread object, we want to block the main thread until the Thread object completes its execution. The main thread is where the Thread object is created and its start method invoked.
How to Install Rust on Windows 10 The Easy And Painless Way
This post shows how to install Rust on Windows 10. There are two ways to do this – through rustup-init.exe and curl within the Windows Subsystem for Linux. This post does that former. Requirements To start with, we use the
SFTP in Batch Mode Hangs Using Runtime.exec() in Java
When we have applications that call native commands via java.lang.Runtime.exec(), be wary of the invocations. It could potentially output an overwhelmingly large number of texts to the standard output—for example, the sftp command in Linux. Therefore, causing the codes to hang.
Invoking JavaScript from within an Applet
If you did not know that you can invoke JavaScript from within an Applet, chances are you would port most JavaScript codes to Java or, worse, resort to some exotic coding. Otherwise, you would reuse the existing codes. This post
Using JPoller
JPoller is a general purpose Java component to poll directories and asynchronously notify client code of incoming files.
Convert String to LocalDate in JodaTime and Java 8
Handling dates (and time) is never easy and time-consuming. Moreover, its support by Java has been inadequate. If you find yourself longing for some libraries to ease the pain, go ahead because you are not alone. For pre-Java 8, one
PostgreSQL Terminate Active Connections
Sometimes we need to terminate active connections to a database forcefully. Doing such requires two things, determining which active connections to target and running the command to terminate them. This post shows how to terminate active connections using some SQL