Вы находитесь на странице: 1из 11

#include<iostream.h> #include<conio.

h> char*months[]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","O ct","Nov","Dec"}; void cal(int yr,int mo,int fd,int da); void main() { int days[12]={31,28,31,30,31,30,31,31,30,31,30,31}; long int ndays,ldays,tdays,tydays; int i,y,m,fday,d; clrscr(); cout<<"Enter the YEAR & MONTH"; cin>>y>>m; ndays=(y-1)*365l; ldays=(y-1)/400-(y-1)/100+(y-1)/4; tdays=ndays+ldays; if(y%400==0&&y%1001==0||y%4==0) days[1]=29; else days[1]=28; d=days[m-1]; tydays=0; for(i=0;i<=m-2;i++) tydays=tydays+days[i]; tdays=tdays+tydays; fday=tdays%7; cal(y,m,fday,d); } void cal(int yr,int mo,int fd,int da) { int i,r,c; clrscr(); gotoxy(25,5); cout<<months[mo-1]<<yr; gotoxy(5,6); cout<<"_________________________________________________________"; gotoxy(10,7); cout<<"Mon Tue Wed Thur Fri Sat Sun"; gotoxy(5,8); cout<<"_________________________________________________________"; r=10; c=11+fd*6; for(i=1;i<=da;i++){ gotoxy(c,r); cout<<i; if(c<=41) c=c+6; else

} } gotoxy(5,16); cout<<"_________________________________________________________"; getch(); }

c=11; r=r+1;

SQL Data Types


Posted by Akash Padhiyar On July - 21 - 2010
SQL data type is an attribute that specifies type of data of any object. Each column, variable and expression has related data type in SQL.

You would use these data types while creating your tables. You would choose a particular data type for a table column based on your requirement. SQL Server offers six categories of data types for your use:

Exact Numeric Data Types:


DATA TYPE bigint int smallint tinyint bit decimal numeric money smallmoney FROM TO

-9,223,372,036,854,775,808 9,223,372,036,854,775,807 -2,147,483,648 -32,768 0 0 -10^38 +1 -10^38 +1 -214,748.3648 2,147,483,647 32,767 255 1 10^38 .1 10^38 .1 +214,748.3647

-922,337,203,685,477.5808 +922,337,203,685,477.5807

Approximate Numeric Data Types:

DATA TYPE FROM float real -1.79E + 308 -3.40E + 38

TO 1.79E + 308 3.40E + 38

Date and Time Data Types:


DATA TYPE FROM datetime date time Jan 1, 1753 smalldatetime Jan 1, 1900 TO Dec 31, 9999 Jun 6, 2079

Stores a date like June 30, 1991 Stores a time of day like 12:30 P.M.

Note: Here datetime has 3.33 milliseconds accuracy where as smalldatetime has 1 minute accuracy.

Character Strings Data Types:


DATA TYPE FROM char char TO Maximum length of 8,000 characters.( Fixed length non-Unicode characters) Maximum of 8,000 characters.(Variable-length non-Unicode data). Maximum length of 231characters, Variablelength non-Unicode data (SQL Server 2005 only). Variable-length non-Unicode data with a maximum length of 2,147,483,647 characters.

varchar

varchar

varchar(max) varchar(max)

text

text

Unicode Character Strings Data Types:


DATA TYPE nchar nvarchar Description Maximum length of 4,000 characters.( Fixed length Unicode) Maximum length of 4,000 characters.(Variable

length Unicode) nvarchar(max) ntext Maximum length of 231characters (SQL Server 2005 only).( Variable length Unicode) Maximum length of 1,073,741,823 characters. ( Variable length Unicode )

Binary Data Types:


DATA TYPE binary varbinary varbinary(max) image Description Maximum length of 8,000 bytes(Fixed-length binary data ) Maximum length of 8,000 bytes.(Variable length binary data) Maximum length of 231 bytes (SQL Server 2005 only). ( Variable length Binary data) Maximum length of 2,147,483,647 bytes. ( Variable length Binary Data)

Misc Data Types:


DATA TYPE sql_variant timestamp uniqueidentifier xml cursor table Description Stores values of various SQL Server-supported data types, except text, ntext, and timestamp. Stores a database-wide unique number that gets updated every time a row gets updated Stores a globally unique identifier (GUID) Stores XML data. You can store xml instances in a column or a variable (SQL Server 2005 only). Reference to a cursor object Stores a result set for later processing

List of Dos Command 1

Posted by Akash Padhiyar On August - 1 - 2010 Append The append command can be used by programs to open files in another directory as if they were located in the current directory. Arp The arp command is used to display or change entries in the ARP cache. Assoc The assoc command is used to display or change the file type associated with a particular file ******************. At The at command is used to schedule commands and other programs to run at a specific date and time. Atmadm The atmadm command is used to display information related to asynchronous transfer mode (ATM) connections on the system. Attrib The attrib command is used to change the attributes of a single file or a directory. Bootcfg The bootcfg command is used to build, modify, or view the contents of the boot.ini file, a hidden file that is used to identify in what folder, on which partition, and on which hard drive Windows is located. Break The break command sets or clears extended CTRL+C checking on DOS systems. Cacls The cacls command is used to display or change access control lists of files. Call The call command is used to to run a script or batch program from within another script or batch program. Chcp The chcp command displays or configures the active code page number. Chdir The chdir command is used to display the drive letter and folder that you are currently in. Chdir can also be used to change the drive and/or directory that you want to work in.

