Mahendra Kariya

Greenhorn
+ Follow
since Aug 25, 2008
Merit badge: grant badges
For More
India
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mahendra Kariya


I am using MS SQL Server 2008 as database. I downloaded the JDBC drivers from Microsoft's website.

I am running a query in my program.



This query is working fine sometimes. But when the user load increases, this query is failing. It is generating an exception:


I am not using the word 'Contribution' anywhere. I don't understand why this error is occurring? This doesn't occur every time. ONLY WHEN THERE IS LOAD ON THE SERVER.
How to solve this error?

Michael Dunn wrote:How are you handling my clicking of the
'take picture' button of my phone.


Certain things can't be stopped completely. In such cases, rules and regulations comes into picture. In the organization where my application will be deployed, using any kind of cameras is strictly prohibited. Anyone doing so will lose his job.

And anyways, I am looking for some technical guidance here. The management is there to handle the rest of the cases. So, let us focus on the question I asked.
12 years ago

Campbell Ritchie wrote:??? Put a Listener on the content pane which catches the action and does nothing, then put a listener for the same event on the frame ???



How do you propose to do this? Can you give some code snippets?
12 years ago

Michael Dunn wrote:
if you don't want a screen dump of your app, how are you controlling say notepad opening alongside,
(or in front, if full screen), and, with notepad having focus, the screen is printed.



I am setting the state to ICONIFIED whenever the focus is lost.
12 years ago

I want to capture mouse clicks on the border of a JFrame.

Here's Why:
I have successfully disabled "Print Screen" of my window. Here's my code.



But, try this scenario. Click on the Title Bar of JFrame. Before releasing the mouse button, click "Print Screen". This will take the screen shot. So, now I need to capture the mouse click on the borders of the JFrame. How can I do this?
12 years ago
I have a file in a shared folder. This folder can be accessed by over 100 people.

I want to know if there is any event listener that gets invoked when a file attribute is changed (like making file hidden). Also, is it possible to know who changed the file attributes? (This is for taking action against that person).

I am using Windows 7.
12 years ago
Not exactly a java client. I only want to code a program that will run a REXX script.

Actually I want access to COBOL programs (which will be in some PDS on Mainframe) on my local machine so that I can analyse them. I will call the remote REXX script from my local Java program. This script will give me access to COB programs I require.

Anyways if there is some Open Source Java client using this protocol, that would be helpful. I can go through its source code and create my own Java program.
Connection to Mainframe will be established via TCP/IP using TN3270 / TN3270E protocol.
I want to create a program on a local machine (Windows / Linux) which will connect to a Mainframe computer (given IP Address and port number). I want to run a REXX Script which is present on this mainframe (z/OS).

Any help is appreciated.
Thanks. This seems to be working.

Just a few questions.
  • On successful compression, the size of the image is not reducing!!! Why is it so?
  • Are there any other "compressionType" other than LZW for GIF?
  • 13 years ago
    This is exactly what I was looking for... Thanks!

    But I am getting an error when I am trying to compress images of types other than JPEG.

    I am getting the following error

    I even tried the other 3 compression types viz. BI_RGB, BI_RLE8, BI_RLE4. But I am getting the same error.
    I am also not able to compress other images like GIF/PNG/TIFF etc.

    Any workaround???
    13 years ago
    I want to compress all types of images, JPEG/GIF/TIFF/PNG etc in Java. JAI seems to be using deprecated classes and methods. Is there any other option?
    13 years ago
    How can the MIME type of a file be known on the basis of its contents?
    I don't want the detection to be based on file's extension as new extensions evolve everyday.
    14 years ago
    Thanks to AndrewThompson64 on Sun Forums. I changed the file path to URL and it worked fine. The code for that is below.

    14 years ago
    Local files cannot be accessed from an applet unless applet is digitally signed. What a silly mistake...!
    14 years ago