Salamina Daniel

Ranch Hand
+ Follow
since Oct 10, 2001
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 Salamina Daniel

I'd like to launch a java apllication from the browser (I need to print to a dot print matrix and use the print port directly), and it seems that I could use Java Web Start to do that.
Is there any way to import the browser output into the java application (so at the moment that I launch the app. I could print the browser output directly to the printer as ASCII text)?
Best regards
18 years ago
Thanks for your message !
I'll take a look at Java Web Start. It seems like a good solution for my problem
18 years ago
I have to develop an application (java) wich access a database and after some calculations updates database an write a receipt (a sort of POS- local administration).
My problem is that if i stick to JSP (which seems like the most elegant and practical solution)- I'll have to print receipts from the workstation browser to a dot matrix printer. As I have no way to print only a few lines of text from the browser (It prints only A4 or some similar formats and my receipts are variable in layouts and sizes) my only choice is to write a client side application (and direct the output to LPT1, without printer driver intervention).
The point is I don't like awt and Swing ...but I'd rather use the browser (not to forget that updating the application would mean to reinstall all the clients)
Can you figure another solution for my issue ?
Best regards
18 years ago
I finished my SCJP a few months ago, and lately I'm trying the database field (Oracle on Linux). In the mean time, I started to read Ed Roman's book on EJB and found it very good. I'm wondering on what position is this week's book,
" Building Scalable and High-Performance Java(TM) Web Applications Using J2EE(TM) Technology", compared to Ed Roman's classic one.
Thanks for the reply
Actually I changed a little bit C:\oracle\ora90\database\initfirst.ora, like this :
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
and maked the password file PWDsecond.ora in C:\oracle\ora90\database\PWDsecond.ora
After this I could log on and issue the create database statement
Best regards
19 years ago
Well, I installed Oracle 9i Personal Edition for Windows98 and everything went well.
Now, I'm trying to manually create a database (I didn't wanted the job to be done by the dca), but I get into troubles :
1. C:\set ORACLE_SID=first
2. C:\SQLPLUS /nolog
3. SQL>connect sys/manager as sysdba
A starting window appear and I'm asked so supply a password. What password ? (I tried all the password but none seems to be ok)
I read about OS Authentication and password file Authentication, so I made the following file :
C:\oracle\ora90\database\initfirst.ora, like this :
==========================================
# Cache and I/O
DB_BLOCK_SIZE=4096
DB_CACHE_SIZE=20971520
# Cursors and Library Cache
CURSOR_SHARING=SIMILAR
OPEN_CURSORS=300
# Diagnostics and Statistics
BACKGROUND_DUMP_DEST=c:\oracle\ora90\admin\first\bdump
CORE_DUMP_DEST=c:\oracle\ora90\admin\first\cdump
TIMED_STATISTICS=TRUE
USER_DUMP_DEST=c:\oracle\ora90\admin\first\udump
# Control File Configuration
CONTROL_FILES=("c:\oracle\ora90\admin\first\control01.ctl",
"c:\oracle\ora90\admin\first\control02.ctl",
"c:\oracle\ora90\admin\first\control03.ctl")
# Archive
LOG_ARCHIVE_DEST_1='LOCATION=c:\oracle\oradata\first\archive'
LOG_ARCHIVE_FORMAT=%t_%s.dbf
LOG_ARCHIVE_START=TRUE
# Shared Server
# Uncomment and use first DISPATCHES parameter below when your listener is
# configured for SSL
# (listener.ora and sqlnet.ora)
# DISPATCHERS = "(PROTOCOL=TCPS)(SER=MODOSE)",
# "(PROTOCOL=TCPS)(PRE=oracle.aurora.server.SGiopServer)"
#DISPATCHERS="(PROTOCOL=TCP)(SER=MODOSE)",
#"(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)",
#(PROTOCOL=TCP)
# Miscellaneous
COMPATIBLE=9.0.0
DB_NAME=first
# Distributed, Replication and Snapshot
#DB_DOMAIN=us.oracle.com
REMOTE_LOGIN_PASSWORDFILE=NONE
# Network Registration
INSTANCE_NAME=first
# Pools
JAVA_POOL_SIZE=31457280
LARGE_POOL_SIZE=1048576
SHARED_POOL_SIZE=52428800
# Processes and Sessions
PROCESSES=150
# Redo Log and Recovery
FAST_START_MTTR_TARGET=300
# Resource Manager
RESOURCE_MANAGER_PLAN=SYSTEM_PLAN
# Sort, Hash Joins, Bitmap Indexes
SORT_AREA_SIZE=524288
# System Managed Undo and Rollback Segments
UNDO_MANAGEMENT=AUTO
UNDO_TABLESPACE=undotbs
==========================================
As you can see I have REMOTE_LOGIN_PASSWORDFILE=NONE
so I use OS authentication.
I don't know what to do as I can't login to issue the CREATE DATABASE statement.
Thanks a lot !
Best regards
19 years ago
Congratulations !
Best regards
19 years ago
Congratulations !
All the best !
19 years ago
Congratulations !
Best Regards
19 years ago
I want to express my thanks and gratitude to all the people here at Javaranch for their advices and support. I believe this is the best place for learning Java on the NET.
I gave the exam on 24 January 2002 (last week).
My story :
When I clicked the button for the final result I saw 100% for all sections. It was a real pleasant surprise after more than 5 months of hard work.
There are persons much more valuable than me on this site. But I've done my lessons, and of course I had luck.
The best advice I can give you :
Be very careful!. If you've done your homework, the difference is in the details ! Make a search in this forum with "traps to be aware " and you'll find Ajith Kallambella, Maha Anna, Jim Yingst... tips on how to avoid such traps.
Even with your eyes wide opened you can make mistakes (emotions and tension can mislead you even for simple questions).
I never done any notes for the exam. I preffer to read Velmurugan's ones.
I've done a lot of mocks which sharpened my eyes. The most important activity after taking a mock is to analyze the result . I spent a great amount of time writing little programs to clarify the points I was unsure of.
All the things above were mentioned all around this place by the forum moderators. I just tried my best to follow them.
Future plans :
I think I will spend my time learning some database concepts and maybe I'll go for an Oracle certification.
Thanks a lot !
Best regards
19 years ago
A simple question.
---------------------
I encountered a few mocks with the following problem:
They asked me to write the range of an integer. I tried to write -2^31 2^31-1 but the test engine hasn't accepted this answer (only
-2147483648 2147483647 was correct from their point of view). The point is I can't remember such a number (I keep only the magnitude in my mind).
So in the real exam, if I write the exponential form whith "^", like above It will be all right ?
Question from J@Whiz :
What will be the output on compiling/running the following code?
public class MyThread implements Runnable
{
String myString = "Me ";
String yourString = "You";
public void run()
{
for (int i=0; i < 2; i++)
{
myString.concat(" to Me ");
System.out.print(myString);
yourString.concat(" for You ");
System.out.println(yourString);
}

}
public static void main(String[] args)
{
MyThread t = new MyThread();
new Thread(t).start();
new Thread(t).start();
}
}

