 |
 |
Index ‹ java-programmer
|
- Previous
- 2
- Running server-side Java on FreeBSD in production environments
So, I've seen a few mentions here of folks using Java server apps on
FreeBSD in production. I've been very happy to watch the progress by the
Java team on the native JDKs from the sidelines, as well as the
improvements to libc_r and such that have been MFC'd, but I'm curious as
to whether the consensus on this list is that it's ready to be used for
production. Anyone want to share good success or horror stories? We're
trying to determine whether the apache.org box can start to run our own
software. :) Speed is definitely less important than proper functioning.
Brian
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 2
- J2ME internationalizationI want to provide the binary with *only one* language, because I want to
be as small as I can.
But I want to provide many binaries (one per language).
So, I write the code with hardcoded strings like "$_nearest_dist_$".
I write a file like:
-----english.ini----
$_nearest_dist_$=Nearest distance is 90m
--------------------
and I write a php script which in *.java files, replaces all strings in
form "$_*_$" with language correct string.
php phpWriteStringsToSource.php <project_folder> <language.ini>
THE BIG PROBLEM: I realize that *.java files must have ansi* encoding!
Any of utf-8, uc16le or be is not compiled correct!
So, what I can do?
- 3
- Multiple installs of JDKWhen you do a silent install of the JRE you have the option to pass
PRIVATE=1, resulting in an install which doesn't check the registry
for a prior installation, and doesn't update the registry. You can
therefore have more than one install of the same JRE.
I need to find a similar capability for the JDK, but can't seem to. We
get rc=1603 on the second JDK install.
How can this be done...?
JDK >= 1.5.
{{{ Andy
- 5
- Initialize managed bean with header information?We use Netegrity's SiteMinder for SSO security on all web apps.
Although SiteMinder handles security for accessing the application
itself, restrictions to certain functions and data are handled within
the application based on user type.
The user information (such as name, type, etc.) are passed in from
SiteMinder via header variables. ie:
hddr_user = Joe Blo
hddr_group = Admin
hddr_phone = 555-555-5555
I'm looking at different designs to capture all of this user
information from the headers at one time and store as a bean in the
user's session (so as to not need to continually reference the header
information).
Does anyone know if you can create a managed bean (ie. User) that is
initialized with header information (by using the configuration file
w/ value-binding expressions)?
- 5
- passing RequestPath to error page from web.xmlHi,
I have pointed any errors to Error.jsp in my web.xml file (as shown).
<error-page>
<error-code>500</error-code>
<location>/Error.jsp?id=500</location>
</error-page>
As you can see I also pass the type of error, is there any way I can
pass the RequestPath that resulted in the error in the first place?
Cheers,
Paul
- 5
- Help to understand 'array of classes' exampleHi,
I'm trying to create/use an array of classes, and I found the following
code snippet using Google Groups:
...
rectangle[ ] array_name = new rectangle[ 100 ]; // or whatever
size
for ( int n = 0; n < 100; ++n )
{
array_name[ n ] = new rectangle( );
}
...
int i = 99;
int wide = array_name[i].getwidth( );
...
The above snippet was from:
http://groups.google.com/group/comp.lang.java.programmer/msg/1ea4bbde51104914
What I'm trying to understand in the above snippet is the line where the
array is initialized:
rectangle[ ] array_name = new rectangle[ 100 ]; // or whatever size
Before I found that post, I was trying something like:
rectangle [] arrayName; // declear an array of 'rectangle classes'
.
.
rectangle[0] = new rectangle(); // instantiate rectangle/populate array
rectangle[1] = new rectangle(); // instantiate rectangle/populate array
I did it that way because I don't know the number of classes that I'll
want to have in the array of classes ahead of time.
The code per the snippet from the cited posts works, but my original
code would get a NullPointerException, and I don't understand why.
Can someone explain this?
Also, is it possible to do this in a way that I don't have to allocate a
fixed size array?
Thanks,
Jim
- 5
- LookAndFeelHi,
I have a couple of issues I'm trying to resolve. Hopefully someone will have
some ideas.
First, I've been unsucessful trying to get the MotifLookAndFeel working.
I've following every example I have (on paper) and nothing seems to work.
I've run the app on both the PC and Linux box; the window looks and feel
shows up on the PC and metal on the linux machine. Anyone know what's going
on or what could be missing?
Second, the app I've been working has a bunch of ToggleButtons and the color
of the button changes based on selection. All I do is set the background
color in the button press callback. Okay, fine. But when I run the code in
linux, I'm unable to change the color of the "select" mode of the Toggle
button. It always gray. Again. Does anyone know what's going on? From all my
years, this should be extremely simple. Why would it work correctly on the
PC and not in unix?
Thanks in advance.
Bryan
- 5
- getting Error: could not find libjava.so Re: building a jdk1.5
On Mar 3, 2007, at 5:18 PM, Bill Moran wrote:
>
>> On Mar 3, 2007, at 4:01 PM, Chad Leigh -- Shire.Net LLC wrote:
>>
>>> Hi
>>>
>>> I am trying to build jdk15 inside my jail with PREFIX set to /usr/
>>> public (At one time I successfully got jdk 1.4 to build after much
>>> hacking)
>>>
>>> I have the option for builing inside a jail set. We get to the
>>> point where the linux java is installed and it is actually building
>>> the jdk
>>>
>>> # Start of jdk build
>>> /libexec/ld-elf.so.1: /usr/local/lib/libiconv.so.3: Undefined
>>> symbol "__mb_cur_max"
>>> *** Error code 1
>>>
>>> Stop in /usr/ports/java/jdk15.
>>> #
>>>
>>> I am not exactly sure what it is doing at this point in order to
>>> hack round it. libiconv a fresh install from ports
>>>
>>
>> Turns out that the issue is that gmake cannot run. I have not
>> figured out why yet, having removed and reinstalled libiconv and
>> gmake and getting the same error. But it is not java related.
>>
>> I'll redirect this to -questions
>>
>> If anyone has an idea on why gmake would fail as above on a fresh
>> install, 6.2-RELEASE from a day or two ago, I would appreciate it.
>> Please CC me as I am not currently subscribed to -questions, though I
>> am on -java
>
> Not a direct answer to your question, but when I needed to do this
> a few months ago, I just did a "make package" on my workstation, then
> shipped the package up to the jail system and installed it with
> pkg_add.
>
> Doesn't solve the problem, but if you're in a pinch, it's a handy
> workaround.
>
OK, I had never done this before -- built a package from a port. So
I did this on the base machine and then copied it into the jail and
did a pkg_add like so
# pkg_add -P /usr/public -v jdk-1.5.0p4_1.tbz
as I wanted it installed in my local policy dir /usr/public (which
gets mounted RO in every jail). My 1.4.2 java on my other jail
server is installed like this (but was built inside the jail many
moons ago).
Now, when I try to run java I get
# java -version
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.
#
Java is in /usr/public/jdk1.5.0/ (the same as my 1.4.2 on the other
server which is in /usr/public/jdk1.4.2/). libjava.so is inside the
lib dir and I thought that java was referential to itself so it could
find its libraries.
I also tried setting JAVA_HOME and JRE_HOME though I have not had to
do that in a long time.
The new 1.5 jdk is registered in the javavms file .
When I run the javavm script with /bin/sh -x it does run the correct
java and running it with an explicit path does not help.
# /bin/sh -x /usr/public/bin/javavm -version
+ _JAVAVM_SAVE_PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/pub/
sbin:/usr/pub/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/
bin
+ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+ _JAVAVM_PREFIX=/usr/public
+ _JAVAVM_CONF=/usr/public/etc/javavms
+ _JAVAVM_OPTS_CONF=/usr/public/etc/javavm_opts.conf
+ basename /usr/public/bin/javavm
+ _JAVAVM_PROG=javavm
+ _JAVAVM_MAKE=/usr/bin/make
+ [ javavm = javavm ]
+ echo javavm: warning: The use of 'javavm' as a synonym for 'java'
is deprecated
javavm: warning: The use of 'javavm' as a synonym for 'java' is
deprecated
+ _JAVAVM_PROG=java
+ [ -r /usr/public/etc/javavm_opts.conf ]
+ . /usr/public/etc/javavm_opts.conf
+ _JAVAVM_OPTS=
+ setJavaHome
+ realpath
+ realpath /usr/public
+ [ -n -a /stubs/usr_local/etc/ssmtp != /usr/public ]
+ unset JAVA_HOME
+ _JAVAVM_PORTSDIR=
+ [ -r /usr/share/mk/bsd.port.mk ]
+ /usr/bin/make -f /usr/share/mk/bsd.port.mk -V PORTSDIR
+ _JAVAVM_PORTSDIR=
+ _JAVAVM_BSD_PORT_MK=
+ [ -n -a -r /Mk/bsd.port.mk ]
+ [ -n ]
+ [ ! -e /usr/public/etc/javavms ]
+ sed -E s|[[:space:]]*#.*||
+ uniq
+ _JAVAVM_VMS=/usr/public/jdk1.5.0/bin/java
/usr/public/linux-sun-jdk1.4.2/bin/java
+ [ -n ]
+ dirname /usr/public/jdk1.5.0/bin/java
+ JAVA_HOME=/usr/public/jdk1.5.0/bin
+ dirname /usr/public/jdk1.5.0/bin
+ JAVA_HOME=/usr/public/jdk1.5.0
+ basename /usr/public/jdk1.5.0
+ _JAVAVM_VM=jdk1.5.0
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n /usr/public/jdk1.5.0 -a -f /usr/public/jdk1.5.0/bin/java ]
+ _JAVAVM_PROG_PATH=/usr/public/jdk1.5.0/bin
+ return 0
+ [ 0 != 0 ]
+ [ -x /usr/public/jdk1.5.0/bin/java ]
+ basename /usr/public/jdk1.5.0
+ setJavaOptions java jdk1.5.0
+ echo java
+ sed -e s/\./_/g -e s/-/_/g
+ local OPTS_PROG=java
+ echo jdk1.5.0
+ sed -e s/\./_/g -e s/-/_/g
+ local OPTS_JAVA_HOME=jdk1_5_0
+ eval echo ${JAVAVM_OPTS_jdk1_5_0_java}
+ local JAVA_HOME_PROG_OPTS=
+ eval echo ${JAVAVM_OPTS_jdk1_5_0}
+ local JAVA_HOME_OPTS=
+ eval echo ${JAVAVM_OPTS_java}
+ local PROG_OPTS=
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ export JAVA_HOME
+ tryJavaCommand /usr/public/jdk1.5.0/bin/java -version
+ [ -n ]
+ [ -x /usr/public/jdk1.5.0/bin/java ]
+ [ -n /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/pub/sbin:/usr/
pub/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin ]
+ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/pub/sbin:/
usr/pub/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
+ exec /usr/public/jdk1.5.0/bin/java -version
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.
#
What did I do wrong?
Thanks
Chad
---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad at shire.net
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 5
- generate certificate from PEMHi,
I am developing a middleware solution for our companyy. I have got 2
certifcates clkey.pem and clcert.pem for the final application. How I
can combine these 2 keys in 1 certificate? Do I need to first create
self signed certificate?
Thx in advance.
- 7
- javax and macim running mac os 9.2 with MRJ SDK 2.2. im tring to compile a class
importing javax.swing.*; it says it cant find it. i unziped all the
jars and i cant find javax anywhere. is this not supported on this os.
- 8
- JTable and Custom Default Cell Editors
From: "Erica Wheatcroft" <email***@***.com>
Subject: JTable
Date: Thursday, January 20, 2005 4:17 PM
HI -
I have a jtable that uses two custom default cell editors to create combo
boxes for two of the the 4 columns. If the user selects another value from
either of the combo boxes i want to know that so i can indicate a save must
occur. I'm not sure what event i should listen to? Does any one have any
suggestions?
Thanks in advance.
Erica
- 9
- How do i implement this interfacepublic interface AQuestion
{
public abstract void someMethod() throws Exception;
}
http://www.angelfire.com/or/abhilash/Main.html
see Question no 5.
How do i implement this interface ?
(1) problem is, it has an abstract method and hecne its complicated
to implement this class.
(2) another problem is, it is the public interface and hence we can not
make one more public class in the same file....because 1 file can have
only 1 public access specifier.
is it really possible to implement this interface ?
- 10
- Problem in configuring SSL in Tomcat5.5Hi,
I have Tomcat5.5 and J2sdk5 installed on my system. I wanted turn on
SSL services in tomcat. I went through the Tomcat Documentation and
did it exactly. I modified server.xml as below,
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
I also created certificate using keytool with default password as
"changeit" and alias as "tomcat".
I restarted the tomcat services too, and then tried to access the page
but i am not able to access it using https connection. Where as i am
able to access same page using Http connection.
Secondly, I am not able to access default tomcat Page too using Https
connection. Everything works fine in case of HTTP connection.
Following is the way iam trying to acces the page,
https://localhost:8443
Can any one help me out to find the problem.
I have IE 6 with SP2 installed on my system.
Thanks
Minesh
- 10
- TableCellRender puzzleBelow is a fairly simple TableCellRenderer for displaying an enum as
an Icon. That works fine. But I added a wrinkle, changing the
background colour depending on whether the row is selected.
No background colour changes happen, even though isSelected is true
when it should be. I wonder if I am missing something obvious.
package com.mindprod.vercheck;
import javax.swing.*;
import javax.swing.table.TableCellRenderer;
import java.awt.*;
/**
* render a the AppSate enum cell, use icon without text.
*/
final class AppStateRenderer implements TableCellRenderer
{
// ------------------------------ FIELDS
------------------------------
private static final JLabel template = new JLabel( "",
JLabel.CENTER );
private Color background;
private Color selectedBackground;
// -------------------------- PUBLIC INSTANCE METHODS
--------------------------
/**
* constructor
*
* @param background background colour
* @param selectedBackground background colour when seleced
*/
public AppStateRenderer( Color background, Color
selectedBackground )
{
this.background = background;
this.selectedBackground = selectedBackground;
}
public Component getTableCellRendererComponent( JTable table,
Object value,
boolean
isSelected,
boolean hasFocus,
int row,
int column )
{
System.err.println( "selected:" + isSelected + " " + row + " "
+ table.getSelectedRow() );
template.setIcon( ( (AppState) value ).getIcon() );
template.setBackground( isSelected? selectedBackground :
background );
return template;
}
}
--
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
- 12
- Tomcat on Windows: JAVA_HOME & -Dsun.io.useCanonCaches'Apologies for posting this here, but I couldn't find any Tomcat user
forum.
A colleague is currently trying to run Tomcat 4.1.30 on Windows 2000
Professional. She first installed JRE2 1.4.2_08, and set %JAVA_HOME%
to the directory C:\j2re1.4.2_08 - I've run "java -version" and it
works fine.
(%JAVA_HOME%/home is in the path correctly).
She then installed Tomcat to C:\jakarta-tomcat-4.1.30.
However, when she runs catalina.sh start, she gets the following
error:
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
Using CATALINA_BASE: C:\jakarta-tomcat-4.1.30
Using CATALINA_HOME: C:\jakarta-tomcat-4.1.30
Using CATALINA_TMPDIR: C:\jakarta-tomcat-4.1.30\temp
Using JAVA_HOME: C:\j2re1.4.2_08
'-Dsun.io.useCanonCaches' is not recognized as an internal or external
command,
operable program or batch file.
I've even tried adding the following to catalina.bat without success:
if not "%JAVA_HOME%" == "" goto gotJavaHome
set JAVA_HOME=C:\j2re1.4.2_08
:gotJavaHome
Can anyone see where we might be going wrong?
Cheers,
P.
|
| Author |
Message |
blmblm

|
Posted: 2007-8-22 18:02:00 |
Top |
java-programmer, Great SWT Program
In article <email***@***.com>,
Twisted <email***@***.com> wrote:
> On Aug 21, 1:30 pm, Joe Attacki <email***@***.com> wrote:
> [Attacki misattributed the quoted text once again]
> [insulting nonsense deleted]
> > Honestly, I don't care if he advertises his open-source project in here,
> > but the fact that he was underhanded about it is what I took issue with.
>
> I've provided a reasonably plausible and much more charitable
> interpretation of his actions. You are quick to see malice where there
> may well be none;
Oh, the irony.
> probably because your own normal behavior is
> malicious, so you expect it of everyone else as your default model for
> a random person's mind is (as is normal) your self-model.
--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
|
| |
|
| |
 |
blmblm

|
Posted: 2007-8-22 18:02:00 |
Top |
java-programmer >> Great SWT Program
In article <email***@***.com>,
Twisted <email***@***.com> wrote:
> On Aug 21, 1:30 pm, Joe Attacki <email***@***.com> wrote:
> [Attacki misattributed the quoted text once again]
> [insulting nonsense deleted]
> > Honestly, I don't care if he advertises his open-source project in here,
> > but the fact that he was underhanded about it is what I took issue with.
>
> I've provided a reasonably plausible and much more charitable
> interpretation of his actions. You are quick to see malice where there
> may well be none;
Oh, the irony.
> probably because your own normal behavior is
> malicious, so you expect it of everyone else as your default model for
> a random person's mind is (as is normal) your self-model.
--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
|
| |
|
| |
 |
Twisted

|
Posted: 2007-8-22 21:36:00 |
Top |
java-programmer >> Great SWT Program
On Aug 22, 6:01 am, email***@***.com <email***@***.com> wrote:
> > I've provided a reasonably plausible and much more charitable
> > interpretation of his actions. You are quick to see malice where there
> > may well be none;
>
> Oh, the irony.
Is this meant to be some kind of attack?
If not, then it bears explaining.
If so, then you really need to try harder. :P
|
| |
|
| |
 |
blmblm

|
Posted: 2007-8-22 23:17:00 |
Top |
java-programmer >> Great SWT Program
In article <email***@***.com>,
Twisted <email***@***.com> wrote:
> On Aug 22, 6:01 am, email***@***.com <email***@***.com> wrote:
> > > I've provided a reasonably plausible and much more charitable
> > > interpretation of his actions. You are quick to see malice where there
> > > may well be none;
> >
> > Oh, the irony.
>
> Is this meant to be some kind of attack?
I'd call it an observation, but one that does imply something
negative about your behavior. I wouldn't call that an attack,
but you might.
> If not, then it bears explaining.
Do I need to spell it out for you? You don't think *you* are
"quick to see malice where there may well be none"?
> If so, then you really need to try harder. :P
I'd just as soon not.
--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
|
| |
|
| |
 |
Twisted

|
Posted: 2007-8-23 12:53:00 |
Top |
java-programmer >> Great SWT Program
On Aug 22, 11:16 am, email***@***.com <email***@***.com>
wrote:
> In article <email***@***.com>,
>
> Twisted <email***@***.com> wrote:
> > On Aug 22, 6:01 am, email***@***.com <email***@***.com> wrote:
> > > > I've provided a reasonably plausible and much more charitable
> > > > interpretation of his actions. You are quick to see malice where there
> > > > may well be none;
>
> > > Oh, the irony.
>
> > Is this meant to be some kind of attack?
>
> I'd call it an observation, but one that does imply something
> negative about your behavior.
In other words, yes.
> Do I need to spell it out for you? You don't think *you* are
> "quick to see malice where there may well be none"?
No. Only when it's clear that someone is doing something bad or
sneaky. Suggesting an expensive and proprietary solution to someone
while neglecting to mention either a) that it's expensive and
proprietary or b) the several fairly well-known free alternatives that
haven't been mentioned in the thread yet and that a) you surely know
of but b) the OP presumably doesn't or they wouldn't be asking their
question in the first place. This has occurred a few times and leads
to the obvious suspicion that the poster is financially connected to
the company that makes the expensive solution in some way. (Employee,
or owns stock, or ...) else why would they specifically omit
mentioning the free options? (Example: someone responded to someone's
IDE question by mentioning IntelliJ products, with no mention of
either Eclipse or NetBeans, despite surely knowing of both, being a
regular poster here.)
Another example of course is someone posting something that states or
implies something negative about another poster. This (demonstrably)
leads to nonconstructive flamewars and is clearly off-topic besides.
It's difficult to imagine there can be any non-malicious reason for
doing such a thing.
Or do you propose that these things happen by accident? I don't see
this as plausible, though. You don't badmouth someone by accident, or
mention a commercial product but not a free one by chance, unless you
are picking elements of your responses out of a hat by blind draw, and
there's no sane reason to be doing *that* is there?
|
| |
|
| |
 |
