|
Is it rubbish now ?
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
Symantec.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I guess that's inspiring, but when I got involved with an entrepreneurial program back at the university business school, I found out his story is far from unique. Nearly every entrepreneur that ever survived did something simila. AS I did when I started my first business.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
as an entrepreneur his story is far from unique, but as a programmer not every other guy has written books like: "Peter Norton's Assembly Language Book for the IBM PC", "Advanced C Programming", "The Peter Norton Programmer's Guide to the IBM PC"...
|
|
|
|
|
Just don't compare the Norton products of decades ago with the Norton products of today.
I don't really know Peter Norton's backstory, but for getting his name associated with what it is today, I hope he took the money and never looked back.
|
|
|
|
|
Do software/computer user group meetings even exist anymore other than in some college towns with a lot of tech industry?
Explorans limites defectum
|
|
|
|
|
Dean Roddey wrote: Do software/computer user group meetings even exist anymore other than in some college towns with a lot of tech industry?
There are a couple here in Dayton (weekly) and some in Columbus (annual and weekly) and neither are really large cities.
You can also check out the meetup site to see if there are some near you : meetup.com[^]
If you have location turned on it'll show you upcoming meetings near you.
Or you can search a city like the following:
Meetups near Dayton, Ohio | Meetup[^]
Meetups covers everything but you'll see Web Dev group, JS group, etc.
|
|
|
|
|
I have a Windows Service running that does a number of file conversions docx->PDF->PostScript plus combining the files. I'm running into a problem of hard drive write latency. The application writes a file (converts to another format). When it finishes, it copies it elsewhere, but I am getting an error that the converted file is not accessible. I'm assuming that my server is configured to do buffered file writes like a storage server when what I really need is a file server that is done writing when it says it is done. I put in a time delay before the file copy, but it didn't seem to help. Is there a way to confirm the file write is complete or some way around this?
Any suggestions or links to the problem would be appreciated. Thanks, M
|
|
|
|
|
This is really a programming question so you are in the wrong forum - you need to be in "quick answers", "Ask a question".
However, I had the same issue and simply had my copying code loop (with a few milliseconds sleep) until the file was properly closed. Waiting an arbitrary time will be too flaky. Loop it!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Thanks. I'll move it there as well. Thanks for the answer too. I just don't really like a loop that doesn't have a fixed end. I do three tries now...
... and could you be trusted with the source code
|
|
|
|
|
Michael Breeden wrote: could you be trusted with the source code
Nah. He'd turn round and flog it to the Chinese. He's done it before...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
...but never again. US customs impounded all the bags of rice at the border!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
I vaguely remember using a 100ms wait time and gave up with an error notification if I looped more than 300 times (30 seconds total) - computers don't get tired or mad about doing the same thing over and over so looping only 3 times because "that's probably enough" is not bringing enough firepower to bear!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Forogar wrote: omputers don't get tired or mad about doing the same thing over and over Bah my laptop will go on strike every time I try and loop database writes it considers too deep, cantankerous bitch that she is.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Forogar wrote: I had the same issue and simply had my copying code loop (with a few milliseconds sleep) until the file was properly closed. Waiting an arbitrary time will be too flaky. Loop it!
I have a method in my static Globals class called FileIsOpen that does the same thing. It loops until the file is closed, or until a time limit is met (throws an exception).
".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
|
|
|
|
|
Hi,
Michael Breeden wrote: problem of hard drive write latency
Liquid Nitrogen.
Michael Breeden wrote: but I am getting an error that the converted file is not accessible
The scenario you are giving does not make a lot of sense to me. It sounds more like something has obtained an exclusive lock on the newly created file. Most likely Windows Defender or whatever third-party security product you are using.
From your service when you create the file... use the LockFile function after calling CreateFile with the FILE_FLAG_NO_BUFFERING flag. Hold the lock for the entire time and finally after you copy the file to the final destination release it.
Best Wishes,
-David Delaune
|
|
|
|
|
Randor wrote: Liquid Nitrogen.
I've used that. It just works...
".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
|
|
|
|
|
You could try using a FileSystemWatcher (.Net) or creating a Folder Watcher.
How reliable this would be I have no idea.
|
|
|
|
|
Not very. The trigger is fired when the file is created, not when it is closed, so he will still have the same problem.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
He can use a FileSystemWatcher for this.
".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
|
|
|
|
|
I ran into a similar problem years ago with DOS. I wrote the realtime code for a sucker rod inspection system. Basically the rods move through the detectors at 1 ft/second. I had to take the readings, do some filtering and spot flaws, then send a signal to a paint gun when the flaw passed by the paint gun. Still audir record was required, so I needed to save all of the measurements and filtered results to the hard disk, without missing any days passing by at 1 ft/sec. I made an end of rod detectotion routine and "vomited all the data to the hard disk in between rods. The trick was to tell when the hard disk write was completed to begin searching for the start of the next rod. In DOS it wasn't too hard, but I don't recall how I did it.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
We were sitting around talking about the max possible datetime in SQL server, and the fact that you have to know what it is before you can use it.
I mentioned that .Net types all have a MaxValue property, and one of the DBAs said there was nothing like that in SQL server - "you have to know the value".
I mentioned that we like to avoid using "magic numbers", and asked if SQL Server allowed you to specify common values accessible by all databases on the server, something like this:
DECLARE @@SqlDateTimeMaxValue DATETIME = '9999-12-31 23:59:59.997'
...and was again told that SQL didn't have anything like that.
SQL Server - Welcome to the 80's...
".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
|
|
|
|
|
Why would it need one? You can always check validity with TRY_PARSE() or TRY_CONVERT().
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
We need to set a datetime column with the max datetime value. Using magic numbers to do this is just as much a bad idea as it is in .net.
".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
|
|
|
|
|
By using maximum/minimum dates to mean something like "not yet happened" or "not yet known", you are using magic numbers however you look at it - regardless of whether said magic number can be represented by a constant.
Either use a NULL or preferably normalise the database to the point where the appropriate date field either exists or it doesn't.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|