WEBLOG
How To Setup Automatic SSH-Agent for GitBash
Using below procedure, you shall be able to setup SSH-Agent to run automatically whenever GitBash is launched on Windows. The ssh-agent process will continue to run until you log out, shut down your computer, or kill the process. Also you may need to add your SSH keys separately unless already loaded or available as per your config. However the main...
How To Configure Virtual Hosts in XAMPP
Apache has made it very easy to have multiple websites or web applications running on the same physical server, and access each using a custom domain name. This is known as virtual hosting, and each virtual host can be mapped to a different subdirectory of the server. 1. What are VirtualHosts? The term 'Virtual Host' refers to the practice of running...
Shortcut To Auto-Insert ‘main’ Method in IntelliJ
IntelliJ Live Templates Live templates let you insert frequently-used or custom code constructs into your source code file quickly and efficiently IntelliJ IDEA comes with a set of predefined Live Templates. You can use them as-is, or modify them to suit your needs. If you want to create a new live template, you can do it from scratch, on the basis of...
How To Change Apache Http & SSL Ports in XAMPP
Why change Apache Port By Default, Apache runs HTTP on port 80 and SSL on port 443 in XAMPP. Generally, you may need to change the port number for the following reasons : For customized network design. For security purposes. For resolving port conflicts with other applications. For example, users commonly report a conflict between Skype and Apache both using port 80. Checking port availability Before...
How To Customize GitBash For Windows
By default the GitBash prompt settings / configuration come from shell script called 'git-prompt.sh'. This is usually hosted inside 'profile.d' directory inside the GitBash installation directory. The below described method only focusses on customizing the 'GitBash' prompt and NOT about customizing default 'Bash' prompt on Linux terminals. fd30baa716dbfbe282fe147ab717b664
Maven Common Commands Reference
Maven offers a good set of commands and CLI Options to carry out wide range of Dev tasks. Most of these commands are in fact Maven build life cycles, phases and goals. Here is a list of common Maven commands along with explanation. But before we go through the Maven commands, it is good idea to understand the structure or...
HomeWeblog
FT AUTOMATION
Desired Capabilities in Selenium Web Driver
1. Desired Capabilities in Selenium The performance of a Web application may vary according to different browsers and...
HOW-TO'S
How To Change Font for Eclipse Editor Pane
This article shows how to change the text size and style for the Eclipse editor pane. The font...
NFT AUTOMATION
How To Create FTP Test Plan in JMeter
About File Transfer Protocol File Transfer Protocol is a widely used standard network protocol for FIle sharing between...
PROGRAMMING
Java DecimalFormat Class
When you need to format decimal numbers, such as taking three or two decimal places for a...
Getting Started With Hibernate
Introduction Hibernate is a framework which allows you to access database tables from Java code. Before Hibernate came into existence, JDBC was widely used. JDBC is an API to access a relational database from a java program. JDBC basically allows you to execute SQL statements from Java code, so any SQL statement which you can run on a database directly,...
How To Sort List in Java
Introduction A List is an interface in the Java collection framework. It can be used to store objects. Programmers often encounter scenarios where they need to sort a List. There are several ways you can achieve this. In the next few sections, I will be going over each method in detail. 1. Using Collections.sort The Collection framework has the java.util.Collections class. This...
How To Install Pacman For Git on Windows
The 'Git for Windows' by default does not come with MSYS2 package manager called 'Pacman' and hence it is a limited version or subset of the MSYS2. Also the bash which supplied wih Git for Windows is not a full version of bash hence does not provide for full Linux environment. Given below is the easiest method (bullet 3...
How To Convert String To Date in Java
Introduction There are often scenarios in programming, where you will need to convert a date in String format to an actual Date object. For example, such a scenario may occur when the date is read from an end user via a UI and sent to the back-end code. In this article, we will understand the different ways in which you...
How To Concatenate Strings in Java
Introduction In Java, a String is a sequence of characters. There are often programming situations where you will need to concatenate Strings. There are several ways in which you can achieve this. In the next few sections, I will be going over each method in detail. Using + Operator The + operator is also known as the concatenation operator. It can be...
Setting Max/Min Digits For Decimal Numbers With Java DecimalFormat
The DecimalFormat class offers the following four such methods which can be used to easily set the maximum and/or minimum digits for decimal numbers. As shown in the below table, two of these methods can set max/min digits for integer part while the other two methods can do the same for the fraction part of the decimal numbers as...
Rounding Decimal Number With Java DecimalFormat
The DecimalFormat class has a method called setRoundingMode() which can be used for setting the rounding mode for DecimalFormat object. The setRoundingMode() accepts RoundingMode class object as the parameter. You can pass any of the Enum constants available in the RoundingMode class as parameter to the setRoundingMode() method to achieve the desired rounding of decimal number. The following example demonstrates...
CODE SNIPPETS | CODEX
Java Gists
Concatenate Strings Using StringBuffer.append()
In addition to String, Java has the java.lang.StringBuffer and java.lang.StringBuilder classes. These can also be used to concatenate...
Java Gists
Convert List to Array Using Stream without Param
Java 8 has added the Stream API that helps to easily perform bulk operations on Collections. A new...
Java Gists
Convert String to Date Using SimpleDateFormat Class
Sometimes, you may need to convert a String to a java.util.Date object. For this, you need to use...
ÂÂ