Sep 29

Quiz: The Classic IQ Test

Personal 61 Comments »

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Today i gave a test called "The Classic IQ Test" on www.tickle.com. I enjoyed this test. I scored 126 which according to them falls under the category "Visual Mathematician". This test is available on www.tickle.com and it is free of cost. My complete result of this test is given below:

.  

Visual Mathematician

 

.

 Your IQ Score is: 126

.

You have a strong ability to process visual-spatial and mathematical information. These skills combined with your strengths in logic are what make you a Visual Mathematician.

You're able to understand patterns visually and in numbers. That means your mind can create a mental picture for any problem. In addition to that skill, you possess an intelligence that allows you to apply math to that picture, too. That helps you manipulate multiple parts of the picture (or problem) to come up with a solution. You have many skills that are critical to success and problem-solving. Your talents help you understand the "big picture," which is partly why people may turn to you for direction — especially in the workplace. You flourish in environments where tasks are clearly defined, and you are a whiz at improving processes and making things more efficient. Your ability to detect patterns and your skills in math and logic, make it natural for you to come up with ideas and theories that simplify processes for everyone.

Outside of work, Visual Mathematicians tend to do well at strategic activities like chess. It must be that ability to recognize patterns — both as they are and how they develop. Regardless of how you put your mind to use, you've got a great set of talents. You will be able to envision a clear path and calculate the risks, and more importantly, the rewards, of anything you take on

.



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

Sep 27

What is WCF:

WCF stands for Windows communication foundation. WCF allows to build distributed application reagrdless of their underlying plumbing, in a syammetrical manner. Unlike other distributed APIs like (DCOM, .Net remoting, XML web services etc), WCF provides a single, unified, and extendable programming object model that can be used to interact with a number of previously diverse distributed technologies.

WCF is a way to develop the SOA application.

Lets get a brief introduction, advantage and disadvatange of other distributed technologies prior to WCF.

DCOM:

DCOM stands for Distributed component object model. This technology was used prior to the release of .Net platform. Using DCOM it was possible to develop Distributed system using COM objects.

Benifit:

Benifit of the DCOM was the location transparency of components. This allowed client software to be programmed in such a way that the physical location of the remote objects were not hard-coded. Regardless of whether the remote object was on the same machine or secondary networked machine, the code base could remain neutral, as the actual location was recorded externally in the system registry.

Limitation:

DCOM  was a Windows centric API. Even though DCOM was ported to a few other OS, DCOM alone did not provde a fabric to build comprehensive solution involving multiple OS(Windows,Unix, Mac) or promote sharing of data between diverse architectures (COM, J2EE, CORBA, etc)

COM+/Enterprise services:

COM+ was released by Microsoft. It's first name was Microsoft Transaction server (MTS). Despite its name, COM+ is not only used by COM programmers, it is also accessible to .Net programmers.

Features of COM+:

COM+ provides a number of features which are Transaction Management, object lifetime management, pooling services, a role based security system and a loosely coupled event model and so on.

Limitation:

COM+ has the same limitation of DCOM i.e. It is a windows only solution that is best suited for in-house application development or as a backend service indirectly manipulated by more agonistic front end.

.Net Remoting:

With the release of .Net plateform, DCOM quickly bacame a lagacy distributed API. In its place, the .Net base class libraries shipped with the .net remoting layer, represented by the System.Runtime.Remoting namespace. This namespace allows multiple computers to distribute objects, provided they are all running the application under the .net plateform.

Benifit:

.Net Remoting is usable only by .net application but it is possible to make use of .Net remoting to build distributed systems that span multiple OS.

Limitation:

Interoperability between other programming architectures (such as J2EE) was still not directly possible.

WEB Services:

From the history of the distributed API we can see that developing the distributed application which can run on multiple OS was not possible. They are all plateform and framework dependent.

XML web servies addressed this issue. So when you need to expose the services of remote objects to any OS and any programming model, XML web services provide the most straightforward way of doing so.

Benifit:

The benifit of the XML web services is interoperability and data exchange, because web service encodes its data as simple XML. Given the fact that web services are based on open industry standard (HTTP,XML,SOAP) rather than proprietary type systems and proprietary wire formats (as in case with DCOM or .net remoting), they allow for a high degree of interporability and data exchange.

Limitation:

Potential draw back of web services is the fact that they can suffer from some performance issues (given the use of HTTP and XML data representation), and they may not be suitable for in house application where TCP-based protocol and binary formatting of data could be used without penalty.

Role of WCF:

