 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- You have received 5 notifications from your fans!Alyssa
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/profile
/NewCustomProfile.aspx?u=alyssawilcox591> sent you a fan request.
Automatically sign in
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=3> to view Alyssa's profile and to accept or reject
her fan request.24 hours ago
Alyssa
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/profile
/NewCustomProfile.aspx?u=alyssawilcox591> sent you a fan request.
Automatically sign in
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=3> to view Alyssa's profile and to accept or reject
her fan request. 24 hours ago
Alyssa
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/profile
/NewCustomProfile.aspx?u=alyssawilcox591> sent you a fan request.
Automatically sign in
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=3> to view Alyssa's profile and to accept or reject
her fan request. 24 hours ago
There are 2 additional fan requests to review
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=3> .
Click here to view ALL notifications
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=1&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Inbox/M
ain.aspx?messages=> Change your Email Summary Settings
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=4&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Prefere
nces/Main.aspx?open=emailPref>
You can control
<http://www.fanbox.com/socnet/EmailStat.aspx?cmp=&xyz=4&lit=5&me=xAr3pqu
jU0kBSGmCF6dKsg==&fan=F1Qw1zM6IEk=&opg=http://profile.fanbox.com/Prefere
nces/Main.aspx?open=emailPref> the frequency of these summary emails.
FanBox - 255 G Street #723, San Diego, CA 92101, USA
- 1
- how to hide tabs in JTabbedTableHello all
I have a JTabbedTable with many tabs with JPanel in it. I want in a state,
only some tabs are shown and other states, other tabs are shown. I used
setVisible(boolean) but it does not work. could you please help
thank you
S.Hoa
- 2
- pass by referenceAndreas Leitgeb wrote:
> Patricia Shanahan <email***@***.com> wrote:
>> The issue is more critical for people for whom "pass by reference" is
>> familiar language. They will think they know what it means, and have to
>> find out somehow that it means something entirely different, when
>> talking about Java, that it does when talking about other languages.
>
> By the way, this is also true for "reference" itself. They also have
> to learn that what Java calls a reference wouldn't be called that way
> in other languages, for exactly the reasons you wrote (null allowed,
> assignment-semantics).
Indeed, I think the choice of "reference" to mean "pointer or null" was
a bad one. It would have been better to call a pointer a pointer, and
note that it can be null.
For the benefit of people transitioning from C or C++, it may be
necessary to note that it does not have pointer arithmetic or unsafe
conversions.
> Why is it ok, to talk of references in Java, but have an entirely
> different meaning of "reference" in mind in context of the phrase
> "pass by reference"?
"pass by reference" (or more usually "call by reference") is a long
standing term with a meaning independent of the use of "reference" as a
freestanding term. I learned it long before I knew any language in which
one could actually have a reference. I don't see any reason why having
to learn a Java-specific meaning of reference should require people to
learn special meanings of other terms, especially when with have a
perfectly good phrase, "pass reference by value", that is only one word
longer and says *exactly* how Java behaves.
Patricia
- 2
- 3
- Creating an object during runtimeI'm trying to generate an object name during run time, and then create an
object with the contents of that variable. You can see that I'm trying to
also make the object name self generating (almost, the 'y' variable isnt
being incremented yet), putting two values ('y' and 'C'). My apologies for
poor coding structure / lack of comments, but I'm am a bit lost on how to
work it out. MANY thanks in advance.Heres what I have so far:
public class testVariable
{
private String name = "";
private String New_name = "";
private int y = 2;
public testVariable()
{}
public void test(String x)
{
name = x;
New_name = name + y ;
System.out.println(New_name);
}
public String getNew_name()
{
return New_name;
}
public static void main(String[] args)
{
int z = 2;
testVariable Darren = new testVariable();
Darren.test("C");
testVariable "c"+ z = new testVariable();
String Old_name = New_name;
}
}
- 3
- JNI CallStaticVoidMethod fails after N callsI have written an application in Java and C on the Solaris 10 (x86)
platform using the JDK 1.5.0_09. The Java code calls a native method
"startButtonWatcher," which then forks, the parent process returning,
and the child process initiating an event loop that calls a static
method, "sendButtonEvent," on a Java class "ButtonWatcher."
The problem is that on the 65 invocation, the CallStaticVoidMethod will
hang. There is no core file or pid log file produced. (it will also
hang for CallVoidMethod as well if I remove the static declaration in
ButtonWatcher.)
I have also added a main() function to the C code so that it can be
compiled and run as an executable rather than a library file loaded
from Java, and the the same loop will be fine, the Call*Method call
being exected forever (or over a million times at least). The only
difference in the code is the JVM--in the sharable library, it uses the
JVM of the class that calls the native method, and the standalone has
to create its own. What could be the problem? Thanks!
- 3
- "class not found".I'm getting the dreaded "class not found" error. I've Googled this
error and found that it's quite common, but not in exactly the way I
get it. My applets run fine on my machine, both when tested locally
via a local HTML file, and also when going to website, but gives the
"Class not found" error other machines. Anyone have any idea what
might be wrong?
I suspect it may be a codebase error, but I've tried the following in
my HTML file without success:
<APPLET CODE="moonCalendar.class"
name = "moonCalendar" WIDTH=1000 HEIGHT=350>
<APPLET CODE="moonCalendar.class" codebase="."
name = "moonCalendar" WIDTH=1000 HEIGHT=350>
<APPLET CODE="moonCalendar.class"
codebase="http://www.ckolchak.com"
name = "moonCalendar" WIDTH=1000 HEIGHT=350>
You can see if it works on your machine by going to:
http://www.ckolchak.com/astroCalendar.htm
- 3
- Java Object Persistence (JSP & Java)Hi all.
I'm currently working on a simulation with a web frontend. The
simulation is based on 3 components:
- A Webfrontend
- A persister (which is the object of my quetsio :-)
- A WorkHorse
The Workhorse is doing the actual simulation while the web frontend is
used to interact with the Simulation (queueing and dequeueing new
events to the simulation stack).
Now my question is what the best choice for the persister would be.
I found http://www.prevayler.org/wiki.jsp which looks nice but I don't
know if it's the best choice. Is there a library that transparently
saves and loads whole Object dependencies from an SQL Database, or is
an Object Cloud better?
What is your experience with this/other libraries?
- 6
- Problem running the hello world servletI installed j2sdk1.4.2_12, and apache tomcat 4.1.34, on a windows XP
box. I set the following environment variables:
CATALINA_HOME C:\apache-tomcat-4.1.34
CLASSPATH C:/Program
Files/Java/jre1.5.0/lib/xt/QTJava.zip;C:/j2sdkee1.3.1/lib
J2EE_HOME C:/j2sdkee1.3.1
JAVA_HOME C:/j2sdk1.4.2_12
PATH C:\j2sdk1.4.2_12\bin\
I edited the web.xml in C:\apache-tomcat-4.1.34\conf and uncommented
the invoker servlet tag so that I can run servlets.
I can now access jsp and html pages with tomcat, but when I tried to
run HelloWorld Servlet, it gives the following error:
ava.util.MissingResourceException: Can't find bundle for base name
LocalStrings, locale en_US
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:838)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:807)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:578)
at HelloWorldExample.doGet(HelloWorldExample.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:417)
at
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
What could be the problem?
- 8
- Inline bytecode?Is it possible to do iline bytecode in Java? Sort of like inline asm
in c++, but platform independent.
- 11
- How to make sure stdout and stderr is caught from runtimeexecHi,
I have written a class that handles stdout and std err from a unix
command. How can I make sure that both threads have finished? Do I need
to synchronzie my StreamConverter?
cheers,
//mikael
> public class RuntimeExec {
>
> public RuntimeExec() {
> }
>
> /**
> * Executes a command
> * @param command
> * @return The result of the command
> * @throws IOException
> */
> public String exec(String command) throws IOException {
> int exitValue = 0;//0 - executed ok.
> String stdOut = null;
> String stdErr = null;
> String result = null;//result from clearcase operation
> StringBuffer out = new StringBuffer();
> StringBuffer err = new StringBuffer();
> Process process = Runtime.getRuntime().exec(command);
> StreamConverter outSc = new StreamConverter(process.getInputStream(),out);
> StreamConverter errSc = new StreamConverter(process.getErrorStream(),err);
> Thread outThread = new Thread(outSc);
> Thread errThread = new Thread(errSc);
> outThread.start();
> errThread.start();
> //Wait until the prosess finish
>
> long delayMillis = 5000; // 5 seconds
> try {
> //wait for threads to die.
> outThread.join(delayMillis);
> if (outThread.isAlive()) {
> // Timeout occurred; thread has not finished
> } else {
> // Finished
> }
> } catch (InterruptedException e) {
> // Thread was interrupted
> }
>
>
>
>
> return result;
>
>
> }
>
> // bridge between byte and character stream.
> class StreamConverter implements Runnable {
> private InputStreamReader isr = null;
> private StringBuffer sb = null;
> // end of steam
> private static final int EOS = -1;
>
> public StreamConverter(InputStream is, StringBuffer sb) {
> isr = new InputStreamReader(is);
> this.sb = sb;
> }
>
> public void run() {
> int character = 0;
> try{
> while ((character = isr.read()) != EOS) {
> sb.append((char)character);
> }
> }catch(IOException ioe){
> System.out.println("Could not read std out!"+ioe.getMessage());
> }
> }
>
> }
>
>
> }
- 12
- Image from WebHi all, I need to read an image located in http://www.xxx.yyy/eee/test.jpg
...how can I do?
How can I display once readed in a swing interface?
thanks.
mario
- 15
- Java Timer, swingDear Java experts,
I'm struggling with timers. I've used javax.swing.Timer in my program. But
when one doesn't have the jre installed, my program doesn't work. It then
gives a class not found exception in the browser. It only works on the sun
virtual machines which you have to download from the website like some jre.
I quess the swing library isn't supported by a lot of virtual machines. But
I'm happy about how the timer works in my program because it makes use of
the actionListener.
Is there some easy solution? Using a simple Timer like the swing version and
let it work on any virtual machine/ jre?
best regards,
Piet den Dulk (Netherlands)
- 15
- Intellij 5.1 compile time error..hi,
I am using Intellij 5.1 version. Each time I build the project I get
an error:
error: Compiling Web Module 'web':Invalid file
and the file is in the "deploy" folder
So each time I go into the folder and maually delete the .war file and
then when I build the project it works fine.
>From what I have seen one more person using the same version has this
problem. but the one's using the earlier versions don't have this
problem.
Is there any solution for this?
thanks,
- 16
- "Linked List" AssistanceCan someone please point me to a url that will show me how to create a
linked list.
This needs to be a very simple example as Linked Lists are confusing me.
Thankyou for your assistance.
|
| Author |
Message |
Joe Attardi