Mike Schilling

|
Posted: 2007-8-23 14:32:00 |
Top |
java-programmer >> Great SWT Program
Twisted wrote:
>This has occurred a few times and leads
> to the obvious suspicion that the poster is financially connected to
> the company that makes the expensive solution in some way. (Employee,
> or owns stock, or ...) else why would they specifically omit
> mentioning the free options? (Example: someone responded to someone's
> IDE question by mentioning IntelliJ products, with no mention of
> either Eclipse or NetBeans, despite surely knowing of both, being a
> regular poster here.)
That was me.
1. IntelliJ is, in my experience and opinion, by far the best of the three.
I know many developers who pay money for IntelliJ rather than download the
free ones, because it makes them that much more productive.
2. Other people had mentioned Eclipse and NetBeans, making it unnecessary
for me to do so.
3. That's not an "obvious suspicion". It is an outrageous attack on my
personal integrity, which is why I'm bothering to respond.
|
| |
|
| |
 |
blmblm

|
Posted: 2007-8-23 17:17:00 |
Top |
java-programmer >> Great SWT Program
In article <email***@***.com>,
Twisted <email***@***.com> wrote:
> On Aug 22, 11:16 am, email***@***.com <email***@***.com>
> wrote:
> > In article <email***@***.com>,
> >
> > Twisted <email***@***.com> wrote:
> > > On Aug 22, 6:01 am, email***@***.com <email***@***.com> wrote:
> > > > > I've provided a reasonably plausible and much more charitable
> > > > > interpretation of his actions. You are quick to see malice where there
> > > > > may well be none;
> >
> > > > Oh, the irony.
> >
> > > Is this meant to be some kind of attack?
> >
> > I'd call it an observation, but one that does imply something
> > negative about your behavior.
>
> In other words, yes.
I'd say "attack" is too strong a word for an admittedly somewhat
snarky observation. But maybe not.
> > Do I need to spell it out for you? You don't think *you* are
> > "quick to see malice where there may well be none"?
>
> No. Only when it's clear that someone is doing something bad or
> sneaky. Suggesting an expensive and proprietary solution to someone
> while neglecting to mention either a) that it's expensive and
> proprietary or b) the several fairly well-known free alternatives that
> haven't been mentioned in the thread yet and that a) you surely know
> of but b) the OP presumably doesn't or they wouldn't be asking their
> question in the first place. This has occurred a few times and leads
> to the obvious suspicion that the poster is financially connected to
> the company that makes the expensive solution in some way. (Employee,
> or owns stock, or ...) else why would they specifically omit
> mentioning the free options? (Example: someone responded to someone's
> IDE question by mentioning IntelliJ products, with no mention of
> either Eclipse or NetBeans, despite surely knowing of both, being a
> regular poster here.)
Huh. Well, maybe I'm more trusting than I think -- I don't assume
that personal financial gain is the most likely explanation for
someone mentioning a commercial product despite being aware of
no-cost / non-commercial alternatives. Sure, it's a possible
explanation, but most likely? Apparently YMV ("Your Mileage
Varies") here.
The "someone" who mentioned IntelliJ has explained why he didn't
mention no-cost alternatives. I find this explanation completely
plausible, and I might have acted as he did (mentioning a commercial
product I thought was worth recommending, without including a
discussion of alternatives).
> Another example of course is someone posting something that states or
> implies something negative about another poster. This (demonstrably)
> leads to nonconstructive flamewars and is clearly off-topic besides.
> It's difficult to imagine there can be any non-malicious reason for
> doing such a thing.
Carelessness? Different standards of what constitutes an
offensive remark? A comment that many people find unobjectionable
("you are wrong about that") may be taken as an insult by some.
Maybe we should all be more careful not to give offense, even
inadvertently, but I think the rule about not ascribing to malice
that which can be explained by stupidity more or less applies here.
> Or do you propose that these things happen by accident? I don't see
> this as plausible, though. You don't badmouth someone by accident, or
> mention a commercial product but not a free one by chance, unless you
> are picking elements of your responses out of a hat by blind draw, and
> there's no sane reason to be doing *that* is there?
I think there are more possible explanations than you're offering here
(deliberate malice/greed or accident).
--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
|
| |
|
| |
 |
Twisted

|
Posted: 2007-8-24 6:38:00 |
Top |
java-programmer >> Great SWT Program
On Aug 23, 2:32 am, "Mike Schilling" <email***@***.com>
wrote:
[snip]
You again!
> Twisted wrote:
> >This has occurred a few times and leads
> > to the obvious suspicion that the poster is financially connected to
> > the company that makes the expensive solution in some way. (Employee,
> > or owns stock, or ...) else why would they specifically omit
> > mentioning the free options? (Example: someone responded to someone's
> > IDE question by mentioning IntelliJ products, with no mention of
> > either Eclipse or NetBeans, despite surely knowing of both, being a
> > regular poster here.)
>
> That was me.
>
> 1. [snip advertisement for commercial product]
> 2. Other people had mentioned Eclipse and NetBeans, making it unnecessary
> for me to do so.
This has often not been the case in the threads where I raise a fuss.
> 3. That's not an "obvious suspicion". It is an outrageous attack on my
> personal integrity, which is why I'm bothering to respond.
There was no attack, outrageous or otherwise, in the post to which you
just replied. It didn't name any names but Andrew Thompson, and even
so, it named none in connection with promoting commercial software to
the exclusion of free alternatives and without upfront disclosure.
A post that doesn't name names can hardly be considered an "outrageous
attack on your personal integrity".
On the other hand, your reaction does speak volumes about your guilty
conscience. The duck that got shot quacks the loudest.
Incidentally, you have not provided any reasonable explanation for
mentioning IntelliJ without mentioning that it costs money, thus
saving people on a budget the bother of wasting their time clicking a
link or two before finding that out and then just sighing and clicking
back several times. Well, people on a budget and everyone else of
sound mind and judgment, since nobody sane will pay over the odds for
something they can easily and legally get for free someplace else.
But that comes right back to why care might be taken to softpedal the
very existence of free alternatives...
|
| |
|
| |
 |
Twisted

|
Posted: 2007-8-24 6:49:00 |
Top |
java-programmer >> Great SWT Program
On Aug 23, 5:16 am, email***@***.com <email***@***.com> wrote:
> Huh. Well, maybe I'm more trusting than I think -- I don't assume
> that personal financial gain is the most likely explanation for
> someone mentioning a commercial product despite being aware of
> no-cost / non-commercial alternatives. Sure, it's a possible
> explanation, but most likely? Apparently YMV ("Your Mileage
> Varies") here.
What about doing so while also carefully omitting to mention a) the
existence of free equivalents AND b) the fact that the product you've
mentioned is not free?
> The "someone" who mentioned IntelliJ has explained why he didn't
> mention no-cost alternatives. I find this explanation completely
> plausible, and I might have acted as he did (mentioning a commercial
> product I thought was worth recommending, without including a
> discussion of alternatives).
If the alternatives had already come up in the same thread, that would
be fine. As long as you disclosed in your posting that your new
suggestion was not free, and preferably stated the price rather than
just indicating that it was nonzero.
> Maybe we should all be more careful not to give offense, even
> inadvertently, but I think the rule about not ascribing to malice
> that which can be explained by stupidity more or less applies here.
Calling me names is not easily explained without invoking malice in
some form. Indeed, if someone expresses a negative claim about me one
of two things must be the case:
a) They don't actually believe it, in which case they are lying and
indeed lying maliciously to muddy my name. This is clearly malicious
behavior. Or
b) They are sincere, in which case they actually believe nasty things
about me, in which case those very beliefs are themselves what's
malicious, and presumably malicious behavior (such as broadcasting
those beliefs in public) stems from their dislike of me.
Either way, something malicious is going on. And this applies equally
if I'm replaced with any other person as target.
> I think there are more possible explanations than you're offering here
> (deliberate malice/greed or accident).
Such as? Surely nobody truly honestly believes that excellent free
products like Eclipse are no good and awful? Or perhaps they do --
duped by whoever *really* stands to gain from pushing an inferior,
proprietary, and expensive good over a perfectly good commodity
version. Either way, it's disingenuous on *someone*'s part. It's
rather like a drug company advertising its heavily over-priced
painkiller that actually has exactly the same active ingredient as an
ordinary generic aspirin, only about half as much per pill and at four
times the price per pill; the only difference in the products being
that their pill is a funky orange color and has their logo proudly
stamped on both sides. And then convincing their customers to
proselytize their brand as superior to generic aspirin as well.
Which they're eager to do, mainly because it helps them convince
themselves that they did not just waste an ungodly amount of money on
what they fear they could indeed have had for a fraction of that
amount.
Only with software the force of self-deception will be even more
powerful, as someone seeks desperately to believe that they somehow
didn't get screwed in the transaction when they plonked down a three-
figure sum for something a competitor is giving away gratis.
Convincing others is a common way to try to convince yourself.
This is also how prudish mores survive and get transmitted from
generation to generation. *Not* pushing the notion that anything fun
is immoral and a deadly sin means admitting that your own dry and
boring life of just lying back and thinking of England was wasted and
you missed out on a lot of good things and now you're past your prime
and have lost any chance of ever having those experiences. :)
|
| |
|
| |
 |