Chkdsk The chkdsk command, often referred to as check disk, is used to identify and correct certain hard drive errors. Chkntfs The chkntfs command is used to configure or display the checking of the disk drive during the Windows boot process. Cipher The cipher command shows or changes the encryption status of files and folders on NTFS partitions. Cls The cls command clears the screen of all previously entered commands and other text. Cmd The cmd command starts a new instance of the command interpreter. Cmstp The cmstp command installs or uninstalls a Connection Manager service profile. Color The color command is used to change the colors of the text and background within the Command Prompt window. Comp The comp command is used to compare the contents of two files or sets of files. Compact The compact command is used to show or change the compression state of files and directories on NTFS partitions. Convert The convert command is used to convert FAT or FAT32 formatted volumes to the NTFS format. Copy The copy command does simply that it copies one or more files from one location to another. Date The date command is used to show or change the current date. Debug The debug command starts Debug, a command line application used to test and edit programs.

Defrag The defrag command is used to defragment a drive you specify. The defrag command is the command line version of Microsofts Disk Defragmenter. Del The del command is used to delete one or more files. The del command is the same as the erase command. Dir The dir command is used to display a list of files and folders contained inside the folder that you are currently working in. The dir command also displays other important information like the hard drives serial number, the total number of files listed, their combined size, the total amount of free space left on the drive, and more. Diskcomp The diskcomp command is used to compare the contents of two floppy disks. Diskcopy The diskcopy command is used to copy the entire contents of one floppy disk to another. Diskpart The diskpart command is used to create, manage, and delete hard drive partitions. Doskey The doskey command is used to edit command lines, create macros, and recall previously entered commands. Driverquery The driverquery command is used to show a list of all installed drivers. Echo The echo command is used to show messages, most commonly from within script or batch files. The echo command can also be used to turn the echoing feature on or off. Edit The edit command starts the MS-DOS Editor tool which is used to create and modify text files. Edlin The edlin command starts the Edlin tool which is used to create and modify text files from the command line. Endlocal The endlocal command is used to end the localization of environment changes inside a batch or script file.

Erase The erase command is used to delete one or more files. The erase command is the same as the del command. Eventcreate The eventcreate command is used to create a custom event in an event log. Eventquery The eventquery command is used to display the events and event properties from one or more event logs. Eventtriggers The eventtriggers command is used to configure and display event triggers. Exe2Bin The exe2bin command is used to convert a file of the EXE file type (executable file) to a binary file. Exit The exit command is used to end the Command Prompt session that youre currently working in. Expand The expand command is used to extract a single file or a group of files from a compressed file. Fastopen The fastopen command is used to add a programs hard drive location to a special list stored in memory, potentially improving the programs launch time by removing the need for MS-DOS to locate the application on the drive. Fc The fc command is used to compare two individual or sets of files and then show the differences between them. Find The find command is used to search for a specified text string in one or more files. Findstr The findstr command is used to find text string patterns in one or more files. Finger The finger command is used to return information about one or more users on a remote computer thats running the Finger service.

For The for command is used to run a specified command for each file in a set of files. The for command is most often used within a batch or script file. Forcedos The forcedos command is used to start the specified program in the MS-DOS subsystem. Format The format command is used to format a drive in the file system that you specify. Fsutil The fsutil command is used to perform various FAT and NTFS file system tasks like managing reparse points and sparse files, dismounting a volume, and extending a volume. Ftp The ftp command can used to transfer files to and from another computer. The remote computer must be operating as an FTP server. Ftype The ftype command is used to define a default program to open a specified file type. Getmac The getmac command is used to display the media access control (MAC) address of all the network controllers on a system. Goto The goto command is used in a batch or script file to direct the command process to a labeled line in the script. Gpresult The gpresult command is used to display Group Policy settings. Gpupdate The gpupdate command is used to update Group Policy settings. Graftabl The graftabl command is used to enable the ability of Windows to display an extended character set in graphics mode. Graphics The graphics command is used to load a program that can print graphics. Help The help command provides more detailed information on any of the other Command Prompt commands.

Hostname The hostname command displays the name of the current host. If The if command is used to perform conditional functions in a batch file. Ipconfig The ipconfig command is used to display detailed IP information for each network adapter utilizing TCP/IP. The ipconfig command can also be used to release and renew IP addresses on systems configured to receive them via a DHCP server. Ipxroute The ipxroute command is used to display and change information about IPX routing tables. Label The label command is used to manage the volume label of a disk. Loadfix The loadfix command is used to load the specified program in the first 64K of memory and then runs the program. Lodctr The lodctr command is used to update registry values related to performance counters. Logman The logman command is used to create and manage Event Trace Session and Performance logs. The logman command also supports many functions of Performance Monitor. Logoff The logoff command is used to terminate a session. Lpq The lpq command displays the status of a print queue on a computer running Line Printer Daemon (LPD). Lpr The lpr command is used to send a file to a computer running Line Printer Daemon (LPD).

Java History
Posted by Akash Padhiyar On August - 16 - 2010

Java is a high-level object-oriented programming language developed by the Sun Microsystems. Though it is associated with the World Wide Web but it is older than the origin of Web. It was only developed keeping in mind the consumer electronics and communication equipments. It came into existence as a part of web application, web services and a platform independent programming language in the 1990s. Earlier, C++ was widely used to write object oriented programming languages, however, it was not a platform independent and needed to be recompiled for each different CPUs. A team of Sun Microsystems including Patrick Naughton, Mike Sheridan in the guidance of James Goslings decided to develop an advanced programming language for the betterment of consumer electronic devices. They wanted to make it new software based on the power of networks that can run on different application areas, such as computers and electronic devices. In the year 1991 they make platform independent software and named it Oak. But later due to some patent conflicts, it was renamed as Java and in 1995 the Java 1.0 was officially released to the world.

Вам также может понравиться