|
Posted: 2008-1-4 5:46:00 |
Top |
java-programmer, the MI 5 spammer
email***@***.com wrote:
> Incorrect. None of the nasty things that you have said or implied
> about me are at all true.
Does this mean you still accuse me of hacking OpenOffice.org's mailing
lists? What a hoot!
|
| |
|
| |
 |
Joe Attardi

|
Posted: 2008-1-4 5:46:00 |
Top |
java-programmer >> the MI 5 spammer
email***@***.com wrote:
> Incorrect. None of the nasty things that you have said or implied
> about me are at all true.
Does this mean you still accuse me of hacking OpenOffice.org's mailing
lists? What a hoot!
|
| |
|
| |
 |
Roedy Green

|
Posted: 2008-1-6 17:56:00 |
Top |
java-programmer >> the MI 5 spammer
On Mon, 31 Dec 2007 10:51:52 -0500, Lew <email***@***.com> wrote,
quoted or indirectly quoted someone who said :
>What does Thunderbird's newsgroup filtering lack that makes you so harsh?
I use Forte Agent. It is not so capable.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
|
| |
|
| |
 |
Martin Gregorie

|
Posted: 2008-1-7 3:43:00 |
Top |
java-programmer >> the MI 5 spammer
Roedy Green wrote:
> On Mon, 31 Dec 2007 10:51:52 -0500, Lew <email***@***.com> wrote,
> quoted or indirectly quoted someone who said :
>
>> What does Thunderbird's newsgroup filtering lack that makes you so harsh?
>
> I use Forte Agent. It is not so capable.
>
I used Agent when I ran Windows and now use Thunderbird because its the
best Linux newsreader I've found so far.
I'd agree that TB may well be better than Agent as a mail client
(Agent's non-support of nested mailboxes didn't suit me at all) but for
me Agent is considerably better than TB for handling newsgroups because:
- it allows wild cards in filters
- you can set a new filter and then force a rescan on the ng to dump a
new pest without having to skip his tedium in the rest of the ng
- I never saw the sort of deletion-related thread collapse I described
above
- it has considerably more flexible ways of specifying when to discard
a post based on its age, service residence, etc
- it has the ability to lock specific posts, which prevents their
age-related deletion.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
|
| |
|
| |
 |