Mike Schilling

|
Posted: 2007-8-24 6:49:00 |
Top |
java-programmer >> Great SWT Program
"Twisted" <email***@***.com> wrote in message
news:email***@***.com...
>
> On the other hand, your reaction does speak volumes about your guilty
> conscience. The duck that got shot quacks the loudest.
I think that The Sopranos is a much better show than Everybody Loves
Raymond. Now claim I own HBO, you idiot.
|
| |
|
| |
 |
Mike Schilling

|
Posted: 2007-8-24 6:57:00 |
Top |
java-programmer >> Great SWT Program
"Twisted" <email***@***.com> wrote in message
news:email***@***.com...
>
> If the alternatives had already come up in the same thread, that would
> be fine. As long as you disclosed in your posting that your new
> suggestion was not free, and preferably stated the price rather than
> just indicating that it was nonzero.
"I just found this great Thai restuarant downtown, but they charge for the
food. Or, the Salvation Army runs a soup kitchen."
|
| |
|
| |
 |
nebulous99

|
Posted: 2007-8-24 8:16:00 |
Top |
java-programmer >> Great SWT Program
On Aug 23, 6:49 pm, "Mike Schilling" <email***@***.com>
wrote:
> > On the other hand, your reaction does speak volumes about your guilty
> > conscience. The duck that got shot quacks the loudest.
>
> I think that The Sopranos is a much better show than Everybody Loves
> Raymond. Now claim I own HBO, you [insult deleted].
Apples, oranges, and yes, the original topic was bananas into the
bargain.
Do you and Lew actively lurk and monitor the group continually for new
posts so whenever you see one by me you can pounce on it instantly?
It's making it impossible for me to get caught up -- I've already been
here an hour longer than I planned to today, because new posts keep
arriving that flame me and require a response from me, only for you to
go and undo all my hard work by posting another fucking flame two
minutes after my response goes live. Fuck off, the both of you.
Oh, and Lew, I now have evidence that Joe Attacki is a sock puppet of
yours. Not proof, mind you, but some circumstantial evidence. You both
posted via google groups and after a near-simultaneous transition now
post via a Comcast news server, and the whole while from Comcast IPs.
The one niggling spoiler is that there's a post by you with a reply by
Attacki 20 minutes later a few days ago and the IP addresses are quite
different (though both owned by Comcast). That suggests maybe a
coincidence in ISP and news server use, and different cities of
residence. Then again, a lot of large ISPs (such as Comcast) just
allocate DHCP randomly from any of several large, non-city-specific IP
blocks these days, which can be quite diverse even in their first
octets, so ...
I just wonder if maybe you spun off an alternate persona for posting
the really nasty OT flames and legally-dodgy things like privacy-
prying and other things in questionable taste so they won't reflect on
your reputation under the name Lew.
Just a theory, mind you.
|
| |
|
| |
 |
