jwenting 1,905 duckman Team Colleague

There is no goto in Java and for a very good reason.
You should not work the way you propose, you should instead call a different method from each condition instead of jumping to a fixed position in the same method.

The same goes for C as well. Though goto is available there its use should be (and is by most people) actively discouraged except under extreme conditions where the few microsecond performance difference between a direct jump and a function call make a critical difference.

For that reason goto is a reserved word in Java but its use will generate a compiler error.

jwenting 1,905 duckman Team Colleague

actually itoa is standardised in C++

jwenting 1,905 duckman Team Colleague

Use your favourite search engine with the query "how to as questions".
One of the first pages listed will be: http://www.catb.org/~esr/faqs/smart-questions.html which explains very well how to ask questions and why questions asked like yours won't get you the answer you're screaming for.

jwenting 1,905 duckman Team Colleague

graphics.h is a very old library for doing graphics in DOS with Borland C++ 3.x.
It's not supported under Windows, and the compiler isn't supported either.

jwenting 1,905 duckman Team Colleague

I did report this thread to the site administrators... If it had been my site I WOULD have contacted law enforcement.

jwenting 1,905 duckman Team Colleague

I guess you are talking about programming in an environment with a GUI. But I am still using lots of programs from times
where no such thing as a GUI was available. In such an environment clrscr() was very useful to provide something that gets close to a GUI.
This thread is about porting not about redesign. :)
K

no, I'm SPECIFICALLY talking about programs in a commandline environment.
There's ways to have a fullscreen application in those too, unless your operating system and hardware are from the mid 1970s or before.

It's about porting but during ports errors in the design should be addressed and the clrscr command is used in error (in fact its very inclusion in compiler libraries could be considered an error on the part of the compiler writers).

NEVER clear the screen in a commandline environment. That screen isn't yours, you're expected to graciously share it with everyone else.

You should in fact not expect any output to ever reach the screen at all. Redirection to file is extremely common, especially in a Unix environment. Redirection to printer is also quite possible.
Clearing the screen in those situations makes no sense as the file or printer cannot be cleared. Therefore using a command to clear the screen doesn't produce predictable results, therefore its use constitutes a bug.

Bugs should not be ported therefore removing the clrcscr is a required step in the porting process.

jwenting 1,905 duckman Team Colleague

wrong forum would be the first thing that's wrong with it...

You don't need that reader either.
And then your calculation will of course always yield an integer value as you're working with only integers.

jwenting 1,905 duckman Team Colleague

you're going about it wrong but you probably knew that already.

Here's what to do (I leave it to you to translate that into C++):

declare variable for smallest value
declare variable for largest value
set both to first value in the file
while there's more data
    read new value
    if smaller than smallest set as smallest
    else when larger than largest set as largest
wend
close file
jwenting 1,905 duckman Team Colleague

Don't attach things, I won't open them.

Most likely you didn't place the select inside an html form which would cause the value to not be passed in the request.

jwenting 1,905 duckman Team Colleague

no, all she says is that clrscr() is in almost all cases it is used used incorrectly and without being needed.

Its SOLE use is to clear the screen in console applications. BUT, console applications should NOT clear the screen, they should instead assume that the screen is not in any way under their control!

There are NO reasons for a console application to clear the screen. If you need total control of the screen you should not be writing a console application in the first place.

jwenting 1,905 duckman Team Colleague

headerfiles are not compiled, clear and simple.

.o files are compiled compilation units which have not yet been linked, header files are not compilation units.

jwenting 1,905 duckman Team Colleague

all compilers should recognise a core set of operations.

If you're using a very old compiler you're in trouble as those preceed that standard and won't implement it.
If you elect to use custom libraries for a specific compiler you deliberately abandon compatibility.

You're doing both.

- Learn STANDARD C++, not some compiler specific enhancements.
- LEARN the language, don't think you can program when you can get code you got from someone else to compile.
- use code tags when posting code. I (and many others) won't read any code that doesn't use them.

jwenting 1,905 duckman Team Colleague

You could do worse than install Ubuntu.
Based on Debian, arguably the best distribution around, but made more userfriendly (especially the installation and tools integration).

jwenting 1,905 duckman Team Colleague