nebulous99

|
Posted: 2008-1-7 12:57:00 |
Top |
java-programmer >> the MI 5 spammer
On Jan 3, 4:46 pm, Joe Attardi <email***@***.com> wrote:
> [implied insult deleted]
None of the nasty things that you have said or implied about me are at
all true.
|
| |
|
| |
 |
nebulous99

|
Posted: 2008-1-7 12:58:00 |
Top |
java-programmer >> the MI 5 spammer
On Jan 5, 1:41 pm, Martin Gregorie <email***@***.com> wrote:
> My only real quibble with TB is the structural c.l.j.p. collapse that
> resulted when I set "delete" filters on the three aliases used by
> [insults deleted]
None of the nasty things that you have said or implied about me are at
all true.
|
| |
|
| |
 |
Andreas Leitgeb

|
Posted: 2008-1-7 14:38:00 |
Top |
java-programmer >> the MI 5 spammer
email***@***.com <email***@***.com> wrote:
> On Jan 5, 1:41 pm, Martin Gregorie <email***@***.com> wrote:
>> My only real quibble with TB is the structural c.l.j.p. collapse that
>> resulted when I set "delete" filters on the three aliases used by
<< fragrant, verbally overflowing friend.
> None of the nasty things ...
Interesting to see, that you identified yourself with that description.
|
| |
|
| |
 |
