Tuesday, November 29, 2011

METHOD OVERRIDING IN C#.

/*
  Method Overriding :- The methods having same name , same signature
  but in different class & different implementation.

    Overloding        Overriding
    ==========        ===========
   1. In single class           1. Minim. Two class
   2. Different signature     2. Same signature
*/
//parent class
class a
{
    public virtual void display()
    {
        System.Console.WriteLine("base class");
    }
}
//child class
class b : a
{
    public override void display()
    {
        System.Console.WriteLine("child class");
    }
}   
class c
{
    public static void Main()
    {
        b z=new b();
        z.display();
       
    }
}
   
        

METHOD OVERLOADING IN C#.

//Method Overloding :
//The Methods having the same name .. but different signature
//Signature : Number of parameters and Types of parameters
//Return type is not included in signature..
//Return type change : not overloding ...erororororo
class a
{
    //private attribute
    int x;
    public void display()
    {
        x=9999;
        System.Console.WriteLine("x="+x);
    }
    /* erorororororooror
    public int display()
    {
        x=9999;
        System.Console.WriteLine("x="+x);
        return 999;
    }
    */
    public void display(int p)
    {
        x=p;
        System.Console.WriteLine("x="+x);
    }
    public void display(int p,int q)
    {
        x=p+q;
        System.Console.WriteLine("x="+x);
    }
}
class b
{
    public static void Main()
    {
        a z=new a();
        z.display();
        z.display(222);
        z.display(33,33);
       
    }
}


HOW TO INITILIZE ARRAY IN C#.



 /*Array:-
C# supports single-dimensional arrays, multidimensional arrays (rectangular arrays), and array-of-arrays (jagged arrays).

To Declare:-
==========
Single-dimensional arrays:
int[] numbers;

Multidimensional arrays:
string[,] names;

Array-of-arrays (jagged):
byte[][] scores;

Declaring them  does not actually create the arrays.In C#, arrays are objects  and must be instantiated. The following examples show how to create arrays:

Single-dimensional arrays:
int[] numbers = new int[5];

Multidimensional arrays:
string[,] names = new string[5,4];

Array-of-arrays (jagged):
byte[][] scores = new byte[5][];
for (int x = 0; x < scores.Length; x++)
{
   scores[x] = new byte[4];
}

Initializing Arrays
=============
 Single-Dimensional Array
 =====================
  int[] numbers = new int[5] {1, 2, 3, 4, 5};
  string[] names = new string[3] {"Matt", "Joanne", "Robert"};

 You can omit the size of the array, like this:
  int[] numbers = new int[] {1, 2, 3, 4, 5};

 string[] names = new string[] {"Matt", "Joanne", "Robert"};

You can also omit the new operator if an initializer is provided, like this:
 int[] numbers = {1, 2, 3, 4, 5};
 string[] names = {"Matt", "Joanne", "Robert"};

Multidimensional Array
===================
int[,] numbers = new int[3, 2] { {1, 2}, {3, 4}, {5, 6} };
string[,] siblings = new string[2, 2] { {"Mike","Amy"}, {"Mary","Albert"} };

You can omit the size of the array, like this:
int[,] numbers = new int[,] { {1, 2}, {3, 4}, {5, 6} };
string[,] siblings = new string[,] { {"Mike","Amy"}, {"Mary","Albert"} };

You can also omit the new operator if an initializer is provided, like this:
int[,] numbers = { {1, 2}, {3, 4}, {5, 6} };
string[,] siblings = { {"Mike", "Amy"}, {"Mary", "Albert"} };

Jagged Array (Array-of-Arrays)
========================
You can initialize jagged arrays like this example:
int[][] numbers = new int[2][] { new int[] {2,3,4}, new int[] {5,6,7,8,9} };

You can also omit the size of the first array, like this:
int[][] numbers = new int[][] { new int[] {2,3,4}, new int[] {5,6,7,8,9} };
-or-
int[][] numbers = { new int[] {2,3,4}, new int[] {5,6,7,8,9} };

using foreach:-
=============
int[] numbers = {4, 5, 6, 1, 2, 3, -2, -1, 0};
foreach (int i in numbers)
{
   System.Console.WriteLine(i);
}
*/
using System;
class DeclareArraysSample
{
    public static void Main()
    {
        // Single-dimensional array
        int[] numbers = new int[5];

        // Multidimensional array
        string[,] names = new string[5,4];

        // Array-of-arrays (jagged array)
        byte[][] scores = new byte[5][];
  // Create the jagged array
        for (int i = 0; i < scores.Length; i++)
        {
            scores[i] = new byte[i+3];
        }

        // Print length of each row
        for (int i = 0; i < scores.Length; i++)
        {
            Console.WriteLine("Length of row {0} is {1}", i, scores[i].Length);
        }
    }
}

