hi,
I use in an old java application some borland components (com.borland.dx.dataset.Column, com.borland.dbswing.JdbTable, ...).
I don`t want that anybody is able to change the values of one column. So I used column0.setEditable(false);
But now I have the problem, if I add a new row to the Table, I can't edit it :-).
So how is it possi...
I'm using this grammar to calculate math expressions:
// Konfiguration (JavaCC-Manual konsultieren)
options {
STATIC = true; // alle Parser-operationen sind static
// verwende zwei Token um zu entscheiden, was passieren soll
LOOKAHEAD = 2;
}
// hier beginnt unsere Parser Klasse ("MathParse")
PARSER_BEGIN(MathParse)
// h...
A simple wordcount reducer in Ruby looks like this:
#!/usr/bin/env ruby
wordcount = Hash.new
STDIN.each_line do |line|
keyval = line.split("|")
wordcount[keyval[0]] = wordcount[keyval[0]].to_i+keyval[1].to_i
end
wordcount.each_pair do |word,count|
puts "#{word}|#{count}"
end
it gets in the STDIN all mappers intermediate values. Not f...
Hi,
According to here, the C compiler will pad out values when writing a structure to a binary file. As the example in the link says, when writing a struct like this:
struct {
char c;
int i;
} a;
to a binary file, the compiler will usually leave an unnamed, unused hole between the char and int fields, to ensure that the int field i...
I would really like to do something like this:
Callable<MyObject> myCallable = ....
Future<MyObject> = new Thread( myCallable).start();
I basically want to start a single long-running task that runs in parallel with my main task, and I do not want pooling or thread re-use. The Executors stuff seems to be very pooling oriented and it...
Is there something equivalent to OmniCppComplete for java in vim ?
I know of eclim but I think it is overkill for such a simple feature.
...
We have a Struts 2 web application that's used by pretty much every employee to manage and configure jobs for our server farm. We're working on a plan to make a dashboard for customers, so they can see their own jobs, and a very simple display of its status ("in process", "ready for proofing", "finished", etc). All of the pages the cus...
A class can be a "subclass" of itself if its inner class extend the outer class
so the class is somehow extending itself without throwing any Exception. So, does it really mean a class is also a subclass of itself?
Thanks.
...
I have a JFrame and I open a JDialog from it and another JDialog from that dialog - which menas i have 3 windows visible (JFrame, JDialog1, Jdialog2).
When I close both dialogs and run a garbage collectior few times (from netbeans profiler)
I can see that JDialog2 (the one opened from JDialog1) is garbage collected but JDialog1 (opened ...
I have been given the option to either have a Windows laptop or a Mac laptop to do my Java development on. Before committing to one of these, I thought I would find out if there are any issues or benefits I should know about using a Mac laptop over a windows laptop?
One thing I did hear was that the Java JDK releases are not always the ...
I am using a Richfaces' picklist and I want to populate the right-side panel with a list of SelectItems from my backing bean.
Populating the left-side is not a problem from the backing bean, however, the right hand side is problematic.
This is what I currently have
<h:outputText value="Roles" />
<rich:pickList showButtonsLabel="fals...
Hi
I was asked to write a servlet that collects client's details such as ip, mac address etc.
getting his IP is pretty straight-forward (request.getRemoteAddr()) but I dont find an elegant way to get his MAC address.
seems reasonable that the web server has access to data such as Mac address etc, since it gets the TCP packets and all....
Hi, I'm using Apache 2.2 and Tomcat 6.0.18 on Windows XP. I've enabled the mod_proxy module to redirect the traffic from my Apache web server to Tomcat. I only updated the httpd.conf file to have the redirection like this:
ProxyPass /myapp http://MYMACHINENAME:8080/MyApp/Start
ProxyPassReverse /myapp http://MYMACHINENAME:8080...
I am trying to come up with a logic for a date based licensing mechanism for a Java web app. The app needs to be deployed in client sites which may not have access to the Internet (deployed on the intranet). In this case how do I build a licensing mechanism based on Start / End Dates. If I use the server system Date / Time for this, I ri...
I encountered ConcurrentModificationException and by looking at it I can't see the reason why it's happening; the area throwing the exception and all the places modifying the collection are surrounded by
synchronized (this.locks.get(id)) {
...
} // locks is a HashMap<String, Object>;
I tried to catch the the pesky thread but all I ...
How can I change the current working directory from within a Java program? Everything I've been able to find about the issue claims that you simply can't do it, but I can't believe that that's really the case.
I have a piece of code that opens a file using a hard-coded relative file path from the directory it's normally started in, and ...
I created a new project thus ...
File, New Project...
Java, Java Application.
Right-click project icon in "Projects" tree-view panel.
Choose New, Web Service Client...
Specify WSDL file e.g.
( ) Project
(*) Local file D:\temp\Foo\Bar.wsdl
( ) WSDL URL [Set Proxy...]
client...
I need your help on the design of the restore-procedure in a backup system I'm building. The prerequisites are the following:
A restore can be made of one or several files.
A file consists of 1 or more data-blocks (on average 16mb in size, minimum 4mb maximum 64mb).
A data-block is replicated using erasure coding into replication-bloc...
I'm having a bit of a problem with getting JBoss working across networks. As a quick overview, we have a development network (which I'll call DEV), and a client network (say.. CLIENT!). These are connected via a firewall. In the Dev network, the server is known as 192.168.100.50, on the client network it's known as 10.0.100.50. DNS in bo...
I am trying to debug an issue involving a ClassCastException in Java. In the interest of solving the issue I need to know what is going on when I cast from Object to a specific type. Can anyone explain to me how the Java cast operator works at the Java level and the JVM level?
...