Hi Guys
How can I write a java application with Pocket Pc?
could you please suggest me an IDE and JDK for PPC?
Thanks a lot ...
My PPC : Xperia X1
My OS : WindowsMobile 6.1
My Cpu : 528 Mhz
I'm looking for an implementation preferably in Java of an algorithm for finding a Minimum Equivalent Graph of a Digraph (http://portal.acm.org/citation.cfm?id=321526.321534).
Even better would be an implementation of "Approximating the minimum equivalent digraph" http://cat.inist.fr/?aModele=afficheN&cpsidt=3634076 (requires ACM membership, sorry)
alternative link http://www.cs.umd.edu/~samir/grant/kry94b.ps (postscript)
I need to find the value of ncr- the number of ways of selecting r objects out of n.
if i first find the numerator then the denominator. i get an exception.
i am using java.
how to do it for example for 44 C 42
Can I bind a table name in a Java Prepared Statement?
i.e.
PreparedStatement pstmt = aConn.prepareStatement("SELECT column FROM ? ");
pstmt.setString(1, "MY_TABLE");
Nope, no I can't. New question, anyone know how to delete a question?
I'm using Tomcat 6.0, and I want to know how can I configure Tomcat's server.xml file to connect to mysql database, and enable form based authentication in java.
I'm currently using mysql 5.1, and I've already downloaded mysql connector jar file, and put in lib directory of Tomcat.
Hi everyone,
I would like to know how can I generate a random pre-master key PMK in java? (related in key exchange and authentication)
Is it similar with other randam key generating? What particularly is a pre master key?
Thanks,
Sebby.
Hi everyone, I am trying to run a python script through an application I've written. I found some pages which say that this piece of code is doing it, but I can't figure it out.
http://code.google.com/p/android-scripting/source/browse/android/AndroidScriptingEnvironment/src/com/google/ase/locale/LocaleReceiver.java
Can someone explain what is going on and how I can edit that to run an arbitrary script file in my project directory?
Looking at some old application code which uses explicit driver loading as
Class.forName(...).newInstance
I have been told to change this to use the Java 1.4.2 mechanism to establish a database connection using ContextLookup, and DataSource.
Are there any gotchas I should be aware of?
I have a small server application I wrote in Java running on my web server. The client application I wrote can connect to the server and it receives data, but the server does not receive any data sent by the client. Any idea what the problem could be? The two communicate fine on my local machine.
Hi, how do i order a given set of colors from the rainbow in VIBGYOR order. say i input the seven colors in the following order { red, blue, green, yellow, indigo, violet, orange} and i should print the output as {violet, indigo, blue, green, yellow, orange, red}, irrespective of the order i give the output should be as above. Can someone suggest me about implementing this in java program?
Thanks,
-Vijay
I'm trying to optimize the startup time/class loading time of my Java web app because its on the Google App Engine and startup time is important.
Is there a way I can turn on some sort of class loading debug messages or someway to see where time is being spent while class loading? I want to see if any specific libraries take a while to load and then get rid of them if they aren't essential.
A short question: My eclipse project is set to use the "sun-java-6-openjdk"-supplied JDK library, but I cannot Ctrl-click to view source (no source attached), as I can do out-of-the-box on Windows. How do I make this work?
I want to implement a camera preview. For that I have a custom View CameraView extends ViewGroup that in the constructor programatically creates an surfaceView.
I have the following components (higly simplified for beverity):
ScannerFragment.java
public View onCreateView(..) {
//inflate view and get cameraView
}
public void onResume() {
//open camera -> set rotation -> startPreview (in a thread) ->
//set preview callback -> start decoding worker
}
public void onPause() {
// stop decoding worker -> stop Preview -> release camera
}
CameraView.java extends ViewGroup
public void setUpCalledInConstructor(Context context) {
//create a surfaceview and add it to this viewgroup ->
//get SurfaceHolder and set callback
}
/* SurfaceHolder.Callback */
public void surfaceCreated(SurfaceHolder holder) {
camera.setPreviewDisplay(holder);
}
public void surfaceDestroyed(SurfaceHolder holder) {
//NOTHING is done here
}
public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
camera.getParameters().setPreviewSize(previewSize.width, previewSize.height);
}
fragment_scanner.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.myapp.camera.CameraView
android:id="@+id/cameraPreview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
I think I have set the lifecycle correct (getting resources onResume(), releasing it onPause() roughly said) and the following works just fine:
pressing home and returning
pressing Taskswitcher and returning
rotation
But one thing doesn't work and that is when I press the power-button on the device and then return to the camera-preview. The result is: the preview is stuck with the image that was last captured before button was pressed. If I rotate it works fine again, since it will get through the lifecycle.
After some research I found out that this is probably due to the fact that surfaceView won't get destroyed when the power-button is pressed, i.e. SurfaceHolder.Callback.surfaceDestroyed(SurfaceHolder holder) won't be called. And in fact when I compare the (very verbose) log output of the home-button-case and the power-button-case it's the same except that 'surfaceDestroyed' won't get called.
So far I found no solution whatsoever to work around it. I purposely avoid any resource cleaning code in my surfaceDestroyed(), but this does not help. My idea was to manually destroy the surfaceView like asked in this question but this seems not possible. I also tested other applications with surfaceViews/cameras and they don't seem to have this issue. So I would appreciate any hints or tips on that.
I have an array of strings plus one additional string. I want to use this string and values of array to get a set of string. Then I want to order the set of string alphabetically and extract the string which is the first in the list. What is the easiest way to do it in Java?
I can set the max memory as 1000 and not more than that, if I set the memory more than that, it throws the following error.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
My question is, why jvm looks for the max memory at startup?
Thanks in advance.
I am on OSX Snow Leopard (10.6.2) I can install anything I need to. I would preferably like a Python or Java solution. I have searched on Google and found lots of information on writing my own program to do this, but this is a just a quick and dirty experiment so I don't want to invest a lot of time on writing a bunch of code to do this, I am sure someone else has done this already.
After evaluating a case in a switch statement in Java (and I am sure other languages) the following case's are also evaluated unless a control statement like break, or return is used.
I understand this is probably an implementation detail, but what is/are the reasons for having this functionality happen?
Thanks!
Hi guys, I really need help with finding a repeated number out of 3 boxes. Let's say that i have 3 boxes, each box contain 10 piece of numbered paper (1 - 10) but there is a number the same in all 3 boxes eg: box1 has number 4 and box2 has number 4 and box3 also has number 4.
How to find that repeated number in java with an efficient/fastest way possible?
Thanks in advance!
I've been programming in Java for a while, and I've just come across this syntax for the first time:
public Object getSomething(){return something;};
What's interesting me is the final semicolon. It doesn't seem to be causing a compiler error, and as far as I know isn't generating runtime errors, so it seems to be valid syntax. When would I use this syntax? Or is it just something that is allowed but generally not used?
Hi, is there something like API built atop the standard ProcessBuilder for calling system programs? I won't argue that scripts can be ported to Java but utilities like arping and netstat are good-to-go in Linux.
Hi,
I am using using hibernate 3.5.6 with Oracle 10g. I am seeing the below exception during initialization but the application itself is working fine. What is the cause for this exception? and how it can be corrected?
Exception
Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Info
Oracle version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
JDBC driver: Oracle JDBC driver, version: 11.1.0.7.0
Thanks,
Girish
Hi all,
I am trying to detetct/work around this bug in RSS elements.
That means I have to find a wrong namespace-declaration and change its
value to the correct namespace. E.g:
xmlns:media="http://search.yahoo.com/mrss"
must be:
xmlns:media="http://search.yahoo.com/mrss/"
How can I achive that using the standard java XML APIs?
Hi! I am trying to develop a portlet in Liferay that operates on a Bonita workflow, but I keep getting the exception in the title. I am not particularly familiar with the Java world, so I have no idea what to bang my head against :)