VELIDATION ON TEXT BOX THROUGH JAVA SCRIPT.

ON FORM LOAD : - .CS FILE
--------------------------
protected void Page_Load(object sender, EventArgs e)
   {
        txtPhone.Attributes.Add("onkeydown", "return isNumeric(event.keyCode);");
       
        txtPhone.Attributes.Add("onkeyup", "keyUP(event.keyCode)");
    } 

  


CODE ON DESIRED TEXT BOX :-
-----------------------------
<asp:TextBox ID="txtPhone" runat="server" onkeyup = "keyUP(event.keyCode)" onkeydown = "return isNumeric(event.keyCode);"></asp:TextBox>




CODE ON MASTER PAGE :-
-----------------------
    function isNumeric(keyCode)
{
      if(keyCode==16)
            isShift = true;

      return ((keyCode >= 48 && keyCode <= 57 || keyCode == 8 ||
            (keyCode >= 96 && keyCode <= 105)) && isShift == false);
}
</script>

PAGING ON GRID VIEW.

 CODE ON .CS FILE : -
---------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;

public partial class reg3 : System.Web.UI.Page
{
    SqlConnection con;
    SqlCommand cmd;
    SqlDataReader dr;

    protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection con = new SqlConnection(@"data source=RAJAT\SQLEXPRESS;initial catalog= master;integrated security=sspi;");
        con.Open();
      
        SqlDataAdapter da = new SqlDataAdapter("select * from registration", con);
        DataSet ds = new DataSet();
        da.Fill(ds);
        GridView1.DataSource = ds;
        GridView1.DataBind();
       
        con.Close();
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
       
        GridView1.PageIndex = e.NewPageIndex;
        SqlConnection con = new SqlConnection(@"data source=RAJAT\SQLEXPRESS;initial catalog= master;integrated security=sspi;");
        con.Open();
       
        SqlDataAdapter da = new SqlDataAdapter("select * from registration", con);
        DataSet ds = new DataSet();
        da.Fill(ds);
        GridView1.DataSource = ds;
        GridView1.DataBind();
       
        con.Close();
    }
}

Thursday, November 3, 2011

Top ways to improve your system speed : -



1.Let your PC boot up completely before opening any applications.

2.Refresh the desktop after closing any application. This will remove any unused files from the RAM.

3.Do not set very large file size images as your wallpaper. Do not keep a wallpaper at all if your PC is low on RAM (less than 64 MB).

4.Do not clutter your Desktop with a lot of shortcuts. Each shortcut on the desktop uses up to 500 bytes of RAM

5.Empty the recycle bin regularly. The files are not really deleted from your hard drive until you empty the recycle bin.

 6.Delete the temporary internet files regularly.

 7.Defragment your hard drive once every two months. This will free up a lot of space on your hard drive and rearrange the files so that your applications run faster.

8.Always make two partitions in your hard drive. Install all large Softwares (like PSP, Photoshop, 3DS Max etc) in the second partition. Windows uses all the available empty space in C drive as virtual memory when your Computer RAM is full. Keep the C Drive as empty as possible.

9.When installing new Softwares disable the option of having a tray icon. The tray icons use up available RAM, and also slow

How to view the code of a website : -



If you are surfing on internet , you can see that some Websites are Secure and you cannot see them, you are somehow blocked to see the Secure site.

Any way... what u need to do is make a new notepad file and write in it the followng DLL's.. just copy-paste these

regsvr32 SOFTPUB.DLL
regsvr32 WINTRUST.DLL
regsvr32 INITPKI.DLL
regsvr32 dssenh.dll
regsvr32 Rsaenh.dll
regsvr32 gpkcsp.dll
regsvr32 sccbase.dll
regsvr32 slbcsp.dll
regsvr32 Cryptdlg.dll


and save it as > all file types, and make it something like securefile.bat.

then just run the file and your problem will be solve.

All RUN commands of windows :-