What I meant was that you should check the value of the variable because it probably is 0 and therefore nothing will get printed...

Either that or your frequencies are all so low that (when divided by 2 in your case) the result is less than 1 so gets rounded to 0 and again nothing is printed.

jwenting 1,905 duckman Team Colleague

hmm, so C does support local UDFs inside methods?
Never too old to learn I guess :)

jwenting 1,905 duckman Team Colleague

In my experience the vast majority of all problems people have with any OS and hardware are self-induced.

People overclock their systems, install unstable hacked beta drivers because someone told them those are faster, plug in hardware without reading the installation instructions (or not comprehending them when they do read them), and then blame Microsoft for making a bad product.

Apple has it easier in that respect in that they have far more control over the hardware their customers are running.
Linux also has it easier because it's mainly used by people with more knowhow as well as having a lot less hardware and application support overall and therefore less chance of users messing it up.

Personally the only OS crashes I've had since upgrading to Windows 2000 back in 1999 that weren't caused due to bugs in (usually) 3rd party applications were due to hardware problems (last weekend for example an overheating videocard that caused my PC to reset itself every few minutes, faulty power cable to the fan, can happen to any computer).

I've been thinking of getting me a Mac on the side, but a cheap one.
Not to become my main machine (doing development for Windows and modern Java versions not supported on Mac that's impossible even if I wanted to) but to play with (like my Linux box which is also to play with).
Thinking of either a used iMac (can get some reasonably cheap) or a new …

jwenting 1,905 duckman Team Colleague

Check out the value of numofAsterisks.
Most likely it's 0...

jwenting 1,905 duckman Team Colleague

no, UDFs are defined outside methods in C and C++.
In Java you could have created an inner class similar to this, in C++ that's not allowed.

Something like

#include <iostream>
#include <string>

struct student
{
    std::string name; //name of student
    int SSN; // social security number
    std::string cardtype;
    float balance;
};

int main()
{
    student students[10];
    for (int i = 0; i <= 10; i++ )
    { 
        std::cout << "Enter student name\n";
        std::cin >> students[i].name;

        std::cout << "Enter social security number\n";
        std::cin >> students[i].SSN;

        std::cout << "Enter card type\n";
        std::cin >> students[i].cardtype;
    }
}
jwenting 1,905 duckman Team Colleague

Use code tags.
Tell exactly what's going on and what's going wrong.

I'm not going to read through a hundred lines of malformated code to look for a typo or a missing statement, point me to the correct 10 lines or so and I may take a look.

jwenting 1,905 duckman Team Colleague

did you reboot after you plugged in that other mouse?
PS/2 plug devices (which your mouse is) won't usually work until the power has been interrupted on the bus.

If you have you either have 2 bad mice or you may have a faulty PS/2 bus or controller.
As you can use USB or (if you still have a serial port) serial rodents it's not much of a problem, more of an annoyance.

jwenting 1,905 duckman Team Colleague

If you need basic tutorials you won't master both languages enough to be commercially viable in 6 months.

Narue mentioned the one C++ book you MUST read and understand.
I don't think there's a single similar book for Java, it would be too thick ;)
Simply put: there's no way to master Java in 6 months, as there is no way to master C+ in 6 months.

Get yourself Head First Java which will give you a good start but you can read a library full of books and still be a grasshopper.

jwenting 1,905 duckman Team Colleague

FC-PGAx is Celeron, PPGA is true Pentium.
Celerons are feature limited lowcost versions, a lot slower than their true counterparts.

Good enough for desktop machines in most companies or for people who just want to browse the web and maybe write some letters, but not for highperformance games or graphics (for example).

jwenting 1,905 duckman Team Colleague

I doubt MS is going to help you, but it can't hurt to try. You might have better luck contacting the manufacturer of the computer. I have an e-Machine that I had this problem with once; I called them up and they gave it to me in just a few minutes.

Without a CD, how are you getting to the "enter your product key" page?

