Wednesday, August 15, 2012

C# developer interview questions and answers


Takeaway: Software development hiring managers and potential interviewees will find these open-ended C# proficiency interview questions and answers useful.

Good help is hard to find. There is an art to finding a developer who fits well in your organization in terms of personality and work ethic; fortunately, it’s more straightforward to determine their technical expertise.
I worked at a couple of places where development managers loved drilling job candidates on syntax while having them write code, and it was clearly a stressful experience for the interviewee. I do not like asking specific syntax questions during interviews since most developers do not know language syntax or class names off the top of their heads.
In terms of the basic interview, I prefer to ask open-ended questions where the candidate can explain concepts and how they would attack problems. Some organizations like to give candidates tests or have them eyeball code snippets to spot problems, and I think those are good evaluation tools.
This is the first installment in our series of programming language-specific development interview questions and answers. Here is a list of questions (and the answers to those questions) that will help you get a feel for a candidate’s proficiency with C#. You can ask follow-up questions based on their replies.

What are namespaces, and how they are used?

Namespaces are used to organize classes within the .NET Framework. They dictate the logical structure of the code. They are analogous to Java packages, with the key difference being Java packages define the physical layout of source files (directory structure) while .NET namespaces do not. However, many developers follow this approach and organize their C# source files in directories that correlate with namespaces. The .NET Framework has namespaces defined for its many classes, such as System.Xml–these are utilized via the using statement. Namespaces are assigned to classes via the namespace keyword.

What is a constructor?

A constructor is a class member executed when an instance of the class is created. The constructor has the same name as the class, and it can be overloaded via different signatures. Constructors are used for initialization chores.

What is the GAC, and where is it located?

The GAC is the Global Assembly Cache. Shared assemblies reside in the GAC; this allows applications to share assemblies instead of having the assembly distributed with each application. Versioning allows multiple assembly versions to exist in the GAC–applications can specify version numbers in the config file. The gacutil command line tool is used to manage the GAC.

Why are strings in C# immutable?

Immutable means string values cannot be changed once they have been created. Any modification to a string value results in a completely new string instance, thus an inefficient use of memory and extraneous garbage collection. The mutable System.Text.StringBuilder class should be used when string values will change.

What is DLL Hell, and how does .NET solve it?

DLL Hell describes the difficulty in managing DLLs on a system; this includes multiple copies of a DLL, different versions, and so forth. When a DLL (or assembly) is loaded in .NET, it is loaded by name, version, and certificate. The assembly contains all of this information via its metadata. The GAC provides the solution, as you can have multiple versions of a DLL side-by-side.

How are methods overloaded?

Methods are overloaded via different signatures (number of parameters and types). Thus, you can overload a method by having different data types, different number of parameters, or a different order of parameters.

How do you prevent a class from being inherited?

The sealed keyword prohibits a class from being inherited.

What is the execution entry point for a C# console application?

The Main method.

How do you initiate a string without escaping each backslash?

You put an @ sign in front of the double-quoted string.
String ex = @"This has a carriage return\r\n"

What is the difference between a struct and a class?

Structs cannot be inherited. Structs are passed by value and not by reference. Structs are stored on the stack not the heap. The result is better performance with Structs.

What is a singleton?

A singleton is a design pattern used when only one instance of an object is created and shared; that is, it only allows one instance of itself to be created. Any attempt to create another instance simply returns a reference to the first one. Singleton classes are created by defining all class constructors as private. In addition, a private static member is created as the same type of the class, along with a public static member that returns an instance of the class. Here is a basic example:
public class SingletonExample {
private static SingletonExample _Instance;
private SingletonExample () { }
public static SingletonExample GetInstance() {
if (_Instance == null)  {
_Instance = new SingletonExample ();
}
return _Instance;
}
}

What is boxing?