Joe Attardi

|
Posted: 2008-1-7 22:34:00 |
Top |
java-programmer >> the MI 5 spammer
Andreas Leitgeb wrote:
> Interesting to see, that you identified yourself with that description.
More interestingly, this is the second time he's done so!
|
| |
|
| |
 |
nebulous99

|
Posted: 2008-1-10 2:31:00 |
Top |
java-programmer >> the MI 5 spammer
On Jan 7, 1:37 am, Andreas Leitgeb <email***@***.com>
wrote:
> [misquotes me]
Do not misquote me again. Your post contained supposed "quoted
material" that did not occur in the post that you followed up to nor
summarize material that did. That is incorrect. Stop being dishonest.
> [implied insult deleted]
None of the nasty things that you have said or implied about me are at
all true.
|
| |
|
| |
 |
nebulous99

|
Posted: 2008-1-10 2:32:00 |
Top |
java-programmer >> the MI 5 spammer
On Jan 7, 9:33 am, Joe Attardi <email***@***.com> wrote:
> Andreas Leitgeb wrote:
> > [implied insult deleted]
>
> [implied insult deleted]
None of the nasty things that either of you have said or implied about
me are at all true.
|
| |
|
| |
 |
Joe Attardi

|
Posted: 2008-1-10 2:38:00 |
Top |
java-programmer >> the MI 5 spammer
email***@***.com wrote:
>> [implied insult deleted]
What implied insult? I stated that you twice responded to something not
mentioning you by name with your boilerplate response, which anyone who
can read the group can plainly see...
> None of the nasty things that either of you have said or implied about
> me are at all true.
Except in this case it is true.
|
| |
|
| |
 |
Andreas Leitgeb

|
Posted: 2008-1-10 2:56:00 |
Top |
java-programmer >> the MI 5 spammer
email***@***.com <email***@***.com> wrote:
> On Jan 7, 1:37 am, Andreas Leitgeb <email***@***.com> wrote:
Snipped context restored:
<< << fragrant, verbally overflowing friend.
<< > None of the nasty things ...
<< Interesting to see, that you identified yourself with that description.
> Do not misquote me again. Your post contained supposed "quoted
> material" that did not occur in the post that you followed up to nor
> summarize material that did.
It's not indented by '>', so it's not even implied to have been in your
previous posting, and where I get my cites else from is my own choice.
Anyway, you most obviously *did* take the mention of a "fragrant, verbally
overflowing friend" as referring to you, although your name wasn't mentioned.
|
| |
|
| |
 |
Lew

|
Posted: 2008-1-10 8:03:00 |
Top |
java-programmer >> the MI 5 spammer
Joe Attardi wrote:
> email***@***.com wrote:
>>> [implied insult deleted]
> What implied insult? I stated that you twice responded to something not
> mentioning you by name with your boilerplate response, which anyone who
> can read the group can plainly see...
>
>> None of the nasty things that either of you have said or implied about
>> me are at all true.
> Except in this case it is true.
OK, now you've destroyed this thread.
--
Lew
|
| |
|
| |
 |
