Skip to main content

Posts

Showing posts from 2011

Get data from Table using dataTable using c#.net

Get data from Table using dataTable using c#.net static public DataTable getData(string selectstr) { string connectionString = ""; OleDbConnection connection = null; OleDbDataAdapter adp = null; OleDbCommandBuilder oleDbCommandBuilder = null; DataTable dataTable = null; connectionString = ConfigurationSettings.AppSettings["ConnectionString"]; connection = new OleDbConnection(connectionString); connection.Open(); adp = new OleDbDataAdapter(selectstr, connection); oleDbCommandBuilder = new OleDbCommandBuilder(adp); dataTable = new DataTable(); adp.Fill(dataTable); connection.Close(); return dataTable; }

Some Companies list All over World

Companies City Region Country Jordan Data Communications Company Llc Amman Amman Governorate Jordan Godrej Infotech Limited Mumbai Maharashtra India Bharti Broadband Delhi Delhi India Tata Teleservices Ltd - Tata Indicom - Cdma Divisi Mumbai Maharashtra India Excell Media Pvt Ltd Hyderabad Andhra Pradesh India Reliance Communications Pune Maharashtra India Bharti Broadband Bangalore Karnataka India Acd Elektronik Gmbh Almersbach Rheinland-pfalz Germany Mts Allstream Toronto Ontario Canada Tata Communications Gurgaon Haryana India Telekom Malaysia Berhad Petaling Jaya Kuala Lumpur Malaysia Delhi-vsb- Leased Line Tata Teleservices Ltd Chandigarh Chandigarh India Microsoft Corp Asia/pacific Region Tata Teleservices Isp New Delhi Delhi India Telenet N.v. Brussels Brussels Hoofdstedelijk Gewest Belgium Porini Spa Como Lombardia Italy Net4india Ltd. Delhi Delhi India 3bb Broadband Bangkok Krung Thep Thailand Ptv Swiss Ag Bern Bern Switzerland Tata Communications Ahmad

Symbols in ER Diagrams

Symbols in ER Diagrams Rectangle : Entity set Ellipse  : Attribute Diamond : Relation Lines  : links attribute to entity or relation and entities to relations Double ellipse : multivalued attribute Dashed ellipse : derived attribute Double line : total participation of entity in relationship set Inverted triangle : Links sub-type entities with super-type entity

Group policy Update or refresh through command line,example of gpupdate

Group policy Update or refresh through command line GPUPDATE is a command to update or refresh group policy as per current changes. syntax of GPUPDATE command is as follows. gpupdate [ /target: { computer | user }] [ /force ] [ /wait: value ] [ /logoff ] [ /boot ] Example of gpupdate command is as follows you can try on command line gpupdate gpupdate /target:computer gpupdate /force /wait:100 gpupdate /boot if you want more description then you can  visit this link http://support.microsoft.com/kb/298444/

What is DBMS? what are the benefits of DBMS ?

DBMS stands for Database management system. DBMS consists of a collection of interrelated data and set of in build standard programs to access those data. Goal of DBMS is to provide environment that is convenient and efficient to use in retrieving and storing data. Some  benefits of DBMS are Reduced data redundancy and inconsistency. Data can be shared in DBMS. Standards of DBMS can be enforced. Security restriction can be applied. Integrity of data can be maintained. Data independence  or Abstraction could be achieved.

Best for data recovery software

Best for data recovery software 1. Disk Getor Data recovery 2. Nero 11 in build recovery tool 3. Recuva 4. Easeus data recovery pro -There are many as per the situation and type of recovery you want to conduct. IMHO you can not judge any particular one as "The Best". Still if you want me to name a few I'll go for EASEUS Data Recovery Wizard Professional or GetData.

ERP Microsoft AX Certification,SAP Training Institutes in India