Boxing is the process of explicitly converting a value type into a corresponding reference type. Basically, this involves creating a new object on the heap and placing the value there. Reversing the process is just as easy with unboxing, which converts the value in an object reference on the heap into a corresponding value type on the stack. The unboxing process begins by verifying that the recipient value type is equivalent to the boxed type. If the operation is permitted, the value is copied to the stack.

Monday, August 13, 2012

Instant Hair Conditioner: For single use - by Mrs. Rajam Murali


Ingedients:
Vendhayam - 1TS
Moong Dal - 1TS
Pungangai (remove the seed) - 1piece
Curds - 1IS
Preparation:

Soak vendhayam, Moong dal and Pungangai in boiled water the previous night. The next day morning, grind all the 3 ingredients in Mixie and mix curds with the paste. Transfer the final paste into a bowl.

Application: Oil your Hair with either Coconut or Gingeley oil and comb nicely. Make 2 to 3 partitions and apply the paste over the scalp and keep it for 10 to 15 minutes. Then wash off with warm water without using Shampoo.

Benefits: The paste washes the Hair and gives good shine. It also prevents split ends and Dandruff too. This also gets rid of itching. This can be done twice a week.

Sunday, August 12, 2012

FACE PACKS

Orange and Milk Face Pack for Normal Skin

You can make this pack with 10 s of orange juice and half tablespoon of fresh milk cream. Apply the pack and let it dry for half an hour. Wash your face with clean water and this natural face pack for normal skin will make your skin smooth.

Potato Face Pack for Normal Skin

You just have to take one grated fresh potato and squeeze out the extract from it. Now, mix this potato juice with a little bit of lemon juice. Pour a little bit of juice on a piece of cotton and apply it on your face. Keep it for 5 minutes and then wash it off. This is perhaps the most time saving pack among the natural face packs for normal skin.

Wheat Flour Face Pack for Normal Skin

This is definitely the easiest face pack to make among the natural face packs for normal skin and you just need to make a paste of wheat flour and milk. Rub the pack on your face and let the pack dry for 15 minutes. Then, take off this wheat paste. It will soften and clean your skin.

Fruit Face Pack for Normal Skin

Make a paste of grapes, orange, strawberries, apples and peer and add few s of honey to it. Apply the pack on your face and leave it for half an hour. Rinse it off with lukewarm water. You can even apply a pack of orange peels soaked in curd and leave the pack for 20 minutes to dry and then wash it with cold water.

Make a paste with a ripe papaya. Apply on the face and wash after 20 minutes.

Take one cup of curd. Add the juice of two lime to it and make a mixture. Apply it on the face. After half an hour wash the face with cold water.

Make a paste with one lime, 1/2 an orange and a cup of curd. Apply this pack on the face and wash it after 20 minutes

Make a paste with cucumber and coconut water. Apply on the face and wash after some time.

Apply a paste with raw plantain and strawberry on the face. The face will look fresh.

Make a paste with turmeric and sandal. Apply it on the face. It helps to remove pimples and other marks on the face.

Take two carrots, one egg white and half cup of ,milk Grate the carrot and add the egg white and milk. Apply this mixture on the face for 20 minutes.

Take one piece of ripped papaya, Half teaspoon honey, one spoon milk cream. Mix all these ingredients and make it as a paste. Apply this paste for 25 minutes and rinse off.

Make a paste with a handful of thulasi(basil), a handful of pudhina(mint), a piece of cucumber and a handful of curry leaf and apply on the face and wash it off after some time.

Soak 10 almonds for an overnight and peal the skin. Make a paste with these almonds, a handful of rose petals. Apply the mixture on the face. After 30 minutes massage the face with wet hands and wash the face.

MEHANDI LEAVES USE

Here are some natural way to make and maintain your hair soft and silky.

Hot oil Massage - Treatment to make your hair soft and reduce hair fall

