Alan Christen

Greenhorn
+ Follow
since Sep 18, 2006
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 Alan Christen

]Fixed: changed Short to short. Compiled without errors.
Hello,

I was given this source code and asked to compile it: it fails with the error " inconvertible types found : int required: java.lang.Short".

The code does a bitwise shift to convert some hashed (I think) values to integer. The compiler fails when encountering this statement "s >>>= 5;"


The original author of the code swears up and down that it used to compile but cannot help me.

Note that I removed the SQL query from this code snippet due to its size...Any idea what could be the problem?
9 years ago
You don't have to use Java for this.

Look at using the Oracle functions HexToRaw() and RawToHex() with a stored procedure and CTAS (CREATE TABLE ... AS). You won't event have to suck the data out.

Thanks to all for your input.

It is big deal for a newbie like myself to have guys like you taking time to answer questions like this.

Thanks again.

11 years ago
Makes sense. As long as the end result is what was expected. There is no difference.

Joanne: what is your personal preference, coding style? I am curious...
11 years ago
Hello!

/****************DISCLAIMER****************/
I am a self-taught, beginning programmer with Java. So what, you ask? Well, there is a *lot* of the "basics" that I don't have...lots of things that aren't so obvious to me. You've been warned.
/****************DISCLAIMER****************/

I have access to code written by contractors (no longer present on site) and there are distinct differences I noticed.

In some instances, a class is written like this:


In other cases, it is the "other way around":



What is the difference between the two? Is one design better than the other?

I welcome your comments. Thank you.

Al.

[ October 31, 2008: Message edited by: Alan Christen ]
[ October 31, 2008: Message edited by: Alan Christen ]
11 years ago
Paul/Rob-

Thanks for your replies. Obviously, the simple way to do this is by creating a network mapping using Samba...

It is also obvious that this has really nothing to do with JFileChooser.

My apologies for the confusion.

Thanks again for your prompt replies.

Al.
11 years ago
Hello!

/****************DISCLAIMER****************/
I am a self-taught, beginning programmer with Java. So what, you asked? Well, there is a *lot* of the "basics" that I don't have...lots of things that aren't so obvious to me. You have been warned.
/****************DISCLAIMER****************/

I have a built a very simple application using Swing & JFileChooser. All that is does is open up Oracle SQL*Loader log files: then the user can check for error messages.

My JAR is on a MS Windows workstation and the log files are on a Unix server. A batch file FTPs every day the files to a directory on the MS Windows workstation.

I want to enhance my application so that I can use JFileChooser to grab the files directly from the Unix server.

I have a hostname/ip address as well as username/password for that Unix server. I have r/w access to the directory where the log files are.

Is it possible? Can someone please provide a few pointers?

Thanks for your time.

Al.
11 years ago
It appears that it is a published WSDL document: another team (at my work) has successfully designed an app using Axis to pull info using this service.

I don't have access to their source code though...
11 years ago
Hello!

/****************DISCLAIMER****************/
I am a self-taught, beginning programmer with Java. So what, you asked? Well, there is a *lot* of the "basics" that I don't have...lots of things that aren't so obvious to me. You have been warned.
/****************DISCLAIMER****************/

I have at my disposition a web service "getAccountStatus" that was designed for the purpose of "looking up" a customer account based on account numbers....an account number is passed as message to the web service and the customer information is returned via XML.

I have a database table containing a list of 350K customer account numbers. My task is to verify whether these accounts are "active".

How do I build my requester so that it knows where this service is located? How do I bind to the service?

Can someone please provide me a few high level pointers on how I get started? I don't need to build anything fancy...

Thank you for any help you may provide.

Al.
[ July 15, 2008: Message edited by: Alan Christen ]
11 years ago
Chad,

I know this does not answer your question but why using Java?

Did you know you can do the same in a shell script with a *lot* less code?

I did it for Oracle & DB2 without too much trouble....you can check web sites like this one

http://www.orafaq.com/scripts

My 2 cents.

Al.
Thank you very much for your reply!!! It helped!

Can you please suggest books/website where I could find more on the topic of shift operators??

Thank in advance.

Al.
12 years ago
Hello!

/****************DISCLAIMER****************/
I am a self-taught, beginning programmer with Java. So what, you asked? Well, there is a *lot* of the "basics" that I don't have...lots of things that aren't so obvious to me.
/****************DISCLAIMER****************/

I have a Oracle (10G) database table that contains 2 columns: callbackday (Date datatype) & callbacktime (Number(5) datatype).

My job is to extract data from this table and massage it before dumping it to another table. So far, I created a simple class that selects from this table and outputs the results to the console.

I was informed today that the "callbacktime" value is in fact a time value (HH:MI:SS). The explanation I was given is as follows:

This "callbacktime" field contains two-byte bitmap with the following format:

Bits 15-11 : Hour
Bits 10-5 : Minutes
Bits 4-0 : Seconds/2


How do you suggest I perform the conversion? I have started reading up on bitwise shift operators but I am not sure I am on the right path...

Can someone please provide a few pointers??

Thanks in advance for your time.

Al.

[ May 15, 2008: Message edited by: Alan Christen ]

[ May 15, 2008: Message edited by: Alan Christen ]

[ May 15, 2008: Message edited by: Alan Christen ]
[ May 15, 2008: Message edited by: Alan Christen ]
12 years ago
The Google query

http://www.google.com/search?hl=en&q=how+to+find+the+difference+between+Dates+%2Bjava&btnG=Google+Search

returns 242,000 hits.

In this *huge* result set, I found this url:

http://www.exampledepot.com/egs/java.util/CompDates.html

Time spent: 3 minutes.
12 years ago
Ernest,

Thanks for taking the time to reply. I see my mistake now (smacking forehead...duh).

One quick question though: the reason why I chose Hashmap() is that it appeared to have large "Storage" capacity.

I am dealing with large tables (up to 650 million values in the worst case) ; could I use a list of store that many elements?

Previous attempts using arrays failed with "Java Heap Space" error.

TIA,

Alan.
13 years ago