jwenting 1,905 duckman Team Colleague

http://jakarta.apache.org and look for POI.
It's not perfect in that it doesn't understand all capabilities of MS Word but it understands pretty much all core capabilities.

jwenting 1,905 duckman Team Colleague

cin returns itself, not the thing(s) it reads from the input.

jwenting 1,905 duckman Team Colleague

sorry, it's proprietary to the company.
But it's not hard to create something similar with a bit of thinking :)

jwenting 1,905 duckman Team Colleague

no, since there is no "the" C/C++ ebook.
But there's a lot of good books here: http://www.daniweb.com/techtalkforums/newpostinthread10232.html

jwenting 1,905 duckman Team Colleague

you forgot the wait(1000000000); instruction ;)

jwenting 1,905 duckman Team Colleague

hmm, what about automatically adding timestamps and fixed formatting, multithreaded writing to a file, consistent formatting of arrays written to the log, etc. etc.

jwenting 1,905 duckman Team Colleague

That's the problem with your purely linear way of doing things.
Create a parsetree and recursively process it from the inside out.

jwenting 1,905 duckman Team Colleague

Norton is utter crap. As HV says their "protection" is extremely weak, and their applications are extremely intrusive.

BlackICE is just as bad though. Misses serious intrusions and reports things that are quite harmless.

jwenting 1,905 duckman Team Colleague

Haven't seen them in days past either. Could be because I block scripted ActiveX and I did get a few attempts to run those in the past few days.
My popup killers didn't report blocking anything...

And yes, I use IE as well (and have never had a spyware/trojan/whatever infestation since 1997 when I started using the net).

jwenting 1,905 duckman Team Colleague

Oh, there's System.out.println() which is what everyone used before dedicated loggers became available.
We created our own logging API, another favourite passtime in days past.

jwenting 1,905 duckman Team Colleague

:1,$s/bug/feature/g

jwenting 1,905 duckman Team Colleague

have you ever looked at the API docs for Java?
There's a very comprehensive entry on the String class, which contains quite a few handy functions including substring, split, indexing functions, etc. etc. etc.
Then there's a lot of other classes that provide String handling and manipulation functionality.

Maybe if you spent more time studying and less time waiting for answers to your questions (you can even combine the two activities quite well) you'd figure such things out more quickly.

The API docs can be downloaded from Sun, where you'll also find the Java Tutorial which, though not perfect, is rather good.

Next I'd recommend you purchase and work your way through a book: Head First Java by Kathy Sierra and Bert Bates, which is published by O'Reilly.

jwenting 1,905 duckman Team Colleague

VI is excellent. It's my default lightweight editor (not in the least because I do a lot of work remote at customer sites and our own Unix servers where all I have is a terminal window).

jwenting 1,905 duckman Team Colleague

You can't, and you don't want to.

Once your application ships you want to be able to get some logs when there's a problem at a customer's site.

To get that build your application to log those messages to some file.
If you create a logger with different logging levels you can turn on different levels of logging at runtime by changing a config file or command line option.

Java has (from 1.4 onwards) a quite comprehensive logging framework built in, or you can use a 3rd party framework like Log4J.

Logfiles should at the minimum list a timestamp with every entry so you can trace what happened where, and best also a very good indication of where the entry was created (just using this.toString() is a good start, line numbers can help as well).

jwenting 1,905 duckman Team Colleague

or just page back a page or so in this very forum.

Your question comes up and is answered in some detail at least once a week. In fact it happens so often it gets kinda tiring...

jwenting 1,905 duckman Team Colleague

basic will just teach poor programming practices... It's just too basic (pun intended) ;)

Pascal, Modula 2, Python, are all there and far better suited for the beginner.

jwenting 1,905 duckman Team Colleague

The classes Integer and NumberFormat have functions for converting between decimal, hex, octal, binary, and pretty much any other system you can think of.

No need to do it all yourself, it's right there in the standard API!

If you want individual digits out of a string converted, just take substrings of 1 character long and you're home (almost) free.

