Tag: tutorial

Java How to – Find if the Class exists or not

Problem Statement You need to test for the presence of a class from your java program. Solution Use Class.forName method to find if a particular class exists. Below is a sample code snippet demonstrating the usage of Class.forName to find out if the class “test” exists. Note that this method throws an exception incase the class cannot be loaded. Note: You need to pass the…

Json.NET & C# – Installing Json.NET for C# projects in Visual Studio 2015

Json.NET is one of the popular high performance and open source JSON framework for the .NET Developers. It lets the developers to serialize and deserialize .NET objects and is considered to be one of the most popular .NET library. The first version of Json.NET was released sometime in June 2006 and now this library is used is most of the popular .NET open source projects…

How to copy array and increase size dynamically in Java ?

Below is a sample code snippet in Java demonstrating the steps to copy the array elements to a new array and increase the size dynamically. The program using the Arrays.copyOf method which lets the developers to create new array with a new size as well as copy the content of the old array to it at the same time. How to copy array and increase…

Java – How to check if a double value is Infinite ?

Problem Statement You need to find out if the given number of type double is Infinite or not. Solution Use the isInfinite method defined in the Double class to find of the given number is a infinite as shown below. The output of the above program is Abundantcode.com Java Tutorials true

Json.NET & C# – How to Seralize an Object ?

One of the ways to serialize an object to JSON string in C# in the Json.NET is using the SerializeObject method defined in the JsonConvert method. The JsonConvert class provides an easy to use wrapper class and method over the JsonSerializer. How to Seralize an Object in C# using Json.NET ? Below is the sample code snippet demonstrating the usage of JsonConvert.SerializeObject method in C#…

C Program to display Inverted half-pyramid using *

Problem Write a program in C to print Inverted half-pyramid using * as shown below.The program should take the number of rows as input. * * * * * * * * * * How to create and display Inverted half-pyramid pattern in C using * ? Output Abundantcode.com Coding samples Enter the limit : 4 * * * * * * * * *          …

SQL Server 2014 Tutorial – Assign TCP/IP Port to Database Engine

Problem Statement You need to change the SQL Server 2014 port number from 1433 to a different port number. Solution By default , SQL Server runs on the port number 1433. You can change it to different port number by following the below steps. 1. Open SQL Server 2014 Configuration Manager from the Windows Start menu. 2. In the left side bar of the Sql…

Different Tabs in the Package Manifest file in Universal App

The package manifest file in the Windows Store App and Windows Phone app (universal app) lets the developers to describe some of the key information about the application like the name , necessary device capabilities that the app can use and the requirements for the device to install the app etc. The name of the file would generally be Package.appxmanifest. Different Tabs in the Package…

Json.NET & Oxygene – How to Serialize an Object ?

One of the ways to serialize an object to JSON string in Oxygene # in the Json.NET is using the SerializeObject method defined in the JsonConvert method. The JsonConvert class provides an easy to use wrapper class and method over the JsonSerializer. How to Serialize an Object in Oxygene using Json.NET ? Below is the sample code snippet demonstrating the usage of JsonConvert.SerializeObject method in…

Java – How to use Packages to organize code ?

Problem Statement You need to use packages in java to organize your code. Solution Your Java program might the following Classes Interfaces Enums Other types There are times when your program might grow larger including th number of java classes used. You might want to organize these source files to that it is easier to maintain and avoid other issues like class name conflicts. Inorder…

Match Statement in F#

Match Statement is similar to switch statement in C# . Below is a sample code snippet demonstrating the use of Match statement in F#. Match Statement in F#

Json.NET & Oxygene – How to Deserialize an Object ?

One of the ways to Deserialize an object to JSON string in Oxygene in the Json.NET is using the DeSerializeObject method defined in the JsonConvert method. How to Deserialize an Object in Oxygene using Json.NET ? Below is a sample code snippet demonstrating how you can deserialize an object from Json string to Oxygene object using Json.NET. It takes the json string that contains the…

Microsoft Band and Android(Java) – Connect to the Band

Below is the sample code snippet demonstrating how to connect to the first microsoft band that is paired using the BandInfo and BandClient object. How to Connect to the Microsoft Band from android application using Java ? How to get the list of paired bands from the android application using java.

How to use array Rank in C# ?

In C# , the Rank property of the array is is used to get the rank of the array. In simple terms , rank refers to the number of dimensions of the array. How to use array Rank in C# ? You can get the number of dimensions of the array using the Rank property of the array. For instance , the Rank property of…