|
Paul R. Johnson wrote:
Here is a class to dial, hangup, and test the internet connection being used.
This would more appropriately belong as an article submission.
|
|
|
|
|
Sorry,
I am not sure how to write an article and submit it. It was code that I was struggling with, and I finally got it to work correctly.
I saw that others were having problems with the same results, so I just wanted to help out.
Paul
|
|
|
|
|
can some one help me with this project plzz
Standard telephone keypads contain the digits 0 through 9. The numbers 2 through 9 each have three letters associated with them.
Many people find it difficult to memorise phone numbers, so they use the correspondence between digits and letters to develop eight-letter words that correspond to their phone numbers. For example, a person whose telephone number is 4263-7663 might use the correspondence in Table 1 to develop the eight-letter word “HANDSOME” so that people can easily remember his phone number. Each eight-letter word corresponds to exactly one eight-digit telephone number. A delivery service could surely do so with the number 3354-8379 (i.e., “DELIVERY”).
Each eight-digit phone number corresponds to many separate eight-letter words. Unfortunately, most of these represent unrecognisable juxtapositions of letters. It is possible, however, that the owner of a barber shop would be pleased to know that the shop’s telephone number, 4247-2888, corresponds to “HAIRCUTS”. A hospital with the phone number 4677-4825 would be pleased to know that the number corresponds to the letters “HOSPITAL”. A body shop owner would be pleased to know that the shop’s number, 2639-7467, corresponds to “BODYSHOP”.
Write a C program that, given an eight-digit number, writes to a file every possible eight-letter word combination corresponding to that number. There are 6561 (38) such words. Avoid phone numbers with the digits 0 and 1.
Digit Letter
2 A B C
3 D E F
4 G H I
5 J K L
6 M N O
7 P R S
8 T U V
9 W X Y
|
|
|
|
|
From the comp.lang.c++ faq, but appropriate to any langauge.
"If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm." [Thanks to Jack Klein]
|
|
|
|
|
Here Here.
Dave Shaw
History admires the wise, but elevates the brave. - Edmund Morris
|
|
|
|
|
wat is this
|
|
|
|
|
Hi,
I keep getting an error when I try to insert a new record into a table (SQL 2000) that has a column that I've configured as 'Unique Null Allowed'. I used Visual Studio (2003) IDE SQL Data Adapter Wizard to create the stored procedures, data adapter, and dataset using a simple select statement with one paramater. Everything works fine except the 'Unique Null Allowed' column requires a value on Insert or I get an error. What am I doing wrong?
|
|
|
|
|
If you have a column which is Unique and Allow nulls then
only one record will be allowed to have null value in this columns because if other record was inserted with null value in this unique columns it will not be allowed because this column is unique and other record already have null value in this column
MCAD
-- modified at 20:54 Friday 2nd September, 2005
|
|
|
|
|
I want to filter out some email address from a block of text. currently i use something like this which i found over internet.
[\\w]+@[\\w]+.[\\w]{2,3}
but it doesn't pick all email address, like some.one@some.ac.in
can u help me,
thanks,
Derick
Visit my tech blog http://techcapsules.blogspot.com
|
|
|
|
|
You have to include some more characters in order to catch all valid email addresses:
[\w\-%~\.]+@[\w\-\.]+\.[\w]{2,4}
This will only match strictly standard conformant email adresses, though. You might want to include even more characters, as some people have email adressed that does not conform to the standard.
---
b { font-weight: normal; }
|
|
|
|
|
Try this
string s = @"^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$";
Regex ex = new Regex(s);
Match match = ex.Match("g_s+gavcom.com");
if ( match.Success )
{
MessageBox.Show("Found");
}
Live Life King Size
Alomgir Miah
|
|
|
|
|
In VS 2003, I used CaptionText in DataGrid control. I have migrated my form
in VS 2005 using DataGridView. Does DataGridView has CaptionText property.
How do I accomplish this task if the property does not exist? Any alternate
way of setting CaptionText or Title of the DataGridView?
Help appreciated.
Thanks
|
|
|
|
|
hi,
how can i get the selected text from address bar in Internet Explorer programe.
i try slove these problem use hook techel but i fail.
can anyone help me......
|
|
|
|
|
I cant seem to get this code to work. I need populate a combobox with items that have separate values. For instance: When the user selects "item" within the combobox the "value" associated with that item will be displayed in a textbox.
private void Form1_Load(object sender, System.EventArgs e)
{
ComboBox c = new ComboBox();
c.Items.Add(new MyItem("Item", "Value"));
textBox1.Text = ((MyItem)c.SelectedItem).Content;
}
class MyItem
{
private string item; // String to show in the ComboBox
private string val; // String to show in the TextBox
public MyItem(string i, string v)
{
item = n;
val = v;
}
public override string ToString()
{
return item;
}
public string Content
{
get
{
return val;
}
}
}
It doesn't seem to like this bit of code:
textBox1.Text = ((MyItem)c.SelectedItem).Content;
Error: Object Reference not set to an instance of an object
Any help would be appreciated.
Thanks
-- modified at 12:54 Friday 2nd September, 2005
|
|
|
|
|
That is because the SelectedItem property is null, as the user has not yet selected a value.
You have to wait until the user has selected a value before you can check what the users selected.
---
b { font-weight: normal; }
|
|
|
|
|
Sometimes it is that easy. Thanks for the help
|
|
|
|
|
All of my efforts to add items to display in the combobox fail; I've added items using the IDE in VS2003 (String Collection Editor) or programtically and all I get is an empty drop down list that gets longer. The project compiles and I get no errors but my application only shows an empty drop down list. Can someone please tell me what I'm doing wrong?
|
|
|
|
|
I had this problem for awhile - it was due to McAfee virus scan "Buffer Overflow protection". McAfee had a fix on thier site.
If this is not your problem, sorry.
|
|
|
|
|
Thank you so very much for your help; you were dead on target. I disabled the overflow protection and the code works. Now all I have to do is go around and pick up all my torn hair.
|
|
|
|
|
Glad I could help. I had a bunch of code across my network suddenly generating empty List & Combo boxes. My hair still hasn't grown back.
|
|
|
|
|
has anyone come across an implementation of UNIX style wildmat pattern matching C#. I have searched all over but couldnt seem to find anything.
|
|
|
|
|
Not that I know of. The .NET framework class library has full support for regular expressions, though, in the System.Text.RegularExpressions namespace.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
how can i find out the location of the current class?
would application.startup path work?
|
|
|
|
|
Classes don't necessary reside in a directory. The code file for the class does, sure, but that may not be what you want. Application.StartupPath will give you the directory from which the executable started, excluding the file name of the executable.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
System.Reflection.Assembly.GetExecutingAssembly().Location
|
|
|
|