Tag: guide
How to Declare an Octal literal in Java ?
Problem Statement You want to declare an octal literal in Java. Solution Prefix the value with 0. A literal that contains leading zero is an octal number. The output of the above program will be 8 21
Json.NET & Oxygene – How to Serialize a Collection?
Do you want to serialize an collection in your Remobjects Oxygene.NET application?. Json.NET supports this functionality with ease. The Collection can be an Array , Dictionary or List. You need to simply pass collection to the JsonConvert.SerializeObject static method which would serialize the collection and return you the Json string. How to Serialize a Collection in Oxygene.NET using Json.NET library ? For example , assume…
SQL Server 2014 Tutorial – Open SQL Server Instance Port in Windows Firewall
Problem Statement You need open the SQL Server Instance port number in Windows Firewall so that you can connect to SQL Server from another machine. Solution When you try to connect to the SQL Server instance from another machine , you might receive the connection timeout error . To allow the users of other machine to connect to your SQL Server instance , you need…
Java – How to get the String representation of the Boolean value in Java ?
Problem statement You need to convert the Boolean value to string and display the string representation of the same. Solution Use the toString static method defined in the Boolean class for the conversion. The output of the above program is Abundantcode.com Java Tutorials false
How to Check if Integer is a multiple of a number in Java?
If you want to check if the integer value is a multiple of a number in Java , you can use the modulus (%) operator . If you get the result as zero , then it is considered as multiple of a number. How to Check if Integer is a multiple of a number in Java? Below is a sample code snippet demonstrating the usage…
How to append an array to another in JavaScript ?
In JavaScript , you may want to append one array to another array(s) to combine their elements resulting in to a single array. How to append an array to another in JavaScript ? You can use the concat method of JavaScript to achieve the same. Below is a sample code snippet demonstrating the usage of the concat method of array in JavaScript to combine multiple…
Java – How to declare Hexadecimal literal ?
Problem statement You need to declare an Hexadecimal literal in Java and display the result on a console window. Solution Hexadecimal numbers can contain numbers from 0-9 as well as characters A-F where A-F represents 10-15. You can prefix the numbers with 0X to denote it as hexa decimal number as shown below. The output of the above program will be 10 21
SQL Server 2014 Tutorial – Personalize SQL Management Studio
Problem Statement You need to personalize SQL Server Management Studio. Solution There are various personalization options available for the SQL Server users in the SQL Management Studio. For example, if you want the Object explorer to be place on a different position instead of showing it in the left side of the SSMS, you can just move it by clicking it on the title bar…
ElasticSearch – How to Install ElasticSearch ?
Problem Statement You need to download , install and Elastic Search on Windows and Mac OS X machines. Solution You can download ElasticSearch which is available in various formats like Zip , Tar.gz from https://www.elastic.co/downloads/elasticsearch . The installation is pretty simple and infact you dont need to do anything special to install ElasticSearch on your machine. You need to extract or uncompress the file. Note…
Java – How to document your code ?
Problem Statement You need to document your java classes so that it helps in maintenance. Solution Use Javadoc and place comments before any method , field or class to document. Just enter /** to start writing the comments using javadoc. The subsequent lines needs to begin with * and end the comment section with */ Below is a sample code demonstrating the usage of the…
Java How to – Get Environment Variables
Problem Statement You need to programmatically get the values of the environment variables from your java program. Solution Use java.lang.System.getenv method to get the environment variables from your java program from Java JDK 1.5 and higher version. You can pass the “PATH” as parameter to the method to retreive the path from the environment variable. When no arguments are passed, it returns all the environment…
Java – How to Check if the Double value is not a number ?
Problem Statement You need to find out if the given double value is not a number in Java. Solution Use the method isNaN() defined in the Double class to find out if the given number is not a number in Java. The output of the above program is Abundantcode.com Java Tutorials true