The Network. Multithreading. This tutorial can be found on -

Size: px
Start display at page:

Download "The Network. Multithreading. This tutorial can be found on -"

Transcription

1 This tutorial can be found on - Instant messaging is sweeping the world, and is rapidly replacing as the preferred electronic communications means. Behind this phenomenon, however, is a rather simple technology, which Chris Payne discusses (with step-by-step building instructions). Instant messaging is sweeping the world it is rapidly replacing as the preferred electronic communications means. Behind this phenomenon, however, is a rather simple technology, especially with.net's new programming paradigm. This article will give some background on the technologies needed to build an instant messenger, as well as build a simple one step by step. The Network The first thing that comes to mind when thinking about an instant messaging application (IM) is the Internet; after all, to send an instant message, you need to deal with a network. The System.Netnamespace in the.net Framework contains all the classes you'll ever need to handle network requests of any type (and for IM, you don't need many)..net introduces pluggable protocols, which is a way to create an application that can handle any type of Web request using only one class..net automatically determines the type of network traffic that is going on, and adjusts appropriately taking a lot of work away from you, the developer. In this article, we'll look at a few classes in the System.Net.Sockets namespace, which provides a more sophisticated interface for dealing with network traffic. You'll find, though, that even these are very simple. For an IM application, there are two classes we're interested in. System.Net.Sockets.TcpClientand System.Net.Sockets.TcpListener provide methods for you to send and receive data, respectively, using the TCP protocol. All you need to know is the IP address of the person you want to communicate with, and you're set to go. But wait a moment. An application cannot do two things at once. That is, your application cannot both send messages and receive them at the same time, which is a key feature of instant messaging. Somehow, you have to devise a way to accomplish two things at once we'll discuss this in the next section. Multithreading Everyone's heard of multithreading, but not many people know exactly what it means, much less how to do it properly. Every Windows application,.net or otherwise, runs in a thread, the basic component of processing. The operating system doles out resources to threads, and all execution takes place within a thread. All applications use threads, and many use only a single thread (for example, Notepad). As its name implies, a thread is linear. Only one thing can be going on at a time in a thread because a CPU can process only one thing at a time (though it does so very quickly). This is why most applications can only do one thing at a time why you can't send and receive IMs at the same time. With Windows, there's no rule that says an application can have only one thread. An application will always have a main thread (which the operating system creates when the application starts and then destroys when the application quits), but generally, the program is free to create additional threads as it needs them

2 (assuming, of course, that there are available resources). With multiple threads, you can do multiple things at once in a single application. (Note, however, that the CPU still technically only processes one thread at a time, but at least your application thinks there are two things going on at once.) Threading in.net is handled by the classes in the System.Threading namespace, of which we are interested in only one: Thread. When you create an instance of the Thread class, you are creating a new thread for the operating system to handle. This new thread can go off by itself, doing the things it needs to do, without bothering about the main thread. However, because the main thread is the one controlling the application, you need a way for the new thread to report back. Otherwise, the new thread would go on forever and your application would lose control of it a rogue thread. This process is done through callbacks. When the new thread needs to get in touch with the main thread, it raises an event, just like any other.net Windows Forms control, which the main thread catches and deals with appropriately. Now, imagine the IM application again. Your main thread is running the application, allowing you to type messages and send them. Meanwhile, in the background, you have another thread going that sits and listens for incoming messages. When it receives one, it notifies the main thread, which takes the message and displays it properly. The background thread then continues waiting for more messages. Simple as that! (Remember that the sending and receiving of messages is done with thetcpclient and TcpListener classes.) A Note About IM Applications Most IM applications that are around nowadays rely on a server/client approach. That is, you log into a server, and messages you send are sent to the server, which in turn routes them to their intended destinations. The server acts as the middleman. There are some advantages to doing it this way, although there are some disadvantages as well. The application we will build here is completely peer-to-peer (P2P), so it doesn't rely at all on a server. Rather, you connect directly to another user, and messages are not sent anywhere other than where they're supposed to go. This provides some added security, and much flexibility (but may not be so great for corporations that want to build up a registered database of IM users; that is, AOL or MSN).

3 Let's Build It! First, we need the basic framework a template for a standard Windows Forms application. This is shown in Listing 1. Listing 1 The Framework using System; using System.Windows.Forms; using System.Drawing; using System.Net.Sockets; using System.Threading; using System.IO; using System.ComponentModel; namespace MyNamespace { public class Chat : Form { private Button btsend = new Button(); private RichTextBox rtbmessage = new RichTextBox(); private RichTextBox rtbtype = new RichTextBox(); public Chat() { rtbmessage.dock = DockStyle.Top; rtbmessage.size = new Size(300,200); rtbtype.location = new Point(0,205); rtbtype.size = new Size(240,65); btsend.text = "Send"; btsend.click += new EventHandler(this.SendText); btsend.size = new Size(50,50); btsend.location = new Point(240,205); this.text = ".NET IM"; this.size = new Size(300,300); this.closing += new CancelEventHandler(this.CloseMe); this.controls.add(btsend); this.controls.add(rtbmessage); this.controls.add(rtbtype); private void SendText(Object Sender, EventArgs e) { private void CloseMe(Object Sender, CancelEventArgs e) { public static void Main() { Application.Run(new Chat());

4 This very simple code produces this screen Briefly, you first have the namespaces you'll use, taking into account the threading and net classes you'll need. Next, you have the namespace, class, and several Windows Forms controls to provide the user interface. These are all initialized in the constructor, Chat, and a few event handlers are added specifically, to handle the "Send" button click, and to perform some processing when the form closes. Those empty event handlers are shown next, followed by the Main method, which starts the application. Your basic IM window First thing's first. You need to create a mechanism to send messages. That's simple enough: declare a new TcpClient object somewhere between lines 11 and 14: private TcpClient objclient; The only time you actually need to use this object is when the user sends a message that is, when they click the "Send" button. So let's modify the SendText method: private void SendText(Object Sender, EventArgs e) { rtbmessage.text += strme + ": " + rtbtype.text + "\n"; objclient = new TcpClient(" ", 1000); StreamWriter w = new StreamWriter(objClient.GetStream()); w.write(rtbtype.text + "\n"); w.flush(); objclient.close(); rtbtype.text = ""; The second line displays the entered text in the RichTextBox. This allows you to keep a record of the conversation. The next line instantiates the TcpClient object. The first parameter of the constructor is the IP address of the person you're going to talk to. In this case, we're going to talk to ourselves (and before you ask, yes, I do have friends), so use the standard IP address that points to your local computer. You could

5 also use "localhost" here, or use any other DNS name that works for you. The second parameter is the port number you want to send to. This number is relatively arbitrary just choose something in the thousands. Next, you need to actually send the message. If you're familiar with the.net method of network messaging, you'll know that this is done by retrieving a Stream on the network that you can write to. Essentially, the GetStream method grabs the ear of the receiver, and prepares to yak into it. We use a StreamWriter object to do the actual writing. The Write method writes the contents from therichtextbox (followed by a new line character), and Flush ensures that the data is sent immediately (rather than waiting for any network buffering). Finally, you close the TcpClient. (This is very important; otherwise, you'd maintain a connection to the receiver, and that's not necessary.) Erase the contents of the "rtbtype" box, so the user can start anew. So now your little application can send messages to itself, but no one's listening yet. To do this, you need another thread and a TcpListener object. Add the following code before line 14: private Thread thdlistener; private TcpListener objlistener; Somewhere in the constructor, add the following code: thdlistener = new Thread(new ThreadStart(this.Listen)); thdlistener.start(); The first line instantiates your new thread. ThreadStart is actually a delegate (like EventHandler) that points the application to an event-handling method the Listen method in this case. Essentially, this first line tells the application that when the new thread starts, the first thing it should do is execute the Listen method. The second line actually starts the new thread off and running. Next, we need the Listen method: private void Listen() { string strtemp = ""; objlistener = new TcpListener(1000); objlistener.start(); do { TcpClient objclient = objlistener.accepttcpclient(); StreamReader objreader = new StreamReader(objClient.GetStream()); while (objreader.peek()!= -1) { strtemp += Convert.ToChar(objReader.Read()).ToString(); object[] objparams = new object[] {strtemp; strtemp = ""; this.invoke(new Invoker(this.ShowMessage), objparams); while(true!= false);

6 This method starts off by instantiating the TcpListener object; the third line tells it to listen on port 1000 (this should probably be the same as the port you're sending on; otherwise, you won't receive the communications). The Start method, naturally, starts the listener listening. Recall that the listener needs to alert the main thread when it hears something, and then goes back to waiting. Thus, we introduce the infinite do loop (because true will never equal false, this loop executes indefinitely). Inside this loop is where the receiving and notifying will be done. Now that the TcpListener is listening, you need to tell it what to listen for. The AcceptTcpClientmethod causes the TcpListener to sit there until a TcpClient (actually, any application that communicates via TCP) contacts it. If no one ever sends you an instant message, the execution will never get past the AcceptTcpClient line (which, if this weren't on a different thread, would cause your application to freeze). When you do finally receive some communication, you use thegetstream method to grab the raw contents of the message, wrapping it in a StreamReader to return the contents in a human readable format. Next, you go into a loop to read the message, character by character. Note that the Read method of the StreamReader returns everything in numbers. Thus, you need to use the Convert.ToChar method to change those numbers back into the text characters they represent. Peek tells you when you reach the end of the message. NOTE You can't use the StreamReader's ReadToEnd method here because, given the network communication, the StreamReader can't determine the end. It simply waits and waits and waits for more information, and your IM application isn't very useful. Let's skip down to the third-to-last line for a moment. Communication between threads is often a risky procedure if not done properly. You need a way to alert the main thread safely, and theinvoke method is your savior. Invoke takes two parameters: a delegate that points to a method that the main thread should execute once it receives the alert, and any parameters that should be sent to that method, in an array. The Invoker delegate here is a custom one. To create it, simply add the following code somewhere before line 14: public delegate void Invoker(String t); This delegate will pass a string (the received message) to the event handler. This string is the one you built from the StreamReader, but you need to put it in an array to properly send it usinginvoke; so this is done a few lines above. In a nutshell, here's the plan of execution: First, the new thread starts and executes the Listenmethod; then it instantiates a TcpListener, and waits for someone to contact it. When a submission is received, it retrieves the message into a string using a StreamReader; next, it alerts the main thread, telling it to execute the ShowMessage function, passing in the newly built string; then it goes back to waiting for a message. Rinse and repeat.

7 Let's look at the ShowMessage function. It's very simple: private void ShowMessage(String t) { rtbmessage.text += t + "\n"; This method simply takes the string passed into it, and displays it in the RichTextBox. There's only one thing left to do: When your application quits, you need to break the infinite loop in the Listen method and stop the TcpListener from listening. If Listen had been executed on the main thread, it would stop when your application closed. However, because it's in another thread, it will continue on, regardless of what the main thread does. So, in the event handler for the form'sclosing event, you stop the TcpListener: private void CloseMe(Object Sender, CancelEventArgs e) { objlistener.stop(); And you're done! As you can see, it doesn't take much to build a chat application. You can compile this code from the command line using the command (assuming, of course, that you saved this code as Chat.cs): csc /t:winexe /r:system.dll,system.drawing.dll,system.windows.forms.dll Chat.cs Listing 2 shows the code in its entirety, with some minor modifications to make it more user-friendly. This screen shows the output after some nice chatting with myself.

8 Listing 2 A complete Instant Messaging Application using System; using System.Windows.Forms; using System.Drawing; using System.Net.Sockets; using System.Threading; using System.IO; using System.ComponentModel; namespace MyNamespace { public class Chat : Form { public delegate void Invoker(String t); private Thread thdlistener; private TcpListener objlistener; private TcpClient objclient; private Button btsend = new Button(); private RichTextBox rtbmessage = new RichTextBox(); private RichTextBox rtbtype = new RichTextBox(); private string strfriend; private string strme; public Chat() { strfriend = " "; strme = "Chris"; thdlistener = new Thread(new ThreadStart(this.Listen)); thdlistener.start(); rtbmessage.dock = DockStyle.Top; rtbmessage.size = new Size(300,200); rtbtype.location = new Point(0,205); rtbtype.size = new Size(240,65); btsend.text = "Send"; btsend.click += new EventHandler(this.SendText); btsend.size = new Size(50,50); btsend.location = new Point(240,205); this.text = ".NET IM"; this.size = new Size(300,300); this.closing += new CancelEventHandler(this.CloseMe); this.controls.add(btsend); this.controls.add(rtbmessage); this.controls.add(rtbtype); private void SendText(Object Sender, EventArgs e) { rtbmessage.text += strme + ": " + rtbtype.text + "\n"; objclient = new TcpClient(strFriend, 1000); StreamWriter w = new StreamWriter(objClient.GetStream()); w.write(rtbtype.text + "\n"); w.flush(); objclient.close(); rtbtype.text = ""; private void Listen() { string strtemp = ""; objlistener = new TcpListener(1000); objlistener.start(); do { TcpClient objclient = objlistener.accepttcpclient(); StreamReader objreader = new StreamReader(objClient.GetStream()); while (objreader.peek()!= -1) { strtemp += Convert.ToChar(objReader.Read()).ToString(); object[] objparams = new object[] {strtemp;

9 strtemp = ""; this.invoke(new Invoker(this.ShowMessage), objparams); while(true!= false); private void ShowMessage(String t) { rtbmessage.text += strfriend + ": " + t + "\n"; private void CloseMe(Object Sender, CancelEventArgs e) { objlistener.stop(); public static void Main() { Application.Run(new Chat());

The Stack, Free Store, and Global Namespace

The Stack, Free Store, and Global Namespace Pointers This tutorial is my attempt at clarifying pointers for anyone still confused about them. Pointers are notoriously hard to grasp, so I thought I'd take a shot at explaining them. The more information

More information

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output General Date Your Company Name Tel: +44 1234 567 9898 Fax: +44 1234 545 9999 email: info@@company.com Microsoft Visual Studio C# Project Source Code Output Created using VScodePrint Macro Variables Substitution

More information

Threads & Networking

Threads & Networking Threads & Networking C# offers facilities for multi threading and network programming an application roughly corresponds to a process, handled by the OS time sharing simulates multi tasking inside an application

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

Linked Lists. What is a Linked List?

Linked Lists. What is a Linked List? Linked Lists Along with arrays, linked lists form the basis for pretty much every other data stucture out there. This makes learning and understand linked lists very important. They are also usually the

More information

05. SINGLETON PATTERN. One of a Kind Objects

05. SINGLETON PATTERN. One of a Kind Objects BIM492 DESIGN PATTERNS 05. SINGLETON PATTERN One of a Kind Objects Developer: What use is that? Guru: There are many objects we only need one of: thread pools, caches, dialog boxes, objects that handle

More information

Konark - Writing a KONARK Sample Application

Konark - Writing a KONARK Sample Application icta.ufl.edu http://www.icta.ufl.edu/konarkapp.htm Konark - Writing a KONARK Sample Application We are now going to go through some steps to make a sample application. Hopefully I can shed some insight

More information

Taking Control of Your . Terry Stewart Lowell Williamson AHS Computing Monday, March 20, 2006

Taking Control of Your  . Terry Stewart Lowell Williamson AHS Computing Monday, March 20, 2006 Taking Control of Your E-Mail Terry Stewart Lowell Williamson AHS Computing Monday, March 20, 2006 Overview Setting up a system that works for you Types of e-mail Creating appointments, contacts and tasks

More information

BEGINNER PHP Table of Contents

BEGINNER PHP Table of Contents Table of Contents 4 5 6 7 8 9 0 Introduction Getting Setup Your first PHP webpage Working with text Talking to the user Comparison & If statements If & Else Cleaning up the game Remembering values Finishing

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

More information

How to Improve Your Campaign Conversion Rates

How to Improve Your  Campaign Conversion Rates How to Improve Your Email Campaign Conversion Rates Chris Williams Author of 7 Figure Business Models How to Exponentially Increase Conversion Rates I'm going to teach you my system for optimizing an email

More information

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output General Date Your Company Name Tel: +44 1234 567 9898 Fax: +44 1234 545 9999 email: info@@company.com Microsoft Visual Studio C# Project Source Code Output Created using VScodePrint Macro Variables Substitution

More information

Chapter 13 Working with Threads

Chapter 13 Working with Threads Chapter 13 Working with Threads Until relatively recently only advanced programmers understood and knew how to employ threads in application programs. Part of the problem was that using threads was not

More information

Using icloud's Mail rules to delete a message before you see it.

Using icloud's Mail rules to delete a message before you see it. Page 1 of 9 How to block spam calls, You know how to use messaging and emails, and you use them to get things done, but far too many just want to sell you things or annoy you with them. Here's how to get

More information

Member Initializer Lists

Member Initializer Lists CS106L Spring 2009 Handout #20 May 12, 2009 Member Initializer Lists Introduction Normally, when you create a class, you'll initialize all of its instance variables inside the constructor. However, in

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

Introduction. Check the value of a 2 byte field. IPTables U32 Match Tutorial

Introduction. Check the value of a 2 byte field. IPTables U32 Match Tutorial Introduction IPTables has always been a relatively flexible and modular firewall; if it can't currently test for a particular packet characteristic, you have the option of writing a test or modifying an

More information

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device.

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device. Let's get started! Start Studio We might have a bit of work to do here Create new project Let's give it a useful name Note the traditional convention for company/package names We don't need C++ support

More information

Fortunately, you only need to know 10% of what's in the main page to get 90% of the benefit. This page will show you that 10%.

Fortunately, you only need to know 10% of what's in the main page to get 90% of the benefit. This page will show you that 10%. NAME DESCRIPTION perlreftut - Mark's very short tutorial about references One of the most important new features in Perl 5 was the capability to manage complicated data structures like multidimensional

More information

MITOCW watch?v=0jljzrnhwoi

MITOCW watch?v=0jljzrnhwoi MITOCW watch?v=0jljzrnhwoi The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

How to read/write text file

How to read/write text file How to read/write text file Contents Use StreamWriter... 1 Create button click event handler... 2 Create StreamWriter... 3 Write to file... 5 Close file... 8 Test file writing... 9 Use StreamReader...

More information

static CS106L Spring 2009 Handout #21 May 12, 2009 Introduction

static CS106L Spring 2009 Handout #21 May 12, 2009 Introduction CS106L Spring 2009 Handout #21 May 12, 2009 static Introduction Most of the time, you'll design classes so that any two instances of that class are independent. That is, if you have two objects one and

More information

Module 2.3a IP 0:00 - 1:00 -

Module 2.3a IP 0:00 - 1:00 - Module 2.3a IP 0:00 - In this video we're going to continue looking at our simplified view of how the internet layers work and in particular we're going to look at the middle layer which is good known

More information

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek Seite 1 von 5 Issue Date: FoxTalk July 2000 It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek This month, Paul Maskens and Andy Kramek discuss the problems of validating data entry.

More information

Smart formatting for better compatibility between OpenOffice.org and Microsoft Office

Smart formatting for better compatibility between OpenOffice.org and Microsoft Office Smart formatting for better compatibility between OpenOffice.org and Microsoft Office I'm going to talk about the backbreaking labor of helping someone move and a seemingly unrelated topic, OpenOffice.org

More information

A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions.

A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions. Handout 2 Functions, Lists, For Loops and Tuples [ ] Functions -- parameters/arguments, "calling" functions, return values, etc. Please make sure you understand this example: def square(x): return x *

More information

Brian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky

Brian Kiser November Vigilant C# 2.5. Commonwealth of Kentucky Frankfort, Kentucky Brian Kiser November 2010 Vigilant C# 2.5 Commonwealth of Kentucky Frankfort, Kentucky Table of Contents 1.0 Work Sample Description Page 3 2.0 Skills Demonstrated 2.1 Software development competency using

More information

Lync is now Skype for Business see what's new

Lync is now Skype for Business see what's new Lync is now Skype for Business see what's new If you already use Skype to stay in touch with friends and family in your life away from work, you'll appreciate the power and simplicity of Skype for Business

More information

Lesson4:CreatinganInterfaceandChecklistService

Lesson4:CreatinganInterfaceandChecklistService Lesson4:CreatinganInterfaceandChecklistService We have the majority of our template for the application set up so far, but we are also going to need to handle the "logic" that happens in the application.

More information

COP Programming Assignment #7

COP Programming Assignment #7 1 of 5 03/13/07 12:36 COP 3330 - Programming Assignment #7 Due: Mon, Nov 21 (revised) Objective: Upon completion of this program, you should gain experience with operator overloading, as well as further

More information

The Microsoft.NET Framework

The Microsoft.NET Framework Microsoft Visual Studio 2005/2008 and the.net Framework The Microsoft.NET Framework The Common Language Runtime Common Language Specification Programming Languages C#, Visual Basic, C++, lots of others

More information

Embedding Python in Your C Programs

Embedding Python in Your C Programs 1 of 7 6/18/2006 9:05 PM Embedding Python in Your C Programs William Nagel Abstract C, meet Python. Python, this is C. With surprisingly little effort, the Python interpreter can be integrated into your

More information

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between MITOCW Lecture 10A [MUSIC PLAYING] PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between all these high-level languages like Lisp and the query

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

P1_L3 Operating Systems Security Page 1

P1_L3 Operating Systems Security Page 1 P1_L3 Operating Systems Security Page 1 that is done by the operating system. systems. The operating system plays a really critical role in protecting resources in a computer system. Resources such as

More information

Post Experiment Interview Questions

Post Experiment Interview Questions Post Experiment Interview Questions Questions about the Maximum Problem 1. What is this problem statement asking? 2. What is meant by positive integers? 3. What does it mean by the user entering valid

More information

PS2 Random Walk Simulator

PS2 Random Walk Simulator PS2 Random Walk Simulator Windows Forms Global data using Singletons ArrayList for storing objects Serialization to Files XML Timers Animation This is a fairly extensive Problem Set with several new concepts.

More information

AT&T Voice DNA Quick Reference Guide for the Polycom SoundPoint IP 321 and 331 Phones

AT&T Voice DNA Quick Reference Guide for the Polycom SoundPoint IP 321 and 331 Phones AT&T Voice DNA Quick Reference Guide for the Polycom SoundPoint IP 321 and 331 Phones This guide contains the key information you need to get started with your Polycom SoundPoint IP 321 or 331 phone that's

More information

Understanding Events in C#

Understanding Events in C# Understanding Events in C# Introduction Events are one of the core and important concepts of C#.Net Programming environment and frankly speaking sometimes it s hard to understand them without proper explanation

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

Assignment 1: grid. Due November 20, 11:59 PM Introduction

Assignment 1: grid. Due November 20, 11:59 PM Introduction CS106L Fall 2008 Handout #19 November 5, 2008 Assignment 1: grid Due November 20, 11:59 PM Introduction The STL container classes encompass a wide selection of associative and sequence containers. However,

More information

lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1

lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1 lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1 www.blender.nl this document is online at http://www.blender.nl/showitem.php?id=4 Building a Castle 2000 07 19 Bart Veldhuizen id4 Introduction

More information

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer.. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

More information

Mobile MessageBank Standard User Guide

Mobile MessageBank Standard User Guide Mobile MessageBank Stard User Guide 1. The World Of Mobile MessageBank 2. MessageBank Stard Set Up 3. Using MessageBank 4. Options 5. How to use the features within MessageBank 6. Pricing 7. Billing 8.

More information

Blitz2D Newbies: Definitive Guide to Types by MutteringGoblin

Blitz2D Newbies: Definitive Guide to Types by MutteringGoblin Blitz2D Newbies: Definitive Guide to Types by MutteringGoblin Types are probably the hardest thing to understand about Blitz Basic. If you're using types for the first time, you've probably got an uneasy

More information

COMP-202 Unit 9: Exceptions

COMP-202 Unit 9: Exceptions COMP-202 Unit 9: Exceptions Announcements - Assignment 4: due Monday April 16th - Assignment 4: tutorial - Final exam tutorial next week 2 Exceptions An exception is an object that describes an unusual

More information

MITOCW ocw f99-lec12_300k

MITOCW ocw f99-lec12_300k MITOCW ocw-18.06-f99-lec12_300k This is lecture twelve. OK. We've reached twelve lectures. And this one is more than the others about applications of linear algebra. And I'll confess. When I'm giving you

More information

CircuitPython 101: Working with Lists, Iterators and Generators

CircuitPython 101: Working with Lists, Iterators and Generators CircuitPython 101: Working with Lists, Iterators and Generators Created by Dave Astels Last updated on 2018-11-01 12:06:56 PM UTC Guide Contents Guide Contents Overview List Functions Slicing Filtering

More information

In today s video I'm going show you how you can set up your own online business using marketing and affiliate marketing.

In today s video I'm going show you how you can set up your own online business using  marketing and affiliate marketing. Hey guys, Diggy here with a summary of part two of the four part free video series. If you haven't watched the first video yet, please do so (https://sixfigureinc.com/intro), before continuing with this

More information

6.001 Notes: Section 17.5

6.001 Notes: Section 17.5 6.001 Notes: Section 17.5 Slide 17.5.1 Now, let's look at one example in which changing the evaluation model allows us to explore a very different kind of computational problem. Our goal is to show how

More information

Instructor: Craig Duckett. Lecture 07: Tuesday, April 17 th, 2018 Conflicts and Isolation, MySQL Workbench

Instructor: Craig Duckett. Lecture 07: Tuesday, April 17 th, 2018 Conflicts and Isolation, MySQL Workbench Instructor: Craig Duckett Lecture 07: Tuesday, April 17 th, 2018 Conflicts and Isolation, MySQL Workbench 1 MID-TERM EXAM is LECTURE 10, Tuesday, May 1st Assignment 2 is due LECTURE 12, Tuesday, May 8

More information

Chris' Makefile Tutorial

Chris' Makefile Tutorial Chris' Makefile Tutorial Chris Serson University of Victoria June 26, 2007 Contents: Chapter Page Introduction 2 1 The most basic of Makefiles 3 2 Syntax so far 5 3 Making Makefiles Modular 7 4 Multi-file

More information

Supporting Class / C++ Lecture Notes

Supporting Class / C++ Lecture Notes Goal Supporting Class / C++ Lecture Notes You started with an understanding of how to write Java programs. This course is about explaining the path from Java to executing programs. We proceeded in a mostly

More information

Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way

Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way Introduction Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way Getting to know you Earthwork has inherited its layout from its ancestors, Sitework 98 and Edge.

More information

RIS shading Series #2 Meet The Plugins

RIS shading Series #2 Meet The Plugins RIS shading Series #2 Meet The Plugins In this tutorial I will be going over what each type of plugin is, what their uses are, and the basic layout of each. By the end you should understand the three basic

More information

Working With Ruby Threads. Copyright (C) 2013 Jesse Storimer. This book is dedicated to Sara, Inara, and Ora, who make it all worthwhile.

Working With Ruby Threads. Copyright (C) 2013 Jesse Storimer. This book is dedicated to Sara, Inara, and Ora, who make it all worthwhile. Working With Ruby Threads Copyright (C) 2013 Jesse Storimer. This book is dedicated to Sara, Inara, and Ora, who make it all worthwhile. Chapter 16 Puma's Thread Pool Implementation Puma 1 is a concurrent

More information

CS93SI Handout 04 Spring 2006 Apr Review Answers

CS93SI Handout 04 Spring 2006 Apr Review Answers CS93SI Handout 04 Spring 2006 Apr 6 2006 Review Answers I promised answers to these questions, so here they are. I'll probably readdress the most important of these over and over again, so it's not terribly

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Lecture 23 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality, educational resources for free. To make a

More information

Professional ASP.NET Web Services : Asynchronous Programming

Professional ASP.NET Web Services : Asynchronous Programming Professional ASP.NET Web Services : Asynchronous Programming To wait or not to wait; that is the question! Whether or not to implement asynchronous processing is one of the fundamental issues that a developer

More information

MITOCW watch?v=4dj1oguwtem

MITOCW watch?v=4dj1oguwtem MITOCW watch?v=4dj1oguwtem PROFESSOR: So it's time to examine uncountable sets. And that's what we're going to do in this segment. So Cantor's question was, are all sets the same size? And he gives a definitive

More information

How To Make 3-50 Times The Profits From Your Traffic

How To Make 3-50 Times The Profits From Your Traffic 1 How To Make 3-50 Times The Profits From Your Traffic by Chris Munch of Munchweb.com Copyright Munchweb.com. All Right Reserved. This work cannot be copied, re-published, or re-distributed. No re-sell

More information

A short introduction to Web Services

A short introduction to Web Services 1 di 5 17/05/2006 15.40 A short introduction to Web Services Prev Chapter Key Concepts Next A short introduction to Web Services Since Web Services are the basis for Grid Services, understanding the Web

More information

Note: Please use the actual date you accessed this material in your citation.

Note: Please use the actual date you accessed this material in your citation. MIT OpenCourseWare http://ocw.mit.edu 18.06 Linear Algebra, Spring 2005 Please use the following citation format: Gilbert Strang, 18.06 Linear Algebra, Spring 2005. (Massachusetts Institute of Technology:

More information

AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests!

AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests! NAME DESCRIPTION Test::Tutorial - A tutorial about writing really basic tests AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests! *sob*

More information

COMP-202: Foundations of Programming. Lecture 4: Flow Control Loops Sandeep Manjanna, Summer 2015

COMP-202: Foundations of Programming. Lecture 4: Flow Control Loops Sandeep Manjanna, Summer 2015 COMP-202: Foundations of Programming Lecture 4: Flow Control Loops Sandeep Manjanna, Summer 2015 Announcements Check the calendar on the course webpage regularly for updates on tutorials and office hours.

More information

Introduction to

Introduction to Introduction to Email gcflearnfree.org/print/email101/introduction-to-email Introduction Do you ever feel like the only person who doesn't use email? You don't have to feel left out. If you're just getting

More information

9.0 Help for End Users Release Notes Using Jive for Outlook...5

9.0 Help for End Users Release Notes Using Jive for Outlook...5 Contents 2 Contents 9.0 Help for End Users... 3 Release Notes... 4 Using Jive for Outlook...5 Client System Requirements...5 Getting Started with Jive for Outlook...5 Jview and View as email... 7 Viewing

More information

Server Component of the Chat Room Lab

Server Component of the Chat Room Lab Chat Room Server Dr. Tom Hicks - Trinity University Page 1 of 41 Server Component of the Chat Room Lab This lab is designed to show students how they may can do socket programming in a step by step process

More information

6.001 Notes: Section 15.1

6.001 Notes: Section 15.1 6.001 Notes: Section 15.1 Slide 15.1.1 Our goal over the next few lectures is to build an interpreter, which in a very basic sense is the ultimate in programming, since doing so will allow us to define

More information

MITOCW watch?v=w_-sx4vr53m

MITOCW watch?v=w_-sx4vr53m MITOCW watch?v=w_-sx4vr53m The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

CS 167 Final Exam Solutions

CS 167 Final Exam Solutions CS 167 Final Exam Solutions Spring 2018 Do all questions. 1. [20%] This question concerns a system employing a single (single-core) processor running a Unix-like operating system, in which interrupts are

More information

COSC 2P95 Lab 5 Object Orientation

COSC 2P95 Lab 5 Object Orientation COSC 2P95 Lab 5 Object Orientation For this lab, we'll be looking at Object Orientation in C++. This is just a cursory introduction; it's assumed that you both understand the lecture examples, and will

More information

The New Brew-CQ Synchronous Sockets and Threading

The New Brew-CQ Synchronous Sockets and Threading The New Brew-CQ Synchronous Sockets and Threading Server Topology: The Brew-CQ server is an application written in the new.net compilers from Microsoft. The language of choice is Visual Basic. The purpose

More information

How to Use. Working for you. By the abc27 News Team. abc27, WHTM-TV 3235 Hoffman Street Harrisburg, PA

How to Use. Working for you. By the abc27 News Team. abc27, WHTM-TV 3235 Hoffman Street Harrisburg, PA How to Use By the abc27 News Team abc27, WHTM-TV 3235 Hoffman Street Harrisburg, PA 17110 717-236-1444 snowwatch@abc27.com Working for you Welcome to Snow Watch! This special system is ready to help you

More information

COMP-202 Unit 9: Exceptions

COMP-202 Unit 9: Exceptions COMP-202 Unit 9: Exceptions Course Evaluations Please do these. -Fast to do -Used to improve course for future. (Winter 2011 had 6 assignments reduced to 4 based on feedback!) 2 Avoiding errors So far,

More information

Introduction to JavaScript and the Web

Introduction to JavaScript and the Web Introduction to JavaScript and the Web In this introductory chapter, we'll take a look at what JavaScript is, what it can do for you, and what you need to be able to use it. With these foundations in place,

More information

Welcome to another episode of Getting the Most. Out of IBM U2. I'm Kenny Brunel, and I'm your host for

Welcome to another episode of Getting the Most. Out of IBM U2. I'm Kenny Brunel, and I'm your host for Welcome to another episode of Getting the Most Out of IBM U2. I'm Kenny Brunel, and I'm your host for today's episode, and today we're going to talk about IBM U2's latest technology, U2.NET. First of all,

More information

Table of Contents. Part 1 Postcard Marketing Today Brief History of Real Estate Postcards Postcard Marketing Today...

Table of Contents. Part 1 Postcard Marketing Today Brief History of Real Estate Postcards Postcard Marketing Today... Table of Contents Part 1 Postcard Marketing Today... 2 Brief History of Real Estate Postcards... 3 Postcard Marketing Today... 4 Pyramid of Postcard Success... 6 Part 2 Achieving Postcard Success... 11

More information

Lecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166

Lecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166 Lecture 20 Java Exceptional Event Handling Dr. Martin O Connor CA166 www.computing.dcu.ie/~moconnor Topics What is an Exception? Exception Handler Catch or Specify Requirement Three Kinds of Exceptions

More information

MITOCW watch?v=9h6muyzjms0

MITOCW watch?v=9h6muyzjms0 MITOCW watch?v=9h6muyzjms0 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Interlude: Expressions and Statements

Interlude: Expressions and Statements Interactive Programming In Java Page 1 Interlude: Expressions and Statements Introduction to Interactive Programming by Lynn Andrea Stein A Rethinking CS101 Project Overview This interlude explores what

More information

MITOCW watch?v=se4p7ivcune

MITOCW watch?v=se4p7ivcune MITOCW watch?v=se4p7ivcune The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Close Your File Template

Close Your File Template In every sale there is always a scenario where I can t get someone to respond. No matter what I do. I can t get an answer from them. When people stop responding I use the Permission To. This is one of

More information

Java Programming Constructs Java Programming 2 Lesson 1

Java Programming Constructs Java Programming 2 Lesson 1 Java Programming Constructs Java Programming 2 Lesson 1 Course Objectives Welcome to OST's Java 2 course! In this course, you'll learn more in-depth concepts and syntax of the Java Programming language.

More information

CONTENTS: While loops Class (static) variables and constants Top Down Programming For loops Nested Loops

CONTENTS: While loops Class (static) variables and constants Top Down Programming For loops Nested Loops COMP-202 Unit 4: Programming with Iterations Doing the same thing again and again and again and again and again and again and again and again and again... CONTENTS: While loops Class (static) variables

More information

B - Broken Track Page 1 of 8

B - Broken Track Page 1 of 8 B - Broken Track There's a gap in the track! We need to make our robot even more intelligent so it won't get stuck, and can find the track again on its own. 2017 https://www.hamiltonbuhl.com/teacher-resources

More information

CSE143 Notes for Monday, 4/25/11

CSE143 Notes for Monday, 4/25/11 CSE143 Notes for Monday, 4/25/11 I began a new topic: recursion. We have seen how to write code using loops, which a technique called iteration. Recursion an alternative to iteration that equally powerful.

More information

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to A PROGRAM IS A SEQUENCE of instructions that a computer can execute to perform some task. A simple enough idea, but for the computer to make any use of the instructions, they must be written in a form

More information

A few years ago, I was called in to a hectic call-centre the head honcho had a problem.

A few years ago, I was called in to a hectic call-centre the head honcho had a problem. Introduction A few years ago, I was called in to a hectic call-centre the head honcho had a problem. Ironically, it was communication. Even though they had phones coming out of their ears (boom, boom),

More information

COMMUNICATION BETWEEN PROCESSES

COMMUNICATION BETWEEN PROCESSES Support for execution : page 1. COMMUNICATION BETWEEN PROCESSES We saw in the last chapter that the system call mechanism worked by cooperation between a process and a separate activity which wasn't quite

More information

Welcome to this IBM podcast, Realizing More. Value from Your IMS Compiler Upgrade. I'm Kimberly Gist

Welcome to this IBM podcast, Realizing More. Value from Your IMS Compiler Upgrade. I'm Kimberly Gist IBM Podcast [ MUSIC ] Welcome to this IBM podcast, Realizing More Value from Your IMS Compiler Upgrade. I'm Kimberly Gist with IBM. System z compilers continue to deliver the latest programming interfaces

More information

Secret CPA Superhero

Secret CPA Superhero Secret CPA Superhero By- Abir Bhadra Raju License Terms: This course is for your own personal use ONLY. It is STRICTLY PROHIBITED to reproduce the content enclosed herein or to distribute this course to

More information

class Class1 { /// <summary> /// The main entry point for the application. /// </summary>

class Class1 { /// <summary> /// The main entry point for the application. /// </summary> Project 06 - UDP Client/Server Applications In this laboratory project you will build a number of Client/Server applications using C# and the.net framework. The first will be a simple console application

More information

How Do I Sync My Iphone To Another Computer Without Losing Everything

How Do I Sync My Iphone To Another Computer Without Losing Everything How Do I Sync My Iphone To Another Computer Without Losing Everything to transfer content from your current iphone, ipad, or ipod touch to another device. You should connect the device to itunes to sync

More information

Exception Handling Alternatives (Part 2)

Exception Handling Alternatives (Part 2) Exception Handling Alternatives (Part 2) First published in Overload 31 Copyright 1999 Detlef Vollmann Resume In part 1, several alternative mechanisms for handling exceptional events were presented. One

More information

Tips from the experts: How to waste a lot of time on this assignment

Tips from the experts: How to waste a lot of time on this assignment Com S 227 Spring 2018 Assignment 1 100 points Due Date: Friday, September 14, 11:59 pm (midnight) Late deadline (25% penalty): Monday, September 17, 11:59 pm General information This assignment is to be

More information

Table of Contents. Cisco How NAT Works

Table of Contents. Cisco How NAT Works Table of Contents How NAT Works...1 This document contains Flash animation...1 Introduction...1 Behind the Mask...2 Dynamic NAT and Overloading Examples...5 Security and Administration...7 Multi Homing...9

More information