Tag: How to
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…