 |
 |
Index ‹ java-programmer
|
- Previous
- 3
- Check class file for annotationDoes anyone know of a simple way to determine whether a marker
annotation is present in a given class file?
TIA
--
========================================================================
Ian Pilcher email***@***.com
========================================================================
- 3
- sentmail problemhi
i am doing a project using JavaMail API with JSP and James server
i have implemented sendmail,compose. but i wanna know how can i
implement sentmail as it is seen in the real application.
I wanna know what can i should do to retrieve the mails sent from an
account using James
- 3
- [ANN] SwingEmpire FormBuilder - New Preview 0.9.4
SwingEmpire FormBuilder helps in quickly building GUIs with JGoodies
Forms.
The new/updated features include:
* pluggable custom layout styles for grid elements and borders
* enhanced support of custom component factories
The preview is available at
http://www.swingempire.de/palace/FormBuilder
For your convenience a summary of "old" features
* rapid visual design of form-oriented GUIs
* targeted on JGoodies Forms
* re-usable layout data
* immediate preview in choosable LookAndFeels
* persisting layout data separated from application code
* persisting via standard XMLEncoder
* pluggable custom components
* pluggable persistence format
Test and (hopefully :-) enjoy - I'm eagerly awaiting your feedback.
Regards
Jeanette Winzenburg, Berlin
- 4
- Something a bit goofy about Generics
Iterable<? extends JavaFileObject>
You'd think a JavaFileObject[] or a JavaFileObject... would fullfil
that requirement, but it doesn't. It fills it sufficiently to do a
for:each but not to satisfy this parameter.
That is like a piece of purple lint on a white sweater.
People say arrays and generics don't mix, but they damn well SHOULD.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
- 5
- Proposal. Sort should return a boolean.Here is an idea. I would like it if Collections. sort and Arrays.sort
would return a boolean. true means something actually changed. false
means the array was already in order.
Further there would be an additional boolean parameter to the sort to
say "items probably already in order". The sort would then do a quick
check to make sure the items were in order, and if so, bypass the full
sort.
This would be useful when you have to avoid needlessly calling
fireTableDataChanged after a sort.
It would also allow you to use sorts in an assert to ASSURE the data
are already sorted, and explode if they are not already sorted.
Since the sort is void now, all existing code would still work. You
would just have an additional method call with the optional boolean
parameter, or perhaps only in would get the boolean return.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
- 5
- change defaultsHi,
How do you change the default font for all components ( frame, label, etc )
in swing ?
regards
Johan
- 6
- 7
- JProgressBar Flickering!Hi everyone! I just have a little question here!
I have a Swing GUI in which I put a JProgressBar.
I also have a static class where I put a static variable JProgressBar.
In my main program, because the static methods are time consuming, I
start a new thread, where I initialize the static JProgressBar with the
one in main gui.
So I'm able to update the text, value, etc in the GUI without locking
my main program.
The problem is:
I put progression report [ progressBar.setValue(int) ] in my loops to
see the change. It works perfectly BUT!!!
Every time it sets a new value, the progress bar show a lot of
flickering! I enabled double buffering on it, but no effect!
How can I remove this bad effect??? If some knows please tell me quick
:)
Thanks,
Ad
- 7
- Circular linked listHi
I'm looking for a circular linked list implementation.
Any references appreciated.
Cheers
Sharp
- 8
- debrisW a t c h o u t!
ALLIACNE ENTERPRSIE (A ETR)
Currnet Prcie: 0.80
Add this g e m to your w atch list, and w atch it tard closely!
Nwes Releaes!
Taeocrp announces breackrough in removing deadly l andmines.
Mill Valley, California August 25, 2006 - The Alliance Etnerprise Corpoartion announced today a breakthrough in developing an Areial Lnadmine Sysetm aimed at locating, detecting and mapping deadly landm ines.
TeaCorp's mission is to reclaim lands around the globe embedded with l andmines that victimize countries and their stakeholders.
More than 100 m i l l i o n landm ines in 83 countries are holding international communities and industries hostage, preventing the inv estment in and development of product ive lands and the re-building of infrastructure. A broad variety of landmine s have been scattered over pro ductive areas effectively crippling the eco nomy and disabling thousands of children and adults. There are no reliable records that accurately show where these d e v a s t a t i n g landmine s lie in wait for their v ictims.
With the present day c osts to clear a single land mine ranging between $1,000 to $1,500, solving the problem of de-mining lands will reach billions of dol lars. TaeCorp has developed a technology based, cos t effective solution to this problem using its three tiered approach to scanning, mapping and removing la ndmines. TaeCorp's System will provide many social and eco nomic benef its to countries and their industries including oil and gas, mining, agriculture, roads and infrastructure development.
About TaeCorp.
TaeCorp's vision is to be the recognized leader in providing Aeiral Deteciton Systmes including global de-mining, clearing a path to a safer planet for all humankind.
Here comes the big one!
All signs show that AET R is going to Explode!
Concl usion:
The examples above show the awesome, earning potential of little known companies that explode onto invesotr's radar screens; Many of you are already familiar with this. Is A ETR poised and positioned to do that for you? Then you may feel the time has come to act... And please watch this one trdae tomorrow! Go AE TR.
Pen ny sotcks are considered highly speculative and may be unsuitable for all but very aggressive investros. This prof ile is not in any way affil iated with the featured company. This report is for entertainment and advertising purposes only and should not be used as invesmtent advice. If you wish to stop future m a i lings, or if you feel you have been wrongfully placed in our membership, send a blank e m a i l with No Thanks in the subject to
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 8
- -Xmx---m getting smaller and smallerHi,
I have Windows XP SP3 with 4GB memory (I know Windows only allows apps to use
about 3.25GB.) I have no applications running. I ran System Mechanic 7 to
defrag the memory with the result of the largest contiguous block of memory
being 2.74GB.
However, everytime I started Eclipse 3.3.2, the JRE 1.6.0_04 JVM terminated
with a -1 code. I started at -Xmx1024m and continually decremented until I
reached -Xmx600m when Eclipse started okay. This morning I was running
Eclipse with -Xmx900m okay.
The only changes I made were to (1) set the system variable JAVA_HOME to
reference JDK 1.6.0_04 and replaced java.exe, javaw.exe, javaws.exe in c:
\WINDOW\System32\ with the JRE 1.6.0_04 files. They were 1.4.2_07.
Does anyone have any idea why the JVM terminates because of not enough memory
when there is more than enough contiguous memory? This is really
frustrating.
Thank you,
Don
- 14
- 16
- JNI Trouble calling FindClass from Worker threadHello
I am able to get the class object when i call FindClass in the main
thread. Now when i spawn a worker thread and attempt the same call
after caching the JVM and creating a new Env . it fails and triggers an
exception on the Java side .
My code for a DLL looks like this
JMVM *jvm = NULL ;
..
DLLMain()
{
}
JNIEXPORT jint JNICALL Initialize
(JNIEnv *pEnv, jclass)
{
pEnv->GetJavaVM(&jvm);
ASSERT(jvm!=NULL);
jclass cls = pEnv->FindClass("demoflashplugin/views/Objfactory");
if(cls!=NULL)
AfxMessageBox("cls found");
AfxBeginThread(WindowThread , NULL);
}
UINT WindowThread(LPVOID p)
{
JNIEnv *env = NULL ;
jclass cclass ;
if(jvm!=NULL)
{
if (0==jvm->AttachCurrentThread((void**)&env,NULL))
{
if ((env)->ExceptionOccurred()) {
AfxMessageBox("Exception occured");
(env)->ExceptionDescribe() ;
}
if(env!=NULL)
{
AxMessageBox(getenv("CLASSPATH"));
cclass = env->FindClass(demoflashplugin/views/Objfactory");
if(cclass!=NULL)
{
AfxMessageBox("Class is not Null");
}
else
AfxMessageBox("Class is s Null");
}
else
{
AfxMessageBox("env is NULL ");
}
AfxMessageBox("Finished checking for string");
}
else
{
AfxMessageBox("JVM IS Null");
}
}
}
- 16
- PAAppViewer3 (AppViewer3)?Hello,
Might anyone please kindly answer my question? Thank you very
much.
I can't read the result of performing bootstrapping in Amos 6.0.
In the Amos text output, on the left hand side, there are two
sections. The lower section is the result of performing bootstrap,
including estimates/bootstrap, estimates of bootstrap standard error,
estimates of bias-corrected percentile method.
However, I can't read any of them. Nothing shows up.
Also, I find this message,
Error number: 70
Source: PAAppViewer3 (AppViewer3)
Description: Permission denied
Call stack: frmMain hdoc_ onmouseover
How can I be able to read the result of performing bootstrapping in
Amos 6.0.?
Thank you very much and look forward to your kind reply.
Please take care
Best wishes to your life
Caroline
- 16
- RMI first stepHello,
For testing purpose, I'm trying to use RMI...
Here is the exception when I run Main.java :
Exception in thread "main" java.security.AccessControlException: access
denied (java.net.SocketPermission 192.168.0.1:1099 connect,resolve)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:264)
at
java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
at java.net.Socket.connect(Socket.java:501)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketF
actory.java:22)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketF
actory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at testRMI.Main.main(Main.java:28)
(jdk1.5.0_01 - Win2000Pro - no firewall)
What am I doing wrong ?
Thanks for your help,
Martin.
The code :
===================================================================
Main.java :
package testRMI;
import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.Naming;
import java.lang.SecurityException;
import java.rmi.RMISecurityManager;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class Main extends UnicastRemoteObject implements Meeting
{
private String ivDate = new String("25/3/2005");
private static final long serialVersionUID = 1;
public Main() throws RemoteException {
}
public String getDate() throws RemoteException {
return ivDate;
}
public static void main(String[] args) throws
AlreadyBoundException,RemoteException,
MalformedURLException,SecurityException {
System.setSecurityManager(new RMISecurityManager());
Main ms = new Main();
Naming.rebind("rmi://192.168.0.1/Meeting",ms);
}
}
===================================================================
Meeting.java
package testRMI;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Meeting extends Remote
{
public String getDate() throws RemoteException;
}
===================================================================
ClientRMI.java
package testRMI;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RMISecurityManager;
import java.rmi.Remote;
import java.rmi.RemoteException;
public class ClientRMI
{
public static void main(String[] args)
throws RemoteException, MalformedURLException,NotBoundException {
System.setSecurityManager(new RMISecurityManager());
Remote r = Naming.lookup("rmi://192.168.0.1/Meeting");
String s = null;
if(r instanceof Meeting)
{
Meeting ms = (Meeting)r;
s = ms.getDate();
}
System.out.println(s);
}
}
===================================================================
|
| Author |
Message |
fsd