For OEM software Microsoft will (quite rightly so as that's the support contract for OEM software) tell you to contact your hardware vendor.

I have an idea where that CD may have come from, there's so many "backup copies" available from friends and friends' friends...

jwenting 1,905 duckman Team Colleague

>>My teacher told me that tutoring was my problem and good luck basically
>You have a poor teacher. I suggest you report him, because he's not doing his job.
Maybe the teacher meant that his problem is that he doesn't pay attention in class, instead browsing the web all day :)

jwenting 1,905 duckman Team Colleague

My PC takes an eternity to boot but not because of any sound.
It's the plethora of USB hardware I've installed, all of which needs to be powered up and initialised that causes the 5+ minute bootcycle...

jwenting 1,905 duckman Team Colleague

Did you really pay for the license?
If you have no CDs, no certificates, no nothing it sounds like you didn't.
If you got a preinstalled machine and were billed for Windows you may well have been ripped off by a store installing pirated versions of Windows (it happens more than you may think) as they should have supplied you with at least a certificate which would mention your key (this is usually a sticker on the side of your PC these days) and possibly with a CD as well (depending on the installed OS).
They should also have included a CD image on the harddisk so you can create your own recovery CD.

PS, screaming in all caps isn't going to make people like you any better.
PPS, hijacking other peoples' questions for your own is seriously frowned upon.
PPPS, asking for private assistance is seriously frowned upon.

jwenting 1,905 duckman Team Colleague

Very much so. He kind of got buried under the rug after he abruptly left western culture (and his music career) to become a Muslim.

yes, though that was largely self-imposed I think.
Any musician who doesn't produce and tour gets ignored by the media and the media determine what people buy.
I've one colleague who used to work for the organisation that determines the top-40 chart (the most influential here).
They CLAIM to be based purely on popularity but reality is quite different.
The top 20 spots are decided solely on payment figures. The record company who pays the most gets their artist the #1 spot for the week.
The lower 20 are based on the number of times a record has been performed on radio and TV (and the decisions on what to perform are made largely based on again payment from record companies).
Non-producing artists are unlikely to sell a lot (after all, most potential customers already have the stuff) so don't get exposure in the charts and media. As a result few new customers develop for those artists, causing them ultimately to drop out of view completely except for maybe stations playing oldies and classics.

He's lately re-emerged, but last time he tried to enter the US he was denied by a terrorist watch list. He staunchly denies being a terrorist.

Wouldn't you deny being a terrorist?
Not saying he is one, but just a man's denial of …

jwenting 1,905 duckman Team Colleague
10 a=1
20 if (a=1) goto 10

Loopy enough? Not Java of course ;)

jwenting 1,905 duckman Team Colleague

Discreet (Autodesk) have a free modelling tool called GMax you can download from their website (and is also distributed by many games these days).
Aimed squarely at computer game users and manufacturers to create objects for a 3D gaming environment it's highly powerful and relatively easy to use.

Not sure if you can easily export the models to other formats, if not you could just export them to your favourite game (check the game for instructions, it usually comes with the tools) and use that as a rendering engine.

As to povray, it's a nice tool. Didn't know it still was being updated, not used it in years.

jwenting 1,905 duckman Team Colleague

Cat Stevens is good isn't he?
I work better with music shutting out the environment, which is why I often work with headphones on.
At work I've got some dozen of so CDs imported into iTunes ranging from Townes van Zandt to R.E.M. and occasionally swap some of that for others.

jwenting 1,905 duckman Team Colleague

Are you too cheap to want to spend some money on keeping your system secure?

I've seen and tried free and cheap antivirus solutions and they don't do much of anything except giving you a false sense of security (especially against new virusses, some are moderately effective against old ones)..

jwenting 1,905 duckman Team Colleague

Ask them...
There may be sites where people can post their stuff for others to submit as their own (homework cheating...) but I wouldn't know where to find them and wouldn't mention them if I did as I frown upon such practices.

jwenting 1,905 duckman Team Colleague

It'd be even FUNNIER if it was true! :D

hmm, secretary files charges for sexual harassment. Wife files for divorce. Man is fired from his job.

Doesn't seem all that funny to me.

jwenting 1,905 duckman Team Colleague

And of course they'll record and analyse every call you make to strengthen their personal profile on you just like they do with gmail and searches.

Thanks but no thanks.

jwenting 1,905 duckman Team Colleague