Microsoft Dynamics AX – 4.0 Ontrack ERP School, Y18, EP Block, Kolkata 700064 Sector V Salt Lake. Kolkata 700 091 Nearest Landmark- IEM Building at College More (The road between IEM & SIMOCO Mobile) Phone: 033-2357-2555/2556/2560 Email: erpco@ontrackindia.com Source Tek Solutions Computer Training in Begumpet, Hyderabad Provide Online Computer Training, Testing Tools, Java, .Net, Microsoft Share Point Server, Business Analyst in Hyderabad. For further details contact us @ 9848084140. V.S. Technologies Pvt. Ltd. Computer Training in Ameerpet, Hyderabad V.S. Technologies Pvt. Ltd. is the Offshore Training Center of V-Soft Consulting Group, Inc., headquartered in Louisville, Kentucky.V-Soft has a legacy of 8 years experience in virtually all aspects of the Information Technology business and... 1. KITS Computer Training in Ameerpet, Hyderabad The institute is established by software professionals with more than 15 years of experience in IT in USA. Training in a

Evolution of wireless communication,electromagnetic waves, mobile phones, satellites, telecommunication

Evolution of wireless communication Communication between two  communications devices   can basically classified as   follows a. wired communication b. wireless communication           Our   focus is on only mobile phone and cell phone. Before mobile phone [wireless communication],   telephone came into existence. 1876 -telephone was invented by Alexander Graham bell 1881-in   Berlin   public telephone service was started [wired circuit switching network]. In early 18 century wireless communication was existing through optical medium. The wireless communication boomed only after invention of electromagnetic waves by Michael Farady. 1907-the first commercial transatlantic connection were setup using huge base stations. On both side. 1920-marconi discovery of short waves gets reflected ionosphere. This helps to sent wireless messages around the world bouncing at the ionosphere. 1926-the first telephone in a train was available on the Berlin Hamburg line. 1927-radio for cars w

FEATURES OF C++

FEATURES OF C++ Classes and Objects: Class defines the properties of an object. It is the group of similar objects. It defines data member and member functions. Variables of the class are called objects, each object has it own separate memory. Object is also called instance of a class when it is initialized. Encapsulation: It means binding of data members and member function in a class. Data hiding : We always the data members as private and member functions as public. Private members are not accessible outside the class they can only be accessed through the public member functions. Data Abstraction: We always define the essential properties of an object without going to the background details. ADT(abstract data types): A class defines only the essential properties of an object without going to the background details. Inheritance: We can inherit all the properties of a class instead of redefining all these properties again. Hence, inheritance provides the programmer with

Books name of visual studio .net and Networking

1. Dave Grundgeiger(2002)”Programming Visual Basic .NET” First Edition, O’Reilly, pp->311-345 2. Matthew A. Stoecker(2003)”Developing Windows-Based Applications “Second Edition,PHI,pp->359-399 3. S.Michel et al.(1998) ”Adaptive Web Caching: Towards A New Global Caching Architecture”, Computer Networks & ISDN Syst., 4. K. Thompson, G. Miller, and R. Wilder, "Wide-Area Internet Traffic Patterns and Characteristics," Proc. 3rd Int'l. Conf. Web Caching, 1998 5. Thuan Thai Hoang Q. Lam(2001)”.NET Framework Essentials”,O’Reilly,pp->183-207

SDLC Objectives and Testing Methodology

SDLC Objectives objectives include the following: To reduce the risk of project failure To consider system and data requirements throughout the entire life of the system To identify technical and management issues early To disclose all life cycle costs to guide business decisions To foster realistic expectations of what the systems will and will not provide To provide information to better balance programmatic, technical, management, and cost aspects of proposed system development or modification To encourage periodic evaluations to identify systems that are no longer effective To measure progress and status for effective corrective action To support effective resource management and budget planning To consider meeting current and future business requirements Testing Methodology To be truly robust, distributed applications require more than simple functional testing before release into production. You should perform at least one—and preferably all—of the following types

Benefits of the re-engineered process

Benefits of the re-engineered process: The re-engineered process benefits an internal auditor in the following manner:- 1) Organized collection of data:- Use of audit logs ensures the auditor that the track of all the required transactions are made in an organized manner this reduces the time that the auditor will take in collecting data from the original source. Moreover the cost incurred will be less. The data collected will be more authentic as no manipulation can be made by any person to the data which is stored in the audit log since it can be retrieved only by the auditor 2) Reduction in time for completion of audit:- Timely and accurate data ensures that the audit is completed within the specified time limit, moreover frequent interaction with the external auditor ensures that corrective measures in the audit plan is made regularly. 3) Cost effective:- The auditor need not maintain separate files for all the working papers and audit trials since these will be there in th

