| Please test the new 1.6.0 patchset |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- Use of scrolling in the JBuilder IDEDoes anybody know why the use of scrolling is not supported in the IDE of
JBuilder ? (the middle mouse button). Will this be supported sometime in the
future? Because it is really convienient.
Also can you tell me why the Java programs do not support the clicking of
the middle mouse button hit as an event?
Thanks in advance.
- 2
- Jsp Error Cant Get Data from databaseHi
i am writing a JSP page which connects to Mysql DataBase
i can get the connection but i cant get to execute the query on the
database
plz help
the code of jsp file
<%@ page import ="java.lang.*" %>
<%@ page import ="java.sql.*" %>
<html>
<head>
<title>
Index Page
</title>
</head>
<body>
jsp pages is better than ASP.NET
<%
int x;
Connection conn=null;
Statement st=null;
ResultSet rt=null;
String query="select * from user";
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/
mysql","root","aaaa");
if(conn==null)
{
out.print("not connected");
}
out.print("<br>"+"Connection"+conn+"<br>");
try
{
st = conn.createStatement();
rt=st.executeQuery("select * from a.a");
while(rt.next())
{
String y;
String str;
x=rt.getInt("id1"+"<br />.");
y= rt.getString("id2"+"<br />.");
str= rt.getString("id3"+"<br />.");
out.print(x);
out.print(y);
out.print(str);
}
}
catch(Exception ex)
{
out.print("<br>");
out.print("Timeoooo "+"<br />");
}
finally
{
if (rt != null) rt.close();
if (st != null) st.close();
if (conn != null) conn.close();
out.print("<br>");
out.print("Timeoooo"+"<br />");
}
%>
<%
conn = null;
st = null;
ResultSet rs = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn =
DriverManager.getConnection("jdbc:mysql://localhost:
3306/","root","aaaa");
st = conn.createStatement();
rs = st.executeQuery("select * from a.employees");
while(rs.next()) {
%>
<TR><TD><%= rs.getString("lname_txt") %></TD>
<TD><%= rs.getString("fname_txt") %></TD></TR>
<%
}
%>
</TABLE>
<%
} catch (Exception ex) {
ex.printStackTrace();
%>
</TABLE>
Ooops, something bad happened:
<%
} finally {
if (rs != null) rs.close();
if (st != null) st.close();
if (conn != null) conn.close();
}
%>
</body>
</html>
- 2
- Javascript link problem in IE 6Found the fix myself. Go to
http://support.microsoft.com/default.aspx?kbid=281679 and register the
dll's listed there. I don't know which one did the trick because I did
each one of them.
On Sun, 18 Jun 2006 22:04:39 GMT, Sangrateo
<email***@***.com> wrote:
>I'm running Windows XP SP2 with all of the latest updates and patches.
>Whenever I click on a javascript link in Internet Explorer, nothing
>happens. I don't get an error message nor do any windows pop up.
>
>A good example is at the Windows Update page. Nothing happens when
>clicking on a software update for more information (where it shows
>"Click to display this update's description"). Its as if I were
>clicking a non-link portion of the web page.
>At the bottom left corner of IE, appears
>"Javascript:parent.fnExpandDetails(0);" when I hover over the same
>link.
>
>Anyone have any ideas?
>Thanks,
>
>Sangrateo
>email***@***.com
Sangrateo
email***@***.com
- 2
- 3
- Sexy GirlfriendsPornoduel.com
Bodypaint - http://www.pornoduel.com/duel.php?myCategory=bodypaint
Bondage - http://www.pornoduel.com/duel.php?myCategory=bondage
Sexy Amatures - http://www.pornoduel.com/duel.php?myCategory=amature
Sloppy Blow Jobs - http://www.pornoduel.com/duel.php?myCategory=blowjob
Sexy Costumes - http://www.pornoduel.com/duel.php?myCategory=costume
Erotic Art - http://www.pornoduel.com/duel.php?myCategory=hentai
Nasty Lesibans - http://www.pornoduel.com/duel.php?myCategory=lesbian
Sexy Sluts - http://www.pornoduel.com/duel.php?myCategory=frontal
Perfect Pussy - http://www.pornoduel.com/duel.php?myCategory=pussy
- 3
- Need a project... found a website on mindprodJohn T wrote:
> First, for those who may not already know, I am NOT a Java programmer. I
> am learning the language for my own purposes (
> Along with Ruby, XML, Perl and Groovy).
>
> I have sucessfully written a Java program which parses an XML file and
> am using it in my job. I am a technical support person, who specializes
> in printing systems, namely the way that our systems (HPUX and SunOS)
> interface with a print server running Easyspooler and Infoprint Manager.
>
> With that in mind, I think I am ready for a project. However, the
> closest thing I can come up with on my own, as anyone who has read any
> of my previous threads can tell, is some form of real world modelling. I
> am *not* convinced that this would be benefical to me as a learning
> experience.
>
> So let me elaborate on what I have been studying.
> I am familiar with classes, interfaces, packages and polymorphism,
> although interfaces and polymorphism are still somewhat foreign to me. I
> know a little bit about interfacing with Oracle and MySQL and have done
> a very rudimentary JSP page which talks to an Oracle database.
>
> Since I have no current projects in my job which require me to do any
> kind of Java programming (I came up with the XML parser as satisfying a
> need I had) I am looking for some suggestions.
>
> I have made my way through some of Eckle's book (and even have had an
> email from him). I have worked my way through the first portion of the
> Sun Java Tutorial. I've studied the Horstmann books (text for a class I
> took in Java) and, my favorite, Head First Java.
>
> I would like to do something with what I have learned. I'm not ready
> for GUI programming yet, nor do I want something trivial. Perhaps
> someone out there has written something along the lines of what I am
> looking for and would be willing to share with me the requirements for
> what they did. From the requirements, I can do a Use-Case and UML
> diagrams and from there, get to the coding.
>
> *Remember* I come from a procedural language (COBOL) background and have
> done very little OOP aside from SAS (does anyone remember SAS) and some
> Delphi, so please, be gentle. A simple project is all I am looking for.
> I'm not going to market it and I'm not going to post my code here
> looking for suggestions on how to clean it up.
>
>
Since no one has come up with anything I did a google search (GIYF) for
beginner java project and this is one of the sites which came up.
http://mindprod.com/projects/beginner.html
Do these make sense as beginner projects or am I out of my league again?
- 3
- Can I link to a PDF from JavaHelpI reckon its not going to be possible but I'm going to ask....
I've done a JavaHelp system and we'd like if we could make a PDF
document available from here.
I thought we could do it as a download, right click and save target as
but when I right click it just tries to open it in the JavaHelp...
Can anyone think of a solution? The other option I suppose is to make
the document available as another option on the help menu but I'd
wanted to deploy the help jars on their own(at the moment we cant
redeploy the client)
- 5
- Running compiled programs in command promptHi, I should know how to do what it says in the subject of this post,
but I don't. I've almost finished Sams Teach Yourself Java in 24 Hours
3rd Edition and now I need to pass some arguments to the program via
command prompt but the book only covers 1.4.
java program [arguments] when i cd it to the directory containing the
class
doesn't work.
- 10
- Object creation vs. ThreadLocal retrievalI have a method which searches a singly linked list for an object. It
needs to return references to both the object and the preceding object
in the list. I have created a very simple inner class to encapsulate
this information:
private final class MemberReference
{
final Member referent;
final Member previous;
MemberReference(Member referent, Member previous)
{
this.referent = referent;
this.previous = previous;
}
}
An instance of this class will be required for just about every access
the the class, including reads, which could cause a lot of these objects
to be created and then discarded.
I'd like to avoid this if possible, but the class does need to support
reading by multiple threads, so I wouldn't want to use a single
instance (or a couple of class fields). I'm thinking of using a
ThreadLocal, but I can't help wondering if retrieving the thread-local
value might not be more expensive than creating a new object.
Anyone have any experience/thoughts?
Thanks!
--
========================================================================
Ian Pilcher email***@***.com
========================================================================
- 11
- Hiring 70 SAP HR TestersHi,
Hiring 70 SAP HR Testers in the following domains:
* 27 WILMA (OM & PA) Testing Analysts
* 7 Payroll Testing Analysts
* 13 Benefits Testing Analysts
* 9 Leave Administration Testing Analysts
* 1 Compensation Testing Analyst
* 7 Interfaces Testing Analysts
* 6 Global Mobility Testing Analysts
This is a 3 months contract. The client will cover lodging expenses
and 2 flights home per month.
Location: FL, NJ
The client will hire from the phone interview.
Thanks
Craig
- 11
- CubicCurve2D TracingGiven an arbitrary CubicCurve2D how can I iterate along it getting
both the x and y coordinates of the current point as I go?
Thanks.
- 11
- Managing Session with javamailHi all,
I send a large number of emails using javamail. My problem is that my
provider limits the number of emails I can send out per minute per
session. On top of that, it does not allow me to use another SMTP
server than its own.
My first way to deal with that has been to include a sleep in my
sending loop in order to respect their quota (20 mails per minute).
But I now would like to explore faster ways to send emails out.
One of my idea was to close the session and reopen a new one to see if
that would be accepted by my provider server. But I don't see that
being a possilbe with javamail. Am I wrong?
Can you come up with other ideas?
Has anyone of you guys had to deal with such an issue before?
Thanks,
Necleto
- 11
- Static Variables in Servlet ContainerJohn C. Bollinger wrote:
> Application servers typically assign different ClassLoaders to different
> web applications. That, combined with typical ClassLoader delegation
> behavior, normally produces the situation you describe. It is probably
> fairly safe to expect that kind of behavior, but be advised that it is
> not guaranteed. In particular, in some application servers that support
> it, hot (re)deployment may cause such expectations to be incorrect.
Well, one part of that is very definitely guaranteed: that classes in
web applications' relevant WEB-INF folders will be loaded in a class
loader that's unique to that web application. The part about shared
classes and a container lib directory is entirely implementation-
dependent.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
- 12
- How to add a pathSeparator to a path (JFileChooser question)Hi,
I can use JFileChooser, getCurrentDirectory, getPath to get the
current path name. However, how can I add a path separator to its end?
Assuming, I got a return of
c:\temp
, how to get the path separator "\" and add it to the end of the path
c:\temp\
Thanks a lot!!!
- 12
- Upgrade from 1.4.2_10 to 1.5.0_06I recently upgraded my JAVA and now I am unable to run any JAVA applets.
All I am getting is a "General Exception" dialog box and a whole lot of CRAP
in the "JAVA Console" - see below...
---------------------------------------------------------------------------------
Java Plug-in 1.5.0_06
Using JRE version 1.5.0_06 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Rob
network: Loading user-defined proxy configuration ...
network: Done.
network: Loading proxy configuration from Internet Explorer ...
network: Done.
network: Loading direct proxy configuration ...
network: Done.
network: Proxy Configuration: No proxy
basic: Cache is disabled by user
----------------------------------------------------
c: clear console window
if: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
basic: Registered modality listener
liveconnect: Invoking JS method: document
liveconnect: Invoking JS method: URL
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@87a5cc,
refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@152544e
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
network: Connecting http://www.java.com/applet/testvm.class with
proxy=DIRECT
network: Connecting http://www.java.com/applet/testvm/class.class with
proxy=DIRECT
load: class testvm.class not found.
java.lang.ClassNotFoundException: testvm.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: www.java.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
basic: Exception: java.lang.ClassNotFoundException: testvm.class
java.lang.ClassNotFoundException: testvm.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: www.java.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
basic: Modality pushed
basic: Modality popped
Anyone else experienced this issue? SUN seems to be more than a little
perplexed - and is not providing much help...
|
| Author |
Message |
Greg Lewis

