Monday, March 8, 2010

Global variable in Silverlight

To share the value across, global variables are required. Similarly, if a value has to be passed from one XAML to another global variable concept can be used.

Steps:
1) Create property in APP.XAML

Private _gloVar As String

Property gloVar() As String
Get
Return _gloVar
End Get
Set(ByVal value As String)
_gloVar = value
End Set
End Property


2) From one XAML's code behind, create object for APP and then get the current instance.
3) Using that object, property created in step 1 is accessible. Using this set the value.

'Setting value from one xaml
'get the current application object
Dim objApp As App = App.Current

'set the value to the app var
objApp.gloVar = "Value you want to store"

4) From where (XAML) you want value to be used, get current instance of the APP like described in step 2 and access the property value from that object.

'Reading the value from another xaml
'get the current Application object
Dim objApp As App = App.Current

'read the application variable
TextBlock.Text = "Content loaded from global variable: " + objApp.gloVar

Thursday, July 9, 2009

How to find SQL Server Property using query

Here’s a quick trick the will allow you to easily retrieve information about the Microsoft SQL Server version that you are currently running. This quick how-to was written using SQL Server 2005, but it’s applicable to SQL Server 2000 as well.
Login to the Microsoft SQL Server Management Studio (Query Analyzer in SQL Server 2000)
Click New Query
Type and Execute the following SQL command:
SELECT SERVERPROPERTY (’productlevel’) as ‘Product Level’, SERVERPROPERTY(’productversion’) as ‘Product Version’, SERVERPROPERTY (’edition’) as ‘SQL Server Edition’

Wednesday, July 8, 2009

Deploy .NET Assembly to GAC

3 steps to deploy an assembly in the GAC:
  • Create or locate Key File for signing: sn -k "Path to SNK File"
  • Assign the Key to your Project (AssemblyInfo File):
  • Deploy the dll: gacutil -I "Path to DLL"

Saturday, May 3, 2008

Million in Maths ... ;)

Number of zerosU.S. & scientific communityOther countries
3thousandthousand
6millionmillion
9billion1000 million (1 milliard)
12trillionbillion
15quadrillion1000 billion
18quintilliontrillion
21sextillion1000 trillion
24septillionquadrillion
27octillion1000 quadrillion
30nonillionquintillion
33decillion1000 quintillion
36undecillionsextillion
39duodecillion1000 sextillion
42tredecillionseptillion
45quattuordecillion1000 septillion
48quindecillionoctillion
51sexdecillion1000 octillion
54septendecillionnonillion
57octodecillion1000 nonillion
60novemdecilliondecillion
63vigintillion1000 decillion
66 - 120 undecillion - vigintillion
303centillion 
600 centillion

Sunday, April 27, 2008

Vitamins for...

Vitamins are only required in very small quantities. There is no chemical similarity between these chemicals; the similarity between them is entirely biological.

Vitamin A: good for your eyes.
Vitamin B: about 12 different chemicals.
Vitamin C: needed for your body to repair itself.
Vitamin D: can be made in your skin, needed for absorption of Calcium.
Vitamin E: the nice one - reproduction?

Tuesday, April 22, 2008

Identify the service pack version

Simple Steps to know service pack version:
  1. Click Start, and then click Run.
  2. Type winver and press Enter to display a window with system information.

Friday, March 21, 2008

Videos From NG


thanks to nationalgeographic