What is Digital signatures

What is Digital signatures   A major benefit of public key cryptography is that it provides a method for employing digital signatures. Digital signatures let the recipient of information verify the authenticity of the information’s origin, and also verify that the information was not altered while in transit. Thus, public key digital signatures provide authentication and data integrity. These features are every bit as fundamental to cryptography as privacy, if not more.  A digital signature serves the same purpose as a seal on a document, or a hand-written signature. However, because of the way it is created, it is superior to a seal or signature in an important way. A digital signature not only attests to the identity of the signer, but it also shows that the contents of the information signed has not been modified.  A physical seal or handwritten signature cannot do that. However, like a physical seal that can be created by anyone with possession of the signet, a digital sign

emittere, fet, NPN, PNP, standard transistors.semiconductor materials, TYPES OF TRANSISTOR

TYPES OF TRANSISTOR There are two types of standard transistors: NPN PNP with different circuit symbols. The letters refer to the layers of semiconductor material used to make the transistor. Most transistors used today are NPN because this is the easiest type to make from silicon. If we are new to electronics it is best to start by learning how to use NPN transistors. The leads are labeled base (B), collector (C) and emitter (E). These terms refer to the internal operation of a transistor but they are not much help in understanding how a transistor is used, so just treat them as labels A Darlington Pair is two transistors connected together to give a very high current gain. In addition to standard (bipolar junction) transistors, there are field-effect transistors, which are usually referred to as FET.

What Spread Spectrum Does?

 What Spread Spectrum Does? The use of these special pseudo noise codes in spread spectrum (SS) communications makes signals appear wide band and noise-like. It is this very characteristic that makes SS signals possess the quality of Low Probability of Intercept. SS signals are hard to detect on narrow band equipment because the signal’s energy is spread over a bandwidth of maybe 100 times the information bandwidth. A spread spectrum system is one in which the transmitted signal is spread over a wide frequency band, much wider, in fact, than the minimum bandwidth required to transmit the information being sent. Spread spectrum communications cannot be said to be an efficient means of utilizing bandwidth. However, it does come into its own when combined with existing systems occupying the frequency. The spread spectrum signal being “spread” over a large bandwidth can coexist with narrow band signals only adding a slight increase in the noise floor that the narrow band receivers see.

Prerequisite of ERP

Benefits of ERP Better business practices with re engineering of process as this becomes a prerequisite to ERP. Accurate and timely information. Eliminate duplication in work. Better customer satisfaction. Improve operational Efficiency. Reduce avoidable costs and losses. Better inventory management. Facilitates knowledge management. Better employee satisfaction. Better planning and preparedness. Example of ERP- Microsoft dynamics axapta, Navision,CRM,SAP, Oracle,Tally ,Baan,LN etc.

CHARACTERISTICS OF COMPUTER

CHARACTERISTICS OF COMPUTER   1. Speed: Computer can do calculations at the super fast speed without any mistake. A modern computer can execute about thirty million instructions in one second. 2. Accuracy: Computer never gives wrong results nature. In fact the most computer errors are caused due to wrong input of data and instructions. 3. Diligence: It is away from basic human nature. It never bored or tired and it can work for long times without creating any error. 4. Storage Capacity: It can store a large amount of information in a very small space. We can display the stored information whenever desired. 5. Versatility: It is one of the most wonderful thing about computer. It can do various jobs at one time. 6. Automatic: They are capable of automatically performing repetitive or long process without making any errors. 7. Power Of Remembering: It can store or recall any information as well as when we required. Computer does not make any guess or forget.

