Reading accelerometer data in windows phone 7

Add a reference to the Microsoft.Devices.Sensors assembly, and declare an instance of the Accelerometer class. Call the Start() method to generate accelerometer readings. using Microsoft.Devices.Sensors;   Accelerometer accelerometer = new Accelerometer(); accelerometer.Start(); accelerometer.ReadingChanged += new EventHandler<AccelerometerReadingEventArgs>(accelerometer_ReadingChanged); The event handler void accelerometer_ReadingChanged(object sender, AccelerometerReadingEventArgs e) { float X = (float)e.X; float Y = (float)e.Y; float Z […]
Continue reading…

Enjoyed this post? Share it!

 
 

Merge Datasets using C#

We can merge a dataset to another dataset using Merge. Lets assume we have two datasets ds1 and ds2. DataSet ds1 = new DataSet(); da1.Fill(ds, “temp”);
Continue reading…

Enjoyed this post? Share it!

 
 

Lambda functions in Javascript

JavaScript supports closures and lambda functions and is one of the most common scripting languages. JavaScript actually use these functions as a support to the object-oriented programming model. var Example = function() { this.public = function() { return "This is a public method"; };   var private = function() { return "This is a private […]
Continue reading…

Enjoyed this post? Share it!

 
 

Filemodes in Perl

O_RDONLY Read only O_WRONLY Write only O_RDWR Read and write O_CREAT Create the file if it doesn’t exist O_EXCL Fail if the file already exists O_APPEND Append to the file O_TRUNC Truncate the file O_NONBLOCK Non-blocking access Example use: $path = "C:\\file.txt"; sysopen(FH, $path, O_RDONLY) or die $!;
Continue reading…

Enjoyed this post? Share it!

 
 

SQL-Operators

What is an Operator in SQL? An operator is a reserved word or a character used primarily in an SQL statement’s WHERE clause to perform operation(s), such as comparisons and arithmetic operations. Operators are used to specify conditions in an SQL statement and to serve as conjunctions for multiple conditions in a statement. Arithmetic operators […]
Continue reading…

Enjoyed this post? Share it!

 
 

SQL-Datatypes

SQL data type is an attribute that specifies type of data of any object. Each column, variable and expression has related data type in SQL. Data types are used while creating tables.  Data types for a table column are specified based on the type of data needed to be stored. SQL offers six categories of […]
Continue reading…

Enjoyed this post? Share it!

 
 

SQL-Syntax

SQL SELECT Statement: SELECT column1, column2….columnN FROM TABLE_NAME SQL DISTINCT Clause: SELECT DISTINCT column1, column2….columnN FROM TABLE_NAME SQL WHERE Clause: SELECT column1, column2….columnN FROM TABLE_NAME WHERE CONDITION SQL AND/OR Clause: SELECT column1, column2….columnN FROM TABLE_NAME WHERE CONDITION-1 {AND|OR} CONDITION-2 SQL IN Clause: SELECT column1, column2….columnN FROM TABLE_NAME WHERE column_name IN (val-1, val-2,…val-N) SQL BETWEEN Clause: […]
Continue reading…

Enjoyed this post? Share it!

 
 

SQL-Overview

SQL is an ANSI (American National Standards Institute) standard. Introduction to SQL SQL is structured Query Language which is a computer language for storing, manipulating and retrieving data stored in relational database. SQL is the standard language for Relation Database System. All relational database management systems like MySQL, MS Access, Oracle, Sybase, Informix, postgres and […]
Continue reading…

Enjoyed this post? Share it!

 
 

Perl documentation

Have you ever wonder where can we find information about various in-built Perl functions\subroutines? If yes then you can find the same on any of the system where Perl is installed. You will just have to use ‘perldoc’. But how to use it? Let’s have a look at its theory and practical part: Theory: ‘perldoc’ […]
Continue reading…

Enjoyed this post? Share it!

 
 

Scalar function in perl

PERL’s scalar function returns different output when used with lists. Example Using ‘scalar’ with arrays: my @array = (’a’,’b’,’c’); my $valueReturned = scalar (@array); print "Value Returned : $valueReturned"; Output : Value Returned : 3 Example using ‘scalar’ with lists: my $valueReturned = scalar (’a’, ‘b’, ‘c’); print "Value Returned : $valueReturned"; Output : Value […]
Continue reading…

Enjoyed this post? Share it!