Win a copy of Head First Android this week in the Android forum!

Mahesh swami

Greenhorn
+ Follow
since Aug 13, 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 Mahesh swami

---------------------------------------------------------------------------
Q what is the major similarities and difference b/w prepaired statement and StoredProcedures
I said Store procedures include function,cursor, while prepaired statement doesnot !!
please correct me
---------------------------------------------------------------------------

The similarity is that both preparedStatement & Stroed Procedure are precompiled on the database. Hence database need not create a query plan ateach execution time

The difference is that you you can write DB programming logic in Stored Procedure, pass IN,OUT , IN-OUT paramaters, use variables, conditional logic etc,
With PreparedStatments you can only execute parameterised SQL queries.

---------------------------------------------------------------------------
Q will the query will run faster on Delete/insert/Update query if table has Index on it ?
---------------------------------------------------------------------------
The query will run slower if indexes are used. This is because the databse alos need to update the index table aliong with your actual table for insert, delete, update operations.

But for select queries using coulmns with indexes for search, it will definitely improve performance!!!
15 years ago
Hi everybody,
I have a java application which can be used by desktops as well as PDA/Handheld devices. Since the size of the application jar file is around 3MB, its nota good idea to distribute it for PDA/handheld devices due to memory constraints.

Is anybody aware of a Java native compiler , which will convert my application Jar to an WinCE executable.

I searched a lot on the intenet but there is no product which exactly satisfies my requirements. A few like SuperWaba/Waba create a WinCE exe but only for the programs written in their proprietory language.

Any suggestions/guidance from you would be most appreciated.

Thanks & Regards
Mahesh

-- There are three things I always forget. Names, faces -- the third I can't remember!!!
15 years ago
Hi everybody,
I have a java application which can be used by desktops as well as PDA/Handheld devices. Since the size of the application jar file is around 3MB, its nota good idea to distribute it for PDA/handheld devices due to memory constraints.

Is anybody aware of a Java native compiler , which will convert my application Jar to an WinCE executable.

I searched a lot on the intenet but there is no product which exactly satisfies my requirements. A few like SuperWaba/Waba create a WinCE exe but only for the programs written in their proprietory language.

Any suggestions/guidance from you would be most appreciated.

Thanks & Regards
Mahesh

-- There are three things I always forget. Names, faces -- the third I can't remember!!!
15 years ago
What a doHead() method does is , it calls doGet() with modified response object which supresses all the response body and sends only the headers
-Mahesh
18 years ago
You can write
Runtime.exec("Iexplore http://www.yahoo.com");
18 years ago
Using reflection is the only approach to solve your dilemma
Suppose you have a singleton class then you might be having a method to get its instance
say getInstance()
SO you can do
Class cls = Class.forName(runtimehandler);
Method metGetInstance = cls.getMethod("getInstance", null);
DataHandler dh = (DataHandler)metGetInstance .invoke(null, null);
dh.method1();

I hope this solves your problem.
-Mahesh
18 years ago
I think the problem is that the expression element ie
<%= XXX%> needs some expression which will return a result that can be converted to a String . But constructors will not return any explicit value.
Compiler will need something like this
<%java.util.Date dt = new java.util.Date();%>
<%=dt%>
18 years ago
JSP
HttpServletRequest object is created when the container calls the service method. COntainer wraps the request in this type of object. This object is destroyed whenservice method for the called servlet ends.
18 years ago
Both the threads will be started simultaneously since one method is static it is synchronization for class level. And the Instance method is synchronization for instance level
-Mahesh
18 years ago
What If you pass the reference of Object of main class to the constructor of subclass object like this
MainClass(){
Subclass sub = new SubClass(this);
}
-Mahesh
18 years ago
See ,
HttpServlet class needs to override teh service() method in the GenericServlet class or else it would be a Abstract class.
Now it requires that the arguments to this method should be objects of type HttpServletRequest and HttpServletResponse. Hence it wraps the ServletRequest and ServletResponse type objects into required type and then calls the protected service()method. Which in turn checks for the Http method(Get/Post) and call doXXX method().
18 years ago
Hi,
Just Try this,
JFrame frame - new JFrame();
frame.setExtendedState(JFrame.MAXIMIZED_BOTH );
Hope this achieves what u r looking for
-Cheers
18 years ago
Hi friends
I want to set a Custom UI for my scrollbar.I wrote one class called CustomScrollBarUI which extends BasicScrollBArUI. I have not overriden any method except unistallKeyBoardActions() which is given no implementation.
But as I set this UI to my scrollbar, borders of the scrollbar disappear.
Please help!!!
19 years ago
You can add a focus listener to the text field.And override foucsGained(FocusEvent).Then you can write the code of selecting the text in this method
19 years ago
U can use,rs.getObject() or rs.getBinaryStream() and then read from the stream.