Lew

|
Posted: 2007-8-24 8:21:00 |
Top |
java-programmer >> Great SWT Program
email***@***.com wrote:
> Oh, and Lew, I now have evidence that Joe Attacki is a sock puppet of
> yours. Not proof, mind you, but some circumstantial evidence. You both
> posted via google groups and after a near-simultaneous transition now
I don't use Google Groups. You couldn't pay me to use Google Groups.
--
Lew
|
| |
|
| |
 |
nebulous99

|
Posted: 2007-8-24 8:25:00 |
Top |
java-programmer >> Great SWT Program
On Aug 23, 6:56 pm, "Mike Schilling" <email***@***.com>
wrote:
> "I just found this great Thai restuarant downtown, but they charge for the
> food. Or, the Salvation Army runs a soup kitchen."
That's a completely different matter.
A. The marginal cost of reproduction of food is not zero. Unlike, say,
software.
2. The Salvation Army is a charitable cause whose service is meant for
the hungry homeless. Someone who can afford to buy food at normal
commodity prices using their service might be committing some form of
fraud and is certainly abusing their hospitality and competing with
the homeless people who have no alternative. The same is not true of
people using Eclipse, which is aimed at a general audience of
programmers and where it costs very little for them to provide plenty
for everybody, so people with money downloading Eclipse aren't
crowding out poor people who can't afford IntelliJ. Unlike soup,
Eclipse is a nonrival good. And lastly,
D. There's a quality difference. The soup kitchen probably serves
ordinary food, while the Thai restaurant likely sells weird ethnic
crap. Eclipse and IntelliJ, on the other hand, are both IDEs with a
focus on Java. If you were comparing Eclipse with some weird
commercial Borland text-mode IDE from the early nineties your analogy
might make more sense. A better comparison would be to put the free
Borland-IDE-clone RHIDE on the soup-kitchen side as free but no-frills
and crummy and some weird commercial IDE with a very odd user-
interface on the other -- perhaps something used on SGI workstations
in days of yore, so it would seem to speak with a thick accent to
Windoze-users, and priced in the four-figures like anything else
connected with SGI (except the hardware, whose pricing was worse --
much, much worse).
Anyone who can spot the subtle reference gets a free IDE by the way.
|
| |
|
| |
 |
