A Developer's Diary

Showing posts with label Tools N' Utilities. Show all posts
Showing posts with label Tools N' Utilities. Show all posts

Jan 10, 2013

Dealing with cache issues in Jnlp applications

Even though I had disabled the temporary internet files setting in the java control panel as shown below, my jnlp application will still not pick up the latest changes. This is a common issue faced by java web start application developers and becomes quite annoying if changes are not getting reflected. javaws -uninstall is an useful command related to java web start which clears up the cache for you and you need not struggle with deleting the jar files in the %temp% or other folders.

Command for deleting Java Web Start Cache
javaws -uninstall

Read more ...

Dec 26, 2012

Advantages of Base64 Encoding

Base64 encoding is a technique used for converting binary data into blocks of printable ASCII characters. The Base64 encoding algorithm uses a special conversion table to assign one of the 64 ASCII characters to every 6 bits of the bytestream. That is to say, a binary stream is divided into blocks of six bits and each block is mapped to an ASCII character. The ASCII character with the value of 64 (character =) is used to signify the end of the binary stream.

Advantages
1. 7 Bit ASCII characters are safe for transmission over the network and between different systems
2. SMPT protocol for emails supports only 7 Bit ASCII Characters. Base64 is the commonly used technique to send binary files as attachments in emails.

Disadvantages
1. Base64 encoding bloats the size of the original binary stream by 33 percent
2. Encoding/Decoding process consumes resources and can cause performance problems

Read more ...

Dec 19, 2012

VI Editor - A great tool for testing Regular Expressions

VI is one of the fastest and most successful editor used by the unix users. VI can also boast of having a regular expression search feature which I found amongst easiest to use and easy to test your regular expressions as well

Consider the file pom.xml below. We are going to demonstrate a step by step way of selecting only line numbers in the file and finally performing a search and replace to remove all the leading line numbers from the text

1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 2   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 3   <modelVersion>4.0.0</modelVersion>
 4   <groupId>com.examples.spring</groupId>
 5   <artifactId>HelloSpring</artifactId>
 6   <packaging>jar</packaging>
 7   <version>1.0-SNAPSHOT</version>
 8   <name>HelloSpring</name>
 9   <url>http://maven.apache.org</url>
10   <dependencies>
11     <dependency>
12       <groupId>junit</groupId>
13       <artifactId>junit</artifactId>
14       <version>3.8.1</version>
15       <scope>test</scope>
16     </dependency>
17   </dependencies>
18 </project>

Read more ...