|
Hi,
first of all your observations lack precision. You are relying on the system clock, and that one only advances every 15 milliseconds on your system; if you want to know more about that, read my timers article.
To get more precise measurements, use a better timer (a StopWatch in VB.NET; or a MultiMedia Timer).
Rather than observing say ten times 0 msec, once 15 msec; you will then see say eleven times 1.4 msec
BTW: what is the Exit Function doing in your code?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
The code isn't taking exactly 15.627 milliseconds every time it "fails". Unless you're using the high resolution timers, this is the minumum resolution of the timing method you're using.
The problem you have is that you're using 570 different compares against a single word. You need to turn this around and make it so you can do a lookup of the one word on a known list, if at all possible.
Another possibility would be to pre-test the single word to narrow it down to a small number of filters that might apply. If you have a word that starts with a letter, there's no sense in testing a bunch of rules that all start with a number.
But, in the end, it sounds like your code is being stopped by the Garbage Collector while it does it's work. Normally, the GC will stop all threads in your process, walk the object graph looking for things to collect, do it's cleanup work, then resume your threads. Depending on the app, this can take a couple dozen milliseconds, making it look like your code hung for a brief time.
Why is thing happening?? Well, since you're obviously parsing out individual words, you're creating String object after String object, one for each and every word you test. These String objects are dropping out of scope at some point, and the GC has to spend time cleaning them up every once in a while.
|
|
|
|
|
|
I have a small app for a site manager, (so it has to be simple, right?).
I require a Date, Supplier and Load to be sent to another manager.
I have done this as a Form with a DateTimePicker and two ComboBoxes.
Once the selection is made from these boxes, hit the SEND button and the data is to be emailed to the other manager.
I do not want to go through outlook, just email the data.
I have SD1 as Date, SD2 and SD3 as Text.
Is there some way of just sending SD1, SD2 and SD3 to a single fixed address in as few lines of code as possible and without opening outlook?
(I want the site manager to just choose and click).
Thanks
------------------------------------
"I am always serious about what I do, not necessarily about how I do it."
Tom Baker
|
|
|
|
|
System.Net.Mail namespace has what you're looking for. Documentation[^]
|
|
|
|
|
There are other ways but which ever way you choose you will need access to an SMTP server (well at least I think you do!). Do you have a server with IIS installed? Because there is a virtual SMTP server component with IIS.
If you have access to an SMTP server look at System.Net.Mail. Very simple to send emails with very few lines of code.
|
|
|
|
|
Hi,anybody knows where i can find a source code to motion detection in Visual Basic 6 for a IP axis cam?
Thanks
|
|
|
|
|
|
Since VB6 is long since dead, and doesn't do a good job of image processing, I seriously doubt you're going to find any code for this in VB6. It's more likely that you would find components written in other languages, like C++ or C#, that do a much better job of processing images with much better performance.
|
|
|
|
|
|
from Bob
or in other words, what are you trying to do, where is your code that fails, how does it fail, whats the error etc etc
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
no,i want to know whether i can add reponse.redirect url in vb6.0 or not like in asp.net ,if yes then plz provide me the sample code.
thanks
prem
|
|
|
|
|
What are you using in VB6 to write your web-based app?
|
|
|
|
|
In the time its taken you to post this question you could have tried it and found out, so why don't you?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
hai all,
i am new to .net.is it possible to print datas in horizontal in crytal report.i want to print names in horizontal.
for ex,
i have one tablename as student.
table student contain 3 columns are name,age,place.
values are:
name age place
dinesh 22 salem
ramu 25 coimbatore
sekar 26 trichy
balaji 28 chennai
i want to print names in horizontal in crystal report.
in my crystal report,
names are printed in vertical like below in crystal report
name
dinesh
ramu
sekar
balaji
but i want to print names in horizontal like below
name:dinesh,ramu,sekar,balaji
how to print names in horizontal?
|
|
|
|
|
Use Cross Tab to print Data Horizontally.
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Hi All,
I am changing Trial Days Period of my software using Registry.Every thing is right but when i m running application using GUEST account.Then it's not working properly because HKEY_LOCAL_MACHINE not accessable by Guest Account.
So Please Help me how to set Trial days for All Users in XP and Vista Configuration.
Thanks
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Unfortunately, the Guest isn't allowed in that part of the registry. There are two alternatives available;
- Use some other account with more privileges than the Guest account
- Store your data in some other place
Sorry
I are troll
|
|
|
|
|
Pls Suggest me which area is sutable for Saving information.
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
I don't know if a Guest is allowed to use the internet, otherwise it would probably be best to store it remotely.
See, if a guest can write information to your system then anyone (since guest is anonymous) could start writing to your computer, effectively filling up all your harddisk-space. I doubt that there is a location on your system where the guest-account is allowed to write, but I could be mistaken - you could check with a network-administrator to verify this.
I are troll
|
|
|
|
|
Guest is allowed to use the internet.My application is for local machine not for web purpose.If Remotely means any Disk area then please Suggest me where??
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Remotely means somewhere else than on that computer. Amazon has some very cheap storage-space available
eg_Anubhava wrote: My application is for local machine not for web purpose.
Lots of desktop-applications use the internet. It's not just there to display webpages. Some applications use it when they want to check whether there are updates, or asking Google for a translation of a particular word.
I are troll
|
|
|
|
|
But my application is for local machine
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
That doesn't prohibit you to store the data elsewhere. Your application may run happily on the local machine, whilst reading and writing from the internet
My virusscanner, for instance, is just meant for my local machine. It gets updated over the internet. That doesn't make it an internet-application - it just uses the internet as if it were a diskdrive.
I are troll
|
|
|
|
|
Why are you even bothering with the Guest account?? I haven't heard of a single company or person that uses it, or even allows it to be enabled (it's disable on every Windows machine by default.)
|
|
|
|