Hot oil massage is the most sought method to make your hair soft and to reduce hair fall. Take equal amount of coconut oil and olive oil. Heat the oil. Add 6 peppers in the hot oil. When the pepper start cracking, switch off the stove. Wait until the heat is tolerable by you. Then dip a cotton in the oil and massage the oil on the scalp with the cotton. Apply liberally on the scalp. Massage with your finger tips. Wrap a towel on the head covering the hair. This will give heat to the hair and will help the hair to absorb more oil and hence moisturising the hair. Leave it on for 2 hours. Then wash your hair. This will give you a smooth and silky hair.

Curd and Fenugreek (vendhayam) for hair care

One more well known method is using curd and fenugreek seeds(vendhayam) .   Soak fenugreek seed in curd at night. Let it be soaked for the whole night. In the morning grind the fenugreek seeds along with the curd. Make it into fine paste. Apply this paste on the scalp and hair. This paste will be sticky because of fenugreek. Fenugreek and curd will give softness to the hair. Leave it for 30 minutes. Then wash your hair with shampoo. Wash it thoroughly to remove the fenugreek fully. This method not only gives a soft and silkiness for your hair but is also a good antidandruff treatment for the hair.

Hibiscus Leaves (sembaruti leaves) - get soft and silky hair

Hibscus(sembaruti) leaves are the ancient method to make the hair of women soft and silky. Take the leaves of hibiscus (15 - 20 leaves if the leaves are big). Using little waterm grind the leaves to make it to a fine paste. Apply this paste on the scalp and to the full length of the hair. Let this be on hair for 30 minutes. Then wash your hair with shikakai powder or shampoo. Dry with a soft towel. You can see immediate result when trying this method. You can feel the softness in your hair, when the hair is fully dry. It is also believed that this natural method will improve hair growth.

Coconut milk with Lime - Hair Care

Coconut oil is always one of the key ingredients in hair care. Coconut milk also has the same importance in hair care. Blend grated coconut in a mixer. Extract thick coconut milk. Take 1 tablespoon of lime juice. Add the lime juice to the coconut milk. Leave this mixture for 10 minutes, so that both will get mixed well. Then apply this liquid on the scalp and hair. This can be left on hair for 30 minutes before washing with regular shampoo. Lime is a coolant, so those having cold or fever or sinus should be careful when using lime juice. Coconut milk and lime will give a glossy and silky effect for the hair naturally.

Egg with oil 

Egg is a natural hair care product. Egg is used to repair dry and dull hair. Beat 2 egss until it froths. Then add a table spoon of coconut oil or olive oil to it. Again beat it, so that the oil and the egg blends together. If needed, you can add a tablespoon of curd to this and blend it together. Apply this mixture on the scalp and hair. Leave it on the hair for 1 hour. Then wash it normally with the regular shampoo. This egg and oil treatment gives you bouncing hair.


a good and safe way for silky and straight hairs would be mehendi with curd.
But the mehendi must be the natural one not that which are sold in packets.
Actually the mehandi in those packets have some colour in them which is not good for silky hairs.
What you need to do is take the mehandi leaves and grind it &then mix the curd in it and apply it on your hairs.
you will see some difference.
do this every weak.

http://www.a1tamilnadu.com/hair-care-get-silky-hair/681/#.UCeFVKHia1k

AMLA TREATMENT


    • Mix about 1/2 cup of pure amla (Indian gooseberry) powder with enough warm water to make a paste. The paste should be about as thick as a cup of stirred yogurt. Let the mixture stand for 10 to 15 minutes.
    • 2
      Apply the paste to dry, clean hair using your hands (rubber gloves are recommended but not absolutely necessary; amla does not stain), starting close to your scalp and working toward the ends of your hair. Be gentle and do not rub the mixture into your scalp.
    • 3
      Let the paste sit on your head, uncovered, for three to five minutes. The amla mixture should be thick enough that it doesn't drip. Rinse the paste out with lukewarm water. Do not apply your regular conditioner or shampoo for a few hours.
    • 4
      Treat your hair with the amla powder mixture about once every two weeks. Between treatments, try using a shampoo and conditioner containing amla. You also can use amla oil on your hair between treatments for extra shine and softness.


