chiang-sh·Aug 24LeetCode Notes #42: Trapping Rain WaterGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after…
chiang-sh·Feb 5Updating JTextArea synchronously while a process is runningWe have a Java Swing application that converts PDF to TIFF. The Swing frame contains a log block, which is a JTextArea, and new messages…
chiang-sh·Dec 23, 2025LeetCode Notes: ArrayHere are some small notes for the following LeetCode solutions:
chiang-sh·Nov 20, 2025Improving the Image-to-PDF Conversion ProcessIn the previous post, we used a function to decrypt image files and convert them into PDF files.
chiang-sh·Nov 13, 2025To descrypt an image file and convert it into a PDF fileOne of our customer’s systems is going to be deprecated, so they want a small program to extract the images from the system easily. Most of…
chiang-sh·Oct 16, 2025ImageIO does not close the InputStream argument automaticallyThere is a barcode reader function in our app. It reads barcodes from image files, mainly .tiff files. After reading the barcode and…
chiang-sh·Sep 3, 2025Using Presigned URLs for File DownloadsThere is a PDF download function in the project, which can merge several images and generate a PDF file. We use POST to send the file…