Tag: How to
Commenting Code in PowerShell
This short article will explain in simple steps on how to comment the code in PowerShell. How to Comment Code in PowerShell ? You can use the # symbol to provide a comment in PowerShell. The newer version of PowerShell provides additional options for commenting with the help of <# #> block . This block can be used generally for the help comments. Visit PowerShell…
Deleting all the hidden rows and columns in the active worksheet using VBA
Do you want to delete all the hidden rows and columns in the active worksheet in Microsoft Excel using VBA ?. Here’s the code snippet that helps you to do it. How to delete all the hidden rows and columns in Active Worksheet using VBA in Microsoft Excel ?
How to Group Digits of a Number for Formatting in C# ?
If you want to group the digits of a number for formatting to display in C# , one could use the “N” formatting option . Below is a code snippet demonstrating how to use it. How to Group Digits of a Number for Formatting in C# ?
FSharp Interactive Commands
FSharp Interactive UI includes few good number of commands which can be used by the F# Developers . Below are some of the FSI Commands which can be used by the developers. FSharp Interactive Commands Cancel Interactive Evaluation – This option cancels the execution of the FSI . Reset Interactive Session – This option resets the execution of the current FSI . Cut – This…
How to use Phrase List Grammars for recognising Speech in Windows Phone Apps?
The List grammars is one of the grammars that the developers can use to create their own custom grammars. With this technique, simply create an array or collection of strings which are the phrase list and set it to the grammars list of the SpeechRecognizer Object. How to use Phrase List Grammars for recognizing Speech in Windows Phone Apps? Below is a code snippet demonstrating…
How to get specific columns from a Table in SQL Query ?
If you want to get the data from the specific columns from a table in your database , you can specify them in the query. For example, This would return the data of all the columns available in the Department table. If you want to get the data of the specific columns from the Department table , you can specify the column names in the…
How to Launch the Device Cellular Settings App from the Windows Phone 8 App?
Below is a sample code snippet that demonstrated how the developers can use the ConnectionSettingsTask launcher to launch the windows phone device’s Cellular settings app from the Windows Phone 8 App. How to Launch the Device Cellular Settings App from the Windows Phone 8 App?
How to use Phrase List Grammars (List) for recognizing Speech in Windows Phone Apps?
In one of the previous article, we saw how to use the Phrase List Grammars via the array of string for the speech recognition in Windows Phone Apps. Below is a code snippet demonstrating How to use Phrase List Grammars (List) for recognizing Speech in Windows Phone Apps? How to use Phrase List Grammars (List) for recognizing Speech in Windows Phone Apps?
How to Convert Hexadecimal number to decimal in JavaScript?
Below is a sample sourcecode snippet demonstrating the conversion of Hexadecimal number to decimal in JavaScript. How to Convert Hexadecimal number to decimal in JavaScript?
Creating an Animation in XAML and Silverlight
Below is a sample code snippet that demonstrates how to create a simple animation in XAML and Silverlight Creating an Animation in XAML and Silverlight <Grid x:Name=”LayoutRoot” Background=”White”> <Canvas x:Name=”ACCanvas” xmlns=”http://schemas.microsoft.com/client/2007″ xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” Width=”400″ Height=”300″ > <Canvas.Background> <SolidColorBrush Color=”Yellow”/> </Canvas.Background> <Rectangle Width=”190″ Height=”160″ Fill=”Red” Stroke=”Green” Canvas.Left=”0″ Canvas.Top=”50″ RenderTransformOrigin=”0,0″ > <Rectangle.RenderTransform> <TransformGroup> <RotateTransform x:Name=”RotateTransform” Angle=”0″/> <ScaleTransform x:Name=”ScaleTransform” ScaleX=”0″ ScaleY=”0″ /> </TransformGroup> </Rectangle.RenderTransform> </Rectangle> </Canvas> <Grid.Triggers> <EventTrigger RoutedEvent=”Grid.Loaded”>…
NULLIF function in SQL Server
The NULLIF function in SQL Server returns a NULL value if the two input expressions return the same value else the first value (expression) is returned. For example , assume that you want to compare two columns (Address1 and Address2) in the Address table and want to return NULL if both are same to indicate there is NO change and if the addresses are different…
Case insensitive string comparison for Contains in C#
When using the string.contains method , the comparison is done based on the exact string that is passed as parameter. In this case , the comparison is case-sensitive. using System; namespace ACConsoleApp { class Program { static void Main(string[] args) { string input = “This is a WeLcome string”; var output = input.Contains(“Welcome”); Console.WriteLine(output); Console.ReadLine(); } } } In the above code snippet , the…
C Program to find the Factorial of a Given Number
Problem Write a program in C programming language to find the factorial of a given number and display it on the screen. How to find the factorial of a Number in C? The factorial of a number is generally specified as follows N! = 1*2*3*4… N This applies only for the positive number. The factorial of 0 is considered to be 1. Here’s a program…
Java – How to Check if integer is multiple of a number?
Problem Statement You need to check if the integer number is a multiple of a number in Java. Solution Use the modulus operator and check the remainder to find it out. Below is a sample code snippet demonstrating how to find if the number is a multiple of 4.
Navigate from One Page to Another in Windows Phone 8 using NavigationService
When developing a WP8, you may encounter a scenario where you need to navigate from one page to another within your application. The PhoneApplicationPage’s class has the property NavigationService which can be used to navigate from one page to another. The NavigationService exposes the Navigate method which loads the specified windows phone application page . Navigate from One Page to Another in Windows Phone 8…
How to Get the List of Appointments from the Calendar App in Windows Phone using C# ?
If you want to programmatically get the list of appointments from the calendar application of your Windows Phone device programmatically , you can use the Microsoft.Phone.UserData.Appointments. How to Get the List of Appointments from the Calender App in Windows Phone using C# ? Enable the ID_CAP_APPOINTMENTS in the WMAppManifest file and then create an instance of the Appointments class and call the SearchAsync method with…
How to get the table structure in SQL Server ?
To get the details of the table structure along with the indexes and the constraints , you can use the sp_help command as demonstrated in this blog post. How to get the table structure in SQL Server ?
How to Concatenate Strings in C# using LINQ?
Assume that you have an array/List of string which needs to be concatenated. One can concatenate strings using + operator, StringBuilder etc. . . . How about concatenating strings using LINQ? Below is a sample source code that demonstrates how to concatenate strings in C# using LINQ? How to Concatenate Strings in C# using LINQ?
C program to reverse a number
Problem Write a program in C to display the reverse of a number. The below program takes the input from the user in the form of an integer number and uses the while loop until the number becomes o. How to reverse a number in C ? Output Abundantcode.com coding sample Enter a number: 786543 Reverse Number = 345687
UPDATE from SELECT query in SQL Server
Assume a scenario where you have a temporary table contains the data and would like to update a table using the values from the temporary table. Here’s an query demonstrating how to do it in SQL Server.