|
No, Greyfriars.
Life is like a s**t sandwich; the more bread you have, the less s**t you eat.
|
|
|
|
|
|
Thank you for that, I'll try to bear it in mind.
Couple of questions though:
1) who are you?
2) why are you being rude to me?
3) what have I done to annoy you?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
4) who cares?
I wouldn't take that if I were you Griff - why don't you just have his account deleted?
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Because it is unrelated to elephants...and so irrelephant
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
This is so left out of centre.
I don't understand.
Please explain.
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980
|
|
|
|
|
Just a piece of advice because it looks like this account is about to be closed as well; no one is trying to harm you.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Well, I've been running tests on my sql agent stuff, and have realized that my FileSystemWatcherEx code is somewhat flawed. Sometimes I get double events, and sometimes I don't when a file changes. After sitting there cussing for a while, I think I've managed to come up with something that might work all the time.
I created a class that creates filesystemwatcher for each of the change NotifyFilters, and an event queue (for each watcher) that manages the events as they happen. This event queue will only allow an event to be added one time for a given file. So, if you get two LastWrite change events, only the first one is added to the queue. The object that instantiates the watchers and queues sets up parallel tasks (one for each file watcher) to monitor that watcher's queue, and pumps events to subscribers (the WatcherEx class) which then bubbles the event to its subscriber(s).
The reason I call it "over-engineered" is that so far, it's taken almost 1000 lines of code to implement.
Testing begins.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
Yeah, but I'm using the code from that article, and it's not working well. I'm gonna have to go back and edit the article when I finger out the problems.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
John Simmons / outlaw programmer wrote: when I finger out
You may feel like editing that...
|
|
|
|
|
He's giving his old code the finger!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Ah, kids these days!
"finger" was a Unix script, which pointed at someone (or some entity), returning their location, so it's appropriate usage.
Also, given that it's JSOP, "fingering" the trigger when you're about to blast something out of existence would also give an appropriate usage.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Ha! It's so long since I worked with such an antiquated operating system that I'd quite forgotten that. I prefer CPM.
|
|
|
|
|
John Simmons / outlaw programmer wrote: I'm using the code from that article, and it's not working well. Excuse me for a second, need to go downvoting
Recursion: see Recursion.
|
|
|
|
|
I feel like you are re-inventing the wheel here, with file system watching. There has to be a lot of open source stuff for you to use that has already ironed out the kinks. Have you thought about this?
|
|
|
|
|
I think the point is more to learn and understand than to simply re-use what someone else has done. John is a backyard mechanic, so this is a similar vein.
|
|
|
|
|
Ah, I thought he was trying to solve a real world problem. In which case, it would make sense to use something that someone else has done, IMO.
Work smart.
|
|
|
|
|
Sounds quite close to what I was reacquainted with today. It's a monster I coded up back in about September, where the project was still supposed to be a mere proof of concept, but this little baby (just a tiny, forgotten part of the code), is remarkable in how few lines of code it uses. I somehow skirted spending too much time on one little design problem by using dynamic to store a whole bunch of instantiated (i.e. typed) generics[1]. It's all been so invisible and working so nicely I never encountered it again until today; when you right-click a variable you suddenly find out is dynamic, and try "Go to declaration", Visual Studio just gives you the finger.
Not saying your watcher design is anything dodgy like my shortcut, but looking at my code now, it strikes me as quite a feat of 'over'-engineering. I could have just used a tag or something and with a tiny bit more work, avoided spending half a day trying to understand my own, only 6 month old, code.
[1] The correct term for a generic that has been given a fixed type escapes me.
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
modified 16-Mar-15 16:34pm.
|
|
|
|
|
Brady Kelly wrote: The correct term for a generic concrete type.
#SupportHeForShe If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
Only 2 things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
OK, maybe I was wrong with using "correct", as "concrete" does describe such a type, but IMO, "double" is also a pretty concrete type. A quick look at Jon Skeet's C# In Depth tells me they are called "constructed types[^]".
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
|
|
|
|
|
You are correct, double and other primitives are concrete types. Concrete types are also used to describe subclasses of abstract types where all abstract particles are supplied. That's where I was coming from.
But, hey, I'm good with "constructed type".
#SupportHeForShe If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
Only 2 things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
Either way, thanks for steering my reading in the direction of getting down and dirty with compiler et al terminology.
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
|
|
|
|
|
John Simmons / outlaw programmer wrote: So, if you get two LastWrite change events, only the first one is added to the queue
Isn't it possible for a file to be modified more than once? In that case, wouldn't you get more than one "LastWrite changed" event?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
I have been fretting over the question of hacked userids/passwords. As I understand it, the stolen password is not actually the password but a hashed version of it which the hacker then decodes by brute force and ignorance to arrive at the actual password. But what if that wasn't the actual password. What if the system I was using performed some sort of transformation before it hashed the password for storage.
For example, when I log on to my account, I type in pass123 as my password, but unbeknown to me, the system translates that to 321ssap, hashes it and stores it.
The hacker tries to log onto my userid and types in 321ssap as my password which is what he thinks it is. This gets translated to 123pass and hashed for checking. But that hash value is not the same as the one that is stored. Therefore an "Incorrect password" error message is generated.
Am I missing something here?
|
|
|
|
|