nebulous99

|
Posted: 2007-8-24 8:32:00 |
Top |
java-programmer >> Great SWT Program
On Aug 23, 8:21 pm, Lew <email***@***.com> wrote:
> email***@***.com wrote:
> > Oh, and Lew, I now have evidence that Joe Attacki is a sock puppet of
> > yours. Not proof, mind you, but some circumstantial evidence. You both
> > posted via google groups and after a near-simultaneous transition now
>
> I don't use Google Groups. You couldn't pay me to use Google Groups.
Do you ever rest?
Anyway, I never said you did. I said you *used* to.
|
| |
|
| |
 |
Lew

|
Posted: 2007-8-24 8:37:00 |
Top |
java-programmer >> Great SWT Program
email***@***.com wrote:
> On Aug 23, 8:21 pm, Lew <email***@***.com> wrote:
>> email***@***.com wrote:
>>> Oh, and Lew, I now have evidence that Joe Attacki is a sock puppet of
>>> yours. Not proof, mind you, but some circumstantial evidence. You both
>>> posted via google groups and after a near-simultaneous transition now
>> I don't use Google Groups. You couldn't pay me to use Google Groups.
>
> Do you ever rest?
>
> Anyway, I never said you did. I said you *used* to.
I have never used Google Groups.
--
Lew
|
| |
|
| |
 |
