Yingie Pitts

Ranch Hand
+ Follow
since Oct 10, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Yingie Pitts

How do I store users' passwords in Oracle? Should I just save it as a column with other columns (username, userId...) or save it seperately? I know Oracle encrypts passwords but how can I enable Oracle to do it for me?
17 years ago
I imported an EAR file to JDeveloper and tried to run the Application Client JAR file within it, but I got this error:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
Does anyone know what caused this?
Jim, you were right. I could've used parse(String) directly, but that caused the ParseException problem (unable to parse date). Here is how I create the SimpleDateFormat object:
SimpleDateFormat dateParser = new SimpleDateFormat();
Date date1 = dateParser.parse("Jan 23, 2004 03:01:38pm");
Is there anything wrong?
17 years ago
Sorry about that ParseException thing. That was because I did not use ParsePosition parameter. However,
Date date1 = dateParser.parse("Jan 23, 2004 03:01:38pm", new ParsePosition(0)
returns null. Do you know why?
17 years ago
If I use SimpleDateFormat, I would get this:
java.text.ParseException: Unparseable date: "Jan 23, 2004 03:39:38pm".
What I am trying to do is to get a difference of two dates, which are supposed to be formed from two strings.
17 years ago
I got two Date object using this way:

Date date1 = DateFormate.getDateInstance().parse("Jan 23, 2004 03:01:38pm");
Date date2 = DateFormate.getDateInstance().parse("Jan 23, 2004 03:10:38pm");

However, date1.getTime() always equals to date2.getTime(), which is 1074834000000. Can anyone tell my what's wrong?
17 years ago
what's the difference between instance synchronize and static synchronize?
Thanks everyone. Cheers!
Yingie
18 years ago
Congratulations! Good for you! I will take the 007 exam tonight. Let's keep our fingers crossed!
18 years ago
I met some terms during my study of OCA exam and the text book, Introduction to Oracle 9i SQL by Sybex, is not really helpful on explaining them. They are:
1) Index:
What are leading subset columns? How Index is created? how it is accessed? Which dictionary they are stored? Why they work differently on high and low cardinality columns? How they work if appears in Having clause?
2) Physical reads, logical reads? what do they mean?
3) init.ora file.
The only file I can find from my pc is init.ora.8252003155637.
Is this the init.ora file mentioned in the book? But, for example, if I set license_max_sessions = 3 in this file, I still can open more than 3 sessions for one user spontaneously?
Are there anyone has gone through this and want to share your knowledges?
Thanks,
Yingie
18 years ago
I use BorderLayout one a InternalFrame to arrange three components: JPanel (North), JTree (West) and JTable (East). My problem is the size and location of the JTable.
I used setPreferredSize() and setLocation() but none of them seems work properly. The size is not what I set and the location changes when I drop the InternalFrame. Have you had any similar experience and want to share?
18 years ago
I have two JInternalFrames A and B that are added to a JFrame. A opens the other JInternalFrame C. After C is closed, the focus always returns to B not A. Do any of you know why?
18 years ago
No I am not using java.net.MulticastSocket. I am keeping an ArrayList of client socket objects on the server socket. Everytime a client logs in, the client notify the server to add one more client connection into the ArrayList. This is how I keep tract of my client connections.
I used BufferedWriter.flush() to send clients messages that the server read in from one client. But this sends the message to every socket-connected client. How can I send a message to a particular client(s)? Help, please.
Thanks everyone.
But my users don't have email addresses, or at least they don't want to use emails. They want the message pops up on their machine when using the swing app. However it is not something like instant messenger because they don't chat with each other. The messages only be sent when certain event happen and either 1) the event trigers the message automatically, or 2) the owner of the event (user) draft a message himself.
Or, let's see if the socket solution works?
18 years ago