Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

"Monsanto should not have to vouchsafe the safety of biotech food. Our interest is in selling as much of it as possible. Assuring its safety is the FDA's job."

  • Phil Angell, Monsanto's director of corporate communications. New York Times, Oct. 25, 1998
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I've noticed that a lot of your recent questions could be answered by even a cursory reading of just about any intro to vb.net programming book or one of the many similar (free) tutorial web sites. Might I suggest you get one and read it?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Ads might seems annoying but on the positive aspect. It is one way to gain profit in business industry.

I agree that some ads are necessary and even a good thing. Having said that, would you like people continuously knocking on your door and phoning you to sell you something? Even with the "do not call" laws in place we still get phone calls pestering us with "this is your last call (bullshit) to take advantage of our credit card debt consolidation service". When I get these calls (automated) I press "0" to speak to an agent then give them a blast from a whistle. I realize that some of these people only take the jobs because it's all that is available, but I have no sympathy for anyone whose job is basically making annoying spam phone calls.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I've always felt that new posters should, for the first few posts, be presented with a pop-up such as

As a new poster we would like to remind you that it benefits everyone if you are familiar with the DaniWeb rules. After your third post you will no longer see this reminder.

We can't force anyone to read the rules or the stickies but at least that way there would be no legitimate way for a poster to claim ignorance of them.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My older son was always an avid reader. With him it was mostly books on science. He is now doing a post-doc in bio-physics. When my younger son was in early school he liked to read the Goosebumps books by R L Stein. His teacher at that time discouraged him. We, on the other hand, felt that the books were harmless fun and encouraged him to continue. Today he has a college degree in Computer Science and still reads. He also writes as a hobby.

While I enjoy TV and movies, I find that books exercise my imagination more. When you watch a movie you experience the sounds and images of someone else's imagination. When you read a book you experience the author's imagination via the words but your imagination provides the sights, sounds and smells. It is a collaborative effort. When I read, I can take in the book at my own speed. I can stop and savour a particularly interesting passage and I never miss a plot point because a character was mumbling or the musical score was obnoxiously loud.

The last few books I read were

A David Baldacci mystery
John Cleese's autobiography
The Naked Lady Who Stood on Her Head (a collection of psychiatric case histories)
The Born Again Skeptic's Guide to the Bible
A Tale of Two Cities (for the third time)
Analyzing Criminal Minds

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A lot of the forums have a "sticky" post with a title like Please read this before posting. The sticky posts remain at the top of the thread list. If newbie posters took the time to read these stickies we might see a dramatic drop in the number of silly questions. If people bothered to read through the rules we might see even fewer. I see no problem with downvoting or berating (or both) a user for ignoring the stickies and/or rules and posting things like

  • how do I get a free copy of (commercial software)
  • what's wrong with my code (and not posting any code)
  • please do my homework for me

In some cases, a user will post an assignment verbatim and not even bother to ask for help. To me, that's the equivalent of a user saying, "Here. I can't be bothered. You do it."

I think an appropriate response (punishment, to use your word) is warranted.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You have to use a delegate to modify controls. It's not complicated and there is a tutorial on how to use BackGround threads which includes a discussion of delegates. Once you have read the tutorial feel free to post any follow up questions here.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try

cmb1.DataSource = IntList
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

'after one times execute for loop i want to exit here. this meaning is if not exit For loop it will be continue looping so after one times execute i want For loop exit and continue go back to a.txt file and read continue processing. i hope this make sense.

Actually, it doesn't.

Given the pseudo code I provided you should be able to create the corresponding vb code. When you generate the two random numbers (call them r1, r2) you will have to test if r1 > r2 and swap them if true.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you are only allowed P, R or N then I suggest you use a combobox. Why allow the user to bang on invalid keys? Just show him/her the valid choices.

ddanbe commented: The right choice indeed! +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Just changing the name doesn't make it better. There is a saying that goes "just because everything is different doesn't mean anything has changed."

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

This is an oldie that makes me laugh when I visualize it, mostly when I visualize Foster Brooks as the drunk, however, I am not sure what is funnier anymore, the joke or remembering how my older son always horribly mangles it whenever he tries to tell it (OK. Watching him tell it is actually funnier than the joke).

A drunk is sitting in his favourite bar when he sees this totally average dude leave his seat and walk over to the bar. He picks up a drink then leans over and says something in the ear of the most beautiful woman in the place. Her reaction is a little surprised and when the man returns to his seat, she walks over and starts talking with him. After 30 minutes they leave together. The drunk is amazed that such an average man is able to pick up such a babe.

The next night the drunk sees the same routine with the same average looking dude but with a different babe. This goes on several nights in a row. Finally, out of curiosity, the next night the drunk approaches the man before he begins his routine. He says "I've been (hic) watching you night after night picking up the-these beautiful women and I gotta a-ask, how does a guy like you score wi-with these babes?"

The man replies "it's all a matter of breaking the ice. When I go to pick up my drink I say to the woman, …

