c sharp network programming tutorial

C sharp database programming

C sharp database programming

... from an Access database. Listing 1.2: OLEDBCONNECTIONACCESS.CS /* OleDbConnectionAccess.cs illustrates how to use an OleDbConnection object to connect to an Access database 24 Mastering C# Database ... the constructor OleDbConnection myOleDbConnection = new OleDbConnection(connectionString); // create an OleDbCommand object OleDbCommand myOleDbCommand = myOleDbConnection. CreateCommand(); ... creates an OleDbConnection object, passing connectionString (set in the previous line of code) to the constructor: OleDbConnection myOleDbConnection = new 01eDbConnection(connectionString); Listing...

Ngày tải lên: 14/03/2014, 17:40

710 576 2
Mastering C Sharp Database Programming doc

Mastering C Sharp Database Programming doc

... namespace has been imported, the following example creates an OleDbConnection object, passing connectionString to the constructor: OleDbConnection myOleDbConnection = new OleDbConnection(connectionString); Listing ... source=ORCL;user id=SCOTT;password=TIGER"; // create an OleDbConnection object to connect to the // database, passing the connection string to the constructor OleDbConnection myOleDbConnection ... OleDbConnection(connectionString); // create an OleDbCommand object OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand(); // set the CommandText property of the OleDbCommand object to...

Ngày tải lên: 14/03/2014, 20:20

385 2.2K 0
network programming .net with c sharp and vb.net 2004

network programming .net with c sharp and vb.net 2004

... listenerSocket.Bind(ipepServer) listenerSocket.Listen(-1) clientSocket = listenerSocket.Accept() If clientSocket.Connected Then Do bytesReceived = clientSocket.Receive(recv) tbStatus.Text += Encoding.ASCII.GetString(recv) ... EndPoint. AcceptSocket() Accepts a pending connection request. Returns Socket. AcceptTcpClient() Accepts a pending connection request. Returns TcpClient. Pending() Determines if there are pending connection requests. ... creation of an OleDbConnection object, where the constructor is passed the connection string (Table 2.6). Here the database is a Microsoft Access file located at c: \purchaseOrder.mdb C# string szDSN...

Ngày tải lên: 17/04/2014, 09:17

562 2.5K 0
Tài liệu Object Oriented Programming using C sharp ppt

Tài liệu Object Oriented Programming using C sharp ppt

... source code to execute on a particular machine ã compilation into machine-language object code ã direct execution of source code by interpreter program ã compilation into intermediate object code ... o. A car has a current speed and has a certain amount of fuel inside it. Speci c behaviour can also be associated with each object (things that you can do with it) :- a watch can be checked ... automatically at the end of every month) and could discipline any doctor guilty of misconduct – of course this would be true for other sta as well. More specically a manager could check that a doctor’s...

Ngày tải lên: 21/02/2014, 06:20

254 503 1
C Programming Tutorial doc

C Programming Tutorial doc

... blocks of the C programming language, let us look a bare minimum C program structure so that we can take it as a reference in upcoming chapters. C Hello World Example A C program basically consists ... fraction */ Character constants Character literals are enclosed in single quotes e.g., 'x' and can be stored in a simple variable of char type. A character literal can be a plain character ... pointer from functions 87 C Strings 90 C Structures 93 Defining a Structure 93 Accessing Structure Members 94 Structures as Function Arguments 95 Pointers to Structures 96 C Unions 99 Defining...

Ngày tải lên: 11/03/2014, 08:20

145 2.4K 0
Network programming in c

Network programming in c

... struct sockaddr_in can be cast to a pointer to a struct sockaddr and vice-versa. So even though connect() wants a struct sockaddr*, you can still use a struct sockaddr_in and cast it at the last ... the struct // don’t forget your error checking for these calls: bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)); listen(sockfd, BACKLOG); Beej’s Guide to Network Programming ... a call to fcntl(): #include <unistd.h> #include <fcntl.h> . . . sockfd = socket(AF_INET, SOCK_STREAM, 0); fcntl(sockfd, F_SETFL, O_NONBLOCK); . . . By setting a socket to non-blocking,...

