topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday November 17, 2025, 10:29 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 236 237 238 239 240 [241] 242 243 244 245 246next
6001
Living Room / Re: Nightmare on Sesame Street - Video Search Challenge!
« Last post by Stoic Joker on August 25, 2008, 04:13 PM »
That is so wrong on so many levels ... I absolutely must have a copy...

Let us know if you find it.

 :)
6002
Living Room / Re: Numeric Format Strings in C++
« Last post by Stoic Joker on August 16, 2008, 12:33 PM »
@mwb1100

I knew the why %n was deprocated, I Just can't figure out why the documentation just keept looping instead of point out to the new "right" answer. ...And yes I did do a quicky wrapper for both GetCurrencyFormat(...) and GetFormat(...) (and a customized Locale) Which gives me exactly what I needed for the output (billing) report.

Does stringstream allow for (inherantly) secure buffer handling? That's why I'm using the StringCbXxxx(...) series of functions. They do automatic buffer checking to prevent over-runs ... and will even flag you at compile time if something has potential of going poof! I keep thinking that f0dder was the one that had brought them to my attention ... but I'm not sure.


I'll save the code sample in my notes as it's bound to come it handy for something down the line.

Thank you,
Stoic Joker
6003
Living Room / Re: Numeric Format Strings in C++
« Last post by Stoic Joker on August 16, 2008, 12:15 PM »
In the case of money, you almost always want to deal with an atomic value of 1 cent, and you dont care about fractions of cents, but you DO care about losing a penny here or there.  In such cases you should use an integer variable that holds the number of cents in the amount. (1 dollar stores as 100).  That lets you work with exact integer arithmetic.

Hm... Most of the Bean Counter types seem to work 4 decimal places out when doing cost projections or profit analysis stuff, I really don't see how I could use a whole number for that (Multiply it by 1,000.000? ...Zoiks!).

So far I haven't had a problem (but I'm not writing code for Sun), and there really isn't any way for that to adversely impact the output of the program I'm working on. But I will keep it in mind in the future.

(Strange) Side Note: My son took a programming class in college and his professor was insistant on their using the double data type for doing money calculations. So if they're teaching kids mistakes comming outa the gate it's no wonder half the software out there is crap...

*Shrug* ...Points to Ponder...

Thank you,
Stoic Joker
6004
Living Room / Re: Numeric Format Strings in C++
« Last post by Stoic Joker on August 16, 2008, 10:02 AM »
Greetings
   And thanks for the input ... But I'm a bit confused on one point (not to side track myself...). Why not use doubles for dealing with money? The app I working on is the 2nd half of the total project that generates billing reports for 1,000 line items that are all being billed at $00.01 per x. If I used int I'd end up pointer casting everything multiple times and still probably not get the right answer.

   I guess I should also mention that this is a GUI application, so unless I'm badly miss-informed (which has happened...) all the cout stuff is strictly for CLI apps ... Correct?

GetDlgItemInt(...) automatically rounds off the "int" to the nearest whole number so 0.010 becomes 0
GetDlgItemText(...) dumped into atof() (which requires float or double) will actually give me 0.010 as a numeric value that I can then use.

The answer I ended up finding (at 1:30am) was to just run the string through
GetCurrencyFormat(LOCALE_USER_DEFAULT, 0, szNowFormatted, NULL, szString, ARRAYSIZE(szString));
Which is giving me the 1,234.01 format I was after.

Note: I'm using MSVC from MSVS and all the documentation on the MSDN seems to be split between two warring factions:

1. Says to use %n to get the thousands separators.

2. says never use %n because it's "unsafe" and has been depreciated. ...hence my quandary. ...Because none of the aforementioned documentation even hinted at the alternative, which was the API I (am using) mentioned above.

I'm not married to it ... so if there is a better way let me know.