|
Posted: 2007-6-10 23:41:00 |
Top |
java-programmer, Please test the new 1.6.0 patchset
All,
If you're not afraid to build the JDK from scratch without a port,
please try the "current" (new) JDK 1.6 patchset (see
http://www.eyesbeyond.com/freebsddom/java/jdk16.html). This is based
on the 1.6.0 Update 1 Build b06 JRL source.
Unless I get some showstopper reports I plan to release this as
patchset 1 sometime next week. The raw patchset itself will have
problems if you don't have the /usr/X11R6 symlink, but this will be
fixed in the port.
I haven't yet created the jdk16 port, which is why you'll have to
build it from scratch ;). It should be reasonably similar to the current
jdk15 port though.
If the build is successful you should see something like this:
> /usr/local/jdk1.6.0/bin/java -version
java version "1.6.0_01-p1"
Java(TM) SE Runtime Environment (build 1.6.0_01-p1-glewis_19_may_2007_14_14-b00)
Java HotSpot(TM) Client VM (build 1.6.0_01-p1-glewis_19_may_2007_14_14-b00, mixed mode)
(This is on i386 -- you'll see the Server VM on amd64).
Note that I'll be out of town until Tuesday evening, so I may be unable to
respond to any problems before then.
--
Greg Lewis Email : email***@***.com
Eyes Beyond Web : http://www.eyesbeyond.com
Information Technology FreeBSD : email***@***.com
|
| |
|
| |
 |
glewis

|
Posted: 2007-6-10 23:45:00 |
Top |
java-programmer >> Please test the new 1.6.0 patchset
All,
If you're not afraid to build the JDK from scratch without a port,
please try the "current" (new) JDK 1.6 patchset (see
http://www.eyesbeyond.com/freebsddom/java/jdk16.html). This is based
on the 1.6.0 Update 1 Build b06 JRL source.
Unless I get some showstopper reports I plan to release this as
patchset 1 sometime next week. The raw patchset itself will have
problems if you don't have the /usr/X11R6 symlink, but this will be
fixed in the port.
I haven't yet created the jdk16 port, which is why you'll have to
build it from scratch ;). It should be reasonably similar to the current
jdk15 port though.
If the build is successful you should see something like this:
> /usr/local/jdk1.6.0/bin/java -version
java version "1.6.0_01-p1"
Java(TM) SE Runtime Environment (build 1.6.0_01-p1-glewis_19_may_2007_14_14-b00)
Java HotSpot(TM) Client VM (build 1.6.0_01-p1-glewis_19_may_2007_14_14-b00, mixed mode)
(This is on i386 -- you'll see the Server VM on amd64).
Note that I'll be out of town until Tuesday evening, so I may be unable to
respond to any problems before then.
--
Greg Lewis Email : email***@***.com
Eyes Beyond Web : http://www.eyesbeyond.com
Information Technology FreeBSD : email***@***.com
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
|
| |
|
| |
 |
Jean-Baptiste Quenot

|
Posted: 2007-6-16 4:21:00 |
Top |
java-programmer >> Please test the new 1.6.0 patchset
* Greg Lewis:
> If you're not afraid to build the JDK from scratch without a
> port, please try the "current" (new) JDK 1.6 patchset (see
> http://www.eyesbeyond.com/freebsddom/java/jdk16.html). This is
> based on the 1.6.0 Update 1 Build b06 JRL source.
>
> Unless I get some showstopper reports I plan to release this as
> patchset 1 sometime next week. The raw patchset itself will
> have problems if you don't have the /usr/X11R6 symlink, but this
> will be fixed in the port.
>
> I haven't yet created the jdk16 port, which is why you'll have
> to build it from scratch ;). It should be reasonably similar to
> the current jdk15 port though.
I need JDK 1.6, as the Linux version is not good enough (it
creates files with funny permissions), but I don't think I can
afford to build from scratch. However once you've got the jdk16
port available somewhere I can download it and test it. It can
wait a few days/weeks more, no problem.
Thanks for your work Greg,
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
|
| |
|
| |
 |
jbq

|
Posted: 2007-6-17 17:54:00 |
Top |
java-programmer >> Please test the new 1.6.0 patchset
* Greg Lewis:
> If you're not afraid to build the JDK from scratch without a
> port, please try the "current" (new) JDK 1.6 patchset (see
> http://www.eyesbeyond.com/freebsddom/java/jdk16.html). This is
> based on the 1.6.0 Update 1 Build b06 JRL source.
>
> Unless I get some showstopper reports I plan to release this as
> patchset 1 sometime next week. The raw patchset itself will
> have problems if you don't have the /usr/X11R6 symlink, but this
> will be fixed in the port.
>
> I haven't yet created the jdk16 port, which is why you'll have
> to build it from scratch ;). It should be reasonably similar to
> the current jdk15 port though.
I need JDK 1.6, as the Linux version is not good enough (it
creates files with funny permissions), but I don't think I can
afford to build from scratch. However once you've got the jdk16
port available somewhere I can download it and test it. It can
wait a few days/weeks more, no problem.
Thanks for your work Greg,
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- IDE and good bookHi,
What is the best IDE for Java development:
1)eclipse 3.1
2)sun 1
3)jbuilder
4)gui's are for wusses use vi and a command line ant
What is a good book to learn java 1.4?
What is a good book to learn swing?
thanks in advance
- 2
- Leaf linked binary treeHi,
I need a LeafLinked Binary Tree for one of my current projejcts but I
can't find any. Does somebody know a good and performant implementation
I could use or do I have to code it myself?
Thanks,
Snyke
- 3
- 4
- netbeans install.log error#################install.log############################
(Jul 14, 2004 2:07:28 AM), Setup.product.install, com.installshield.product.service.product.PureJavaProductServiceImpl$Installer, err, ProductException: (error code = 601; message="JVM not found")
STACK_TRACE: 8
ProductException: (error code = 601; message="JVM not found")
at com.installshield.product.actions.JVMResolution.install(JVMResolution.java:171)
at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.checkUninstallerJVMResolution(PureJavaProductServiceImpl.java:4747)
at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(PureJavaProductServiceImpl.java:4523)
at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(PureJavaProductServiceImpl.java:3727)
at com.installshield.wizard.service.AsynchronousOperation.run(AsynchronousOperation.java:40)
at java.lang.Thread.run(Thread.java:595)
###################end install.log###################
After downloading the .jar I used javac -jar on the file, and it launched
the installer window. I clicked all the appropiate buttons and the
graphical installer even said netbeans was now installed. The install.log
file disproves that, unfortunately.
what went wrong pls?
thanks,
Thufir Hawat
PS: I posted this again to add "netbeans" to the subject line.
- 5
- Best site for javahttp://javamobileweb.cogia.net
interactive site for java , mobile , wap and web .
a very helpful team also for all your question and problem
- 6
- overriding attributesI have a class A and a class B inheriting from A.
I have a class C and a class D inheriting from C.
I would like to have a attribute ATTR of type C in A. But in B, I would
ATTR to be of type D.
What should I do?
regards,
Andersen
- 7
- which data structure best fits this?hi,
i am looking for a data structure for fast retrievals... and here is my
scenario.
this table is about foreigncy exchange. i will have a buy currency,
sellcurrency, levels, and rate.
A transaction involves from a BUY currency to Sell currency, and it can
have multiple levels, meaning... if the sell amount is 1000, the rate
is 1.1, but if the sell amount is 2000, the rate is 1.2..etc...
Say there is a fixed amount of currencies that I need to maintain (say
10 type only) And I need to store all these rates in a structure, for
fast retrieval..
More concrete example.
Sell : USD Buy: EUR Level: 1 - 1000 rate: 1.1
Sell : USD Buy: EUR Level: 1000 - 5000 rate: 1.2
Sell : USD Buy: EUR Level: 5000 - 99999999 rate: 1.3
Sell : USD Buy: CAD Level: 1 - 1000 rate: 1.1
Sell : USD Buy: CAD Level: 1000 - 5000 rate: 1.2
Sell : USD Buy: CAD Level: 5000 - 99999999 rate: 1.3
Sell : USD Buy: GBP Level: 1 - 1000 rate: 1.1
Sell : USD Buy: GBP Level: 1000 - 5000 rate: 1.2
Sell : USD Buy: GBP Level: 5000 - 99999999 rate: 1.3
------ So, Sell for USD type is finished here.
Sell : EUR Buy: USD Level: 1 - 1000 rate: 1.1
Sell : EUR Buy: USD Level: 1000 - 5000 rate: 1.2
Sell : EUR Buy: USD Level: 5000 - 99999999 rate: 1.3
Sell : EUR Buy: CAD Level: 1 - 1000 rate: 1.1
Sell : EUR Buy: CAD Level: 1000 - 5000 rate: 1.2
Sell : EUR Buy: CAD Level: 5000 - 99999999 rate: 1.3
Sell : EUR Buy: GBP Level: 1 - 1000 rate: 1.1
Sell : EUR Buy: GBP Level: 1000 - 5000 rate: 1.2
Sell : EUR Buy: GBP Level: 5000 - 99999999 rate: 1.3
------ Sell for EUR is finished here.
so on with GBP, and CAD.
my requirements:
Say, someone tell me, what are all the rates for all the levels and
BuyType from EUR as sell?
Then that means I have to send back all the EUR as sell type.
Or, if someone say, what are all the rates for all the buytype for USD
from EUR as sell?
Then that means i have to send back all the EUR as sell, and USD for
Buy.
Or, if someone say, what are all the rates for all the buytype as GBP?
Then, i will have to send back all the buytype as GBP (including all
levels)
Or someone can just ask for a specific level as well for any buy type
of sell type, or both.
I was thinking about hash of hash... but if i have the Sell type as key
of the outer hash... then the inner hash will need to have a buytype as
the key... but then, i will have multiple levels...if i put the
multiple levels in an array of an object, and this object as the value
of this inner hash, that should be fine... but i am worry about the
speed.
Ideas?
thanks,
T
- 8
- 9
- Reading a line from a fileHi to all, I'm trying to read from a file, line by line, and parse out
the data, by using the line.split(" ") function, and I have a file that
has 8 entries total per line, which means that it supposed to read up
to , array[7], but for some reason, when I run it , it says array
outofboundaries. The only thing here that is to notice, is that the
value at 7 might be either a string or an empty string, can that be a
problem?
Thanks
- 10
- Application StoppingI have an application I am working on that keeps shutting down. There
seems to be no rhyme or reason for the shutdown. It happens randomly.
Sometimes it will work other times it won't. I'm starting to think it
might be a windows problem, possibly a process that is running. As my
App is running, Windows thinks the program is not responding. No big
deal, but I'm starting to think that this might be the problem. Here
is the error code it is getting in the Event log.
Faulting application gl.exe, version 1.0.0.0, faulting module
msjava.dll, version 5.0.3810.0, fault address 0x000c4a7e.
It doesn't seem to have anything to do with memory, or the volume of
data I'm processing.
I don't know if anyone will have any advice, I'm grasping at straws.
I'm running Windows XP pro if that helps.
Thanks to anyone with any advice.
- 11
- [Off-topic] cvsHello,
sorry for the off-topic question but I think this is a good
place to ask. I plan to develop open-sourced web application
which integrates CVS browser, a bug tracking system and some
more interesting features to support development both
open-sourced and commercial projects. I would like to know
whether it is worth to invest my free time for such a tool.
CVS is rather an old system and I have no idea how widely is
used in development teams. So my question is easy: Do you use
CVS in your development?
Thank you,
jozef
- 12
- Problem with Tomcat server on windows Vista when used with javaHi,
I have one c++ application to get number of monitors from
system. I am calling .exe of c++ application using java api through
tomcat server in browser on window vista. right now I have two
monitors attached in the system.one primary and other secondary. but
when i call c++ application using java api through tomcat server, it
lists only one primary monitor.
i have some scenario for behavoiur of such application:
(1) when i run directly c++ application on vista it works fine.(gives
two monitors)
(2) when i run using sample java code without tomcat server it works
fine..(gives two monitors)
(3) when i am calling from browser through tomcat server it displays
only one monitor.
(4) one important thing is that when i call same thing on Windows XP
it works fine..(gives two monitors)
can anybody tell that what could be the problem to get list of monitor
through tomcat server on windows vista?
Ravi.
- 13
- error starting java .jar app - classpath issue?I'm reluctant to post to a developers list, but this question
got no help at debian-user in the past 2 days. It seems to be
debian-related more than generic java-related.
This is likely a very simple issue. I've never tried to run a
java .jar library on debian before.
For all commands discussed below, no CLASSPATH environment
variable has been defined.
No errors if I switch to the .jar file directory and issue this
command:
$ java -jar tt.jar
But if if try either of the following commands from another
directory, the errors shown below commands appear:
$ java -jar /usr/share/java/tt.jar
$ java -classpath /usr/share/java/tt.jar -jar /usr/share/java/tt.jar
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:161)
at com.taubler.timebox.submit.SubmitExtensionWidget.<init>(SubmitExtensionWidget.java:16)
at com.taubler.timebox.submit.SubmitManager.<init>(SubmitManager.java:52)
at com.taubler.timebox.TimeTracker.<init>(TimeTracker.java:54)
at com.taubler.timebox.TimeTracker.main(TimeTracker.java:1115)
I wonder if it may just be a matter of learning how to correctly
set the CLASSPATH before issuing the java command on .jar
libraries held in /usr/share/java/. I could not find any
clear guidance about the usual CLASSPATH practice on debian.
(I run sarge. Java is from blackdown j2re1.4 and j2sdk1.4.
Installed without a hitch.)
(App in question is a timekeeper program. See
http://www.taubler.com/timebox/.)
Thanks.
--
Gordon Pedersen email***@***.com
St Paul, Minnesota, USA
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 14
- Making the most of codeI have a web site that uses JSP and some back end classes to manage
data in a MySQL database. It does okay and has run well for about 3
years. It has, however, grown to the point where I need to redesign
some of it to be more dynamic. I've recently started incorporating
Hibernate and JavaServer Faces to ease the development now and make it
easier for me to make changes later on. Or at least that was my plan.
Each database table maps to a Java class. I will easily have 25-30
tables before I am done. I am okay with 25-30 classes to represent
the data, but my concern is when it comes to the associated classes
needed to manage the data connections and such. I find that I am
cutting and pasting way too much similar code into these separate
classes.
For example.
I have a HibernateDAO class that manages the Hibernate session.
Each class then has its own DAO class that extends the HibernateDAO
class and the code within the extended DAO classes is virtually
identical.
Here is one method from my clientDAO class.
public Client add( Client client) {
try {
begin();
getSession().save(client);
commit();
return get(client.getClientId()); //not every class
will have a clientId member
} catch (HibernateException e) {
rollback();
System.out.println( "Could not add client: " +
client.getClientId() + " : " + e); //message hard coded for client
class
return new Client();
}
}
And then in my ContactDAO class I have this.
public Contact add(Contact contact) {
try {
begin();
getSession().save(contact);
commit();
return get(contact.getId()); //not every class will have
an Id member
} catch (HibernateException e) {
rollback();
System.out.println( "Could not add contact: " +
contact.getId() + " : " + e); //Message hard-coded for contact class
return new Contact();
}
}
Note that the code is virtually identical.
The begin(), getSession(), rollback(), and commit() methods are all
from the HibernateDAO superclass.
I tried using Generics to make the return type and parameter <T>, but
this only gets me so far. I cannot declare a new instance of <T>, or
at least I don't know how to. And the method uses values that are
specific to the class in question. I.E. not every data class will
have a getId() method.
I am not sure if any of that made sense, but the crux of the issue is
I am trying to avoid cutting and pasting code and then having to
remember to update it in 25 different places when I make a change. I
feel like there is a way to do what I want, but I just don't have the
experience to see it.
If anyone can point me toward some documentation that might help set
me straight, I would appreciate it.
Thanks.
- 15
- HP Desktop for sale!Hi,
I have an unused HP Pavilion with the fallowing specs:
# Processor: AMD Athlon 64 X2 4000+ (2.1GHz, 2000MT/s System Bus)
# Memory: 2048MB PC2-5300 DDR2 SDRAM memory (2x1GB) (expandable to 8 GB (4 x 2 GB) (64-bit OS)/ 4 GB (4 x 1 GB) (32-bit OS))
# Hard Drive:320GB 7200RPM SATA 3G (3.0 Gb/sec) hard drive
# Optical Drive: 16X DVD(+/-)R/RW 12X RAM (+/-)R DL LightScribe SATA drive
# Expandable Drive Bay: HP Pocket Media Drive bay
# Video Graphics: Integrated graphics
# Network Interface: Integrated 10/100BaseT network interface
# Sound: High Definition 8-channel audio
# Fax/Modem: 56K bps data/fax modem
# Operating System: Genuine Windows Vista?Home Premium
This is "used" but basically brand new (it has literally been on for no more than 6 total hours..) is only 1 month old..
PRICE: $425 OBO
Email- email***@***.com
|
|
|