Tag: How to

C Program to check if a number is Palindrome or not

Problem Write a program in C to check whether a given number is a palindrome or not. How to find if the number is a palindrome or not in C ? A palindrome is a number where the reverse of a number is equal to the original number. Here’s a program in C demonstrating how to do it. Output Abundantcode.com coding sample Enter a number:…

How to Clone an Object in JQuery ?

If you are looking at cloning an object in JQuery , you can do that using the jQuery’s extend method . You can perform the shallow copy or deep copy by setting the parameters. Below is a sample code snippet demonstrating how to clone an object in JQuery How to Clone an Object in JQuery ? The above method performs the shallow copy . You…

Example of Object Initializer in C#

Object Initializer is one of the cool features in C# that lets the developers to initialize the objects as and when they are declared . Example of Object Initialize in C# Below is a sample code snippet that demonstrates how to use Object Initializers in C#.

How to get the date part from the date time in SQL Server ?

If you are on SQL Server 2008 and higher version and want to get the date part of the datetime data in SQL Server , you can use the CONVERT method as shown in this post. How to get the date part from the date time in SQL Server ? If you want to get the current date leaving out the time from the datetime…

How to Terminate an Windows Phone 8 App using C#?

If you want to programmatically terminate the windows phone 8 application , you can use the Application.Terminate() method . How to Terminate an Windows Phone 8 App using C#? When using the Application.Terminate() , the developers should make sure that all the necessary data is saved because , the Application Closing event handler wont be raised in this case.

C Program to find the size of primitive datatypes

Problem Write a program in C to find and display the size of the primitive datatypes likes int , float , double and char using the sizeof function. How to find the size of primitive datatypes in C? Output Size of int: 4 bytes                            Size of float: 4 bytes                              Size of double: 8 bytes                              Size of char: 1 byte

How to Create an Implicit Style in Windows Phone 8 ?

In one of the previous article , we demonstrated how to create an explicit style in Windows Phone 8 for TextBlock . In this article , we will explore how one can create an implicit style in Windows Phone 8. How to Create an Implicit Style in Windows Phone 8 ? To create an Implicit style , the steps are pretty simple , don’t specify…

How to disable editing of items in a combo box in c#?

When working in Win forms using C# and especially when you use the combo box , you would have noticed that by default the user can edit the values inside during the runtime. How to disable editing of items in a combo box in c# (win forms) ? Assuming that the combobox name is combobox1 , here the code to get this behavior.

How to Auto play the Youtube video using the Embed code?

Do you want to auto play the Youtube video using the Embed code? It’s pretty simple. Follow the below steps to know more about auto playing the youtube video. The Embedded youtube video might look something like this <iframe src=”http://www.youtube.com/embed/<Code>”/> How to Auto play the Youtube video using the Embed code? To auto play the video , we have to simply add another parameter(autoplay=1) to…

How to Save File to Isolated Storage in Windows Phone 8?

There are times when you want to copy the files to isolated storage in your Windows Phone 8 App which you can do it easily using C#. Below is a sample code snippet that demonstrates the copying of file to isolated storage in Windows Phone 8 using C#? How to Save File to Isolated Storage in Windows Phone 8? Calling the function Note: make sure…

C Program to find the Sum of natural numbers

Problem Write a program in C to find the sum of natural numbers using recursive function. How to find the sum of natural numbers using recursion in C ? Output Abundantcode.com Coding samples Enter the limit : 5 Result = 15

How to retrieve integer value and remove all other strings in C# ?

If you want to retrieve the integer value and remove all other strings in C# , one can use the Regex.Replace method and apply regular expression easily and get only the integer part from a string. How to How to retrieve integer value and remove all other strings in C# ? Below is a sample sourecode demonstrating How to retrieve integer value and remove all…

How to Implement Rating Control in Windows Phone 8 App ?

If you are looking to implement the rating control in your windows phone 8 app which lets the users to rate an item within the specified values/stars , here’s an useful control from Windows Phone toolkit called “RatingControl” which can used . <Toolkit:Rating Height=”30″ Grid.Row=”1″ Value=”0.6″ ItemCount=”0″ x:Name=”ctAbundantcodeRating”> You can download Windows Phone Toolkit via NuGet manager from Visual Studio 2012.