a.Prints
Me to You You to Me
Me to You You to Me
Me to You You to Me
Me to You You to Me
b.Prints
Me to You Me to You
Me to You Me to You
Me to You Me to You
Me to You Me to You
c.Prints
Me to You You to Me
You to Me Me to You
Me to You You to Me
You to Me Me to You
d.Output cannot be determined
e.Prints
Me You
Me You
Me You
Me You
Their answer:
E is correct. Here two threads are constructed one after another. When start() method of first thread is called, the run() method will be called. Inside the run method, the loop will be executed twice. Please note that concat() method on String object doesn't change the value of original object, it creates new String object. Thus the values of myString and youString will remain unchanged. Thus run will be called twice and will print twice Me You each time it(run) is invoked.
My point: The above explanation is right about string concatenation but is not mentioning the fact that we don't have synchronized run() or code block . So I think we could have an output like this :
Me
Me You
You
..... (first thread start prints Me, cease execution to second thread which prints Me You ....)
So I think d is the answer.
What do you think ?
[ January 22, 2002: Message edited by: Salamina Daniel ]
If in the exam we got a question asking to write some stuff (for example what kind of event is an argument to methods defined in MouseMotionListener interface)
We could write:
MouseEvent
or
java.awt.event.MouseEvent
What would you write ?
I ask this because I saw differences in the way mocks treat this kind of problem .
If we have a question like this one :
Which constructor for FileOutputStream is correct
a. bla bla bla
b. FileOutputStream(File f, boolean append)
c. bla bla bla
d ....
In JDK 1.3 we have only this :
FileOutputStream(String name, boolean append)
Creates an output file stream to write to the file with the specified name.
In JDK 1.4 we also have :
FileOutputStream(File file, boolean append)
Creates a file output stream to write to the file represented by the specified File object.
Should i choose b or not ? (in my opinion not - maybe the test engine from Sun is not updated to keep count of new API changes so I'll stick to the old API)
What would you choose ?

Best Regards