Tag: How to

Searching in an Array in JavaScript

If you want to search an array for a value in JavaScript and retrieve the index of the found array element , you can use the Array’s indexOf method. How to search for an element in an array in JavaScript ? When using the indexOf method , if the value is found, it returns the index representing the array element. If the value is not…

C Program to Find the Largest Number from the 3 Input Numbers

Problem Write a program in C language that accepts 3 numbers as inputs and finds the largest among them and displays it on the screen. How find the largest number among the three input numbers in C language ? Output Abundantcode.com Coding samples                                   Enter number1 : 87                                                   Enter number2 : 54                                         Enter number3 : 23                                           87 is the largest number.

How to Call Other Constructors within the Same Class in C# ?

There are times when you want to avoid duplicating code and want to reuse them when working on multiple constructors . If you want to call other constructors from a constructor within the same class , you need to use the this keyword . How to Call Other Constructors within the Same Class in C# ? Below is a sample code snippet that demonstrates how…

Displaying all the worksheet names in Excel using VBA Code

Do you want to display the names of the worksheets in the excel workbook ?. Here;s how you can do it using the VBA Code. How to display all the worksheet names in Excel using VBA Code ? Open up the Microsoft Visual Basic for Application Window using the keyboard shortcut key “ALT + F11” and enter the following run and free F5 to run…

How to Split a String on newlines in C#?

Ever wanted to split an input string in to new lines in .NET (c#) that has a new line character? Below is a sample code snippet that demonstrates how to do it. How to Split a String on newlines in C#?

Example of Predicate Delegate in C#

Predicate Delegate is an interesting feature in .NET Framework which is like a reference to a function which returns either true or false. Example of Predicate Delegate in C# Below is a sample code snippet demonstrating the usage of Predicate Delegate in C#

How to Detect the Current device in Universal App ?

To detect the current device platform in the Windows Universal App , the developers can use the predefined ifdirectives WINDOWS_PHONE_APP and WINDOWS_APP . How to Detect the Current device in Universal App ? Eg : #if WINDOWS_PHONE_APP // wp8.1 #elseif WINDOWS_APP // windows 8.1 #endif

Java – How to Negate a BigDecimal in Java ?

Problem Statement You need to negate the value of the BigDecimal datatype in your java program. Solution Use the negate method defined in the BigDecimal class as shown below. The output of the above program is Abundantcode.com Java Tutorials -10102

How to Download Map in Windows Phone 8 Programatically using C#?

The Windows Phone 8 SDK provides the MapDownloadTask which lets the users to download the region map which can be used for offline usage. This will launch the Map Download App which lets the users to select the map which needs to be downloaded. How to Download Map in Windows Phone 8 Programatically using C#? Below is a sample code snippet demonstrating how the user…