nebulous99

|
Posted: 2007-8-24 8:46:00 |
Top |
java-programmer >> Great SWT Program
On Aug 23, 8:37 pm, Lew <email***@***.com> wrote:
> email***@***.com wrote:
> > On Aug 23, 8:21 pm, Lew <email***@***.com> wrote:
> >> email***@***.com wrote:
> >>> Oh, and Lew, I now have evidence that Joe Attacki is a sock puppet of
> >>> yours. Not proof, mind you, but some circumstantial evidence. You both
> >>> posted via google groups and after a near-simultaneous transition now
> >> I don't use Google Groups. You couldn't pay me to use Google Groups.
>
> > Do you ever rest?
>
> > Anyway, I never said you did. I said you *used* to.
>
> I have never used Google Groups.
This does not correspond to my own memory, which I certainly trust
much more than I'm likely to ever trust you given your past and
present behavior towards me. Implying that I'm a liar for instance.
|
| |
|
| |
 |
Lew

|
Posted: 2007-8-24 8:48:00 |
Top |
java-programmer >> Great SWT Program
email***@***.com wrote:
> On Aug 23, 8:37 pm, Lew <email***@***.com> wrote:
>> email***@***.com wrote:
>>> On Aug 23, 8:21 pm, Lew <email***@***.com> wrote:
>>>> email***@***.com wrote:
>>>>> Oh, and Lew, I now have evidence that Joe Attacki is a sock puppet of
>>>>> yours. Not proof, mind you, but some circumstantial evidence. You both
>>>>> posted via google groups and after a near-simultaneous transition now
>>>> I don't use Google Groups. You couldn't pay me to use Google Groups.
>>> Do you ever rest?
>>> Anyway, I never said you did. I said you *used* to.
>> I have never used Google Groups.
>
> This does not correspond to my own memory, which I certainly trust
> much more than I'm likely to ever trust you given your past and
> present behavior towards me. Implying that I'm a liar for instance.
I'm not implying anything. Just letting you and everyone know that I've never
used Google Groups - a simple statement of fact. I use Thunderbird for my
newsreader and have done for many years.
--
Lew
|
| |
|
| |
 |
Mike Schilling

|
Posted: 2007-8-24 8:55:00 |
Top |
java-programmer >> Great SWT Program
<email***@***.com> wrote in message
news:email***@***.com...
> On Aug 23, 6:49 pm, "Mike Schilling" <email***@***.com>
> wrote:
>> > On the other hand, your reaction does speak volumes about your guilty
>> > conscience. The duck that got shot quacks the loudest.
>>
>> I think that The Sopranos is a much better show than Everybody Loves
>> Raymond. Now claim I own HBO, you [insult deleted].
>
> Apples, oranges, and yes, the original topic was bananas into the
> bargain.
>
> Do you and Lew actively lurk and monitor the group continually for new
> posts so whenever you see one by me you can pounce on it instantly?
I do look for replies to message I've sent. If you don't want to be in that
list, you know what to do.
|
| |
|
| |
 |
bbound

|
Posted: 2007-8-24 8:58:00 |
Top |
java-programmer >> Great SWT Program
On Aug 23, 8:48 pm, Lew <email***@***.com> wrote:
[repeats self]
ENOUGH of this horseshit! If you have nothing original to say then
shut the hell up and let me get on with my evening.
|
| |
|
| |
 |
Mike Schilling

|
Posted: 2007-8-24 8:59:00 |
Top |
java-programmer >> Great SWT Program
"Lew" <email***@***.com> wrote in message
news:email***@***.com...
> email***@***.com wrote:
>> Oh, and Lew, I now have evidence that Joe Attacki is a sock puppet of
>> yours. Not proof, mind you, but some circumstantial evidence. You both
>> posted via google groups and after a near-simultaneous transition now
>
> I don't use Google Groups. You couldn't pay me to use Google Groups.
We see right through you. Not only do you use Google Groups, you've hacked
it to set the header
User-Agent: Thunderbird 2.0.0.5 (X11/20070719)
|
| |
|
| |
 |
