|
Write a regular expression pattern to match:
1. a full URL (for ex :http://www.yourcompany.com/index.htm )
2. Human name (case sensitive) for ex : Jonh Smith
Plz help me to answer this problem
Thanks very much.
I tried so hard and got so far
|
|
|
|
|
There are website out there that have all sorts of regex expressions. Hint: search for "regular expression library" or something similar.
Alex Korchemniy
|
|
|
|
|
Is this your homework?
---
b { font-weight: normal; }
|
|
|
|
|
URL: how about this one: http://www.foad.org/~abigail/Perl/url3.regex[^]? Though you could shorten it a bit if you only want http and not check for every detail...
Human name (case sensitive): This is not possible (or equally complicated to url3.regex) because names are different in every country. You want that every 'word' starts with an uppercase letter? Then your regex won't work for many non-English names that have some sort of 'filling word' between first and last name.
|
|
|
|
|
Hi
I have to do a program in c# windows application such that form employs with a textbox, Progress bar, label and abutton.
I have to use system.threading.timer such that , when a time is given in the textbox, (say 02:30 PM),then the progress bar progresses and at last after progress bar finishes , the label which is in the form should turn red colour at that specified time(ie, 02:30 PM)..
How o do this .Please help me to do this application.
js
|
|
|
|
|
The Timer class doesn't kick off at a specified time. Rather, it counts down from a specified number of milliseconds and fires it's event. It then resets itself and repeatedly fires its event on that interval.
If you want to check for a certain time, then you'll have to use a Timer to kick off code every minutes or so and check the current system time against your scheduled time. When the times match, then you can launch your process.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i would like to know how to use the mouse events.
just the same things that thecodeproject.com uses for "message boards" link etc...
suggest me any good online tutorial or give one or two simple examples.the rest i will explore
jyothipradeep
|
|
|
|
|
hi there,
take a look on this
http://www.codeproject.com/cs/miscctrl/MouseEvents.asp
<< >>
|
|
|
|
|
I am trying to program an owner-drawn tabcontrol. I am trying to enable the user of my tabcontrol the ability to specify a text color for the selected tab so that the selected tab stands out better.
I have overridden the OnDrawItem method and am receiving the events just fine, but my problem is determining what tab that the OnDrawItem method is being called for.
I just can't figure out how to take an x,y coordinate and turn it into which tab it corresponds to (expecially taking into account that there may be multiple rows of tabs and the tabs may be on the top or side of the tab control, etc).
Any help would be greatly appreciated!
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
Never mind - I figured it out. It is passed as "Index" in the event args object!
dpb
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
I want to display a month calender in which only saturdays can be clicked on and highlighted and also how can i acquire all the saturdays in a month?
Thanks
VisionTec
|
|
|
|
|
The windows month calendar control is very weak and not flexible. The only thing you can really do is catch date changed and check if it's a saturday. You can do much more than that.
>> How can i acquire all the saturdays in a month?
math + DateTime class
Alex Korchemniy
|
|
|
|
|
Take a look at this calender control[^], it's very flexible and surely can achieve what you want.
Regards,
mav
|
|
|
|
|
My dataset has 2 tables having foreign relationship. After I update these 2 tables in my dataset, how can I update them from my dataset to my real database?
Thanks.
|
|
|
|
|
DataAdapter[^]
Study the ADO.net model a little more. There are some great books out there + MSDN.
Alex Korchemniy
|
|
|
|
|
Can you tell me a little more?I searched in MSDN but I could't find the way to solve this problem.Thanks
|
|
|
|
|
How to store image file in Access 2003.Thanks
|
|
|
|
|
hi there,
I remembered that there is a field "OLE object" field used to store any binary data.
So u could use it to store image
<< >>
|
|
|
|
|
Hi all
I have a problem about how to reach an object of a class that is in the memory but dont have name, I'll write an example to discuss
if there is a class called man
public class man
{
string Name;
int length;
}
now the user of the program makes a lot of objects of the class man by using this code in a button
private void button1_Click(object sender,System.EventArgs e)
{
man m = new man;
m.Name = textbox1.Text;
m.length = int.parse(textbox2.text);
}
now there are a lot of objects of the class man in the memory but they dont have a name. How can I reach an object of them or in other words how to save objects of a class so that i can reach them
Note: that in my real program the class is not simple like that it contains complex data types
mego mego
|
|
|
|
|
You need to store a reference to the object somewhere. An ArrayList is a good choice:
<br />
ArrayList Men;<br />
.<br />
.<br />
.<br />
private void button1_Click(object sender,System.EventArgs e)<br />
{<br />
man m = new man;<br />
m.Name = textbox1.Text;<br />
m.length = int.parse(textbox2.text);<br />
Men.Add(m);<br />
}<br />
You can then access the objects through the ArrayList, for example to find the man with a name stored in a string:
<br />
private man Find(string key)<br />
{<br />
foreach (man m in Men)<br />
{<br />
if (m.Name == key)<br />
{<br />
return m;<br />
}<br />
}<br />
return null;
}<br />
There are more efficient ways to do it and different collection you can use depending on exactly what you want and how much coding you want to do up front. For example, you could create your own collection which keeps the names in order so you can search them more efficiently.
|
|
|
|
|
the m object not accessable outside button1_Click
at all even if they have separate name because its scope
so you need to store them like other response suggest and access them later by index or by key depending on the collection type
MCAD
|
|
|
|
|
thanx to u Wjousts and thanx to mohamed also i think that the array list is a good choice
i ll try it
|
|
|
|
|
Hi Guys,
I was wondering if anyone can help me out with a problem.
If I leave my application idle for a while then I get a "Table 0 not found error" on any page that needs to access the database...
i am guessing this happens since the database times out...
how can I handle this exception in a way that if the user leaves the application idle for too long then it would redirect the user back to the login page (I am using .NET Passport for authentication)
Thanks
|
|
|
|
|
Hello,
This week I was given something cool to do. Take a Tablet and Ink enable our Tiff viewing app. Sounded easy. This is what I have:
1 Microsoft.Ink.InkPicture inkPic, that I’m loading with inkPic.image = SomeTiffFromFile
I’m not bothered by scaling problems yet.
This control captures Ink and saves it as Strokes and it works wonderfully. I’m trying to save the Ink into the Tiff.
This is what I have tried:
First I bring the Tiff into Drawing.Bitmap bmp = Image.FromFile(“filename”) (this is the same file I use as the inkPic.Image) Then I make a new Graphic from the Bitmap. Since Ink is made of Points (Ink.Strokes[Foreach].GetPoints(Foreach)) I figured I could do this
Graphics g = Graphics.FromImage(bmp);
for (int i=0; i
|
|
|
|
|
i've a textbox in my form.
I would to learn how to draw an image inside the area of the textbox at the place the classic white.
I don't want a dll that make it but just learn how, so i can do the same for other objects and create quite custom objects.
Thanks.
|
|
|
|