Read more: How to Use Amla (Indian Gooseberry ) For Thick, Shiny, Healthy Hair | eHow.com http://www.ehow.com/how_5198712_use-thick-shiny-healthy-hair.html#ixzz23KKB51Rb

oil - hair


Rosemary Hot Oil Treatment

  • 1
    Fresh rosemary can be grown in your garden.
    Mix 1/2 cup each of dried rosemary leaves and soybean oil in a pot. Heat the herb and oil until it's warm to the touch. Remove the pot from the heat.
  • 2
    Place the cheesecloth over the bowl so the edges of the cloth are hanging over the rim. Pour your rosemary oil treatment into the bowl through the cheesecloth. Lift the cheesecloth so the oil goes through to the bottom of the bowl and the dried rosemary leaves remain in the cheesecloth to be discarded.
  • 3
    Apply your rosemary herbal oil treatment to your hair and scalp, making sure to coat your hair from roots to ends.
  • 4
    Pile your hair up on your head and wrap your head in plastic wrap. Wrap a towel around your head to keep the herbal oil treatment warm while it's on your hair and scalp. Allow the rosemary herbal oil treatment to remain on your hair for at least 15 minutes, then shampoo until all the oil is removed.

Curry Herbal Oil Treatment

  • 5
    Curry helps nourish dry hair.
    Combine 1/2 cup of coconut oil and two strands of dried curry leaves in a pot and heat until warm to the touch.
  • 6
    Allow the oil to cool a little, then crush the curry leaves using your fingers. Strain the curry herbal hair oil treatment into a bowl, using cheesecloth as a strainer. Discard the curry leaves.
  • 7
    Smooth your curry herbal hair oil treatment into your hair and scalp. Massage the oil into your hair, making sure to coat it well. Wrap your head first in plastic wrap, followed by a towel.
  • 8
    Leave the curry herbal hair oil treatment on your hair for a minimum of 15 minutes. The curry hair oil treatment will add moisture to hair that's dry and discolored. Wash your hair thoroughly with your normal shampoo to remove all the oil.


Read more: How to Prepare Herbal Hair Oil | eHow.com http://www.ehow.com/how_6596766_prepare-herbal-hair-oil.html#ixzz23KJG6ujF

Hair care

Wash well & grind fine, fresh curry leaves, as fine as possible with minimum water.

Along with curry leaves you can also add marudhani leaves(henna leaves)

For 2 cups of coconut oil lemon size of paste is correct.

Mix both in a kadai & put on fire.

Heat on a low flame till the paste settles at the bottom of the kadai.

Let it stand for 24 hrs.

Then strain the oil & use.

1 or 2 granules of edible camphor can be added to mask the prominent smell of coconut oil & curry leaves.

Application of this oil is good for hair-growth as well as to prevernt premature hair-greying.



Curd is a very good conditioner for hair. Apply mehandhi powder with curd or apply fenugreek powder with curd to the hair and rinse to get shiny beautiful hair.



Mix two egg whites with henna(marudhani) and a teaspoon of coffee powder. It you have dry hair , add some oil and curd to the mixture. If possible, make this mixture in an iron container and leave it the whole night, without adding egg white. In the morning add the egg white and apply it all over the hair and leave it for 1-2 hours.

Then wash it off with mild shampoo. Egg white acts as a conditioner and gives a shine to dull hair. Do it every week for 10 weeks to make dull hair into a shining hair.



Take 4 teaspoons of (2 tsp of coconut oil and 2 tsp of gingelly oil) and heat it in low flame. When it is hot, add 7 peppers in it. When it starts spluttering, turn off the heat. Allow it to cool until it is bearable in your hands. Then apply it on the scalp and the hair. Leave it for 1/2 an hour. Then wash it off with shampoo.

This is best for dandruff cure and hair fall.



Dry goose berries and make it into a powder. Add this powder in coconut oil and allow it to boil. When it is boiled well, filter the coconut oil and use it regularly. regular use of this oil controls hair fall and greying of hair.