Message transfer agent

 Message transfer agent (MTA) The MTA is software running on a dedicated workstation or computer and is part of the email system’s backbone. Each MTA communicates with one or more UA’s and other MTAs. Its basic function is to accept mail from a UA or another MTA, examine it, and route it. For example, when it receives mail from a UA it verifies the format of the mail. If it is not correct it informs the UA an error has occurred so the sender can be notified. If it is correct there are two possibilities.  First, the recipient is reachable via another UA to which the MTA is connected. Example is user A sending mail to user B connected to same MTA. In this case the MTA gives the mail to the appropriate UA for delivery. Second, the UA that will deliver the mail is connected to another MTA. Here user A may have sent mail to user C connected to some other MTA. In this case the mail must be routed to another MTA. Collectively the MTAs execute a routing strategy that sends the mail throu

Introduction of proxy server

Introduction of  proxy server A proxy server is a kind of gateway that speaks HTTP to the browser but FTP, Gopher, or some other protocol to the server. It accepts HTTP requests and translates them into, say, FTP requests, so the browser does not have to understand any protocol except HTTP. The proxy server can be a program running on the same machine as the browser, but it can also be on a free-standing machine somewhere in the network serving many browsers. Often users can configure their browsers with proxies for protocols that the browsers do not speak. In this way, the range of information sources to which the browser has access is increased. In addition to acting as a go-between for unknown protocols, proxy servers have a number of other important functions, such as caching. A caching proxy server collects and keeps all the pages that pass through it. When a user asks for a page, the proxy server checks to see if it has the page. If so, it can check to see if the page is s

Coloring in particular cells using data grid

Coloring in particular cells using data grid foreach (DataGridViewRow dataGridViewRow in dataGridView1.Rows) { DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle(); dataGridViewCellStyle.ForeColor = Color.Red; if (dataGridViewRow.Cells[2].Value != null) { if (dataGridViewRow.Cells[2].Value.ToString().Trim().Equals("M", StringComparison.CurrentCultureIgnoreCase)) { dataGridViewRow.DefaultCellStyle = dataGridViewCellStyle; } } }

code to disable ctrl+alt+del key using .net

code to disable ctrl+alt+del key using .net Use this code in .net for disable A-C-D Dim regkey As Microsoft.Win32.RegistryKey Dim subkey As String subkey = "Software\Microsoft\Windows\CurrentVersion\Policies\System" regkey = My.Computer.Registry.CurrentUser.CreateSubKey(subkey, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree) regkey.SetValue("DisableTaskMgr", 0) To Again enable A-C-D use this subkey = "Software\Microsoft\Windows\CurrentVersion\Policies\System" regkey = My.Computer.Registry.CurrentUser.CreateSubKey(subkey, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree) regkey.SetValue("DisableTaskMgr", 1) after this Restart PC and use this Function Public Sub RestartComputer() Dim t As Single Dim objWMIService, objComputer As Object 'Now get some privileges objWMIService = GetObject("Winmgmts:{impersonationLevel=impersonate,(Debug,Shutdown)}") For Each objC

MCTS 70-562 exam code of ASP.NET for 3.5 framewok

MCTS 70-562 exam code of ASP.NET for 3.5 framewok 1) MCTS 70-536 is the exam based on core framework,you can choose VB or C# any preferred language of your choice. 2) you can take the gap in between exams 3) you can download sample exam questions from net, like ucertify.com , etc. Certification books is also there by ms publications & there is lot of online material for study. 4) you can purchase online voucher from microsoft and give the exam at any prometric center in your city or you can contact your local prometric center nd ask them to purchase a voucher.Voucher cost 50$ (Rs2500/- appx.),

How to use interfaces in dotnet

