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 Record Using BlazeMeter Plugin (JMeter)
Honestly speaking if you already have a mature or established process using 'native' JMeter from Apache, without...
NFT AUTOMATION
Common Issues with HP Load Runner
HP Load Runner is a popular automated load and performance testing tool that emulates actual load to...
PROGRAMMING
Java Tutorial #3 – Java Arrays
Table of Contents One Dimensional Array Declaring Array Allocting Memory to Array Accessing Array Elements Initializing Array Length...
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 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...
Format Decimal Numbers with Grouping Separator
The DecimalFormat class has a method called setGroupingSize() which sets how many digits of the integer part to group. Groups are separated by the grouping separator. Hence you can use setGroupingSize() method to change the default group digits number as you need. The following example demonstrates setting grouping separator for integer part of the decimal number: 219bd6a59d7bd881631c58a62a5ed178 The above code produces the...
CODE SNIPPETS | CODEX
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 java.util.Calendar
The java.util.Calendar class also encapsulates a date. The Calendar class has some more features than the java.util.Date class....
Java Gists
Convert List to Array Using For-Loop
The simplest way to convert a List to an array is to use a for-loop. The following code...
ÂÂ