jwenting 1,905 duckman Team Colleague

no, you're not implementing your own industry standard for the very reason that a standard is something that's generally accepted and used which your solution won't be ;)

Unless you know very well what you're doing the best bet is to take an existing framework as the basis of your solution.
JDO, Hibernate, EJB even (though I'd advise against that in all but extreme cases) are often good solutions.

I know it's hugely gratifying to roll your own solution (and it's what I tend to do in many cases I admit) but it's not always the economically best solution (and unless you're very good probably not technically either).

jwenting 1,905 duckman Team Colleague

When I first learned C++ the uni had just sent one teacher to a C++ course during summer recess.
He then started teaching his colleagues 2 weeks before classes started at the same rate they were supposed to teach it to us (so they were supposed to remain 2 weeks ahead all through the year), it had been deemed too expensive to send all teachers on that course...

Of course several of us (including me...) studied faster than the curiculum called for and pulled ahead of our teacher. It sometimes was embarassing to have your own teacher ask you for your opinion on things they weren't certain of themselves...

These were experienced teachers, very good otherwise. But due to budget restrictions they hadn't been properly trained in what they were supposed to teach and when saddled with students who studied faster than the course schedule called for they got stuck (but were not too proud to admit it).

jwenting 1,905 duckman Team Colleague

That's the first part of learning actually ;)
Next part (which you seem ready for) is getting a solid theoretical foundation beneath that knowledge you have.
Get yourself to a bookstore and search out some good books. There's some good reviews of books about web design and html here (though not comprehensive and not all books are current, html isn't the primary focus of the site): http://www.javaranch.com/bunkhouse/HTML.jsp

Skip anything that says "teach yourself in XXX", "for dummies", etc. (but not anything by O'Reilly, their books are almost always well worth the investment).

Online tutorials range from the very good to the extremely poor and can actually do more harm than good unless you already know enough to determine which you're dealing with...

You could also consider formal training (online or classroom courses) which can teach you more in a few days than you can in months sifting through books.

jwenting 1,905 duckman Team Colleague

Console applications should never clear the screen. They should not even assume they have sole control over the screen below the point they're started from (for example, another application running in the background may well interrupt them to write something to the output itself, this could be the JVM writing some error message for example).

jwenting 1,905 duckman Team Colleague

Most teachers that start their students out on an IDE couldn't find their way around a command prompt themselves...
It may be getting a bit better but a few years ago anyone who could turn on a computer was hired for programming jobs. Anyone with a tad more experience (say they could spell the name of the language) was hired as a teacher.
Some of those people are still around sadly and haven't learned much in the intervening period.

In India and surrounding countries we now observe the same thing starting to happen which in part explains the flood of questions to many forums about extremely basic things written in extremely poor English.

jwenting 1,905 duckman Team Colleague

IA-64 if I'm not mistaken is a 64 bit AMD CPU, that would make IA-32 it's 32 bit equivalent.

64 bits is 8 bytes, so if malloc returns data alligned on 4 bytes he's in trouble unless he recompiles.
Many compilers I think have compiler flags to set byte allignment.

jwenting 1,905 duckman Team Colleague

Overclocked CPUs don't last nearly as long as do ones running at the listed speed.
The performance gain from moderate overclocking is also so low it's not worth the trouble and severe overclocking will have severe impact on the service life of your system (cutting it down from years to months depending on how severe your overclocking is).

Also keep in mind that many AMDs leave the factory overclocked already! They're sold as suitable for a higher clockspeed than what Intel does, and as a result run hotter than do Intel CPUs of the same listed frequency.

jwenting 1,905 duckman Team Colleague

Have you ever tried to built a print preview using C/C++ ? Let me guess you simply used the SDI/MDI interfaces provided by the MFC. Am i right?

I don't use MFC ;)
I've done it using ObjectWindows though.
Can't say it was much harder than using Java...

But then I specialise in serverside background processes and web applications which don't do many printer previews and don't do any MFC or Swing at all :)

As for chainsaw - did you have a traumatic childhood??