How to use interfaces in  .Net An interfaces contains only the signatures of methods.The implementation of the methods is done in the class that implements the interface. SYNTAX: interface interface_name { void method1() void method2() } By default all the methods in interfaces are fully "public abstract" Example: ======= interface inter1 { void getdata(); void putdata(); } class sample1:inter1 { int eno; string ename; { public void getdata() { console.writeline("enter employee number"); eno=int.parse(console.readline()); console.writeline("enter employee name"); ename=console.readline(); } public void putdata() { console.writeline("employee number:"+eno); console.writeline("employee name:"+ename); } } class class1 { static void main () { sample1 obj=new sample1(); obj.getdata(); console,.writeline(); obj.putdata(); }

characteristic of Pythagorean

The sum of two numbers is a square. The sum of their squares is also a square. Find a method to get all such numbers. Answer let a + b = x^2 and a^2 + b^2 = y^2. the second equation is the characteristic Pythagorean triplet. so we can write a and b as p^2-1 and 2p where p is a positive integer > 1 . therefore, (p^2-1) + (2p) has to be a square number. [which is not true except for p=1/2] thus there is no base Pythagorean triplet which satisfies this relation, but multiples of them may easily do so. like: 3,4,5. 3+4 = 7 not a square. but for 21,28,35. 21 + 28 =7^2. thus (p^2+2p-1)(p^2-1) and (p^2+2p-1)(2p) or better still, q^2*(p^2+2p-1)(p^2-1) and q^2*(p^2+2p-1)(2p) satisfy the given condition, where p,q are both positive integers.

Properties of Irrational numbers

Properties of Irrational numbers If x be an irrational number then there are infinitely many relatively prime integers p and q such that | p/q - x | < 1/q^2 If x is a rational number then there are finitely many solutions to the above equation. This Theorem was first discovered by Dirichlet Further let {y} be the fractional part of y. x is an irrational number then the sequence {nx} n = 1,2,3, ... is not periodic. If x is a rational then this sequence is periodic. A rational number can be represented only by a a finite continued fraction where as an irrational number can be represented by an infinite continued fraction. Each convergent of the continued fraction representation of a irrational number is a better rational approximation of the given irrational number, than any previous convergent. Eg: The continued fraction representation of Pi is [3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, ..] hence the successive rational approximation of Pi are 3, 2

fibonacci numbers in pascal's triangle

Fibonacci numbers in pascal's triangle? The Proof follows from the following identity: Let F(r) be the r-Th Fibonacci number, C(n,r) be the number of combination of n things taken are at a time and [x] be the greatest integer function then Summation C(n-k, k) = F(n+1) where k goes form k=0 to k = [n/2] Now use induction on the variable n.

Improve your reasoning power and Solve the Mathematics equation problem

Improve your reasoning power Question - When a no. is divided by 2, rem. is 1 when divided by 3, rem. is 2. and so on...till it is divided by 10, remainder is 9.What's the number? Answer- if the no. be n, (n+1) is divisible by all of {2,3,4,..,10}. hence (n+1) is divisible by 2520. [ 2 |(n+1) & 3 |(n+1) => 6 |(n+1) & 4 | (n+1) => 12 |(n+1) (12=l.c.m(6,4)) & 5 |(n+1) => 60 |(n+1). continuing in this way 2520 |(n+1)] therefore any no. of the form n=(2520p-1) will suffice where p is a natural no. of course the smallest such natural no. is 2519. Mathematics equation problem X^3-Y^2=2 FIND ALL INTEGRAL SOLUTION OF X,Y Answer: case 1 x-3=y-5 y=x+2 original eq gives x^3-x^2-4x-2=0 no integral solution for this. case 2 x-3=y+5 y=x-8 original eq gives x^3-x^2+16x-66=0 (x-3)(x^2+2x+22)=0 x=3 y=-5 as eq invoves y^2 hence y as wellas -y both satisfies the pairs are (3,5) and (3,-5)

Find the remainder

Find the remainder when the digits 1 to 99 written side by side is divided by 11 i.e: (123456789101112...99)mod 11=? 123456789101112.....979899 counting from right, sum of digits at odd place = 9(9+8+...+1+0)+(9+7+5+3+1) sum of digits at even place = 10(9+8+...+1)+(8+6+4+2) sum of odd - sum of even = -40 = 4 (mod 11)

Code to send email using PLSQL

Code to send email using PLSQL You can use UTL_SMTP and UTL_TCP to send email attachment from Oracle Version 8i onwards. Sample Code: DECLARE v_From VARCHAR2(80) := 'oracle@mycompany.com'; v_Recipient VARCHAR2(80) := 'test@mycompany.com'; v_Subject VARCHAR2(80) := 'test subject'; v_Mail_Host VARCHAR2(30) := 'mail.mycompany.com'; v_Mail_Conn utl_smtp.Connection; crlf VARCHAR2(2) := chr(13)||chr(10); BEGIN v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25); utl_smtp.Helo(v_Mail_Conn, v_Mail_Host); utl_smtp.Mail(v_Mail_Conn, v_From); utl_smtp.Rcpt(v_Mail_Conn, v_Recipient); utl_smtp.Data(v_Mail_Conn, 'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf || 'From: ' || v_From || crlf || 'Subject: '|| v_Subject || crlf || 'To: ' || v_Recipient || crlf || 'MIME-Version: 1.0'|| crlf || -- Use MIME mail standard 'Content-Type: multi

Code to Get all table size in sql database server, code to get table size, get sql tables size, show table size in sql server

SET NOCOUNT ON DBCC UPDATEUSAGE(0) -- Database size. Following code you can write in stored procedure or you can directly run on query browser to get all table size in selected database. EXEC sp_spaceused-- Table row counts and sizes. CREATE TABLE #test ( [name] NVARCHAR(128), [rows] CHAR(11), reserved VARCHAR(18), data VARCHAR(18), index_size VARCHAR(18), unused VARCHAR(18)) INSERT #t EXEC sp_msForEachTable 'EXEC sp_spaceused ''?''' SELECT *FROM #test-- # of rows. SELECT SUM(CAST([rows] AS int)) AS [rows]FROM #test DROP TABLE #test I hope this code will help you a lot on database administration.

Code to check your PC name

Set VObj = CreateObject("SAPI.SpVoice") with VObj Set .voice = .getvoices.item(0) .Volume = 100 .Rate = 1 end with Set VObj = CreateObject("SAPI.SpVoice") For Each Voice In VObj.getvoices I = I + 1 msgbox "I am " & Voice.GetDescription & " and ;)" Next For count=0 to 3 vobj.Speak"Cygig Lol, at least try to do it in a less obvious way" Next

how to Print starik triangle in c++

To Print starik triangle in c++ like this way ********** ********* ******** ******* ****** ***** **** *** ** * You can write following code in c++ editor. void main(){ const int size=10,x=0; for(int i=0;i<size;++i) { cout<<"\n"; for(int j=0;j<size-x;++j) cout<<"*"; for(int k=0;k<x;++k) cout<<" "; ++x; } getch(); }

How to use strcpy with malloc function

char s[]="Hello" is an array of chars char *s[] = "asa"; is an error coz itz an array of character pointers char *s[] = { "AAA", "BBB", "CCC"}; is OK --------------- char s[]="ABCD" char (*p)[5] = &s; //is fine... here p is a pointer to an array ------ In Your case... U cn do this char s[] = "Hello" char *p[2]; p[0] = (char *)malloc(sizeof(s)); strcpy(p[0], s); p[1] = (char *)malloc(sizeof(s)); strcpy(p[1], s);

Program for largest element in array using c++

Program for largest element in array using c++ int array[5],i,temp; printf("\n enter element in array"); for(i=0;i<5;i++) scanf("%d",&array); for(i=1;i<5;i++) { if(array[0]) { temp=array; array=array[0];array[0]=temp; } } printf("\n largest ele. in array=%d",temp); getch(); } we get array size 5 then enter 5 element in array..then tack temp variable before this we give separate 1st element in array to assign maximum element in array then compare it with one by one remaining element in array..if 1st ele in array is smaller than any one element in remaining array then print element in remaining array..else print 1st element in array. Deletes all array elements in c++ #include class Date { int mo, da, yr; public: Date() { std::cout << "Date constructor" << std::endl; } ~Date() { std::cout << "Date destructor" << std::endl;

Code to generate the pyramid structure using c++

Code to generate the pyramid structure using c++ main() { int i; int j,n,uppr,lowr, arry[] = {1,2,3,4,5,6,7,8,9}; /*Take Input */ do { cout << "Enter an odd number(0-9):"; cin >> n; if(n < 0 || n > 9 || ((n % 2) == 0)) cerr << "Error" << endl; }while(n < 0 || n > 9 || ((n % 2) == 0)); /*Generate the pyramid structure */ for(i = 0; i < n; i++) { for(j = 0; j < ((i < (n-i-1)?i:(n-i-1))); j++) cout << " "; lowr = (i < (n-i-1)) ? i : (n-i-1); uppr = (i < (n-i-1)) ? (n-i-1) : i; for( j = lowr; j <= uppr; j++) cout << arry[j]; cout << endl; } return 0; } To execute something before main function you can try below code fun() { clrscr(); printf("\nIn the fun.........."); } #pragma startup fun int main() { printf("\nIn the main()"); getch(); return 0; }

Difference between Visual C++ and Visual C++.NET

Difference between Visual C++ and Visual C++.NET VC++ is only the "single user system GUI" i.e the program or application written in VC++ are to be installed in each machine to use that. While VC++.NET is the "Networked or Web based gui" i.e The program or application written in VC++.NET need not be installed in each machine but it will be in the server and all other machines can use that application by "DOMAIN NAME" or "IP address .NET programmes are made available in the Internet or globally by making use of any servers i.e "Apache server" "Jboss server" "Web logic" all the .NET programme files are put in any of these servers and using IP address this programmes can be accessed. VC++ is a compiler for C/C++ and all and not a language in itself, but the WIN32 platform offers so much applications in itself that it is a almost new world. As far as my decision of going with VC++ 6.0 and VC++.NET is that the bo

difference between locally and globally static variables.

Difference between locally and globally static variables. 1) Global Static variables are initialized at the beginning of the program. Local Static variables are initialized only when the function containing the variable is called. 2) Local Static variable is accessed by only the function in which it is declared. Global Static variable can be accessed by all the function in the program (with in a file in which they declared). 3) Global Static variables are not accessed by any other file. Local Static variables are not accessed from outside the function in which they declared.