Hello friends, here i given all RUN commands for WINDOWS (for all versons).
execute them and get fun.

  • SQL Client Configuration - cliconfg
  • System Configuration Editor - sysedit
  • System Configuration Utility - msconfig
  • System File Checker Utility (Scan Immediately)- sfc /scannow
  • System File Checker Utility (Scan Once At Next Boot)- sfc /scanonce
  • System File Checker Utility (Scan On Every Boot) - sfc /scanboot
  • System File Checker Utility (Return to Default Setting)- sfc /revert
  • System File Checker Utility (Purge File Cache)- sfc /purgecache
  • System File Checker Utility (Set Cache Size to size x)-sfc/cachesize=x
  • System Information - msinfo32.
  • Task Manager – taskmgr
  • System Properties - sysdm.cpl
  • Task Manager – taskmgr
  • TCP Tester - tcptest
  • Telnet Client - telnet
  • Tweak UI (if installed) - tweakui
  • User Account Management- nusrmgr.cpl
  • Utility Manager - utilman
  • Windows Address Book - wab
  • Windows Address Book Import Utility - wabmig
  • Windows Backup Utility (if installed)- ntbackup
  • Windows Explorer - explorer
  • Windows Firewall- firewall.cpl
  • Windows Magnifier- magnify
  • Windows Management Infrastructure - wmimgmt.msc
  • Windows Media Player - wmplayer
  • Windows Messenger - msmsgs
  • Windows Picture Import Wizard (need camera connected)- wiaacmgr
  • Windows System Security Tool – syskey
  • Windows Update Launches - wupdmgr
  • Windows Version (to show which version of windows)- winver
  • Windows XP Tour Wizard - tourstart
  • Wordpad - write
  • Password Properties - password.cpl
  • Performance Monitor - perfmon.msc
  • Phone and Modem Options - telephon.cpl
  • Phone Dialer - dialer
  • Pinball Game - pinball
  • Power Configuration - powercfg.cpl
  • Printers and Faxes - control printers
  • Printers Folder – printers
  • Private Character Editor - eudcedit
  • Quicktime (If Installed)- QuickTime.cpl
  • Real Player (if installed)- realplay
  • Regional Settings - intl.cpl
  • Registry Editor - regedit
  • Registry Editor - regedit32
  • Remote Access Phonebook - rasphone
  • Remote Desktop - mstsc
  • Removable Storage - ntmsmgr.msc
  • Removable Storage Operator Requests - ntmsoprq.msc
  • Resultant Set of Policy (XP Prof) - rsop.msc
  • Scanners and Cameras - sticpl.cpl
  • Scheduled Tasks - control schedtasks
  • Security Center - wscui.cpl
  • Services - services.msc
  • Shared Folders - fsmgmt.msc
  • Shuts Down Windows - shutdown
  • Sounds and Audio - mmsys.cpl
  • Spider Solitare Card Game - spider
  • Malicious Software Removal Tool - mrt
  • Microsoft Access (if installed) - access.cpl
  • Microsoft Chat - winchat
  • Microsoft Excel (if installed) - excel
  • Microsoft Frontpage (if installed)- frontpg
  • Microsoft Movie Maker - moviemk
  • Microsoft Paint - mspaint
  • Microsoft Powerpoint (if installed)- powerpnt
  • Microsoft Word (if installed)- winword
  • Microsoft Syncronization Tool - mobsync
  • Minesweeper Game - winmine
  • Mouse Properties - control mouse
  • Mouse Properties - main.cpl
  • Nero (if installed)- nero
  • Netmeeting - conf
  • Network Connections - control netconnections
  • Network Connections - ncpa.cpl
  • Network Setup Wizard - netsetup.cpl
  • Notepad - notepad
  • Nview Desktop Manager (If Installed)- nvtuicpl.cpl
  • Object Packager - packager
  • ODBC Data Source Administrator- odbccp32.cpl
  • On Screen Keyboard - osk
  • Opens AC3 Filter (If Installed) - ac3filter.cpl
  • Outlook Express - msimn
  • Paint – pbrush
  • Keyboard Properties - control keyboard
  • IP Configuration (Display Connection Configuration) - ipconfi/all
  • IP Configuration (Display DNS Cache Contents)- ipconfig /displaydns
  • IP Configuration (Delete DNS Cache Contents)- ipconfig /flushdns
  • IP Configuration (Release All Connections)- ipconfig /release
  • IP Configuration (Renew All Connections)- ipconfig /renew
  • IP Configuration(RefreshesDHCP&Re-RegistersDNS)-ipconfig/registerdns
  • IP Configuration (Display DHCP Class ID)- ipconfig/showclassid
  • IP Configuration (Modifies DHCP Class ID)- ipconfig /setclassid
  • Java Control Panel (If Installed)- jpicpl32.cpl
  • Java Control Panel (If Installed)- javaws
  • Local Security Settings - secpol.msc
  • Local Users and Groups - lusrmgr.msc
  • Logs You Out Of Windows - logoff.....
  • Accessibility Controls - access.cpl
  • Accessibility Wizard - accwiz
  • Add Hardware - Wizardhdwwiz.cpl
  • Add/Remove Programs - appwiz.cpl
  • Administrative Tools control - admintools
  • Adobe Acrobat (if installed) - acrobat
  • Adobe Designer (if installed)- acrodist
  • Adobe Distiller (if installed)- acrodist
  • Adobe ImageReady (if installed)- imageready
  • Adobe Photoshop (if installed)- photoshop
  • Automatic Updates - wuaucpl.cpl
  • Bluetooth Transfer Wizard – fsquirt
  • Calculator - calc
  • Certificate Manager - certmgr.msc
  • Character Map - charmap
  • Check Disk Utility - chkdsk
  • Clipboard Viewer - clipbrd
  • Command Prompt - cmd
  • Component Services - dcomcnfg
  • Computer Management - compmgmt.msc
  • Control Panel - control
  • Date and Time Properties - timedate.cpl
  • DDE Shares - ddeshare
  • Device Manager - devmgmt.msc
  • Direct X Control Panel (If Installed)- directx.cpl
  • Direct X Troubleshooter- dxdiag
  • Disk Cleanup Utility- cleanmgr
  • Disk Defragment- dfrg.msc
  • Disk Management- diskmgmt.msc
  • Disk Partition Manager- diskpart
  • Display Properties- control desktop
  • Display Properties- desk.cpl
  • Display Properties (w/Appearance Tab Preselected)- control color
  • Dr. Watson System Troubleshooting Utility- drwtsn32
  • Driver Verifier Utility- verifier
  • Event Viewer- eventvwr.msc
  • Files and Settings Transfer Tool- migwiz
  • File Signature Verification Tool- sigverif
  • Findfast- findfast.cpl
  • Firefox (if installed)- firefox
  • Folders Properties- control folders
  • Fonts- control fonts
  • Fonts Folder- fonts
  • Free Cell Card Game- freecell
  • Game Controllers- joy.cpl
  • Group Policy Editor (XP Prof)- gpedit.msc
  • Hearts Card Game- mshearts
  • Help and Support- helpctr
  • HyperTerminal- hypertrm
  • Iexpress Wizard- iexpress
  • Indexing Service- ciadv.msc
  • Internet Connection Wizard- icwconn1
  • Internet Explorer- iexplore
  • Internet Setup Wizard- inetwiz
  • Internet Properties- inetcpl.cpl


Wednesday, October 19, 2011

Best iOS/Android cross-platform mobile development SDKs


Mobile development is one of the fastest growing areas nowadays. There are many platforms and, often, when we build an application or a game, we need to take a very difficult decision: what kind of platforms does it support?
Surely we want our work is compatible with as many platforms as possible and this is the reason for this post. We have collected 11 developers’ tool that allow you to develop application and games cross-platforms easily.
Before going into the details of each SDK, in the table below we can analyze the programming languages and platforms supported by each tool.
SDKLanguageWin SupportiOS SupportAndroid SupportSymbian SupportConsole Support
Shiva3dC++YesYesYesNoWii
SIO2C-C++YesYesYesNoNo
UnityJavaScript, C#, PythonYesYesYesNoXbox, PS3, Wii
CoronaLuaYesYesYesNoNo
PhoneGapHTML, JavascriptYesYesYesYesNo
Titanium MobileHTML, JavascriptNoYesYesNoNo
cocos2d-xC++YesYesYesNoNo
EdgelibC++YesYesYesYesNo
MoaiC++YesYesYesNoNo
MarmaladeC-C++YesYesYesYesNo
Simple DirectMedia LayerC++YesYesNoYesNo