topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Tuesday April 23, 2024, 2:42 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Stoic Joker [ switch to compact view ]

Pages: prev1 ... 236 237 238 239 240 [241] 242 243 244 245next
6001
Living Room / Re: Numeric Format Strings in C++
« 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

6002
Living Room / Numeric Format Strings in C++
« 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

6003
Okay, so I was the only one who thought it was a cat that was good at hunting mice...

*Sigh*

6004
Living Room / Re: What printer?
« 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.

6005
Living Room / Re: which operating system you like most....
« 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.

6006
Living Room / Re: What printer?
« 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.

6007
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...? :)

6008
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... :)

6009
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.

6010
Living Room / Re: Skimp or splurge?
« 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...).

6011
Living Room / Re: Skimp or splurge?
« 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... ;)

6012
Living Room / Re: Cuil search engine
« 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

6013
Living Room / Re: Cuil search engine
« 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.

6014
Living Room / Re: The InfoWorld Programming IQ Test
« 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.

6015
Developer's Corner / Re: ASP Error 0126 -vs- Firefox
« 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... ;)

6016
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...

6017
Developer's Corner / Re: ASP Error 0126 -vs- Firefox
« 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... :)


6018
Wow! I guess now I can afford to try and figure out how to use it.

6019
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

6020
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.

6021
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.

6022
Developer's Corner / Re: ASP Error 0126 -vs- Firefox
« 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.

6023
Developer's Corner / Re: ASP Error 0126 -vs- Firefox
« on: July 25, 2008, 05:30 AM »
justice - I already ran across that page, enabling Parent Paths is only required if you're using the include file "../dir/file.ext" syntax. Parent Paths is the (flawed) feature that was used/exploited by Nimda, CodeRed and a few other server targeting broadcast bast viruses. So I never use it on a prodiction box.

f0dder - No I haven't checked the logs yet, but I'll do that when I get to the office this morning. Last night I installed FF on a XP SP3 VM and took it to the site only to find it was working fine ... for me ... which was no help at all as trying to troubleshoot a non-reproduceable error is a great way to break something (e.g. I was a bit PO'ed and decided it was best to just go watch TV).

I'll post what I find in the logs later this morning, now that I'm calmer... :)

P.S. Thank You - I'd been hoping to get your input when I originally posted.

6024
Developer's Corner / Re: ASP Error 0126 -vs- Firefox
« on: July 24, 2008, 10:34 PM »
Hence my quandry...

The visitor that reported the error was using Firefox, Safari, & OSX 10.5. Now Safari borking anything doesn't surprise me, but Firefox is written by folks that actually know what they're doing. And as already stated it's (an include statement in) a Server Side script (nothing client side)...which is supposed to make the scenario impossible. The site at that point uses only the browser session info, and the page just loops back to itself with SQL querys for different product types (e.g. it's really basic).

*Sigh*

I verified the page was working (in case the server glitched) and all was fine (in IE), I stepped outside the building (server is in-house) and tried the page from my home office which was also IE & fine. Our primary web developer (I'm more the server admin/backup coder), who always runs FF on a test machine, went to the site while we were on the phone and said it did indeed fail (ASP 0126) when loaded in FF ... even tho it was loading fine for me in IE.

So... Site broken -> Owner of company staring at me -> standing there with my D**k in my hand.

...Happy Times ...Not!

I know it "Can't" happen, but I've got a credible source verifying that it is happening.

6025
Developer's Corner / ASP Error 0126 -vs- Firefox
« on: July 24, 2008, 03:35 PM »
Okay... I'm sure most folks will recognize ASP 0126 as the (server side) include file pathing error. The "catch" here is that not only is the path correct, the page loads flawlessly when using IE (5, 6, or 7).

Firefox on the other hand is tossing out the an ASP 0126 error (apparently) all by itself... Now how the hell a browser is managing to run afoul of a Server Side Script I've not a clue.  But I'm open for suggestions if anybody has an idea on what may be happening.

Thank You,
Stoic Joker

Pages: prev1 ... 236 237 238 239 240 [241] 242 243 244 245next