print any real number and print the integer part and the real part separately without using modulus

print any real number and print the integer part and the real part separately without using modulus class date { int dd,mm,yy; public: void input() { cout<<"Enter the date :"<>dd; cout<<"Enter the month :"; cin>>mm; cout<<"Enter the year :"; cin>>yy; } void calc() {int n,p; cout<<"Enter the number of days"<>n; dd=dd+n; if(dd>30) {mm=mm+(dd%30); dd=dd+(dd/30); } if(mm>12) yy=yy+(mm%12) } void display() { cout<<"The new date="<<dd<<"/"<<mm<<"/"<<yy<<endl; } }; void main() {clrscr(); date d; d.input(); d.calc(); d.display(); getch(); }

Display all palindromes in one single string entered by user using c++

void main() { long i,j,n,k,l,v; int flag,u=0,y,x; int shaff[10],shaff1[720][4]; char pal[14],pal1[720][14],word[14]; clrscr(); cout<<"enter the palentrom\n"; gets(pal); strcpy(pal1[0],pal); strrev(pal1[0]); if(strcmp(pal1[0],pal)!=0) { cout<<"entered value is not palaentrom\n"; getch(); exit(0); } y=strlen(pal); if(y%2==0) n=y/2; if(y%2==1) n=(y-1)/2; k=0; for(i=0;i=0;i--) l=l*10+i; for(i=k;i<=l;i++) { v=i; for(j=0;j=n) flag=0; } v=i; if(flag==1) { for(j=0;j[j]=v%10; v=v/10; } u++; } } l=1; for(i=0;i[j]]; x++; } if(y%2==1) { word[x]=pal[n]; x++; } for(j=n-1;j>=0;j--) { word[x]=pal[shaff1[j]]; x++; } word[x]='\0'; flag=1; for(k=0;k<=l;k++) { if(strcmp(pal1[k],word)==0) flag=0; } if(flag==1) { strcpy(pal1[l],word); l++; } } cout<<"