<M/> commented: lol +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Rule number 1 - don't let anyone do your thinking for you.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you are not an extremely lazy person who expects others to do their research for them you can start with google.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Much higher than that if you are non-white.

RikTelner commented: *shots fired* +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And the same to you and everyone else.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When you add numbers you don't generate new numbers, you just get an already existing number. Why would there be more even than odd numbers? You might as well say that since there are an infinite number of primes and an infinite number of integers that there are the same number of primes as integers. Therefore every number is prime.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can effectively run the same code in vb.net with minor modifications. Normally I would try the code before posting but my regular laptop is toast and I m using n old clunker (without vb.net instlled nd with a flkey "A" key). Essentially, wht you would do is read the text in by

My.Computer.FileSystem.ReadAllText(filename)

then use the Replace function as previously noted. I'd be more specific but I hve no way to write/test the code at the moment.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

We have 150 different properties in our group. As part of each hotels night audit, they generate this text file that is stored in the hotels specific folder. It's all on one server, but in their individual folder. This part of the reason I would have preferred to have written the code in VB.net as I had started a program that do the conversion after pushing a button on the users desktop.

It might have been a good idea to have stated that at the very start. Your original request was that you wanted to convert "a" text file. A great many projects have been derailed because the user requirements were not properly specified up front.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Does this mean that a copy of this program will need to be in every folder where the text file exists?

No. Just put convert.vbs in a folder that is in your %PATH%. If you don't know how to do that then after opening a command shell just do

set %PATH%=%PATH%;myfolder

where myfolder is the name of the folder containing convert.vbs. If you don't want to do that then just run it by

D:\myfolder\convert infile outfile

I don't see anything in your code that will direct it to where the original file will be found or where the new, "Save As" file will go. I've got to believe there are some lines of code that need to be inserted to tell it what to do.

The script is complete and does not require any Sub Main or other code. As I stated, the script is run from the command prompt, not by double clicking an icon. The format is

convert inputfile outputfile

The input and output files are specified on the command line.

If the files are in the current folder then just specify the file name as in

convert infile.txt outfile.text

You can qualify the file name(s) with a path if necessary. If you want to convert a lot of files then you can create a Windows batch (.cmd) file containing

convert ifile1.txt ofile1.txt
convert ifile2.txt ofile2.txt
convert ifile3.txt ofile3.txt
etc.

There's no need to complicate this.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Aside from the price gouging (which they have done before), they have also

  1. Denied responsibility for drivers by claiming they are contractors, not employees
  2. Interfered with an attempt by Lyft to attract investors
  3. Threatened to smear reporters
  4. Called in fake rides to tie up drivers from the competition
  5. Charged more to ensure you won't be raped or murdered by their drivers
  6. Allowed their drivers to turn away blind passengers
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can reference controls dynamically by name by using

Me.Controls(name)

So you could do something like

Dim data() As String = {"box1", "box2", "box3"}

For i = 0 To 2
    Me.Controls("textBox" & (i + 1)).Text = data(i)
Next

If you name your controls tbxProp0, tbxProp1, tbxProp2 then you can do

Dim data() As String = {"box1", "box2", "box3"}

For i = 0 To 2
    Me.Controls("tbxProp" & i).Text = data(i)
Next