There should be detailed instructions included with the flash software. Follow those TO THE LETTER.
Also remember that you will need the exactly correct version of the upgrade file. Just the correct chipset or card version isn't enough, most flash updates also are for a particular version of the currently installed BIOS.

Most refusals of BIOS upgrades to work are due to trying to use an incompatible upgrade package.
If the flash does start, do not interrupt it for anything! If you do your card will likely be useless and only the manufacturer will maybe be able to revive it.

Best thing to do with BIOS: leave it alone.
Unless there's a critical flaw in it that requires an upgrade to fix there's almost never a good enough reason to take the risk of loosing your machine (or in this case videocard). The only reason I ever flashed a BIOS was to fix a Y2K bug in a mobo for example.

jwenting 1,905 duckman Team Colleague

Anyway, a $30 is nothing.
I'm sitting here with some €250 worth of controllers and am looking longingly at another kit worth some €1500.
There's another €250 or so worth of controllers I don't use anymore (2 units plus a spare for one of them that's flaky) and may at some point decide to replace with a new €400 set...
On the side I've some €1000 worth of extra devices I purchased for just one application...

That's all dedicated flight simulator stuff, some of the more expensive hardware to add to your PC.

jwenting 1,905 duckman Team Colleague

install the API docs.
Look up DateFormat, SimpleDateFormat, java.util.Date, and Calendar.
Using those you can do what you want quite easily.

jwenting 1,905 duckman Team Colleague

I'm with Alex here. If my site were a commercial venture I'd pay for that if it were commercially viable to do so.
If it isn't, word of mouth is excellent advertising. If it's a hobby site you're probably a member of some of the other associated sites with that hobby. Most offer link exchanges for hobby sites (even the commercial sites often have these for free for noncommercial ones), put the URI in your forum signatures, etc. etc.
Far more effective than paying for it for the simple reason that many people will not click on advertising banners or sponsored links in search engines but will visit a site referred to them by a friend or a site they trust for no reason other than that the referrer liked the site.

jwenting 1,905 duckman Team Colleague

While theoretically possible (after all, the factories do it ;) ) there is a major snagg and that's the availability of parts (meaning: there are none to be had).

For schoolwork you don't need massive power, it'll be mainly word processing, a bit of spreadsheet work, programming, and maybe some simple graphics for illustrating papers.

Nothing any laptop on the market cannot handle, after all they're built as office machines and that's exactly what office machines are good at...

A decent laptop can surely be had for that money, just go to your nearest computer superstore or MediaMarkt (are they in Norway yet? they seem to be appearing all over Europe) and take a look around.
Do stick with the major brands like HP, Acer, Toshiba, and IBM, as the support and quality on the nonames like Packars Bell and more obscure brands is often very poor.