Lew

|
Posted: 2008-1-10 8:03:00 |
Top |
java-programmer >> the MI 5 spammer
Andreas Leitgeb wrote:
> email***@***.com <email***@***.com> wrote:
>> On Jan 7, 1:37 am, Andreas Leitgeb <email***@***.com> wrote:
>
> Snipped context restored:
> << << fragrant, verbally overflowing friend.
> << > None of the nasty things ...
> << Interesting to see, that you identified yourself with that description.
>
>> Do not misquote me again. Your post contained supposed "quoted
>> material" that did not occur in the post that you followed up to nor
>> summarize material that did.
>
> It's not indented by '>', so it's not even implied to have been in your
> previous posting, and where I get my cites else from is my own choice.
>
> Anyway, you most obviously *did* take the mention of a "fragrant, verbally
> overflowing friend" as referring to you, although your name wasn't mentioned.
OK, now you've destroyed another thread.
--
Lew
|
| |
|
| |
 |
Andreas Leitgeb

|
Posted: 2008-1-10 15:40:00 |
Top |
java-programmer >> the MI 5 spammer
Lew <email***@***.com> wrote:
> OK, now you've destroyed another thread.
You're right, and it was more of a "scnr", than anything
else, but as an afterthought, this being the "MI5..."
thread, the damage isn't all that high.
|
| |
|
| |
 |
Lew

|
Posted: 2008-1-10 22:17:00 |
Top |
java-programmer >> the MI 5 spammer
Andreas Leitgeb wrote:
> Lew <email***@***.com> wrote:
>> OK, now you've destroyed another thread.
>
> You're right, and it was more of a "scnr", than anything
> else, but as an afterthought, this being the "MI5..."
> thread, the damage isn't all that high.
True, but it had been entertaining.
--
Lew
|
| |
|
| |
 |
Andreas Leitgeb

|
Posted: 2008-1-11 1:18:00 |
Top |
java-programmer >> the MI 5 spammer
Lew <email***@***.com> wrote:
> Andreas Leitgeb wrote:
>> Lew <email***@***.com> wrote:
>>> OK, now you've destroyed another thread.
>> You're right, and it was more of a "scnr", than anything
>> else, but as an afterthought, this being the "MI5..."
>> thread, the damage isn't all that high.
> True, but it had been entertaining.
It's rather likely, that its entertaining qualities are going
to go further up, now, at the cost of any informational qualities
the thread might have had before.
|
| |
|
| |
 |
Lew

|
Posted: 2008-1-11 10:00:00 |
Top |
java-programmer >> the MI 5 spammer
Andreas Leitgeb wrote:
> It's rather likely, that its entertaining qualities are going
> to go further up, now, at the cost of any informational qualities
> the thread might have had before.
I find your optimism and good spirits to be quite engaging.
Speaking of information, I've been thinking about how so many people describe
anonymous class syntax as "ugly", especially when there are helper methods
involved.
I actually like anonymous class syntax.
Am I just weird? No, there is definitely more to it than that.
There is an aesthetic as a maintenance programmer more than as an original
author. That means structures that may be annoying to write, or to write
around such as checked Exceptions, are a true comfort to the sweep-up person.
Anonymous classes, particularly in their main use case of single-method,
no-arg constructed functors like Runnable, provide a locality of reference to
one-off logic that offsets the psychic diversion from logic to declaration
with nested logic. Even that diversion is part of the linguistic experience
of source-code reading, like an appositive (or even parenthetical) remark -
the very interruption and subsequent resumption of the cognitive thread helps
structure one's understanding.
The aesthetic that calls that "ugly" perhaps is more linear - resentful of
side roads. Ironically this leads to idioms that separate the declaration so
far from the logic that it becomes a more egregious interruption, following
separate class definitions or even files.
With a little practice anonymous class definitions are really a breeze to read
and use, and well worth it. It's sort of like learning to read Charles
Dickens when you've been weaned on Stephen King. There is a point to all that
wordiness.
--
Lew
|
| |
|
| |
 |
Andreas Leitgeb

