[quote user="Manni"]When will those lazy PHP developers start introducing loops?[/quote]
You don't need to use loops. L00ps are for n00bs. Just add a comment stating "loops unrolled for greater performance" and you'll become a hax0r.
[quote user="Manni"]When will those lazy PHP developers start introducing loops?[/quote]
You don't need to use loops. L00ps are for n00bs. Just add a comment stating "loops unrolled for greater performance" and you'll become a hax0r.
[quote user="Phalphalak"][quote user="forkazoo"]
Unfortunately, that often doesn't actually work. Renaming the exe may fail if Windows thinks it is still in use. If you can get rid of it on disk (Sysinternals has a special utility for scheduling moves and deletions at shutdown) -- then you still have to deal with the fact that the running process can repair itself (write itself back out to disk, re-add itself to the registry to run at startup). Just kill the process? Well, some things come as multiple processes which will restart each other.
Some spyware really does need the power-kill trick in order to get any headway.
[/quote]
I'm not a computer technician nor do I have too much experience in that, but isn't there some rather professional way to do that? I mean can't one just scan for the files and processes in question or identify them othewise then let's say save the results to a log file and then plug in the hard drive in question to another computer and have it removed accordingly?
[/quote]
Or boot from a Knoppix CD and do the same if you don't have another computer at hand.
@danielpitts said:
@nonDev said:@CDarklock said:Rethrowing the exception is EXACTLY the right thing to do.
Did you mean "EXACTLY the wrong thing to do"?
Does ANYBODY get sarcasm any more?
Not this enterprisey type.
You've just demonstrated why you should never use regexps if it's not absolutely necessary. You would make a great evil professor, because it's really evil to accept a buggy solution for a problem. :)
Speed is almost never an issue in these cases as it mostly involves parsing text input from forms but readability and error-proneness is.
Btw, I didn't suggest converting it into an integer. If I needed the number afterwards, I'd convert it but if I had several billion digits to check, I'd only check if all the characters are proper digits and check for bounds only if the length of the string equals the length of the upper or the lower bound. Anyway, I'd love to see you build a regexp like this for your billion-digit number.
On second thought, I wouldn't.
Theoretically you could use regexps to recognize integers between 5 and 3976 but anyone with a little common sense won't do such thing.
Either you've ever seen proper exception handling or failed to read the code.
What's the point in catching and rethrowing exceptions? And if there is one (there isn't, unless you also do some logging or other things in the catch block), what's the point in doing it twice?