Tag: How to
How to Allow Null Values for Integer in C# ?
In order to allow null values to an integer or for any value types , we need to make the data type as Nullable<T> where T refers to type. How to Allow Null Values for Integer in C# ? There are 2 ways you can set null value to value types in C# .
Java – How to calculate of Power of a BigInteger Number ?
Problem Statement You need to calculate the power of a number of type BigInteger in Java. Solution Use the instance method “pow” of the type BigInteger by passing the exponent which will return the power as shown below. The output of the above program is 26665751846889541009
CASE expression in a Query in SQL Server
You can use the CASE expression in a T-SQL query in SQL Server to get the same behavior of the switch statement in the programming languages. Below is a sample Query demonstrating the implementation of the CASE expression in a query in SQL Server. CASE expression in a Query in SQL Server The query associates a Department group name to a country USA and UK…
How to convert Array to List in Java ?
This article will explain how to convert a simple array to list in Java . How to convert Array to List in Java ? The Java’s array class provides necessary methods to convert the array to the List using the asList method. Below is a sample code snippet demonstrating the usage of the Arrays.asList method to convert array to List.
Sort Associative array with asort method in PHP
You can use the function asort if you want to sort an associative array in PHP. Sort Associative array with asort method in PHP Below is a sample code snippet demonstrating the usage of asort method to sort Associative array in PHP.
How to Declare and Define an Unsigned Integer data type variable in F# ?
How to Declare and Define an Unsigned Integer data type variable in F# ?
How to Combine a Filename with a Directory in C# ?
If you need to combine the filename with a directory name in C# , use the built in Path class to do it instead of doing it manually. How to Combine a Filename with a Directory in C# ? Below is a sample code snippet demonstrating how to use Path.Combine method in C#.
How to Check if the ArrayList is read-only in C# ?
There are times when you would use the read-only wrapper in order to prevent modifying the ArrayList. We use the ArrayList.ReadOnly method to create such collection. When doing so , you might want to check if the ArrayList is Read-only or not. How to Check if the ArrayList is read-only in C# ? Use the IsReadOnly property defined in the ArrayList object to check this.
How to select N random rows using a T-SQL Query ?
You can use the TOP keyword and specify the number to retreive the TOP N records that the query returns. Additionally , order the records by newid() function using the ORDER BY clause to make the records random. How to select N random rows using a T-SQL Query ?
How to Pass Method or Function as Parameter in C# ?
The C# 3.0 and higher version provides the option for the user to specify the function or method as parameter using the Func delegate . How to Pass Method or Function as Parameter in C# ? Below is a sample code snippet demonstrating how to pass method as parameter in C# using Func delegate.
Initialize Array with Array Initializer and Anonymous Type
Below is a sample code snippet demonstrating how to initialize an array with Array Initializer and anonymous type Initialize Array with Array Initializer and Anonymous Type
How to Declare and Define an unsigned long data type variable in F# ?
How to Declare and Define an unsigned long data type variable in F# ?
C Program to find the G.C.D of a number using Recursive function
Problem Write a program in C to find the find the G.C.D of a number using recursion and display the result. How to find the G.C.D of a number using recursion in C ? Output Abundantcode.com Coding samples Enter the first number: 8 Enter the second number: 4 G.C.D of 8 and 4 is 4.
How to Create an Explicit Style in Windows Phone 8 ?
The developers can utilize the style resources to create styles and use them within the Windows Phone Application. For example , the developers can create a style for the textblock with a key identifier in the app.xaml file and then reuse them in different screens of the application. How to Create an Explicit Style in Windows Phone 8 ? To create an explicit style ,…
How to send SMS in Windows Phone 8 Programatically using C#?
In Windows Phone, the developers can send SMS from their Windows Phone 8 Programatically using the launchers. The Windows Phone SDK provides the SMSComposeTask launcher which can be used to send SMS in Windows Phone 8. Below is a code snippet demonstrating the usage of the SMSComposeTask to send SMS in Windows Phone 8. How to send SMS in Windows Phone 8 Programatically using C#?
Python Program to add two integers
Problem Write a program in Python to add two integers and display the result on the screen. Python Program to add two integers Output Enter first number: 1 Enter second number: 2 1 + 2 = 3.0
How to Get the string from AppResources file in Windows Phone 8 ?
If you want to retrieve the value from the AppResources file in Windows Phone 8 , you can use one of the below options. How to Get the string from AppResources file in Windows Phone 8 ? 1. Using the AppResources.<Property> Assume that the string in the AppResources file is ApplicationTitle and the which contains the value “Abundantcode for Windows Phone development” . , you…
Adding a WinJS control in JavaScript code in Windows 10 App
You can add the WinJS control to the page in the markup page or from your javascript code. How to add a WinJS control in your JavaScript code for Windows 10 Apps ? Add the element in the markup (HTML page) that will host your control. <div id=”element”></div> In your JavaScript code , retreive the element using the document.getElementById method. var containerElement = document.getElementById(“element”); You…
How to allow the user to pick Color from System Color Picker in Winforms Application ?
There are times when you might need to provide the user with the ability to pick the colours within your Windows application . You can use the ColorDialog class which is a built-in color picker which lets the users to pick the color within the app. How to allow the user to pick Color from System Color Picker in Winforms Application ? Just initialize the…
Collapsible links for subcategories in Docusaurus Sidebar
Are you looking at a way to get collapsible links under subcategories in Sidebar in Docusaurus?. We provide you few options in this blog post. One of the easiest way make the links under categories in docusaurus is to change set the docsSideNavCollapsible: true in the siteConfig.js. How to Get Collapsible Links for subcategories in Docusaurus Sidebar ? While the previous fix works only for…