Hi, I'm thinking of buying Martin Fowler's "Patterns of Enterprise Application Architecture".
From what I can see it seems like a great book, it an architectural book with bias towards enterprise Java -- just what I need.
However, in computer years, it is quite old. 2003 was a long time ago, and things have moved on quite a bit since t...
I have a list of radio stations, mostly .mp3 and .ogg. I would like to have a player on a web page that could be controlled with JavaScript. Now I use jlgui, but it is somewhat limited.
Do you know of any alternative to jlgui? Preferably a java applet, but I can tolerate flash or even a system-default media player for a particular conte...
I need to count the time it takes a function to complete in Java. How can I do that?
Note:
I want to count the time a function takes, not the time the full program takes.
...
I decide write a program that list all of the files and directories, but have a problem when dealing with non-english filename.
The problem is that my program cannot gurantee those directories and filenames are in English, if some filenames using japanese, chinese character it will display some character like '?'.
J2SE provide variety ...
Hi there,
When I write Java webapps, I usually use JSTL tags. I think that these tags are great, except for one thing that pisses me off: while the expression language allow you to access bean properties, it does not allow you to call its methods.
In release 1.0, it was not even possible to obtain the length of a string or the number o...
Is there any difference in meaning of AtomicIntegerArray and AtomicInteger[]?
And which one is faster to use?
(only thing that I noticed is that first is taking much less space, but that means that each recheck is checking boundaries of array, so that would make it slower?)
Edit: In a scenario where array is pre-initialized.
...
In Java instance variables can be initialized by an initialization block as shown below:
class Example {
private int varOne;
private int varTwo;
{
// Instance Initializer
varOne = 42;
varTwo = 256;
}
}
Is there an equivalent construct in C#?
[Edit] I know that this can be inline with the insta...
Most of the places on the internet say it stands for WEB INFormation.
I rather doubt it. The folder contains executables. Information is not a suitable name for it.
...
Hi what is the best way to validate a nested string in java?
sample valid string is [aaaa{bbb}]
while [{ss]} is not.
Thanks!
...
Are there any good, portable, open-source, high-level, statically-typed, imperative, object-oriented, garbage collected, safe languages/runtimes with reasonable performance besides Mono and Java? Mono is nice, but it is a Microsoft technology, and I'm kind of afraid of using it (I'm not sure how rational this fear is). The problem with J...
Hi, i am making a noughts and crosses game (tic tac toe) and in my logic class i represent the state of the game with a 2d array, but this is the problem, im checking the array like so
if(gameModel[0][0] == gameModel[1][1] && gameModel[0][0] == gameModel[2][2]){
return true;
}
if(gameModel[2][0] == gameModel[1][1] && gameMod...
For reading XML, there is SAX and DOM built into Java 1.5. You can use JAXP and not need to know details about what parser is available... So, what are some prescribed APIs for one to write XML documents in Java 1.5 and earlier?
I don't want to use a third party binary
I don't want to assume a Sun VM or IBM VM etc and use some speciali...
I've been coding tests in Junit4 with Spring, and I got this funny behavior:
If my tests are passing like this, everything is fine:
@Test
public void truthTest(){
assertTrue(true); //Ok
}
But, if my test fails:
@Test
public void truthTest(){
assertTrue(false); //ERROR
}
Then instead of a test failure I receive an ugly and cr...
Lately I've been getting these 2 strange error messages in Eclipse. These happen the first time i press . , such as in MyClass.myMethod(), pressing the . causes these messages to popup. They show up only the first time after Eclipse is started and don't show up again until next restart.
First error:
Second error:
These might be re...
I require an a java component or oracle package that implements all of the formulas in "Modern Portfolio Theory".
(They do not need to be open source, they can be commerical components.)
My searching has yet to find anything suitable.
Any help on this would be greatly appreciated, I would like to buy a component to do this rather than ...
There are a handful of open-flash-charts tutorials on the web, mostly php from what I can see. I know there is a Java helper class, but I haven't found documentation or examples.
The helper library is also includes in the ofcharts grails plugin.
Java/Groovy or Grails suggestions welcome.
thanks!
...
For my programming languages class, I'm writing a research paper on some papers by some important people in the history of language design. One by CAR Hoare struck me as odd because it speaks against independent compilation techniques used in C and later C++ before C even became popular.
Since this is primarily an optimization to speed...
In my application I've a main shell window and lots of dialogs (classes extends Dialog). I use setSize(width,height) when initializing them, but I know that users constantly resize them for their taste.
What is a smarty way to get notified when the size changes so I can store/load them?
(And why don't do toolkit provide such a thing ou...
I am writing a quote-matching program in which two Abstract Factory Patterns are required, these are two interfaces; QuoteFactory and ModeFactory. ModeFactory switches between EasyMode and HardMode and QuoteFactory picks out Quotes between several different subjects (i.e. PoliticalQuotes, SportsQuotes). In short, the user will pick a mod...
Duplicate
java String concatenation
I'm curious what is the difference between the two.
The way I understand the string pool is this:
This creates 3 string objects in the string pool, for 2 of those all references are lost.
String mystr = "str";
mystr += "end";
Doesn't this also create 3 objects in the string pool?
String mys...