Not exactly like your code (I'm not doing any input) but you should get the idea.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I support Windows for several friends/relatives and it has been my experience that those who use "automatic driver update" utilities just end up with problems. My advice is not to update a driver unless it fixes a known problem. For example, don't update a video driver unless the update is required for a particular game.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What do you call a cow with no legs?

Ground beef.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You could start with the w3 SQL tutorial

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The junior coroner is on duty when a body is brought into the morgue. While examining the back side of the body he notices a cork stuck in the man's butt. When he removes the cork he hears the strains of "Mamas don't let your babies grow up to be cowboys...". He replaces the cork and the music stops. He removes the cork and the music resumes with, "Don't give 'em guitars and let 'em drive trucks...". He replaces the cork and leaves to fetch his boss. When they return, he says to the senior coroner, "listen to this", then removes the cork. Once again he hears "Make 'em be doctors and lawyers and such...". He replaces the cork and says, "well, aren't you surprised?" His boss says, "not really. Any a$$hole can sing country."

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I make allowances for that here but not in news/op-ed type pieces. I expect those to be written by writers familiar with the language. These mistakes are not of the their-they're-there or I-me type mistakes. When someone writes

More than 100 hundred actions nationwide have been planned

that's the result of sloppy/careless writing. I hold those whose job it is to inform us to a higher standard just like I do teachers.

Stuugie commented: I agree with the higher standard but I don't believe it either! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It was so subtle it was practically homeopathic.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It think it was John Oliver who, twice, aired montages of many different local news shows reporting the same story with exactly the same words. This shows that in spite of having many different sources we are actually being fed exactly the same pap.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I am not sure why science has such a bad stigma amongst US teenagers.

I'm guessing that most people these days have little or no idea of the difference between "good" science (or just science) and "junk" science. Clearly lawyers have erased the difference between "possible" and "probable" and the courts have done nothing to restore it. Lawyers on each side have their "experts" who say what they are paid to say. Often this can result in two people using "science" to support completely opposing views.

Science detractors such as the Creationists have also deliberately obfuscated the difference between hypotheses and theory. A hypothesis is akin to a guess (albeit an educated one) about how something works. A hypothesis must be tested and retested. Once the hypothesis has been proven to be representative of reality, once it has been verified to the point that it would be unreasonable to doubt its accuracy, only then does it get elevated to theory. Saying that something is "only a theory" should not be derogatory. Unfortunately, those who wish to deny reality to further their own agendas often resort to "it's only a theory", "further study is needed" or "there is still no consensus." This last one is often trotted out even when 99.9% of scientists are in agreement. The remaining 0.1% often have financial ties to those who would benefit most from denying the obvious.

Another problem is that of the false dichotomy. I don't wish to pick on Creationists again …

diafol commented: Good points as usual RJ +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The molecules of oranges and lemons are identical except that they are mirror images of each other. Your nose can still tell the difference. Source

almostbob commented: one I really like +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

c776ef64cb3d002c285f9dabee844100

This post has no text-based content.
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can do

UPDATE MyTable
   SET user = REPLACE(user,'ZZZQQQ','')

This will remove all ZZZQQQ strings no matter where they appear in the field.

diafol commented: Nice +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The only poetry I've been able to stomach was Grooks by Piet Hein, unless you count Asimov's Lecherous Limericks.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There is no way to report the progress of a single statement operation like My.Computer.FileSystem.CopyDirectory(a,b) other than copy started and copy completed. If you want a progress report then you'll have to break up the operation into multiple single-file copies and report the file name and something like copying file 3 of 9 files. If you are copying sub-folders then you'll have to write your own recursive file copy.

You may be interested in a tutorial on background threads that I put together a few months ago. Among other things, it covers how to update form controls from a background thread.

Stuugie commented: Good tutorial +6
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What I like is when someone posts in the Jokes thread and it bubbles the thread to the top of the list. AD started that thread so it's just a little reminder that he was here and will not be forgotten.

diafol commented: Great! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

As I pointed out in another thread, it also makes payment one more step removed from your money making it almost certain to drive people even further into debt. If every time you went to buy something you had to open your wallet and see how much money was in there, and how much was left after taking out the money to pay, you'd be less likely to buy stuff that was not within your budget. Indeed, you'd be unable to pay once the cash was gone. Credit cards take you one step away from that instant connection with your money. NFC takes you even one more step away.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There is a difference between saying "you are a ####ing moron" and saying "that turns out not to be the case". Both may be true but the former will get you downvoted and the latter will probably not.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

For future reference, when you post

Dim sql As String = "INSERT INTO tbl_info ([AdminNo],UserName, [Course Title], ICNo, Gender, Address, [Data of Birth], TelNo, Email, Type) values ('" & txtname.Text & "', '" & txtadmin.Text & "', '" & txtcourse.Text & "', '" & txtic.Text & "', '" & txtgender.Text & "', '" & txtaddress.Text & "','" & txtbirth.Text & "', '" & txttel.Text & "', '" & txtemail.Text & "', '" & txttpye.Text & "')"

we have no easy way of determining what the syntax error might be because it could depend on the values of the various textboxes that you are concatenating. If you are going to post the above code you should also post the result of

MsgBox(sql)

so that we can see the actual query string being passed to the database engine.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There are very few cases where a GOTO is acceptable. This is not one of them.

ddanbe commented: I NEVER GOTO +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If at first you don't succeed, suppress the vote.

GOP playbook

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I believe that VLC Media Player will play Real Player Files.

rubberman commented: I think you are correct. +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Of course they do. When my older son was about to enter school, the closest English school was built on the open-area concept because, of course, everyone knows that young children are never distracted by what's happening in other areas around them, right? We put our boys in French Immersion instead (but not just for that reason). That school has long since been revamped to eliminate the open areas.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A new clock based on the strontium atom is the most accurate timepiece ever invented. It is expected to keep perfect time over a five billion year period. It is so sensitive that because time passes at different rates in different places (faster at the top of Mount Everest than at sea level) even differences of a few centimeters can be detected. Source

RikTelner commented: Yes, I've also heard they have like 1 second fault on couple hundreds (billions) of years +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There are a number of other free and very useful SysInternals utilities available at the same site.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I suggest you use Sysinternals Autoruns to see exactly what is running on startup. It's a free utility that I have on all my coomputers.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

As far as I know, if the data is viewable then it is copyable. I don't see that there is much you can do about it other than in certain cases like using segmented flv (f4f extension) for media streaming (and even that is probably copyable by some method unknown to me).

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Pants? I think if I restricted a search to only my posts I'd get mostly rants :)

diafol commented: heh heh +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Manitoba Hydro built a state-of-the-art head office in downtown Winnipeg a few years ago using the open office paradigm. They soon found that the noise from adjacent areas was too distracting and had to extend the walls around the meeting areas to the ceiling, which disrupted the airflow which relied on there being no walls.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try looking at Bart's PE Builder.