WCF is a distributed computing toolkit introduced with .net 3.0 that integrated these previous independent technologies into a streamlined API represented primarily via the System.ServiceModel namespace. WCF enables to expose services to callers using wide variety of techniques. For example, in an In-house application where all connected machines are windows based, you can make use of various TCP protocols to ensure the fastest possible performance. This same service can also be exposed using the XML web service-based protocol to allow external callers to leverage its functionality regardless of the programming language or OS.

WCF allows to pick the correct protocol for the job using a common programming model. Due to this it becomes easy to plug and play the underlying plumbing of your distributed application. In most cases, you can do so without being required to recompile or redeploy the client/service software.

In this POST I have attached a word file. In that file I developed a a simple service using the WCF. I developed that service from scratch, instead of using the WCF template. I hope that it will help in understanding of WCF.

WCF.doc (1.12 mb)



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: , , , ,

Sep 25

Why to use unsafe in C# ?

C# | Tips and Tricks | Visual Studio 87 Comments »

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Regarding my article "How to use Pointers in C#" http://www.shahidriaz.com/post/2008/09/22/Unsafe-code-in-Net.aspx alot of people started to ask that why I posted this article and why shoud we use unsafe in C# even some of said to me that I should close my web Frown

First of all I would like to say that in that article I never said that start using pointers and unsafe code in C#. The idea behind was just for the beginners because most of the people think that we can not use pointers in C#.

Now here I am mentioning the scenarios where using pointers is more suitable as compared to other techniques.

What should I do if I am using some external DLL which is not being developed in .Net. Well some will say that creating a RCW (Run time callable wraper) is the solution of using non. Net DLL in .Net. I agree with them, but what if that RCW has a function in it which is taking some pointer as parameter?? I am sure that all of you will find the answer of their question that why and when to use pointers in C#.

I think that if some one is using the non .Net dll in their application then the above scenario will be halpfull for him.

Now lets talk about some other cases where we have to use pointers and unsafe keyword in C#.

Some old third parties control still use pointers. So again we have to use pointers in C# to address those third parties.(e.g. Most of the SDK of  Biomatric devices are in VC which used pointers extensivly, Windows API etc)

Well these all were my own thoughts because I though alot today becasue I was also speechless when people started to ask these question, but I was also sure that there will be some reason of unsafe in C# and that is why microsoft introduced it.

Now I have also done some googling and I am copying some of the lines that why to use pointers in C#.

  • Performance and flexibility, by using pointer you can access data and manipulate it in the most efficient way possible.
  • Memory Addresses, there is no way to know the memory address of some data without using pointers.

Disadvantages of Unsafe Code in C#:

  • Complex syntax, to use pointers you need to go throw more complex syntax than we used to experience in C#.
  • Harder to use, you need be more careful and logical while using pointers, miss using pointers might lead to the following:
    • Overwrite other variables.
    • Stack overflow.
    • Access areas of memory that doesn?t contain any data as they do.
    • Overwrite some information of the code for the .net runtime, which will surely lead your application to crash.
  • Your code will be harder to debug. A simple mistake in using pointers might lead your application to crash randomly and unpredictably.
  • Type-safety, using pointers will cause the code to fail in the .net type-safety checks, and of course if your security police don?t allow non type-safety code, then the .net framework will refuse to execute your application.

Sorry for my poor english..



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: ,

Sep 22

It is a very small and basic article showing that how can we use pointers in C#. I am posting this article because most of the people think that C# does not allow the use of pointers. In this example I will create a small function which will changes the value of a variable using the Pointers. So lets start:

First of all make a simple console application. Copy the following function:  

unsafe private static void UseUnsafeCode()

{

int count = 10;

int* p;

p = &count;

System.Console.WriteLine("Value of count before changing=" + count.ToString());

*p = 25;

System.Console.WriteLine("Value of count after changing=" + count.ToString());

System.Console.ReadLine();

}

Now call the above function in the main program.

Please make sure to allow the compilation of safe code in the property of the project.

The sample code will look something like this:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

public static void Main(string[] args)

{

UseUnsafeCode();

}

unsafe private static void UseUnsafeCode()

{

int count = 10;int* p;

p = &count;

System.
Console.WriteLine("Value of count before changing=" + count.ToString());

*p = 25;

System.Console.WriteLine("Value of count after changing=" + count.ToString());System.

Console.ReadLine();

}

}

}

In the above example I have made a function in which I have declared two variables. The first one is count and its data type is int and the second is an int pointer. Also in the code I have changed the value of count variable using the pointer p variable. The output is given below:

Value of count before changing = 10

Value of count after chaning = 25



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: ,

Sep 22

A wonderfull world by Magical Hands

Entertainment | Personal 94 Comments »

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
First Video


Second Video




[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: