Wednesday, December 31, 2008

what are netbooks?

learn what is a NETBOOK ..
http://en.wikipedia .org/wiki/ Netbook

and read a second opinion here too
http://gizmodo. com/5042814/ why-i-hate- netbooks

Sunday, December 28, 2008

Javascript fucntions list (All Built in Functions in one place)

i was in search of this list ever since i started web development

This is a great list, it contains all the built-in functions that are offered by javascript along with syntax and examples.

http://www.tutorialspoint.com/javascript/javascript_builtin_functions.htm


Saturday, December 27, 2008

A beautiful image searching website

This one is beautiful

http://www.taggalaxy.de/

its an image searching website developed by a student as a final year project. it just extract images from flickr and shows them in a unique way....In a SOLAR system !

a must watch and feel site
highly recommended.

How to read XML from any given link

This task was assigned to me , and i wrote a simple function to accomplish this in C#.Net 2.0
here is the code

private XmlDocument GetXMLDOC(string Path)
{


XmlDocument xdoc = new XmlDocument();
System.Net.WebClient wc = new System.Net.WebClient();
StreamReader sr = null;
string xml = null;
try
{
sr = new StreamReader(wc.OpenRead(Path));
xml = sr.ReadToEnd();
sr.Close();
sr.Dispose();
wc.Dispose();
xdoc.LoadXml(xml);
return xdoc;
}
catch (Exception ex)
{
return null;
}
}



Now you get an XML Document in which XML data is loaded.
To traverse through this XML document we need a XML List and an XML node

string Pagepath = txtLink.Text;

XmlDocument xdoc = GetXMLDOC(Pagepath);

if (xdoc != null)
{
XmlNodeList nodeList = xdoc.GetElementsByTagName("any-XML-tag");

XmlNode Inode = nodeList[0];
}


when we get the XML node , we can get its data by using node.innerText property like this.

string mydata = Inode.InnerText;

thats it... you can use this generic method to fetch all kinds of records from any Xml file if you are given its link...

if you know any other and simpler method for the same purpose..kindly share it..
peace.

Wednesday, November 19, 2008

Tree Traversal

Example

A sorted binary tree

In this binary search tree,
  • Preorder traversal sequence: F, B, A, D, C, E, G, I, H
  • Inorder traversal sequence: A, B, C, D, E, F, G, H, I
    • Note that the inorder traversal of this binary search tree yields an ordered list
  • Postorder traversal sequence: A, C, E, D, B, H, I, G, F
  • Level-order traversal sequence: F, B, G, A, D, I, C, E, H

Sample implementations

preorder(node)
print node.value
if node.left ≠ null then preorder(node.left)
if node.right ≠ null then preorder(node.right)
inorder(node)
if node.left ≠ null then inorder(node.left)
print node.value
if node.right ≠ null then inorder(node.right)
postorder(node)
if node.left ≠ null then postorder(node.left)
if node.right ≠ null then postorder(node.right)
print node.value


All sample implementations will require stack space proportional to the height of the tree. In a poorly balanced tree, this can be quite considerable.

We can remove the stack requirement by maintaining parent pointers in each node, or by threading the tree. In the case of using threads, this will allow for greatly improved inorder traversal, although retrieving the parent node required for preorder and postorder traversal will be slower than a simple stack based algorithm.

Thursday, August 21, 2008

To View a Stored Procedure with T-SQL

This article is taken from www.devguru.com
Syntax:

1. To view the definition of a stored procedure:
sp_helptext procedure_name

2. To view the information about a stored procedure:
sp_help procedure_name

3. To view the dependencies of the stored procedure:
sp_depends procedure_name

procedure_name
Is the name of the stored procedure.

SQL Server allows us to view the definition, information, and dependencies of a stored procedure.

Examples
Code:
sp_helptext spNewAvgGrade;
Output:
CREATE PROCEDURE spGetAvgGrade (@Course INTEGER)
AS
SELECT AVG(Std_Grade) as AverageGrade FROM Students
WHERE Std_Course = @Course
Explanation:

In the above example, the sp_helptext displays the text of the spNewAvgGrade stored procedure.
Language(s): MS SQL Server
Code:
sp_help spNewAvgGrade;
Output:
Name Owner Type Created_datetime

spNewAvgGrade dbo stored procedure 2003-09-14 23:53:13.810



Parameter_name Type Length Prec Scale Param_order

@Course int 4 10 0 1

Explanation:

This example displays information about the stored procedure.
Language(s): MS SQL Server
Code:
sp_depends spNewAvgGrade;
Output:
In the current database, the specified object references the following:

Name Type Updated Selected Column

dbo.Students user table no no Std_Course
dbo.Students user table no no Std_Grade

Explanation:

This example shows the dependencies of the stored procedure.
Language(s): MS SQL Server

Thursday, July 24, 2008

what a great use of flash

check out how the flash is used for this great purpose

www.quranflash.com


click on the book to view a full screen ...

check out that page turning feature , you will feel that you are holding quran shareef in your hands

great work

Regards,
SAAD

Sunday, July 13, 2008

Code Snippets

Visual Studio has provided us a great feature of code snippets , Code snippet is a "shortcut" to write large code with less key strokes
for example if you want to write this

MessageBox.Show("This is a msg");

you just have to write this
mbox

and press
TAB two times

see the magic , the mbox will turn into the larger text i.e


MessageBox.Show("message");

write your msg string here .. and save valuable keystrokes..

but its not the end

there are many code snippets available in Visual Studio just like that one , just right click and point to "Insert Code snippet" and you will see the list of them ..


still want more...


just visit
www.gotcodesnippets.net

and download hundreds of ready-made snippets for your daily use..


still hungry for more :)

you can make your "own snippets" but i left it for your research ... you can find it in MSDN , its really a simple procedure.

Waiting for research result ... :)







Monday, July 7, 2008

Now this is a fantastic use of email

Now you can post to your blogs through email
its really nice to see that feature in blogger.com that I can post at my blog through any email address i want
in this way , i can post to my blogs while forwarding emails to my other contacts..

great

just go to settings -> email and enable this feature

cheers!

Thursday, March 20, 2008

How To Develop Your Own Fonts For Windows

Are you preparing a Project and not able to find an appropriate Font for the Presentation? Well, then you can try your hands in making a Font of your type. Yes, this is true, you can make your own Fonts without any kind of External Softwares being used.
If you are using windows, then you can use this tool really easily.
Simply go to run and type in "EUDCEDIT", and you will see a Font developer application.


You can create fonts through this tool and use them as your Font type there and then. This font tool has some good features, but are meant only for starters. If you looking for some professional help, you might get disappointed with this due to the limited support and tools.
But still for starters, this tool is pretty good.

Good Work Ms Word

I have posted this msg using msword 2007. It works great for me