|
Posted: 2008-1-11 16:51:00 |
Top |
java-programmer >> the MI 5 spammer
Lew <email***@***.com> wrote:
> Andreas Leitgeb wrote:
>> It's rather likely, that its entertaining qualities are going
>> to go further up, now, at the cost of any informational qualities
>> the thread might have had before.
> I find your optimism and good spirits to be quite engaging.
It seems you don't follow the "SWT..." mega thread.
I'd say it's less a matter of "optimism" than of "experience" :-)
Of course, this prognose can be easily thwarped by randomly
introducing a new topic into this thread:
> Speaking of information, I've been thinking about how so many people describe
> anonymous class syntax as "ugly", especially when there are helper methods
> involved.
> I actually like anonymous class syntax.
I actually do find it ugly, but I like the concept behind it, and
furthermore, I have no idea, how to do it better (for my particular
personal definition of "better").
> Am I just weird? No, there is definitely more to it than that.
I wouldn't dare to judge your weirdness :-)
> There is an aesthetic as a maintenance programmer more than as an original
> author. That means structures that may be annoying to write, or to write
> around such as checked Exceptions, are a true comfort to the sweep-up person.
That's true, but in many cases I'd think that a better compromise would still
be a bit nearer to the "original author"-side. That is: some less
typing woudl do more good to the author than hurt the maintainer.
> Anonymous classes, particularly in their main use case of single-method,
> no-arg constructed functors like Runnable, provide a locality of reference to
> one-off logic that offsets the psychic diversion from logic to declaration
> with nested logic.
This almost beats my english.
Having that extra "public void run() {" is, what I do dislike about
current state (but whose change I'm not holding my breath for).
When reading code, it irritates me to find a nested method-declaration
(which generally sticks out more than the preceding "new Interface() {").
> Even that diversion is part of the linguistic experience
> of source-code reading, like an appositive (or even parenthetical) remark -
> the very interruption and subsequent resumption of the cognitive thread helps
> structure one's understanding.
I find that it distracts me into a syntactic extra level. As if
stack-levels in brain weren't generally a scarce ressource :-)
> The aesthetic that calls that "ugly" perhaps is more linear - resentful of
> side roads. Ironically this leads to idioms that separate the declaration so
> far from the logic that it becomes a more egregious interruption, following
> separate class definitions or even files.
I see this consequence to be not at all interrupting. Not more than
normal calling of methods implemented elsewhere.
> With a little practice anonymous class definitions are really a breeze to read
> and use, and well worth it. It's sort of like learning to read Charles
> Dickens when you've been weaned on Stephen King. There is a point to all that
> wordiness.
I'm spoilt from C's philosophy, where anything longer than "strrchr()",
"puts(...)" and "main() { ... }" is source-bloat. :-)
|
| |
|
| |
 |
Lew

|
Posted: 2008-1-11 22:02:00 |
Top |
java-programmer >> the MI 5 spammer
Andreas Leitgeb wrote:
> It seems you don't follow the "SWT..." mega thread.
> I'd say it's less a matter of "optimism" than of "experience" :-)
Not only do I not follow it, I suppressed it from my newsreader a couple of
months ago. I am so sick of that nonsense, or was back then - I have no idea
what's transpired in it since, but I strongly suspect it remains as useless to
me now as it was then.
--
Lew
|
| |
|
| |
 |
Andreas Leitgeb

|
Posted: 2008-1-12 1:20:00 |
Top |
java-programmer >> the MI 5 spammer
Lew <email***@***.com> wrote:
> Andreas Leitgeb wrote:
>> It seems you don't follow the "SWT..." mega thread.
>> I'd say it's less a matter of "optimism" than of "experience" :-)
>
> Not only do I not follow it, I suppressed it from my newsreader a couple of
> months ago. I am so sick of that nonsense, or was back then - I have no idea
> what's transpired in it since, but I strongly suspect it remains as useless to
> me now as it was then.
If you haven't yet changed your preferences for that type of entertainment, then
your back-then choice is still the one I'd recommend to you, now.
Be prepared to suppress this thread as well, from your newsreader, once
the show starts. (That is: once some particular loony finds his way back
to this thread)
|
| |
|
| |
 |
Tristram Rolph