declaration of friend classes ,size of heap in c++

Declaration of friend classes class XYZ { int x; public: }; class ABC { int y; public: friend class XYZ; }; ///////////// class ABC; //forward declaration class XYZ { int x; public: void fun(){ ... ABC tmp; ... tmp.y=10; //legal } }; class ABC { int y; public: friend class XYZ; void fun() { ... XYZ tmp; ... //tmp.y=10; Illegal } }; //Size of heap in c++ #include #include int main() { char *a=(char *)0; int (*fun)()=main; printf("%u ",fun); return(0); }

Bank project example using c++

Bank project example using c++ #include #include"fstream.h" using std::cout; using std::cin; class BankUser{ public: BankUser(); void viewBalance(); void deposit(); void withdraw(); double transfer1(); void transfer2(double); private: double blance; }; BankUser::BankUser() { char type; cout<<"enter the type for this Account"; cout<<"\n\ncheck Account :C"; cout<<"\nSaving Account :S"; cout<<"\n\n\ Enter ur Choice :"; cin>>type; if (type=='S'||type=='S') blance=1500; else blance=1000; } void BankUser::viewBalance() { cout<<"\n The Current Blane Of This Account Is="<>amount; blance+=amount; if(blance>2000) blance+=50; viewBalance(); } void BankUser::withdraw() { double amount; cout<<"Enter the Amount to be with drawn :"; cin>>