Mike Schilling

|
Posted: 2007-8-24 9:00:00 |
Top |
java-programmer >> Great SWT Program
<email***@***.com> wrote in message
news:email***@***.com...
> On Aug 23, 6:56 pm, "Mike Schilling" <email***@***.com>
> wrote:
>> "I just found this great Thai restuarant downtown, but they charge for
>> the
>> food. Or, the Salvation Army runs a soup kitchen."
>
> That's a completely different matter.
How can I possibly argue with your points A, 2, and D?
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Eclipse and Tomcat DevelopmentHi,
I am trying to figure out how to change the build path for my java servlets
in eclipse so that my class files are located within my Apache Tomcat
servers class directory. I tried to change the output folder in eclipse for
the project properties but it doesn't seem to accept it as a valid
directory. It only accepts folders with the current projects working
directory (ex. eclipse\workspace\myProject). Any idea how to do this without
the use of plugin's. If not can someone recommend me the most popular plugin
to get this job done. Thanx in advance
Joe
- 2
- How to set size for JComboBoxHi all,
I am developing an application, which will have two JComboBoxes and
two JTables, and i am using gridbag layout.
when the initial string for JComboBox is small enough then these
sets(JComboBox and JTable) are divided equally, when the initially
string is big then the two sets(JComboBox and JTable) are not divided
equally, how can i divide them equally irrespective of the string
length.
I used the setSize(),setPreferredSize(),and setMaximumSize() for
JComboBox but there is no result ,
Plz help me,
Thanks in advance
dwurity
- 3
- To really foul things up requires a computerPartner just got back from a new government job with an amusing tale.
BC is a large province (about 1000 miles top to bottom) so the BC
government decided to set up a computer system so that any printout
could be directed to any printer in the province, thus saving on
courier costs.
However, the default is the system selects a non-busy printer, not
worrying particularly if it is 1000 miles from the intended recipient.
The printouts don't have proper headers to direct them to the person
eagerly awaiting them so most of the printouts ended up in the
shredder.
- 4
- where to find graphics for buttonsI'm searching for free graphics to grade up my app by using icons on the
buttons for edit, new, delete, save, cancel and so on.
Java class ImageIcons supports gif, jpeg and png format.
Anybody knows a free available source for this basic app icons?
- 5
- netbeans uml pluginhi,
does anyone know if there is a plugin that will create uml diagrams from my
java code for the netbeans ide? i have looked on their website and they say
to use poseidon, but i have not really been able to integrate it into my
netbeans ide.
thanks
Jochen Opp
- 6
- jEdit JavaDebuggerDoes anyone know how to set this plug-in up? I have loaded it in jEdit
but everytime I try and use it it gives a huge long error list and says
I need JDK 1.3 or above, even though I am using JDK 1.5!
Steve
- 7
- Roedy 's convertor, Where is Short ? Where is Byte?Hi Roedy,
This is what you advertise for in
http://www.mindprod.com/zips/java/converter.txt:
signed byte Byte
unsigned byte Byte
short Short
char Character
int Integer
long Long
float Float
double Double
char[] String
This is what you have in your code:
public static final String [] flavours = {
"boolean",
"/*signed*/ byte",
"/*unsigned*/ byte",
"short",
"char",
"int",
"long",
"float",
"double",
"String",
"Boolean",
"Character",
"Integer",
"Long",
"Float",
"Double"};
Noticed anything? Is it voluntary or did you forget java.lang.Byte
and java.lang.Short?
Either the advertisement or the code need to be updated.
My apologies if you have already explained why.
BTW, neat little tool I always come back from time to time.
Cheers, Mike
- 8
- DOM Partial Document ParsingI am trying to build a Java client which will read a never ending XML
data stream from a socket. Here is a simplified example of the XML
document:
<?xml version='1.0' encoding='us-ascii'?>
<NeverendingDataStream>
<Data>1.0</Data>
<Data>2.0</Data>
followed by a continuous stream of <Data> elements from a server
application that may not send the closing </NeverendingDataStream> tag
for several hours or days.
The DocumentBuilderFactory and DocumentBuilder parser for building a
DOM object tree fails because of a missing end tag.
Is there a way to force partial document parsing? I have turned
validating off but it continues to throw a fatal error.
Thanks,
Gary V
- 9
- [ANN] RMI Plug-in for Eclipse v2.0A new version of the RMI Plug-in for Eclipse (v2.0) has been just released.
In the new version there are two new major features:
(*) RMI Spy - Live monitor of the RMI activity in an RMI application
(*) Ready to use examples - the best way of getting started with RMI in
Eclipse
The RMI Registry inspector has greatly improved and it can now invoke
almost any remote method (in previous version it was only possible to
invoke methods that receive no arguments).
Also new in v2.0 - enhanced Java 5 and Java 6 support.
The standard set of features includes
(*) Automatic stubs genaration
(*) Local RMI registry control (start/stop/clean)
(*) RMI Application Launcher - easy codebase and security policy
configuration.
More info at: http://www.genady.net/rmi/v20/
Genady Beryozkin,
Author of the RMI Plug-in for Eclipse
- 10
- Any goodhearted person willing to explain me a program in Java I gotHello
What I'll will ask may take some of your time.
I have no experience at all with Java. But I could get my hand on a
programme written in Java, which does exactly what I want.
But I'm eager to learn, and want to know how it does everything.
I'm not interested in the visual aspect but in the communication
What the program does is communicate with a little box, that catches
data from a machine.
In essence it replaces a printer.
The machines prints to a usb port, via a adaptor, the printing data
goes into a little box, and then via a usb connection goes to the
reading pc.
I want to understand that.
Does anyone has some spare time for this (and "teaching skills") ?
I have the jar's and the classes (decompiled also)
For the moment I will not post the sources online.
Many thanks in advance and have a nice day
- 11
- Set jtable cell coloursHi,
How do i change the colour of a cell in a Jtable, looked at api but couldnt
find anything.
Thanks
Rudy
- 12
- Array optimizing problem in C++?
From an old post by James Kanze
On Apr 9 2003, 5:42 pm, email***@***.com (James Kanze) wrote:
>When I pass an "array" to a function in C/C++, I actually pass
>a pointer to the first element. And the compiler, when it compiles the
>function, only sees pointers -- it has no way of determining any
>relationship between them. Consider, for example, a smoothing function
>(in C or earlier C++):
>
> void
> smooth( double* dest,
> double const* src,
> size_t len )
> {
> for ( size_t i = 1 ; i < len - 1 ; ++ i ) {
> dest[ i - 1 ] = (src[ i - 1 ] + src[ i ] + src[ i + 1 ]) / 3 ;
> }
> }
>
>
>The compiler cannot arrange to use the src[ i + 1 ] value from the
>preceding pass through the loop as the src[ i ] value in the current
>pass, since the write to dest[ i - 1 ] might have changed it. In Java,
>it can, since two arrays are either identical or disjoint.
>
>
>This sort of code shows up frequently. In benchmarks from Java
>suppliers comparing Java to C++, of course:-). But also in any number
>of applications dealing with physical measures: meteorology, geophysical
>research (oil prospection), etc.
Out of curiosity, I tried to test if the above is true. It didn't make
any difference. In fact, C++ was a bit faster (not by much, just 6%).
Probably due to array bound check in Java, if there is in indeed an
issue with C++ arrays, overall there is no difference.
==c++==
#include <iostream>
#include <cstdlib>
#include <ctime>
void fill (double* src, int len);
void smooth (double* dest,
double const* src,
int len );
int main()
{
const int len = 50000;
double src_array [len] = {0};
double dest_array [len] = {0};
fill(src_array, len);
clock_t start=clock();
for (int i = 0; i < 10000; i++)
smooth (dest_array, src_array, len);
clock_t endt=clock();
std::cout <<"Time smooth(): " <<
double(endt-start)/CLOCKS_PER_SEC * 1000 << " ms\n";
// doesn't work without the following cout on vc++
std::cout << dest_array [0] ;
return 0;
}
void smooth (double* dest, double const* src, int len )
{
for (int i = 1 ; i < len - 1 ; i++ ) {
dest[ i - 1 ] = (src[ i - 1 ] + src[ i ] + src[ i + 1 ]) / 3 ;
}
}
void fill (double* src, int len)
{
srand((unsigned)std::time(0));
for (int i = 0 ; i < len ; ++ i ) {
src[i] = rand();
}
}
==== java ========
import java.util.*;
public class Arrays{
public static void main (String[] arg)
{
final int LEN = 50000;
double[] src_array = new double [LEN];
fill(src_array, LEN);
double[] dest_array = new double [LEN];
long start = System.currentTimeMillis();
for (int i = 0; i < 10000; i++)
smooth(dest_array, src_array, LEN);
long end = System.currentTimeMillis();
System.out.println("Time smooth(): " + (end - start) + " ms");
}
static void smooth (double[] dest, double[] src, int len )
{
for (int i = 1 ; i < len - 1 ; i++ ) {
dest[ i - 1 ] = (src[ i - 1 ] + src[ i ] + src[ i + 1 ]) / 3 ;
}
}
static void fill (double[] src, int len)
{
for (int i = 0 ; i < len; i++)
src[i] = Math.random();
}
}
- 13
- RegEx !compileHi,
I am using Eclipse, Java SDK 1.4 and the java.uitl.regex
I am trying to using regular expressions in my code
I could write something simple like:
String re = "\d";
And I am receiving an invalid escape sequence error.
And I am not so sure why
Aidy
- 14
- Tiles Problem with definitions Error - Tag InsertHi to all,
I have a newbie problem and I would appreciate any help.
Thanks in advance.
I have the following constellation:
struts-config.xml:
<snip >
<plug-in className= "org.apache.struts.tiles.TilesPlugin " >
<set-property property= "definitions-config "
value= "/WEB-INF/tiles-defs.xml " / >
<set-property property= "moduleAware " value= "true " / >
<set-property property= "definitions-parser-validate " value= "true "
/ >
</plug-in >
<snap >
tiles-defs.xml
<snip >
<tiles-definitions>
<definition name="definitionName" page="/layouts/layout1.jsp">
<put name="title" value="to be specified" />
<put name="header" value="/tiles/header.jsp" />
<put name="footer" value="/tiles/footer.jsp" />
<pat name="body" value="to be specified" />
</definition>
</tiles-definitions>
<snap >
All referenced JSP exist in the webapp!
Additionally I have a JSP index.jsp that looks like this:
<snip >
<tiles:insert beanName="definitionName"/>
<snap >
There are no action-mappings in the struts-config.xml!
When I call the index.jsp I receive the following error:
org.apache.jasper.JasperException: Error - Tag Insert : No value
defined for bean 'definitionName' with property 'null' in scope
'null'.
I know, that means that there is no bean with this name in any
context.
I check this with <logic:notPresent name="definitionName"
scope="application">
But I have read that the in the case i figured out, all definitions in
tiles-defs.xml are available in the application context under their
"name" attribute. But it seems that I'm wrong.
Does anyone know what goes wrong here. Or do I have to use
action-mappings to work with xml-based definitions?
Greetings
Stephan
- 15
- M.I'5.Persecut ion ` h ow a nd wh y d id it st art?-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-= how. and why did it start? -=
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The harassment didn't start by itself, so someone. must have been there at
the outset to give it a firm push and set the "animals" after me. It. looks
as if I was. set up in June 1990, and the timing indicates someone from
university. was responsible.
>One thing which has. been missing from this discussion is this simple
>prognosis: that maybe he is. right and that, despite his admitted
>mental condition, there really is a campaign against. him organised by
>now-influential ex-students of. his university.
In May or June 1990, Alan Freeman on Radio 1 read out a letter from. someone
who had known me for a few years, who. wrote of the one who "wore out his
welcome with random precision" (from the Pink Floyd. song). Freeman went on
to say to the writer "that's a hell of a letter. you wrote there". The
indication is strongly that. people I had parted from soon before nursed a
grudge against me and were trying to. cause trouble for me.
The suggestion is that Freeman might have shown the letter. to other people,
and things could. have snowballed from there. Right from the start the real
source (security services presumed). didn't announce themselves as the
origin,. but let the "talkers", the radio DJs, believe that they were the
originators. Think about it; if you. announce, "we're MI5 and we have a
campaign against this bloke" then people might not go along. with it; but if
you say, "everyone else. is getting at this bloke because he 'deserves' it"
then people. will join in with fewer qualms.
>Why. would "they" wish to assassinate your character?
It's the classic case of hitting a cripple to prove you're. stronger. Why
would the security services expend hundreds of. thousands of pounds and more
than six years of manpower to try to kill a British citizen? Because. they
are motivated by people who knew me at. university and feel personal
animosity; because they knew me to be emotionally weak, and it is. in the
nature of bullies to prey on those known. to be weak; and because they can
rely on the complicity of the establishment, which the. security services
manipulate and derive funding from. This is. England's biggest humiliation
today,. and the British security services are intent on preventing their
humiliation becoming reality by. continuing their campaign of attempted
murder to suppress the. truth from becoming public.
10751
|
|
|