|
Posted: 2003-12-24 0:06:00 |
Top |
java-programmer, Little Problem
I have three numbers - 1, 2 & 3.
A randomly selected one of the three are stored in 'var1', and another
randomly selected one is in 'var2'.
How do I find out the number that is left over?
I tried a while loop but I couldn't get it to work...
TIA
|
| |
|
| |
 |
Joseph Dionne

|
Posted: 2003-12-24 0:14:00 |
Top |
java-programmer >> Little Problem
fsd wrote:
> I have three numbers - 1, 2 & 3.
>
> A randomly selected one of the three are stored in 'var1', and another
> randomly selected one is in 'var2'.
>
> How do I find out the number that is left over?
>
> I tried a while loop but I couldn't get it to work...
>
> TIA
>
>
Add var1 and var2 together
psuedo code;
switch(var1 + var2)
case 3: three is left
case 4: two is left
case 5: one is left
|
| |
|
| |
 |
Nicholas Paldino [.NET/C# MVP]

|
Posted: 2003-12-24 0:15:00 |
Top |
java-programmer >> Little Problem
fsd,
What I would do is store the values in an ArrayList. When you pick the
numbers randomly, remove them from the ArrayList and place into a new
collection. This would require you to change the range of selected random
numbers every time (the first time you pick a random number from the range
1-3, then 1-2, etc, etc). You just have to stop when you have enough
numbers selected. Then, whatever is left over in the ArrayList is what was
not selected.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- email***@***.com
"fsd" <email***@***.com> wrote in message
news:bs9p1f$b81nj$email***@***.com...
> I have three numbers - 1, 2 & 3.
>
> A randomly selected one of the three are stored in 'var1', and another
> randomly selected one is in 'var2'.
>
> How do I find out the number that is left over?
>
> I tried a while loop but I couldn't get it to work...
>
> TIA
>
>
|
| |
|
| |
 |
Sudsy

|
Posted: 2003-12-24 0:20:00 |
Top |
java-programmer >> Little Problem
fsd wrote:
> I have three numbers - 1, 2 & 3.
>
> A randomly selected one of the three are stored in 'var1', and another
> randomly selected one is in 'var2'.
>
> How do I find out the number that is left over?
>
> I tried a while loop but I couldn't get it to work...
>
> TIA
Think! What do the numbers 1, 2 and 3 add up to? Add up the two
you know, subtract from 6 and you've got the third.
Seems obvious now, eh?
|
| |
|
| |
 |
Dmitriy Lapshin [C# / .NET MVP]

|
Posted: 2003-12-24 0:21:00 |
Top |
java-programmer >> Little Problem
Something like this (pseudo-code):
var1 = Random(3);
var2 = Random(3);
while (var2 == var1)
{
var2 = Random(3);
}
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"fsd" <email***@***.com> wrote in message
news:bs9p1f$b81nj$email***@***.com...
> I have three numbers - 1, 2 & 3.
>
> A randomly selected one of the three are stored in 'var1', and another
> randomly selected one is in 'var2'.
>
> How do I find out the number that is left over?
>
> I tried a while loop but I couldn't get it to work...
>
> TIA
>
>
|
| |
|
| |
 |
Eric Sosman

|
Posted: 2003-12-24 0:22:00 |
Top |
java-programmer >> Little Problem
fsd wrote:
>
> I have three numbers - 1, 2 & 3.
>
> A randomly selected one of the three are stored in 'var1', and another
> randomly selected one is in 'var2'.
>
> How do I find out the number that is left over?
if (var1 != var2)
System.out.println ( (6 - var1 - var2) + " is missing" );
else
System.out.println ("Two values are missing, you liar!");
--
email***@***.com
|
| |
|
| |
 |
Marco Martin

|
Posted: 2003-12-24 0:24:00 |
Top |
java-programmer >> Little Problem
try this;
int nArrayPos = -1;
for(int x = 0; x < arrayOfVars.Length; x++)
{
if(var1 != arrayOfVars[x] & var2 != arrayOfVars[x])
{
nArrayPos = x;
}
}
if(nArrayPos != 01)
MessageBox.Show(arrayOfVars[x].ToString() + " is not beeing used");
"fsd" <email***@***.com> wrote in message
news:bs9p1f$b81nj$email***@***.com...
> I have three numbers - 1, 2 & 3.
>
> A randomly selected one of the three are stored in 'var1', and another
> randomly selected one is in 'var2'.
>
> How do I find out the number that is left over?
>
> I tried a while loop but I couldn't get it to work...
>
> TIA
>
>
|
| |
|
| |
 |
fsd

|
Posted: 2003-12-24 0:32:00 |
Top |
java-programmer >> Little Problem
"Sudsy" <email***@***.com> wrote in message
news:email***@***.com...
> fsd wrote:
> > I have three numbers - 1, 2 & 3.
> >
> > A randomly selected one of the three are stored in 'var1', and another
> > randomly selected one is in 'var2'.
> >
> > How do I find out the number that is left over?
> >
> > I tried a while loop but I couldn't get it to work...
> >
> > TIA
>
> Think! What do the numbers 1, 2 and 3 add up to? Add up the two
> you know, subtract from 6 and you've got the third.
Simple, but highly effective. Well done.
> Seems obvious now, eh?
It does *now*. :)
|
| |
|
| |
 |
Marco Martin

|
Posted: 2003-12-24 0:51:00 |
Top |
java-programmer >> Little Problem
Sorry, the last if should have been;
if(nArrayPos != -1)
"Marco Martin" <email***@***.com> wrote in message
news:9YZFb.6630$d%email***@***.com...
> try this;
>
> int nArrayPos = -1;
> for(int x = 0; x < arrayOfVars.Length; x++)
> {
> if(var1 != arrayOfVars[x] & var2 != arrayOfVars[x])
> {
> nArrayPos = x;
> }
> }
> if(nArrayPos != 01)
> MessageBox.Show(arrayOfVars[x].ToString() + " is not beeing used");
>
>
> "fsd" <email***@***.com> wrote in message
> news:bs9p1f$b81nj$email***@***.com...
> > I have three numbers - 1, 2 & 3.
> >
> > A randomly selected one of the three are stored in 'var1', and another
> > randomly selected one is in 'var2'.
> >
> > How do I find out the number that is left over?
> >
> > I tried a while loop but I couldn't get it to work...
> >
> > TIA
> >
> >
>
>
|
| |
|
| |
 |
Brad BARCLAY

|
Posted: 2003-12-24 1:38:00 |
Top |
java-programmer >> Little Problem
fsd wrote:
> I have three numbers - 1, 2 & 3.
>
> A randomly selected one of the three are stored in 'var1', and another
> randomly selected one is in 'var2'.
>
> How do I find out the number that is left over?
Think more mathematically. Sum the numbers you have together, and
deduct them from the sum of all three numbers. No loops required.
Brad BARCLAY
--
=-=-=-=-=-=-=-=-=
From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project: http://www.jsyncmanager.org
|
| |
|
| |
 |
Eric Johannsen

|
Posted: 2003-12-24 1:43:00 |
Top |
java-programmer >> Little Problem
Unless I'm missing something, this would not work because theoretically you
could get "1" as your answer every time...and that would be stored in each
element of the array list.
Eric
"Nicholas Paldino [.NET/C# MVP]" <email***@***.com> wrote in
message news:#r#email***@***.com...
> fsd,
>
> What I would do is store the values in an ArrayList. When you pick
the
> numbers randomly, remove them from the ArrayList and place into a new
> collection. This would require you to change the range of selected random
> numbers every time (the first time you pick a random number from the range
> 1-3, then 1-2, etc, etc). You just have to stop when you have enough
> numbers selected. Then, whatever is left over in the ArrayList is what
was
> not selected.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - email***@***.com
>
> "fsd" <email***@***.com> wrote in message
> news:bs9p1f$b81nj$email***@***.com...
> > I have three numbers - 1, 2 & 3.
> >
> > A randomly selected one of the three are stored in 'var1', and another
> > randomly selected one is in 'var2'.
> >
> > How do I find out the number that is left over?
> >
> > I tried a while loop but I couldn't get it to work...
> >
> > TIA
> >
> >
>
>
|
| |
|
| |
 |
Nicholas Paldino [.NET/C# MVP]

|
Posted: 2003-12-24 1:59:00 |
Top |
java-programmer >> Little Problem
Eric,
That's not what I meant. The array list would be populated with values,
but not randomly. It would be populated with the set of values to select
from (however one comes to those values is irrelevant). Then, a random
number between 0 and the length of the array - 1 is chosen, representing the
index that the value selected is at. That value is placed in another
collection, and the element at that index is removed from the original set.
This reduces the length by one. Even if one is selected every time, it
works because the elements are shifted down one with each removal, providing
a different value.
--
- Nicholas Paldino [.NET/C# MVP]
- email***@***.com
"Eric Johannsen" <email***@***.com> wrote in message
news:h8%Fb.1938$email***@***.com...
> Unless I'm missing something, this would not work because theoretically
you
> could get "1" as your answer every time...and that would be stored in each
> element of the array list.
>
> Eric
>
> "Nicholas Paldino [.NET/C# MVP]" <email***@***.com> wrote
in
> message news:#r#email***@***.com...
> > fsd,
> >
> > What I would do is store the values in an ArrayList. When you pick
> the
> > numbers randomly, remove them from the ArrayList and place into a new
> > collection. This would require you to change the range of selected
random
> > numbers every time (the first time you pick a random number from the
range
> > 1-3, then 1-2, etc, etc). You just have to stop when you have enough
> > numbers selected. Then, whatever is left over in the ArrayList is what
> was
> > not selected.
> >
> > Hope this helps.
> >
> >
> > --
> > - Nicholas Paldino [.NET/C# MVP]
> > - email***@***.com
> >
> > "fsd" <email***@***.com> wrote in message
> > news:bs9p1f$b81nj$email***@***.com...
> > > I have three numbers - 1, 2 & 3.
> > >
> > > A randomly selected one of the three are stored in 'var1', and another
> > > randomly selected one is in 'var2'.
> > >
> > > How do I find out the number that is left over?
> > >
> > > I tried a while loop but I couldn't get it to work...
> > >
> > > TIA
> > >
> > >
> >
> >
>
|
| |
|
| |
 |
Alex Hunsley

|
Posted: 2003-12-24 21:13:00 |
Top |
java-programmer >> Little Problem
fsd wrote:
>I have three numbers - 1, 2 & 3.
>
>A randomly selected one of the three are stored in 'var1', and another
>randomly selected one is in 'var2'.
>
>How do I find out the number that is left over?
>
>I tried a while loop but I couldn't get it to work...
>
>TIA
>
You could perhaps use the observation that the final number is equal to:
6 - var1 - var2
alex
|
| |
|
| |
 |
Walter Mitty

|
Posted: 2003-12-28 23:13:00 |
Top |
java-programmer >> Little Problem
"fsd" <email***@***.com> brightened my day with his incisive wit when in
news:bs9p1f$b81nj$email***@***.com he conjectured that:
> I have three numbers - 1, 2 & 3.
>
> A randomly selected one of the three are stored in 'var1', and another
> randomly selected one is in 'var2'.
>
> How do I find out the number that is left over?
>
Subtract the two you have from 6.
|
| |
|
| |
 |
Zdenek

|
Posted: 2006-4-30 23:41:00 |
Top |
java-programmer >> Little Problem
Hello
I have a problem with mysql query
I have a table Teams and field 'date' (12-01-2006 format)
I want to see all records but date format I want is 12/01 %d/%m
My query
SELECT Date, p.Category, t1.Teams, t2.Teams, Prediction, Stake, Odds,
Win_Lose, Profit, Score, ZakladyID
FROM
Teams as t1, Teams as t2, Zaklady as m, Category as p
WHERE
Win_Lose = '' AND
p.CategoryID = m.Category AND
t1.TeamsID = m.Team1 AND
t2.TeamsID = m.Team2
How can I make it
Please help me in making right query
Best Regards
Pat
|
| |
|
| |
 |
J.O. Aho

|
Posted: 2006-5-1 1:21:00 |
Top |
java-programmer >> Little Problem
Zdenek wrote:
> Hello
> I have a problem with mysql query
> I have a table Teams and field 'date' (12-01-2006 format)
>
> I want to see all records but date format I want is 12/01 %d/%m
SELECT CONCAT(SUBSTR(Date,0,2),'/',SUBSTR(Date,3,2)), p.Category, t1.Teams,
t2.Teams, Prediction, Stake, Odds, Win_Lose, Profit, Score, ZakladyID FROM
Teams as t1, Teams as t2, Zaklady as m, Category as p WHERE Win_Lose = '' AND
p.CategoryID = m.Category AND t1.TeamsID = m.Team1 AND t2.TeamsID = m.Team2
Should work, but sure there are better ways to do it.
//Aho
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- JTable(A few more queries )I had a couple of more queries -
1) how to prevent swapping of the columns as in, by default the columns
in the JTable are not fixed in terms of their placement. They can be
very well swapped with one another. I want to prevent this.
2) Also after feeding the JTable with the data in database, i want to
be keep one row always empty so that a row can be inserted. It's like
we have in MS-Access.
hope i was clear in explaining the query properly.
Thanx,
Ankur
- 2
- JavaHelp and root nodehi,
Simplifying i have a java help set as this
ROOT -> C
-> B -> b1
-> b2
-> b3
->C
I can set B as current visualized node with these instructions:
helpBroker =(DefaultHelpBroker)coreHelpSet.createHelpBroker();
helpBroker.setCurrentID(B);
my problem is that i'd like to hide the other nodes setting B as tree
root node so that i could only see B and its children b1,b2,b3.
This is because entire help set is recovered from a big manual
describing a lot of applications and i'd like to show only one referred
by node B avoiding to show others that couldn't be installed.
Can you help me?
thanks
- 3
- Applet using jdbc (ms sqlserver)Hi,
After reading lots of docs, a got the impression that it is possible to
write an Java Applet, that uses jdbc to connect to MS SQLServer (Without
flushing all security permissions down to drain).
Here is what I've done:
1. Downloaded the Microsoft JDBC driver for SQL Server 2000 SP 3.
2. Downloaded the app from Microsoft's site:
http://support.microsoft.com/default.aspx?scid=kb;en-us;313100
3. Tried to compile.
I get the java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Error establishing socket.
I have tested every possible error that I can find in MS's site. I have
tried to alter policies granting "permission java.net.SocketPermission",
with no luck. I think that before granting this permission, I also got
some security exceptions..
So here's my question: is it possible to create an applet (UnTrusted)
that uses SQL server, that can be run in browser, that doesn't need any
security alternations?
Best Regards,
Mika
- 4
- Swing Worker Pause/ResumeHello all,
I am dealing with a class that extends SwingWorker and Inside that
class there is another class defined. I'll refer to the inside define
class as the "helper class" for sake of clarity.
What i am try to do is to pause/resume the class that extends
SwingWorker, when i used flags to do that it outputed errors from the
"helper class". These errors came from a method that fires Custom
Events and they were NullPointerExceptions. After the errors were
printed the classes continued executing.
How can i pause/resume successfully ?
Thanx in advance for any help :D
Ahmed Ashmawy
- 5
- Update of JProgressBarHi,
in my program i use a JProgressBar. I know, that i have to use another
Thread for updating the progressbar.
But with the following code it isn't working. What's wrong?
public class Parser1CheckVisitor{
int iCount = 0;
JFrameJRespCheck m_JFrameJRespCheck;
ResponseFile m_ResponseFile;
public Object visit(ASTrecord node, Object data) {
if (data != null) {
m_JFrameJRespCheck.jProgressBarPanelStatus.setMinimum(0);
m_JFrameJRespCheck.jProgressBarPanelStatus.setMaximum(m_ResponseFile.
m_iCount);
makeProgressThread().start();
for (iCount = 0; iCount < m_ResponseFile.m_iCount; iCount++) {
m_ChipFile.readRecord(iCount + 1);
data = node.childrenAccept(this, data);
}
}
return "OK";
}
Thread makeProgressThread() {
return new Thread() {
public void run() {
while (iCount != m_ResponseFile.m_iCount) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {}
m_JFrameJRespCheck.jProgressBarPanelStatus.setValue iCount);
//System.out.println(iCount);
}
}
};
}
}
- 6
- looking for a Java decompilerHello!
Is there a good byte-code de-compiler in the ports? It does not
need to be fancy/GUI -- just a straghtforward .class->.java utility.
Thanks for any pointers. Thanks!
-mi
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 7
- Printing EPS (embedded postscript) from Java.
Hello all,
I need to print .eps (also called .epsf, .epi, .epsi) from inside a
java program. My target platforms are windows and mac-- although
windows is first.
The new 1.4 printing API has aupport for printing normal postscript
but does not have .eps support.
I've been looking around the internet to see what solutions people
have come up with and unfortonately I didn't get what I would call a
solid answer by doing this....
I looked at the source of two open source programs the support .eps.
They both have origianal source but esstenially did it almost exactly
the same way. They took the .ps file the the standard Java classes
generated and just stuck an .eps header on it. They then stick the .ps
inside a box as required. They then searched the .ps file for commands
that are illegal in the .eps and if they are there they just die.
I've got some serious problems with this:
(1) It assumes that the Sun classes are going to generate a .ps that
is easily converted to an eps. Maybe they do now but what about future
versions of Java?
(2) It makes big assumptions about future .ps and .eps formats.
(3) It stinks of just being a hack. Does anyone really know this is
going to work all the time and on all platforms?
Does anyone have any experience with making .eps from Java that has
any sugestions? I want to translate my Garphics2D objects to .eps. I
want the .eps to be accepted by major publishing programs on windows and
mac.
Thanks
Glen Pepicelli,
http://www.glenp.net
(reply to group)
- 8
- how to do synchronization profiling and RepaintManager and performance issuesSome day ago I've posted about a problem with
javax.swing.SystemEventQueueUtilities.queueComponentWorkRequest
and some performance problem.
(http://groups.google.com/group/comp.lang.java.programmer/browse_frm/thread/afcd152d02c4d4cb/#)
My doubt is that the system spend too much time in symchronization
problems.
Someone suggested that it can be all the repaint stuff, but I've tried
to reduce it...(the paint component method in the reduced version is
something like
{ super.paintComponent..
draw an oval}
while in the complex versions is {
{ super.paintComponent..
draw 400 lines
draw 400 oval
}
and the first one takes the 20% of resources while the last the 40%
Moreover the time spent in the paint method is less and the repaint
manager should be decoubled from the component...
so how can I do a better profiling of the system?
I was thinking to override the repaint method and using directly the
invoke later paint..
but I'd like that the new method would be able to merge more call to
repaint in only one paint.. if the last paint hasnt stopped...
I hope that this info will sufficent, otherway askme
Thanks to all
Dimitri
- 9
- Clients are bad ?Hello John Bailo , You say :
" Open source is just about old style client software
catching of to the Web economy "
You obviously don't believe that yourself ,
otherwise you'd be using Google ... Not Moz .
- 10
- 11
- Java Training QuestionI am an unemployed web developer with php, perl, and asp programming
experience and in order to be able to widen my job search I am considering
getting some formal training in Java. I am looking for training
recommendations in order to be able to do Java web development. Also will
this training be appealing to prospective employers or just a waste of my
time and money. Any feedback I get will be greatly appreciated.
- 12
- how to mail a form in JSPhi this is ravin. i m a last year IT student and i am doing my project
at a govt. organization. i have to do one thing in my project that:
> there is a feedback form which is to be filled by any user.
> it is having four fields.
1) name
2) tel.no
3) e-mail address
4) comments
> i simply have to mail this fields to the org.'s mail address when user hits submit button. there is nothing to do with this fields.
please send releated help as early as possible.
- 13
- 14
- Asking help for a java io problemHello, guys! I have a problem running the following code with eclipse
showing that:
java.io.IOException: Stream closed
at sun.nio.cs.StreamDecoder.ensureOpen(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at HtmlFileParser.parseHtmlDoc(HtmlFileParser.java:32)
at HtmlFileParser.main(HtmlFileParser.java:52)
//code here:
try{
FileInputStream fin = new FileInputStream("test.html");
InputStreamReader fr = new InputStreamReader(fin);
for(i=0; i<2048; i++) buf[i] = '0';
fr.read(buf, 0, 2048); //problem here (line 32)
FileWriter fw = new FileWriter("bufWriteTest.txt");
fw.write(buf);
fw.flush();
}
catch(FileNotFoundException e) {
e.printStackTrace();
}
catch(IOException e) {
e.printStackTrace();
}
There are no syntax erro in the above code, it just dosen't work,
please help me finding out what the problem is, thank you.
- 15
- Programatically deducing VARCHAR2 length?Hi,
I'm using WebLogic 5.1 sp12 and Oracle 8.1.7 with JDBC 1.2 drivers.
I was wondering, if I know that a column is a vARCHAR2 column, how
could i deduce the maximum length of that column, short of repeatedly
inserting larger and larger strings until I genertae an exception. I
know with SQL*Plus I can describe the table and find out lengths that
way, but I was hoping for a more general automated method.
Thanks for any help anyone can provide - Dave
|
|
|