Ngày tải lên: 19/03/2014, 13:41

63 956 0
C++ Network Programming, Volume 1 pptx

C++ Network Programming, Volume 1 pptx

... ACEJPC-SAP Class 52 3.4 The ACE.SOCK Class 54 3.5 The ACEJ3OCK_Connector Class 56 3.6 The ACE_SOCK_IO and ACE_SOCK_Stream Classes 60 3.7 The ACE_SOCKAcceptor Class 64 3.8 Summary 68 Chapter ... Message-passing IPC is usually more practical than developing a DSM mechanism and managing it via complex distributed cache coherency protocols. Since DSM is an advanced research topic that's not commonly ... interprocess communi- cation mechanisms. This chapter described how IPC mechanisms yield a number of communication dimensions to consider when designing net- worked applications. We described connection...

Ngày tải lên: 23/03/2014, 22:21

302 288 3
c sharp programming

c sharp programming

... generic type declaration. Like fields, methods can be static (associated with and accessed through the class) or instance (associated with and accessed through an object instance of the class). Constructors A ... C: \WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe hello.cs ã For Mono run mcs hello.cs. ã For users of cscc, compile with "cscc -o <name>.exe <name>.cs". Doing so will produce ... & Overflow exception control Expression Explanation checked(a) uses overflow checking on value a unchecked(a) avoids overflow checking on value a 22 | C# Programming Chapter 24 A section "Entitled...

Ngày tải lên: 31/03/2014, 16:41

71 386 0
visual c-sharp programming basics

visual c-sharp programming basics

