The problem is that i is outside the scope of the loop. However, it is only needed within the loop. If you don't have any other loops in the vicinity, then you are okay, but consider this:
Iterator i = obj.iterator();
while (i.hasNext()) {...
} ...
Iterator i = obj.iterator();
while (i.hasNext()) {...
}
Whoops, this doesn't compile. There's a few ways out of this:
Iterator i = obj.iterator();
while (i.hasNext()) {...
} ...
i = obj.iterator();
while (i.hasNext()) {...
}
The problem with this is that if you delete the first loop, you have the remember to change the second loop. (This is why reusing variables to do different things is not a good idea.) Here's another approach:
Iterator i = obj.iterator();
while (i.hasNext()) {...
} ...
Iterator i2 = obj.iterator();
while (i2.hasNext()) {...
}
The problem with this is that you might forget to change all references from i to i2. Now consider the "standard" solution:
for(Iterator i = obj.iterator(); i.hasNext();) {...
} ...
for(Iterator i = obj.iterator(); i.hasNext();) {...
}
Here, each Iterator is in its own scope and you can easily refactor one loop without dealing with the other.
If you see a reference in the code to Session, you will either
know exactly that they are referring to javax.jms.Session and either know its API or be able to look it up in the docs. In this case, you don't care about the import statements.
or have never heard of Session, and decide to look up its documentation. If you see at the top of the file import javax.jms.Session, then you know exactly where to look. If you just have a bunch of wildcard import statements, you have to check through potentially all the packages for java.util.Session, java.sql.Session, etc.
Also, when someone reads your code, they can browse the imports to check for specific classes you use that they are unfamiliar with. No one is going to read the entire documentation for all the packages you may have used if they only need to understand a few classes.
The gripes about typing are somewhat unfounded. Any reasonable java-aware editor will be able to automatically manage you import statements.
Remember: "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler)
There have been a number of posts complaining about how they have a new keyboard and it doesn't work in Linux. Well, though the Keyboard HOWTO doesn't mention it, these new keyboards work without modification to the standard X setup. That is to say, when you press an "internet" key, the X server recognizes this and recieves the scancode. All you have to do is map that scancode to a useful key, and presto, you have a functional internet keyboard.
Step by Step:
Swap keyboards (no need to reboot here)
Run xev. Make note of the desired key's scancode
Edit your.Xmodmap file to map the key to something useful (X provides the symbolic names F13 and above for situations like this)
Run xmodmap.Xmodmap to tell your X server about your new keys.
Configure your applications to recognize these new keys. For example, in enlightenment you can edit keybindings.cfg so that F13 starts XMMS.
Q. I don't have a home network. Will I need to get one?
A. Yes. ReplayTV 4000's are enabled by an Ethernet connection only. There are also all kinds of incredible features that work only when your ReplayTV is connected to your PC. But don't worry, home networks are relatively inexpensive and easy to install. And, to make this even easier, ReplayTV is providing, for a limited time, a choice of promotional offers including a Free NETGEAR Home Network (a $100 value), with the purchase of an RTV4080, RTV4160 or RTV4320.
The fact that you can bypass commercials still will affect a very limited number of users. Yes, home networks are relatively inexpensive (less than $2000), but your average consumer will not want to set up a firewall/router and a home network just to watch TV.
Looks like the mainstream is still bound to low quality "VHS" technology for a little while longer.
Of course the alt.binaries groups contain a lot of warez/pr0n and gernally questionably legal material. However, there is the occasional alt.binaries.calc-ti, but even google doesn't have the alt.binaries.* hierarchy. This is probably because of it's massive size yet thorough lack of textual information.
Creating object instances on the stack. In D, all objects are by reference.
Trigraphs and digraphs
Preprocessor
Operator overloading
Object oriented gradualism
Bit fields of arbitrary size
Support for 16 bit computers
This seems to be precisely the parts of C++ that Java also does away with. Furthermore, the C preprocessor is not strictly part of the C language and in fact many other programming projects use cpp for simple cut and paste includes of their favorite language. When I first read about trigraphs, I couldn't wait to try them out to make some extra obfuscated code, but alas the C compiler I was using didn't support them. In fact the lack of standards compliance is one of the main drawbacks to programming in C++ and C. If my Java code compiles on sun's compiler, then I can be assured that it will also compile on any other compiler claiming to compile Java code.
The author also mentions that D will not have any bytecodes. From a strict perspective, the Java programming language and the Java VM are two different standards and just because you typically compile Java code into (confusingly named) Java byte codes, doesn't mean you can't use one without the other. For example, anyone (who is insane) can pick up a copy of the Java Virtual Machine Specification and a hex editor and make some syntactiacally correct class files. More realistically though, java bytecodes are often targets for compiler construction classes. Also, if you use the GNU Java Compiler you can compile programs written in the Java programming language directly into machine code.
While 90% of the description of this language screams Java, there seem to be some of the more useful features of C++ thrown in (typedefs, scope operator, etc.). The only way for this to be successful, is to finish standardizing the language as soon as possible and get a reference compiler for it so it leaves the realm of theoretical vaporware. Perhaps Java might have looked more like this if the language design was revisited. However, Java has lots compilers which are much much more likely to conform to the standard than the C++ equivalents.
...scanning the adult playground the place becomes on hot summer evenings. Where else, he asks, can you walk around with a computer, surf the Web, and go utterly unnoticed?
adult playground... hot summer evenings... go utterly unnoticed... sounds like somebody got kicked out of the house for looking at pr0n.
This is a German board game that is less well known in the states, but is distributed here by Mayfair games.
This game is very well designed. The board is composed of hexagons that are shuffled each time. You have to aquire resources to build settlements, which in turn allows to build more. It has been dubbed a cross between simCity and monopoly, but is more entertaining than either of those.
There are 254 screens that wrap around Atari 2600 style. Every time you travel underground, you
advance 3 screens at a time, so a seemingly impossible game becomes possible. This map can be found at one of the better atari 2600 sites.
Once you study the map and memorize the optimal route, you just have to master the art of jumping on crocs heads and over scorpions. Since the barrels roll from right to left, it is easier to travel in that direction, but you will need to practise travelling against barrels if you hope to get the perfect score (you loose points every time you get knicked by a barrel).
The problem is that i is outside the scope of the loop. However, it is only needed within the loop. If you don't have any other loops in the vicinity, then you are okay, but consider this:
Iterator i = obj.iterator(); ...
... ...
while (i.hasNext()) {
}
Iterator i = obj.iterator();
while (i.hasNext()) {
}
Whoops, this doesn't compile. There's a few ways out of this:
Iterator i = obj.iterator(); ...
... ...
while (i.hasNext()) {
}
i = obj.iterator();
while (i.hasNext()) {
}
The problem with this is that if you delete the first loop, you have the remember to change the second loop. (This is why reusing variables to do different things is not a good idea.) Here's another approach:
Iterator i = obj.iterator(); ...
... ...
while (i.hasNext()) {
}
Iterator i2 = obj.iterator();
while (i2.hasNext()) {
}
The problem with this is that you might forget to change all references from i to i2. Now consider the "standard" solution:
for(Iterator i = obj.iterator(); i.hasNext();) { ...
... ...
}
for(Iterator i = obj.iterator(); i.hasNext();) {
}
Here, each Iterator is in its own scope and you can easily refactor one loop without dealing with the other.
Recompile your kernel with VESA VGA graphics console. Then add the following line to your lilo.conf for a 1024x768x64k graphics console:
vga=0x317Explicit import statements are generally preferred for a number of reasons. Consider the following:
import java.io.*;
import java.util.*;
import java.sql.*;
import javas.jms.*;
If you see a reference in the code to Session, you will either
Also, when someone reads your code, they can browse the imports to check for specific classes you use that they are unfamiliar with. No one is going to read the entire documentation for all the packages you may have used if they only need to understand a few classes.
The gripes about typing are somewhat unfounded. Any reasonable java-aware editor will be able to automatically manage you import statements.
Remember: "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler)
The worst problem with the current internet landscape is the proliferation of "table-based" layouts.
But what does view source reveal?
<!-- CONTENT TABLE --><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
Look no further than the HTML header for the culprit:
<meta name="GENERATOR" content="Microsoft FrontPage 5.0"><meta name="ProgId" content="FrontPage.Editor.Document">
Now that they have recognized the problem, are they or their resident Microsoft weenie going to fix it? Probably not.
There have been a number of posts complaining about how they have a new keyboard and it doesn't work in Linux. Well, though the Keyboard HOWTO doesn't mention it, these new keyboards work without modification to the standard X setup. That is to say, when you press an "internet" key, the X server recognizes this and recieves the scancode. All you have to do is map that scancode to a useful key, and presto, you have a functional internet keyboard.
Step by Step:from the faq...
Q. I don't have a home network. Will I need to get one?
A. Yes. ReplayTV 4000's are enabled by an Ethernet connection only. There are also all kinds of incredible features that work only when your ReplayTV is connected to your PC. But don't worry, home networks are relatively inexpensive and easy to install. And, to make this even easier, ReplayTV is providing, for a limited time, a choice of promotional offers including a Free NETGEAR Home Network (a $100 value), with the purchase of an RTV4080, RTV4160 or RTV4320.
The fact that you can bypass commercials still will affect a very limited number of users. Yes, home networks are relatively inexpensive (less than $2000), but your average consumer will not want to set up a firewall/router and a home network just to watch TV. Looks like the mainstream is still bound to low quality "VHS" technology for a little while longer.
Of course the alt.binaries groups contain a lot of warez/pr0n and gernally questionably legal material. However, there is the occasional alt.binaries.calc-ti, but even google doesn't have the alt.binaries.* hierarchy. This is probably because of it's massive size yet thorough lack of textual information.
After an unclean system shutdown (unexpected power failure, system crash)...
Power failures have been known to occur sometimes, but I've never had Linux crash.
from the overview page...
features to keep:All except the last is contained in Java.
features to drop:This seems to be precisely the parts of C++ that Java also does away with. Furthermore, the C preprocessor is not strictly part of the C language and in fact many other programming projects use cpp for simple cut and paste includes of their favorite language. When I first read about trigraphs, I couldn't wait to try them out to make some extra obfuscated code, but alas the C compiler I was using didn't support them. In fact the lack of standards compliance is one of the main drawbacks to programming in C++ and C. If my Java code compiles on sun's compiler, then I can be assured that it will also compile on any other compiler claiming to compile Java code.
The author also mentions that D will not have any bytecodes. From a strict perspective, the Java programming language and the Java VM are two different standards and just because you typically compile Java code into (confusingly named) Java byte codes, doesn't mean you can't use one without the other. For example, anyone (who is insane) can pick up a copy of the Java Virtual Machine Specification and a hex editor and make some syntactiacally correct class files. More realistically though, java bytecodes are often targets for compiler construction classes. Also, if you use the GNU Java Compiler you can compile programs written in the Java programming language directly into machine code.
While 90% of the description of this language screams Java, there seem to be some of the more useful features of C++ thrown in (typedefs, scope operator, etc.). The only way for this to be successful, is to finish standardizing the language as soon as possible and get a reference compiler for it so it leaves the realm of theoretical vaporware. Perhaps Java might have looked more like this if the language design was revisited. However, Java has lots compilers which are much much more likely to conform to the standard than the C++ equivalents.
adult playground... hot summer evenings... go utterly unnoticed... sounds like somebody got kicked out of the house for looking at pr0n.
Didn't anyone see the movie Conspiracy Theory?
Tracking devices have obviously been in our money since the introduction of the new money.
This is a German board game that is less well known in the states, but is distributed here by Mayfair games.
This game is very well designed. The board is composed of hexagons that are shuffled each time. You have to aquire resources to build settlements, which in turn allows to build more. It has been dubbed a cross between simCity and monopoly, but is more entertaining than either of those.
One way to learn about french is by reading things in French. All worthwhile software is usually released with French translations:
DebianGNU
But of course if you don't know any French this won't help. You can however, check out this tutorial.
There are 254 screens that wrap around Atari 2600 style. Every time you travel underground, you advance 3 screens at a time, so a seemingly impossible game becomes possible. This map can be found at one of the better atari 2600 sites.
Once you study the map and memorize the optimal route, you just have to master the art of jumping on crocs heads and over scorpions. Since the barrels roll from right to left, it is easier to travel in that direction, but you will need to practise travelling against barrels if you hope to get the perfect score (you loose points every time you get knicked by a barrel).