The only troubled one here seems to be you. You're the only one after all who can't even respect that others don't share your opinion as well as being the only one whose opinion is as narrow as yours seems to be.

Before i end my post let me let me advice you guys not to be jack of all trades and master of none

Don't worry. We've enough experience to be master at at least one technology (and usually more than one) and still have knowledge of several others...

jwenting 1,905 duckman Team Colleague

I'd kinda assumed it was a snippet rather than a complete source ;)

jwenting 1,905 duckman Team Colleague

no, the installation instructions tell you to create 2 files in the bin directory of the compiler installation.
These files are configuration files for the compiler and linker which tell the compiler and linker where to find header and lib files.
Very handy as otherwise you'd have to constantly type those as compiler options...
It also tells to add the bin directory of the compiler installation directory to the system PATH environment variable so the compiler can be called from any location on the system's filesystem.

Had the OP read the installation instructions and created these files as instructed he'd have had a working environment by now.

jwenting 1,905 duckman Team Colleague

I didn't say you aren't willing to learn, just that you took the easy way out which means you didn't learn anything...

If you'd taken the time to set up your commandline properly (just a few minutes work) you'd have been up and running in no time.

jwenting 1,905 duckman Team Colleague

in fact, all compilers that I know of are free. It's the editors you can elect commercial offerings for (which often offer production enhancing features not found in the free ones).

But when learning the language, don't use a full blown IDE. Those prevent you from learning important concepts like package structure and classpaths.

There's a ton of questions being posted in Java forums constantly by people who claim to have been using Java for years yet when faced with a commandline don't even know how to call the compiler...

jwenting 1,905 duckman Team Colleague

Did you recompile it for your 64 bit architecture?
If not maybe the compiler optimised away the sizeof(int) causing malloc to allocate space for a 32 bit int.
Then when you run on a 64 bit system where the assignment would try to write a 64 bit number, boom.

Just speculation but could be worth looking into...

jwenting 1,905 duckman Team Colleague

I liked Python as a TV show, but is there anybody out there that likes it as a language?

I do. Haven't used it much (no opportunity really, working fulltime on Java development and studying for Sun certification, plus keeping up with developments) but it's a nice language (and a decent Java binding too, albeit outdated compared to the standalone version).

jwenting 1,905 duckman Team Colleague

And so you've not learned a thing...
You still don't know how to use the compiler for example, which is what was your problem in the first place.

You took the easy way out which was to install an IDE with all its wizzards to do the work for you. Next time you're somewhere where you don't have that option you'll again be lost and come here asking the exact same question all over again.

NOONE should use an IDE unless and until they can do anything it does themselves, you haven't reached that stage yet and now you likely never will.

jwenting 1,905 duckman Team Colleague

yes, he clearly didn't follow the installation instructions.

As where to find a good compiler: you have one, you just have to use it properly which your failure to read the installation instructions shows you're not doing.

jwenting 1,905 duckman Team Colleague

program helloworld;
begin
println('Hello world!');
end;

jwenting 1,905 duckman Team Colleague

easy: write them.

jwenting 1,905 duckman Team Colleague

any language will enable you to learn a loop or an if statement.
But with VB you first spent a year learning the IDE and all the nice widgets you can put on a window...

Learn the language, not the tool. Except VB prohibits that. For the same reason Delphi (which I love) should not be a first language (and in Delphi you do a lot more handcoding than in VB).

jwenting 1,905 duckman Team Colleague

Well, seems a bad design decision is coming to haunt you...
you would best look into special built hardware, think of PLCs for example.
Or get some new data acquisition cards with their own logic controllers which you can use parallel to the computer they're in.

Believe it or not but your requirements aren't unique in the world and someone somewhere will have thought of how to solve it and put it on the market.
If not it may be time to contact the electronics engineering department and get them to design the hardware you need for you.