|
Posted: 2008-1-12 3:00:00 |
Top |
java-programmer >> the MI 5 spammer
Andreas Leitgeb wrote:
> Lew <email***@***.com> wrote:
>> Andreas Leitgeb wrote:
>>> It seems you don't follow the "SWT..." mega thread.
>>> I'd say it's less a matter of "optimism" than of "experience" :-)
>>
>> Not only do I not follow it, I suppressed it from my newsreader a couple of
>> months ago. I am so sick of that nonsense, or was back then - I have no idea
>> what's transpired in it since, but I strongly suspect it remains as useless to
>> me now as it was then.
>
> If you haven't yet changed your preferences for that type of entertainment, then
> your back-then choice is still the one I'd recommend to you, now.
>
> Be prepared to suppress this thread as well, from your newsreader, once
> the show starts.
Given that this thread isn't likely to provide any more opportunities
for entertainment than the Great SWT Program thread, it would probably
be polite to refrain from encouraging him in this one.
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- how to make of a specific row toprow in jtableHi,
Please can you tell me how to make of a specific row the first row in
the visible area of a jtable.
For example:
i have a 100 rows and only then a visible.
Now i want to make of row 34, for example, the first one in the
visible area.
How can i do that.
Thank you.
Anand
- 2
- 3
- Capture conversion and containmentHi,
I'm writing a tool that analyses java-code, but I have a problem fully
understanding the rules defined in JLS3 for containment and their
combination with capture conversion.
Take the following classes:
class Box<T> {}
class ABox<T extends A> {}
class A {}
Why (because of which rules) is this type-correct code? :
ABox<? extends A> a1;
ABox<?> a2;
a1 = a2;
(And I really mean "a1 = a2" there, not "a2 = a1")
The extra bounds "? extends A" doesn't really make a difference,
ABox<? extends A> and ABox<?> are equivalent, because that parameter already
has a bound A from the definition of ABox. So, informally I understand why
this code is safe. But my problem is understanding the formal rules by
which we can derive that, and where those rules are defined.
My attempt at understanding this:
The constraint for the assignment is:
capture-of(ABox<?>) <: capture-of(ABox<? extends A>)
the capture of ABox<? extends A> is ABox<_T>
where _T is a fresh type variable with upperbounds A.
the capture of ABox<?> is ABox<_T2>
where _T2 is another fresh type variable, also with upperbounds A.
And ABox<_T2> <: ABox<_T> because _T2 <= _T (_T contains _T2). But why?
I see rules for containment defined (4.5.1.1) for wildcards, but not for
type variables created by capture conversion. While I would actually expect
that only rules for type variables would be needed, as types are always
capture converted before you use them. (And this example is chosen so
that "skipping" this capture conversion step doesn't work.)
Now, intuitively, I would say that one type variable contains another if all
its upperbounds are a supertype of one of the upperbounds of the other, and
all its lowerbounds are a subtype of one of the lowerbounds of the other.
But I'd like to see something like this in writing somewhere, and I can't
find an answer to this in the Java Language Specification or anywhere else.
And this intuitive rule doesn't work for Box<ABox<?>>, because the capture
conversion of that is just Box<ABox<?>> again.
So I'm quite confused about how this actually works.
I'd appreciate some help, or pointers to more information about this.
Wouter.
- 4
- Eclipse PakageWhen we create a pakage in java you make it creating several folders one
inside the other in an organized way.
In Eclipse I can create pakages, but I cann't create a pakage inside
another. (left mose button, new|pakage)
Any ideias on how to create inside pakages via IDE ?
- 5
- serialVersionUID.. ?Hello ,
I posted this message in the Eclpse group with no responses. I am using
Eclipse.
I resolved by defining this in my class:
static final long serialVersionUID = 0;
Now, all of a sudden, this is not working and getting error:
Syntax error on token "DETAIL_FOOTER", VariableDeclaratorId expected after
this token
Happens when I define this class var in applet or interface:
private DETAIL_FOOTER = "# detail footer";
I do not have a clue! Any one have any Ideas?
--
Thanks in Advance...
IchBin
_____________________________________________
'Black holes are where God divided by zero.'
-Steven Wright, comedian (1955- )
- 6
- ANN: New XML Differencing, Updated XML Mapping in Stylus Studio 5.3
A new update for the Stylus Studio XML IDE adds a new XML Differencing
Tool, updated visual XML mapping tools and many other features. Download
a free trial of Stylus Studio 5.3 at:
http://www.stylusstudio.com/xml_download.html
Highlights of new XML Differencing Tool:
* Differencing of XML files and folders using a customizable color-coded
XML tree view
* Support for one-to-one and many-to-one XML file
* Step through XML differences node-by-node
* View differences using "split-screen" and "merged changes" views
* Expand all changes, or collapse identical XML blocks to simplify the
display
* User-configurable XML differencing settings allow you to optionally
resolve or ignore
* XML entity references and XML namespaces
More information at: http://www.stylusstudio.com/xml_differencing.html
Updates to Stylus Studio XML Mapping Tools:
Stylus Studio's visual XML mapping tools now support new split-screen
editing mode that simultaneously display fully editable views of both
the visual XML mapping diagram and the underlying XSLT or XQuery source
code which implements the visual XML mapping. You can now edit either
the source code or the visual XML mapping diagram, and see instantly the
effect their changes have - all without clicking a separate tab or
opening another editor. The automatic synchronization of both the visual
mapping diagram and the XSLT or XQuery source code views is the most
productive mode for developing XML mappings and is a great way to learn
the intricacies of XSLT and XQuery. More information at:
http://www.stylusstudio.com/xml_to_xml_mapper.html
Sincerely,
The Stylus Studio Team
http://www.stylusstudio.com
- 7
- commons transactionHi!
I would appretiate it if someone could direct me to a source where i
could get a feel of how exactly the FileResourceManager, in the
commons.transaction.file package is used to manage transactional files.
A source with an example or usage is cool too.
Thanks,
-D
- 8
- Username String suggestionI'm doing Java excercises in University. Part of a program I am working on
requires me to input a both a surname and forename together and have the
program output the forename name only.
e.g:
Please enter student's name: Yuriy Ivanov
Yuriy scored (+ score) which is a (+ grade)
The only way I can think of doing this is to use a String method to output
everything until it hits a space, does this sound probable?
Of course, I would need validation incase only a space is entered.
If this sounds like I'm on the right lines please can someone tell me how
to do that, if not please can someone tell me a better way. I've only know
of String concatination which is the opposite of what I need.
If there is a way to do this without methods I'd prefer to have that as
this part of the program isn't meant to include methods or arrays yet.
Thank you in advance.
- 9
- I WANT YOU I WANT YOU
I LIKE YOU
PLEASE CLICH THIS:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
http://myprofile3210.blogspot.com
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- 10
- where are file pointer fields?Hello
Where do top level IO classes like InputStream and OutputStream
store the file pointer? I could not find any fields section in
the java api docs.
Does java uses some different method or these
class members are not documented?
Homepage
http://madhur.netfirms.com
- 11
- Carbon AS CE IOC-JMX Architecture V 0.2 is releasedCarbon AS Community Edition is a JMX compliant Open Source J2EE
Application Server project initiated by Aquosine (http://
www.aquosine.com). Carbon AS Community Edition is released under LGPL
and is free to use, modify and distribute. Aquosine is an open
standards based enterprise solutions provider.
Please visit the thread: http://www.theserverside.com/discussions/
thread.tss?thread_id=44178
-Abhilash
- 12
- url rewriting when the url contains parametersHi,
I am trying to maintain sessions by doing URL rewrite. Things were
working fine till the URL did not contain any parameters. The URL that
I have now is of the form:
http://myurl?id=1&user=null and on doing a sessionID append it becomes
http://myurl?id=1&user=null;jsessionId=xyzw..
Things still get authenticated but now when I try and get the value of
user I get passed the whole string after user= and not just null.
What is the right way to append the sessionID? Btw, I am using the URL
to connect to a servlet from a j2me client.
Thanks,
Gaurav
- 13
- Please can you help me how can apply unicode in javaI am tr y to develope a localization application.when i run the code
there is no the right output, it's square box but i can't fix the error
and why it's like that .but i know the unicode representation of my
language please look a sample of code and based on that give me
suggestion to fix the erro.
import java.io.*;
class Unicodechar{
public static void main(String[] args){
//declare a character initialized to Ethiopic
char fidel='\u1200';
// print Ethiopic Unicode (version 3.0)
while(fidel<='\u137C'){
for(int i=0;i<8;i++){
System.out.println((int)fidel +", ");
fidel++;
}
//System.out.println();
}
}
}
- 14
- Software QA InterviewSoftware QA Interview
http://trailfire.com/frank/trails/31938
Don't be SCARED. Be PREPARED. Practice interview questions before your
interview. Preparing your answers ahead of time makes you feel more
confident and gets you hired faster...
- 15
- Spring tutorialHi!
Does anyone knows for a good and free SPRING tutorial?
Please send me some links.
I tryed to google it, but all I find is very poor tutorials.
Thanks!
Marko
--
Remove MakniMe from e-mail address
-----------------------------
SAILING IS A POETRY OF MOTION
-----------------------------
|
|
|