Change ownership of sql database

जानेवारी 27, 2010 by Nitin

SQL Statement:

ALTER AUTHORIZATION ON DATABASE::{databasename} TO {username}

Learning

जानेवारी 20, 2010 by Nitin

“Your most unhappy customers are your greatest source of learning.”

- Bill Gates

Base keyword in C#

डिसेंबर 29, 2009 by Nitin

in inheritance, you can access methods of base class by using “base” keyword

Differences between an Interface and an Abstract Base Class

डिसेंबर 28, 2009 by Nitin

Conceptually, an abstract class is similar to an interface; however, they do have some
subtle differences:
❑ An abstract class can contain a mixture of concrete methods (implemented)
and abstract methods (an abstract class needs at least one abstract method); an
interface does not contain any method implementations.
❑ An abstract class can contain constructors and destructors; an interface
does not.
❑ A class can implement multiple interfaces, but it can inherit from only one
abstract class.

Make copy of an object in C#

डिसेंबर 3, 2009 by Nitin

Deep copy of object


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;

///
/// Summary description for CopyObject
///
public class myObject
{
public myObject()
{
//
// TODO: Add constructor logic here
//
}

public static object Copy(object objAnyTypeOfObject)
{
BinaryFormatter binFormater = new BinaryFormatter();
MemoryStream memStream = new MemoryStream();
binFormater.Serialize(memStream, objAnyTypeOfObject);
//Reset the posotion to initial so that it can read the bytes
memStream.Position = 0;
return binFormater.Deserialize(memStream);
}
}

Get Max Request length from web.config

नोव्हेंबर 3, 2009 by Nitin

For retrieving maxrequest length from web.config use following function:

public int GetMaxLength()
{
HttpRuntimeSection httpRuntime =
(HttpRuntimeSection)ConfigurationManager.GetSection("system.web/httpRuntime");
return httpRuntime.MaxRequestLength;
}

Installing crystal reports

सप्टेंबर 30, 2009 by Nitin

Installing crystal reports on client machine:
Just copy and install following file to client machine,

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports\CRRedist2005_x86.msi

Convert Arraylist to String Array in VB.NET

ऑगस्ट 20, 2009 by Nitin

Dim data As new ArrayList()
Dim str() As String = data.ToArray(GetType(String))

Think positive

ऑगस्ट 20, 2009 by Nitin

Father : “I want you to marry a girl of my choice”
Son : “I will choose my own bride!”
Father : “But the girl is Bill Gates’s daughter.”
Son : “Well, in that case…ok”
Next – Father approaches Bill Gates.
Father : “I have a husband for your daughter.”
Bill Gates : “But my daughter is too young to marry!”
Father : “But this young man is a vice-president of the World Bank.”
Bill Gates : “Ah, in that case…ok”
Finally Father goes to see the president of the World Bank.
Father : “I have a young man to be recommended as a vice-president.”
President : “But I already have more vice- presidents than I need!”
Father : “But this young man is Bill Gates’s son-in-law.”
President : “Ah, in that case…ok”
This is how business is done!!
Moral: Even If you have nothing,You can get Anything. But your attitude should be positive

INTERESTING MARATHI SURNAMES

ऑगस्ट 14, 2009 by Nitin

“With due respect to all Marathi Ladies and Gentlemen.”

1. One who only takes – LELE

2. One with bulb factory – DIVEKAR

3. Maharashtrian Bill Gates – BAL PHATAK

4. One with weight of 100 tonnes – SOMAN

5. Neil Armstrong – NEELESH BHUJBAL

6. One with K on his head – SHIRKE

7. Bakery owner – PAWGI /BUNKAR

8. Narasimha Avtar – POTPHODE

9. One with stomach problem – POTDUKHE

10. One who lives in village – GAONKAR

11. One who only take money – DAMLE

12. One who is brave – WAGH /VEERKAR

13. One who is untidy – GABALE

14. Cotton mill owner – KAPSE /RUIKAR

15. One who eats more – DHOLE/DHAMDHERE

16. One who works very cool – KULKARNI

17.Building constructor – AADEKAR/MAHALE

18. One who is coward – PULEKAR

19. Silver mine owner – CHANDEKAR

20. One who reaches the root – MULEY

21. One who is real cat – MANJAREKAR

22. One who is 1000 times more intellegent- SAHASRABUDHHE

23. One who divides by 2 – NIMKAR

24. One who kills – MARANE

25. Do die do – KARMARKAR

26. One who twists – PILGAONKARO

27. The God – DEVO/DEO-kule

28. Big old Rishi – MAHAMUNI

29. One who always wins – JAYKAR

30. One who talks a lot – MAHASHABDE

31. One who doesn’t talk – GOOPCHOOP

32. One who builds temples – DEVALEKAR

33. One who runs away – BHAGWAT

34. One who blackens everything – KAJALE

35. One who always says ‘take away’ – NENE

36. One who is father – BAPAT

37. One with tailoring shop – SHIWDE

38. Jeweler – RATNAPARAKHI

39. One who always go to Varanasi – KASHIKAR

40. One who is very sweat – GODSE

41. Its okay – BARWE

42. Mango man – AAMBEKAR

43. One who thinks – VICHAARE

44. One who is close to everyone – JAWALKAR

45. One who is wise – SHAHANE

46. One who is bald – TAKLE

47. One who thinks of only meals – DAHIBHATHE

48. Colorful maharashtrians

- KALE

- GORE

- HIRWE

- KALBHOR

- PIWALE

- DHAWLE

49. Some Metallic Maharashtrians

- PITALE

- TAMBE

- LOKHANDE

- SONE