Thank you,
Stoic Joker
6005
Living Room / Numeric Format Strings in C++
« Last post by Stoic Joker on August 15, 2008, 07:55 PM »
Greetings
   I have spent the last several months working on a network scanner that will (quickly) search a network for any & all Print devices and then collect information from/about them (It'll do about 20 IP Addresses per second).

   As usual I am working in Pure Win32 API C++ e.g. No cs, No .NET, No MFC. ...and... I've completely hit the wall on one seemingly simple (but key) point.  I can not get the numeric string formatting to output a string like: 1,254.00

I'm passing a dollar amount stored in a double into StringCbPrintf(...) using %0.2f in the format string which gives me 1254.00 ...But I've gota have the blasted coma's in there or the Corporate Board Room types will whine and gnash their teeth.

Anyone have a clue what I'm missing?

Thank you,
Stoic Joker
6006
Living Room / Re: What is a mouser? What does it mean to mouser someone?
« Last post by Stoic Joker on August 15, 2008, 07:38 PM »
Okay, so I was the only one who thought it was a cat that was good at hunting mice...

*Sigh*
6007
Living Room / Re: What printer?
« Last post by Stoic Joker on August 08, 2008, 07:07 AM »
So... I'm guessing that you'd be happy to stay with the printer you now have (cheaper) ... IF you could get the blasted thing to work! ...Yes?

I do have one question, that came up while I was looking into this. There are actually two different HP 4280 AIO's:
     Photosmart C4280 All-in-One Printer
     Deskjet F4280 All-in-One Printer

Now the DJ F4280 hasn't had a driver update in over a year, but it has no Card Reader (Which you mentioned having trouble with.

The PS C4280 has a driver update that came out last month, and it also has a Card Reader. (Granted I've caught HP back dating drivers to make it look like they weren't slacking before...) It might be worth exploring the 6/2008 v11.0 driver's Basic (e.g. driver only) Driver Package.

Also, never "update" a USB printer driver (I don't care what the book says... ;)).
1. Strip out all instances of the printer driver (and any drivers for printers that no longer exist).
2. Uninstall all of the HP software in Control Panel->Programs & Features (Was Add/Remove prog)
3. Disconnect the printer (USB) and reboot the machine to be sure it's all gone.
4. then reinstall the (Driver Only) "Basic" Driver Package (and don't plug in the USB cable until the install says to).

Let me know how it goes.
6008
Living Room / Re: which operating system you like most....
« Last post by Stoic Joker on August 08, 2008, 05:29 AM »
Windows - Love it, & use it daily
LinuX - It's not for the masses, but it's a lot of fun to play with.
Mac - I absolutely detest pretty things that just don't work. Trying to install a printer driver on a Mac is the most over complicated bit of nonsense I've ever seen.
6009
Living Room / Re: What printer?
« Last post by Stoic Joker on August 07, 2008, 06:55 AM »
Hm... (Confession-> The company I work for is an HP Authorized Service Provider (Er... Dealer if you will).

Now that being said, I also do not "give quarter" when it comes to poor quality... But I can probably explain some of what you've encountered.

HP's bundled Printer Software SucKs (true) ... Even they know that which is why they either offer a corporate/business version of their (newer) drivers, or put (well hide....) a custom install option in the driver install software that will actually (*Shocking*) just let you install the driver without the 700MB of (The printer is now your new (god awful chatty) best friend) "Support Software".

If the printer is BSODing Vista, then it's still using an older Kernel Mode driver ... there should be a newer User Mode driver available (no it won't be clearly marked that way).

I've not a clue on the exchange rate ($200 AU -vs- $200 US). But $200 US will put you in the home user budget/class of device.

If you can clarify your usage requirements it would greatly assist in making a recommendation.
6010
The question someone raised about how often confiscation actually occurs really is relevant (to me at least).  If this is one of those theoretical rules that they put in place for really unusual cases where they suspect your laptop is a bomb and it never really happens then that's one thing.. but if this is one of those rules that border guards use when they get in a bad mood that's something else entirely.
Regardless of how it starts out, it will end up being both. Face it, as long as Guard X can justify their actions to (Chronically preoccupied) "Boss" Y ... You'll never see that device again...

...By the time it's all said and done, "They'll" end up having a contest...and the clown with the largest stack of electronics will make Employee of the ****ing Month.

Did I ever mention I was a "bit" cynical...? :)
6011
I started playing with Vista back in its alpha days, switched to it shortly after it RTM'ed and have never looked back. I have no complaints... other than Zoom can't seem to write a 64bit driver for my modem...which is hardly Vista's fault.

There has been a rather intent poison-pen campaign going on with some of the Tech writers bashing Vista for no real reason other than to bolster their hit rate...and I think that Mojave was/is a rather clever way of MS to combat that tilde-wave of FUD. It also responds to Apples school yard antics in an "Adult" fashion instead of sinking to their level for a nose to nose (Double-Dog Dare Ya...) pissing contest. ...Even if I would love to see somebody in an MS T-shirt beating that little apple hipster to a pulpe... :)
6012
Having worked on several database oriented projects, I gota go with f0dder on this ... GumBalling code together is a total catastrophy.

Sure there is a break point where you need to just bite the bullet and try something ... but think it through first.
6013
Living Room / Re: Skimp or splurge?
« Last post by Stoic Joker on August 02, 2008, 07:29 PM »
Skimp (avoid really); Paying people for anything I can do myself; Home, Auto, or Appliance repairs. My dad taught me years ago to be (mostly) self sufficient e.g. I can fix damn near anything so I'm not shelling out $$$ to keep my stuff working.
Disagree. I think you're better off using that time to do what you do best. If you can earn more in that time, it'll pay for the worker (in economic circles this is known as the law of comparatitive advantage http://en.wikipedia....omparative_advantage)
(hehe) The problem with that manner of construct is it only works well if you're sitting around a coffee table ... in the "Real World" when you're standing in line with an "Average Paycheck" suddenly paying some clown $300 dollars to change a light bulb sounds ... well ... a bit high (now doesn't it).

I once passed a car (on a motorcycle) by hitting a set of railroad tracks at 120mph behind it, I quite literally went over the car and landed in front of it. When asked why I pulled that particular stunt (by my father who was driving the car) my simple response was ... Because I can.

The only advantage to paying someone to do a job, is it doesn't require any skill on the part of the payee Just money). I have never been "rich", or ever "well off". I have always done well for the economically suppressed area I live in, but I have also found that knowing how to do things that most people seem to find mystical or too complex has profited me greatly in the proverbial "long run".

Sure there are tons of things that most people believe are dangerous, and a lot of them are ... if you lack the skill necessary to mitigate the danger by understanding the ramifications of all the various variables. I simply invested my time (from a very early age) in understanding how things work, so to me any type of machinery is like an old friend.

I do what I do because simply because I can.

Side note: I skimp on gas and only get regular for my (truck) Dodge Dakota which has a 5.9 (360ci) engine (avg 10mpg). But I splurge on (my baby) 1987 Harley Davidson FLHTP and get premium only. The scoot will go from 0 to 60 in under 4 sec... & still gets 50+ mpg ...Ya just gota love her...

If your truck uses regular 87-octane, then by all means use that. Using high-octane fuel in an engine that doesn't require it is absolutely a waste of money. However, if your car (like mine) wants high-octane, you'll get better performance (including better gas mileage) if you use it. You can generally use a lower-octane fuel because the engine management system will sense the early detonation that the low-octane allows, but it handles it by inhibiting any timing advance, which lowers the efficiency of the engine. Of course it depends on the numbers of your specific situation, but you're likely not saving any money this way.
This one I'll give you, because you are 100% correct. My truck was designed for high octane fuel...however when the monthly gas bill heads for the $200 mark concessions have to be made. This is why I pulled the old girl (my scoot) outa mothballs. I had tried altering my driving habits (in the truck) to conserve gas only to find I spent most of the time pissing myself off. On the bike, not only can I go back to traveling at a "brisk pace"... but I find over all I'm much calmer (as it's good to be home...).
6014
Living Room / Re: Skimp or splurge?
« Last post by Stoic Joker on August 02, 2008, 12:52 PM »
Hm...
Skimp (avoid really); Paying people for anything I can do myself; Home, Auto, or Appliance repairs. My dad taught me years ago to be (mostly) self sufficient e.g. I can fix damn near anything so I'm not shelling out $$$ to keep my stuff working.

Splurge: on any materials I need to do repairs - It needs to be fixed only once, correctly, and with out hassel.

Side note: I skimp on gas and only get regular for my (truck) Dodge Dakota which has a 5.9 (360ci) engine (avg 10mpg). But I splurge on (my baby) 1987 Harley Davidson FLHTP and get premium only. The scoot will go from 0 to 60 in under 4 sec... & still gets 50+ mpg ...Ya just gota love her... ;)
6015
Living Room / Re: Cuil search engine
« Last post by Stoic Joker on August 02, 2008, 12:30 PM »
It looks like they have investment and marketing power. We can determine this by seeing amount of hype created around its name and superior skills.
True - but they'll need huge amounts of money and time now to overcome this sort of joke/opinion - http://www.theregist.../08/01/cuil_apology/
...I'd just like to take a moment to clairify that I was not masturbating in any of the search engine test results mentioned (in my post) above ... and it is/will only be the search engine that I intend to play with...

Thank you
6016
Living Room / Re: Cuil search engine
« Last post by Stoic Joker on August 02, 2008, 08:24 AM »
*Shrug* I did a search on myself using Cuil and it worked just fine. I'll play with this for a while before making any decisions.
6017
Living Room / Re: The InfoWorld Programming IQ Test
« Last post by Stoic Joker on August 01, 2008, 07:56 AM »
I got an 80 as well (though i didnt get the ruby one wrong, deliberately or otherwise).
It should be noted this is more of a historical quiz with a few stupid questions thrown in for good measure.
Being that I've never been good at history, that may explain my getting a 40. *Shrug* ...That and I'm (completely self taught) not formally educated.
6018
Developer's Corner / Re: ASP Error 0126 -vs- Firefox
« Last post by Stoic Joker on July 27, 2008, 09:44 AM »
missing log entries - cached copies? caching proxy inbetween
LOL - Oh the time I spent on that road ... Problem being The Email sent had to do a series of requests to the server in order to get through (and those were never found). Not to mention that I'm using CDOSYS to drop the (from) site mail directly into the Exchange pickup folder. ...And all the pages in question are set for no cacheing due to their containing dynamic content (Product catagories/pricing/etc.) pulled from a db.

With all that going something should have been logged ... but it wasn't.

Problem is I should have done:

iisreset /stop
iisreset /start

From the get-go (which would have resolved the "issue") ... but (being under-the-gun...) I came out of the gate over-thinking the problem, and (damn near) blew myself outa the water.

*Sigh* ...Guess that's why "they" call it a learning experience... ;)
6019
General Software Discussion / Re: Windows "safely remove device" thingie
« Last post by Stoic Joker on July 25, 2008, 08:00 PM »
Unlocker, truly one of my favorites and it works on x64. 
It works for you?

Does unlocker work on Windows XP 64 or Vista 64? Not yet, I am working on it.
-from unlocker's webpage
I tried it some time ago, and it didn't work on my system (vista 64). Would it be that it was updated and now works? That'd be great :D

Crap, I was posting from the office (comp there is x86) and forgot I didn't have it running at home (x64). I spend so much time jumping between virtual/remote desktops & networks I spend half of my time trying to remember where the hell I'm at.

Sorry...
6020
Developer's Corner / Re: ASP Error 0126 -vs- Firefox
« Last post by Stoic Joker on July 25, 2008, 07:47 PM »
Nice that you've been able to reproduce - it's such a bizz when you can't, or it's only possible intermittently. So, I guess the trick is to make a request with IE, another with working-FF, and a third with faulting-FF, and then check the server logs. At least that's what I'd do, but I'm no web developer, mind you :)
Me either man, I'm a Network/Server Admin and I prefer to work in C++ on system utilities...I only do the website stuff with a gun to my head.

The part that was killing me was yesterday I was on the phone with our (official) company web guy who was using FF2 while I was using IE7 We were both coming from outside the building (in-house server) him from home & me using RDC, both doing forced refreshes, I loaded fine, and he failed consistently.

An exhaustive review (I'm talking 4 hours) of the server logs showed that 90% of his activities, and 100% of the outage reporters activities did not appear in the logs (even tho I have full logging enabled). I even used the time stamp on the Email he'd sent (to a constantly monitored mailbox) from the web form to match up the records and there was nothing there except for my internal visit (which was logged) 10 min after shit hit the fan.

So how the hell we managed to break half of something I've not a clue. So here's the weird part... Last night I managed to over complicate the diagnosis by noticing that there were Win updates available for the server ... Which of course required a reboot. now here's the now clear in retrospect time-line of the misc relevant events:

I exasperated toss FF3.0.1 in an XP VM and load the site correctly.

Trying to troubleshoot an issue that I know is impossible, I Email my results to the web guy hoping to confirm the results as I've no clue what version of FF he's using.

I go watch TV and wait for response from web guy.

Knowing I'll never be able to sleep I start dinking with the server notice and run the updates (server restarts...).

Web guy gets Email in morning, grabs latest copy of FF to confirm my results, him not knowing and me not thinking about the relevance of the restart (ShiT...) "we" both (separately) conclude that the issue lies with FF2.

Now the fun ensues... because I'm do to start a much needed vacation - so I gota get this MF fixed NOW!!!

I go at the Logs with a vengeance.

The anomalously missing log entries begin to paint a picture of some manner of intermittent systemic error ... This type of occurrence generally makes one thing of restarting something ... I go googling for an old copy of FF, install it on a Win2k VM, and confirm my now very strong suspicion that I'm a Friggin Idiot.

Problem Solved.

Because no matter how close one get to attaining a goal, there is always plenty of time for things to go horribly wrong... :)

6021
Found Deals and Discounts / Re: Truspace 7.6 Available for free download
« Last post by Stoic Joker on July 25, 2008, 02:28 PM »
Wow! I guess now I can afford to try and figure out how to use it.
6022
Living Room / Re: July 25th - Happy SysAdminDay you poor b*stards
« Last post by Stoic Joker on July 25, 2008, 02:22 PM »
Happy System Administrator's Day Gothi[c]


I finally got our company web server straightened late this morning ... and as usual nobody said shit. LOL
6023
General Software Discussion / Re: Windows "safely remove device" thingie
« Last post by Stoic Joker on July 25, 2008, 02:16 PM »
A tool I have not used recently, but which I think would also help is the free utility Unlocker which can be found here: http://ccollomb.free.fr/unlocker/
Unlocker, truly one of my favorites and it works on x64. 

Actually left clicking (having three less steps) is a hell of a lot faster.
6024
General Software Discussion / Re: Windows "safely remove device" thingie
« Last post by Stoic Joker on July 25, 2008, 11:00 AM »
Also, if you get the "device busy, cannot unmount" error, try using the handle tool from sysinternals - it will often show you which program is the sinner. Doesn't always work though, which puzzles me; I'd really like to know what has the device locked in those situations.

I've had a Command Prompt do that to me a few times, if it's open on that drive letter with nothing running for awhile.
6025
Developer's Corner / Re: ASP Error 0126 -vs- Firefox
« Last post by Stoic Joker on July 25, 2008, 07:59 AM »
New developments; Discovered how to reproduce error!

Okay... working 2 pronged attack, I'm going over the logs and for some reason I can not locate the user in questions session ... even tho it has to exist because he sent the report via the sites web form (the server is set to log everything).

And, The user specified that they were using FF3, I had installed FF3.0.1 on the test machine. Our other Dev guy just informed me that he was using FF2.02 during yesterday's testing (when it failed), but had installed FF3.0.1 and the site is now loading fine for him.

So... Apparently it is only FF3 and under that is failing to load the page.
Pages: prev1 ... 236 237 238 239 240 [241] 242 243 244 245 246next