Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!

Sasikanth Malladi

Ranch Hand
+ Follow
since Nov 04, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Sasikanth Malladi

Hi all, I'm not sure if this an FAQ. I did google around but couldn't find anything.
What is the rationale behind not letting a thread be rerun?
Let's say I have a thread t1 that does a job.
I do the job with t1.start();
Assuming that all is well and that the job is finished and I need the same job to be done again.
Why can't I say t1.start(); again?
What is the design decision that precluded this behavior from being implemented?
Thanks,
SM
I am flexible. How can it be done with a servlet?
10 years ago
JSP
Howdy ranchers,
I've got a few excel reports which I need to make available via a JSP.
My problem is two fold:
1. I need to store the excel files into an Oracle 10g DB.
2. I need to make these files downloadable via a JSP.

I suppose #1 doesn't really belong here, but I'm hoping someone has already done this and will share their knowledge.

Any tips/pointeres/references on how to do this? I've googled around and tried to first figure out how to store excel files in an Oracle table, but I'm still struggling with getting it done successfully.
Once I do get that done, though, once a user clicks on a button to get the report, what is a good way of offering the file for download?
Thanks,
Sasikanth
10 years ago
JSP
Yes, that worked.
Thanks for the tip.
Sashi
11 years ago
That might work, but it's a log file that's being written to by another process.
I'll give it a shot and post the results.
Thanks for your input,
Sashi
11 years ago
Hi all, I'm trying to insert a message into a log file on a Solaris 10 machine via a Java program.

Basically I need to run an echo command and append the output into the file:

echo "Test message" >> /my/output/file

Here's my effort so far:

public class Test{
public static void main(String args[]){

try{
Process p = Runtime.getRuntime().exec(" echo \"TeSt MeSsAgE.\" >>/var/log/cisco" );

}
catch(Exception e)
{
e.printStackTrace();
}
}
}

It compiles and runs silently but doesn't do what I want.

Any pointers in the right direction?

Thanks,
Sashi
11 years ago
I work with Oracle all the time and am a total newbie to MS SQL Server, added to which I don't have a command line tool.
As mentioned, my method of using a generic front end is expensive as it's inserting each record as a new insert.
Yes, an 'INSERT INTO SELECT' could be better (though I haven't tried it).
Does this insert a bunch of rows at a time?
For example, is an insert into select with 1000 records more efficient than 1000 insert into stmts?
Since I'll be reading off a text file, the select would simply contain the records as csv strings.
Thanks,
Sashi
No, I do not intend to implement my own version of jdts, which considering my task is a little silly.

What I'd like to see is an ability to do a bulk insert, say inserting 1000 records at a go, instead of one at a time. I'm assuming that such an option is possible and will be more efficient than a sequential insert.

Thanks,
Sashi
Hi all, I need to insert a few text (csv) files into a remote MS SQL Server.
I tried to use a generic sql client (aqua data studio) but it seems to be generating an insert for each record. Very inefficient and takes hours for even moderate size files (50K records).
I was thinking of using jtds to do bulk insert. I don't have the MS SQL Server native client so I thought of implementing it myself.
Has anyone does this?
Can you share your experience/tips/pointers etc?
TIA,
Sashi
Why must an abstract class be specified as such? If a class has abstract methods, not declaring the class abstract is an error. What's the rationale behind this?
C++ has no such rule so I was wondering why.
Thanks,
Sasi
Did I say that the API didn't mention what I'm looking for?
Spoken in haste.

Thanks, Henry!
Sashi
11 years ago
Please compile the following code and you'll see what I mean.

The API doesn't list an option to include null fields. This probably revolves around the philosophical discussion of the meaning of the "" string and a null string.
Practically speaking, is there way of making Java respect my nulls, even if they don't exist?
Can I split my string into {"this","is","a","simple","string","",""}?
Not even sure if this makes sense.

awk has no such hangups and works well. But for my present purposes I was thinking of engaging Java.

Thanks,
Sashi>
11 years ago
Great!
Thanks for the quick response, Ben. I will check it out.
Sashi
13 years ago
All, when my servlet receives a request, it needs to send a SOAP message to another webserver and use the response that it receives to send out a response.

Is this a recommended thing to do? Are there better techniques? I'm a little new to SOAP so any pointers in the right direction are appreciated. Any links pointing to how to use a servlet as a SOAP client would be helpful, needless to say.

Thanks,
Sashi
13 years ago
To revisit an old topic, I'd like to see a solution.

Even though I'm designing this page to be read by wget/curl, I'd like to see the line breaks so that it's easy to be passed into a filter via a pipe.

I have set the content type to "text/plain" and it still doesn't help. I've noticed that a few pages generated by Perl/php do seem to preserve the newlines.

I can't think of a reason why Java would behave differently.

Anybody faced this issue before?

Thanks,
Sashi
13 years ago