... !! A0!'.901!RpublicT!70$#,0!108%-,)/2!'(0!$+/8')#/!*#!&0!8-/!+*0!)'!#+'*)10!'()*!8%-**N! S#&=!2#!7-8;!'#!RU#,3]N8*T!-/1!108%-,0!'(0!8%-**!,)2('!#/!'#9!#$!'(0!Main!$+/8')#/4! Calculator Calc = new Calculator();! ! 16" VISUAL" ;C# " ;PROGRAMMING& quot;BASICS# ! //This is the switch-case command //it works like multiple if's switch (String) ... void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked == true) { button1.Enabled = true; } else 4" VISUAL" ;C# " ;PROGRAMMING& quot;BASICS# ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! L#+!/#&!8,0-'01!-!/0&!9,#Q08'N!L#+!3)2('!20'!-%%!*8-,01!7.!E)*+-%!HIW*!)/'0,$-80!708-+*0!)'!)*!<0,.! 8,#&101!-/1!.#+!1#/W'!;/#&!&(-'!3#*'!#$!'(0!8#/',#%*!1#N!X0'W*!'-;0!-!%##;!-'!'(0!)/'0,$-80!$#,!-!7)'4!'(0! $),*'!'()/2!'(-'!9#9W*!)/'#!.#+,!0.0*!)*!'(0!$#,3!,)2('!)/!'(0!3)11%0N!O'!)*!-/!039'.!$#,3!-/1!&(-'!.#+!(-<0! '#!1#!)*!'#!'-;0!8#/',#%*!$,#3!'(0!R"##%7#KT=!'(0!9-/0%!$,#3!'(0!%0$'=!-/1!9+'!'(03!#/!)'N! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ... file operations namespace Calculator { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) ...

Ngày tải lên: 28/04/2014, 15:33

19 312 0
Win32 Programming Tutorial  Tham khảo toàn diện về Con trỏ trong C/C++ ppt

Win32 Programming Tutorial  Tham khảo toàn diện về Con trỏ trong C/C++ ppt

... thường, c c đối tượng c thể đư c truy xuất bằng một trong 2 c ch: tr c tiếp bằng đại diện ho c gián tiếp bằng con trỏ. C c biến con trỏ đư c định nghĩa trỏ tới c c đối tượng c một kiểu dữ liệu c ... lệnh c a thuật toán sắp xếp, thì bạn hãy để cho caller cung c p c ch hàm sắp xếp c a riêng nó. Bằng c ch làm này, bạn tránh đư c hard-coded, t c là tính tái sử dụng không cao, hàm Ascending chỉ ... giá trị c a pInt là 1776 (địa chỉ c a biến var). Vì con trỏ c ng là biến cho nên nó c ng phải c địa chỉ trong bộ nhớ, c n số byte c n thiết cho con trỏ c thể là 2 ho c 4 byte phụ thu c hệ...

Ngày tải lên: 29/06/2014, 08:20

21 580 0
boost.asio c++ network programming

boost.asio c++ network programming

... io_service instance and several handler threads: io_service service_; ip::tcp::socket sock1(service_); ip::tcp::socket sock2(service_); sock1.async_connect( ep, connect_handler); sock2.async_connect( ... ip::tcp::socket(service)); start_accept(sock); service.run(); void start_accept(socket_ptr sock) { acc.async_accept(*sock, boost::bind( handle_accept, sock, _1) ); } void handle_accept(socket_ptr sock, const boost::system::error_code ... boost::shared_ptr<ip::tcp::socket> socket_ptr; io_service service; ip::tcp::endpoint ep( ip::tcp::v4(), 2001)); // listen on 2001 ip::tcp::acceptor acc(service, ep); socket_ptr sock(new ip::tcp::socket(service)); start_accept(sock); service.run(); void...

Ngày tải lên: 01/08/2014, 17:28

156 3.1K 2
gdi programming with c sharp phần 1 pptx

gdi programming with c sharp phần 1 pptx

... the device context (HDC), which is used by GDI to send information to the device. In GDI+, the concept of device context and handle to the device context is replaced by the Graphics object. The ... the application needs to call the SelectObject function, which takes the device context and pen handle as arguments. Now the application can draw any graphics object. The application calls the ... Application Section 2.4. Some Basic GDI+ Objects SUMMARY Chapter 3. The Graphics Class Section 3.1. Graphics Class Properties Section 3.2. Graphics Class Methods Section 3.3. The...

Ngày tải lên: 12/08/2014, 19:20

71 448 0
gdi programming with c sharp phần 2 ppt

gdi programming with c sharp phần 2 ppt

... was clicked. Now we check to see if the Rectangle check box is checked. If so, we draw a rectangle to mark the connecting point of the two lines. If not, we draw an ellipse as the connecting ... Point objects. You can test this code on a button or a menu click event handler. Listing 2.9 Creating RectangleF objects // Create a Graphics object Graphics g = this.CreateGraphics(); float ... menu click event handler. The Form class provides the CreateGraphics method, which returns a Graphics object. The following code snippet creates a Graphics object using the CreateGraphics method...

Ngày tải lên: 12/08/2014, 19:20

70 298 0
gdi programming with c sharp phần 3 docx

gdi programming with c sharp phần 3 docx

... (rect, startColor, endColor, mode); } // Gamma correction check box is checked if(checkBox1.Checked) { lgBrush.GammaCorrection = true; } // Fill rectangle g.FillRectangle(lgBrush, rect); ... System.Drawing.Drawing2D.HatchBrush. public HatchBrush(HatchStyle, Color); public HatchBrush(HatchStyle, Color, Color); The following code creates a hatch brush with a dashed-vertical hatch style, blue background, ... rectangle curGraphics.DrawRectangle(curPen, curX, curY, diffX, diffY); break; } case 4: { // Fill the rectangle curGraphics.FillRectangle(curBrush, curX, curY, diffX, diffY); break; } case...

Ngày tải lên: 12/08/2014, 19:20

70 681 0
w