example of random and randomize function in c++

example of random and randomize function in c++ void main() { randomize(); int k; int vett[90]; clrscr(); for (int i=0; i<90; i++) { do { vett=random(90)+1; k=0; while (vett!=vett[k]) k++; } while(k!=i); } cout<<"?????????"; cout<<"\n"; for (int j=0; j<90; j++) cout<<""<<vett[j]<<" "; int tab[91]; int h; int val; int u=0; for (int l=0; l<90; l++) { h=random(90-u); val=vett[h]; vett[h]=vett[90-u]; tab[val]=val; u++; } cout<<"\n"; cout<<"after ...........????"; cout<<"\n"; for (int y=1; y<91; y++) cout<<""<<tab[y]<<" "; getch(); }

Dynamic cast using c++

Dynamic cast using c++ dynamic_cast() is more useful to find out what kind of object is pointed to by the given pointer. This is used when you write a function that could accept any objects of the given class's hierarchy and then you take care of it inside the method. Like, function myMethod(Base *ptr) // can recognize any object that is of Base's family { if (dynamic_cast(ptr) != NULL) // the pointed-to object is of Child1 { Child1 *myChild = ptr; // here you take care of it as it is of a Child1 object // .. rest of the code } else if (dynamic_cast(ptr) != NULL) // the pointed-to object is of Child2 { Child2 *myChild = ptr; // here you take care of it as it is of a Child2 object // .. rest of the code } else if (dynamic_cast(ptr) != NULL) // the pointed-to object is of Child3 { Child3 *myChild = ptr; // here you take care of it as it is of a Child3 object // .. rest of the code } else { // the object pointed-to by ptr is not Base's class family/

Object Slicing in c++

"If b is a base class pointer and d is a derived class pointer then b=d will copy only the base class contents and remove the derived class contents.This is known as Object Slicing and should be avoided." class bc { public: int a; float b; }; class dc : public bc { public: char c; }; main() { bc Bobj; //Bobj contains int a and float b dc Dobj; //Dobj contains int a, float b and char c Bobj=Dobj; // when we assign dc class obj to a bc class obj it slices of dc portion of obj so a and b get copied into a and b of Bobj and char c does not get copied in effect Dobj got sliced }

Object oriented programming language (OOPL) and Run time Polymorphism

Object oriented programming language (OOPL) What is object in c++ Objects are the foundation of object-oriented programming, and are fundamental data types in object-oriented programming languages. These languages provide extensive syntactic and semantic support for object handling, including a hierarchical type system, special notation for declaring and calling methods, and facilities for hiding selected fields from client programmers. However, objects and object-oriented programming can be implemented in any language. C++ Carry's the concept of object oriented programming 1) data abstraction 2) data encapsulation 3) modularity 4) inheritance 5) polymorphism C++ is an OOPL not just because it supports the OOPS concepts but more importantly, those concepts are EASY to implement in C++, and sometimes some non OOPS concepts are difficult to do. For example, it is possible to implement data hiding etc using C, but they are unusually difficult, whereas C++ directly