Besides, even Windows 3.1 could not do the job. In fact, an MS DOS computer would work this job fine, until Windows 3.1 was started on that computer (they used a spreadsheet to crunch the numbers). After you quit Windows, the timing was wrong, giving numbers which were off on the order of several seconds and making the servo loop go wild. You had to reset the computer and reboot DOS to regain accuracy. The Windows drivers were still running and eating up time. We almost damaged the equipment one time when somebody forgot to reboot.

that tells me a lot about the quality of your system design, and none of it is good.

Go for a dedicated unit to do your stuff and buffers the data in an internal buffer when it's done with it.
Get a modern computer to read out that unit …

jwenting 1,905 duckman Team Colleague

Whether you get exception handling or not depends on the flavour of Pascal you're working with.

Delphi (which is Pascal with a nice IDE and stuff) for example has a comprehensive exception mechanism (though it might not have been available in the very early versions, I don't have those here to check).

Other dialects may have duplicated this over time (Borland being the de-facto standard for Pascal in lue of an official standards body).

jwenting 1,905 duckman Team Colleague

>it will take the ASCII value of a which is 97
We don't care whether you know what the integer values of the ASCII characters are. Stop assuming a specific character set. Geez, how many times do I have to repeat myself before you people get a clue?

And NOW we have you Narue.
IF ASCII is explicitly referred to it will ALWAYS be the same because ASCII is a well defined set of characters and codes.
It stands for American Standard Code for Information Interchange.

If Any other character set is referred to you're theoretically correct (though many will include ASCII as the lower 127 characters).

jwenting 1,905 duckman Team Colleague

in that case the store deals in pirated software and is breaking the law (not surprising as many especially smaller stores do just that).
He probably installed a pirated cracked copy with the activation system disabled.

Be glad your machine no longer works as it now gives you an incentive to get legal software.

and no, we're not going to help you break the law.

jwenting 1,905 duckman Team Colleague

VB is the worst language to start with as you don't learn programming, you learn the tool. Just painting a few forms on a screen isn't programming... And hooking them up by writing a few lines of code in an event handler isn't programming either.

A good language would be Pascal or Java, though Python is also gaining exceptance with teachers for its simplicity.

jwenting 1,905 duckman Team Colleague

Well, all methods in ArrayUtilities are static so can be called without an instance.
In fact, using a call of one of them on an instance could result in a warning (depending on compiler settings).

Compiling them doesn't give any errors at all here if they're (as they should be) in the same directory.

So it's no problem in the code.
try compiling using

javac -classpath . ArrayClient.java

and see what happens.

jwenting 1,905 duckman Team Colleague

146 compiler errors

jwenting 1,905 duckman Team Colleague

yes, removable disks work well. I've done that in the past several times for test machines.
Have harddisks with different OSs, different versions of the software under test.
Just swap in the one you need and get going, apart from the stuff on that disk everything in the machine is guaranteed to be identical between test runs...

jwenting 1,905 duckman Team Colleague

do the cast only if it really is an HttpURLConnection of course, but basically yes.

jwenting 1,905 duckman Team Colleague

what's this got to do with C(++) programming?

jwenting 1,905 duckman Team Colleague

make an hashmap of pointers to the variables with the name of the variable as the key.
You can then simply look up the pointer by the name of the variable, dereference it, and you have your variable back.

jwenting 1,905 duckman Team Colleague

what does it do? and what should it do according to you?
and use code tags, I won't read any code that doesn't use them.

jwenting 1,905 duckman Team Colleague

You can't run them at the same time if that's what you're thinking of (well, actually you can run one inside the other as a virtual machine if you get some special software but that's probably not what you were thinking of).

You can install them so that you can select which you want when booting, but it's a bit tricky.
Personally I've never tried it, but searching the web for "dualboot linux xp" should give plenty of starting points.
Also look for specific info on installing and running linux on your laptop. They are finnicky machines and quite often there's problems that need some lowlevel tweaking to resolve.

jwenting 1,905 duckman Team Colleague

I'm an apostate!
My god is O'Reilly and his prophet is Amazon ;)
Though I must admit I sometimes sin and worship the others whom Amazon also preaches.