You will want a machine with some expansion capabilities. For example the option to fit a second harddrive or more RAM.
Decide on whether you want a CD or DVD burner in there. Usually you cannot replace the unit once installed so better choose wisely (it may be better to get a cheaper unit with just a CD drive and later buy an external writer with a USB or FireWire connection.
Built in network card is now pretty much standard, but units with wireless network cards and/or Gigabit lan are starting to appear. Do you want …

jwenting 1,905 duckman Team Colleague

the h file contains the declaration of the functions in your intarray.c file.
by also including the h file into other c files you can make those functions known without having to rewrite them. Just compile them once and tell the linker to include the compiled file when linking your application.
How to do that is compiler dependent, I guess your teacher will have provided instructions.

jwenting 1,905 duckman Team Colleague

read all three. Check whether first > second and second > third.
Based on those 2 comparisons you should know whether the third comparison (first > second) is needed or not.
If it's not needed you should know which number is the greatest.

This is the same for any language...

jwenting 1,905 duckman Team Colleague

Installed a new videocard today.
Plugged in the powersupply as directed (since when do videocards need powersupply anyway...).
Turned on the PC, start MSFS2004, marvel at the graphics.
5 minutes later my screen goes black and the PC boots itself.
Try again, same thing.

Turn it off, check everything again, find that one of the leads from the powercable isn't properly seated.
Reseat the lead, reconnect the cable, and all is well.

So if something seems right but still your system doesn't work: check your cables!

jwenting 1,905 duckman Team Colleague

Overclocking is indeed dangerous, and unless you take massive risks usually yields only minimal results.

You basically change settings in the hardware to override things like clockspeeds and temperature constraints.
These settings are made in the factory to assure the product works well and doesn't get damaged by overheating or overvoltage.
Manufacturers of course build in safety margins in their products. Overclocking reduces or completely removes those safety margins.
Some hardware suppliers selling ready made CDs unscrupulously buy lower spec hardware and overclock it, then sell it for the price of the faster (more expensive) hardware it now appears to be to the uninformed.

My advise: don't do it...
At best you get a small performance increase for the price of a system that breaks down more quickly and crashes more frequently, reducing the lifespan of your PC.
At worst you break expensive things like the CPU and videocard while trying (and remember that any overclocking will void your warranty!).

jwenting 1,905 duckman Team Colleague

Most GOOD documentation is always restricted information inside companies.
Check out the Apache project, I think there's documentation for Tomcat and/or other of their projects online. If the docs are as good as (most of) their software they're OK.

Have you read "J2EE design and development" by Rod Johnson? It's IMO required reading for anyone involved in desiging a J2EE system.

jwenting 1,905 duckman Team Colleague

heard it before, it's one of those things making their way around the net.
Still funny though, unless it's true.

jwenting 1,905 duckman Team Colleague

if the screen is producing X-rays or whatever in large enough quantities to damage the molecular structure of the plastic casing (which is what the discolouration is) it's likely to be severely malfunctioning.
This can well have an effect in for example the refresh rate (which at incorrect settings can cause headaches) or the sharpness of the image (again, can cause headaches).

If you've traced it to the cleaners, then all's fine ;)
We've had to introduce a policy telling the cleaners to keep their dirty hands off of our computers and screens because they kept damaging them.
They had a habit of using copious amounts of water to clean everything, causing monitors and computers to short out.

jwenting 1,905 duckman Team Colleague

it can be done.
Reading the data itself isn't hard, the hard part is finding out what part of the data is the relevant part for you (and if they're as sneaky as we were they change the html regularly to make it impossible to automate the process).
It would be tantamount to stealing as well.

They have to pay for that data too, so it's only natural they want others using the data to pay as well.

jwenting 1,905 duckman Team Colleague

You'll have to write your own parser for that. I know of no language that will allow you to do this with just one command.

The easiest would be to leave the number as a String (maybe pulling a validation over it to make sure it can be parsed into an int if that's a requirement, printing it out digit by digit using charAt() and putting the required number of spaces in between.
Something like

String getSpacedString(String inp, int numSpaces)
{
  StringBuffer buf = new StringBuffer(inp.charAt(0));
  for (int i=1;i<inp.length();i++)
  {
    // do your magic here, that I'll leave to you. It's quite simple really ;)
  }
  return buf.toString();
}
jwenting 1,905 duckman Team Colleague

Yes you can, but it is likely against the accaptable use policy of the site.

What you'd have to do is use an HttpURLConnection to retrieve the page containing the data you want and extract that which you want.

A more appropriate solution is to contact the site owners and ask whether they have data available for download.
They will likely charge a fee for this or tell you to contact their supplier (as most sites get the data from elsewhere and do have to pay for it).
On getting permission you'll then be given a place to download the data and a description of the data format which you can then use to create a parser for it.

The same system can be used for other data as well.
For example, when working for a major bank I built software to download stock quotes, charts, economic news items, etc. etc. from various sources for consolidation on their website.

jwenting 1,905 duckman Team Colleague

1) monitors give off X-rays. These can be detected by a Geiger counter if it's sensitive enough.
You apparently don't know much about EM radiation or you'd know this.

2) monitors are now shielded which reduces the emissions greatly. If that shielding is not working properly radiation can still get out.

3) either can do it easily. Both UV and X-radiation are EM and will affect plastics. Just because you are more familiar with UV radiation doing it doesn't mean it's the only cause.

--

5) UV can harm people as well and not just if it feels warm

6) it's possible though. What is more likely is the same defect to the hardware having 2 different effects, one of which shows up as the user getting headaches and the screen being discoloured.