java

Can the Android API be leveraged to modify the caller's voice during the call?

I can't seem to find any documentation saying this is possible, but Google turned up a few apps that claim to be able to accomplish it. I'd like to, ideally, be able to play an audio track and have it sent as the caller's voice. ...

Makefile for Java cannot find package

Hello I am new in Java development. I tried to write a makefile which should be runnable in Linux: JFLAGS = -g JC = javac .SUFFIXES: .java .class .java.class: $(JC) $(JFLAGS) $*.java Heap.class: FibonacciHeap.java \ FileOperation.java \ MinLeftistTree.java \ RandomPermutation.java \ Heap.java default: classes cla...

ar file extract in java

Hello, Anyone have any links to a class or package for extracting ar packages in java? Thanks ...

Help In Solving Algorithm

Hi Guys, Am suppose to return the number of character comparisons. In the while() loop i compare the index of the characters and update the counter. My question is, is it right to do it that way or i have to compare the characters themselves. I think comparing the index and updating the counter is the same as comparing the characters t...

Box2D rotate an object, how?

How i can rotate an object in box2d? private static final double DEGREES_TO_RADIANS = (double)(Math.PI/180); float angle = (float) (45*DEGREES_TO_RADIANS); object.body.setTransform(object.body.getPosition(), angle); but not working.. ...

Defining inner class outside java file.

Hello. I want to create a class, ClassB, as inner class of ClassA, but I want to write down outside ClassA.java file. How can I do this? It will be a lot of inner class, and ClassA.java file will be enormous. UPDATE What I really want to do is define ten classes that they will be only accessible by one class. All of them are defined ...

Help In Generating Graph From Executing Algorithm

Hi Guys, I am suppose to generate graph from the results/execution of my algorithm . I have heard something about using CSV file in Excel and generating the graph. I have no idea what this CSV file is and how to do it. I googled CSV file but the answer i got was in connection with databases. I am asking if someone can show me or poin...

Why is hibernate deleting rows from join table when adding element to set mapping many-to-many?

Suposse I have two classes: class A { Set<B> bs } class B { } This mapping: <set name="bs" table="bs_tab" cascade = "save-update"> <key column="a_id /> <many-to-many column="b_id" class="B"/> </set> And join table like this: bs_tab( a_id, b_id, primary key(a_id, b_id) ) When I add some element to bs set a...

How to tell a thread from a previous instance of your activity has finished?

I'm writing a bitmap editor and I'm trying to write an autosave feature. When onPause is called, I write the application state to an autosave file. As this takes between 0.1s and 1.5s, I've been advised this IO operation be performed in a background thread. In the onCreate method of my activity, I check to see if the autosave file exis...

print char using unicode value (java)

Hi, Below code returns ? rather than a random character. Any ideas? Please note that i wrote this as pat of an exercise on method overloading hence the 'complicated' setup. class TestRandomCharacter { public static void main(String[] args) { char ch = RandomCharacter.getRandomCharacter() ; System.out.println(...

Drawing non-transparent content on transparent window

So I'm trying to draw a solid red oval on a transparent window. I later want to do something more complex with multiple shapes, so using setWindowShape isn't what I'm looking for. This is the code I'm using so far: import java.awt.*; import javax.swing.*; public class JavaDock extends JFrame{ public JavaDock(){ super("This...

program in java to get info about Ram

Hi I want a program to get information about RAM How can i do that? ...

Fixing null pointer exceptions in Java (with ArrayList)

Possible Duplicate: Java null pointer exceptions - don't understand why MOVIE.JAVA package javaPractical.week3; import javax.swing.*; public class Movie { // private attributes private String title; private String movieURL; private String year; private String genre; private String actor; // constructor Movie(String t, Stri...

How to write "set classpath" in makefile for Java in Linux?

Hello, I have a newbie question for writing makefile for java in Linux I have a project with: A.java B.java C.java A is dependent on B.java and C.java, they should be in the same folder It is supposed that when I entered the folder, I can run the make command to generate classes. How can I set the classpath as the current folder of...

How to execute mahout with hadoop installation

Hi guys, i'm trying to figure out how to run mahout jar examples with hadoop. I configured mahout and hadoop, now i enter in the hadoop dir and type something like this: /Users/hadoop/hadoop-0.20.2/bin/hadoop jar /Users/hadoop/trunk/examples/mahout-examples-0.5-SNAPSHOT-job.jar org.apache.mahout.SpareVectorsFromSequenceFile -w -i rating...

deployment of application using third party libraries in java

I have seen many people asking this but not a clear answer. I guess that it would depend on each case, so here is my situation: My application performs encryption and decryption using the methods provided by the default JRE installation. I decided to use Bouncy Castle (BC) as a provider, so I would need to include their jars in my appli...

Spring ws - AxiomSoapMessage & attachment with MTOM are inline

Hi, im trying to understand how the AxiomSoapMessageFactory handles request (the body & attachment) but i dont understand some points (or they are maybe features) i 'm using AxioSoapMessageFactory like this : <bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory"> <property name="payloadCaching"...

J2EE containers allow direct server sockets?

Hi, I have a question, that may sound strange. I am interested to know if J2EE containers allow to the applications deployed, to open direct server sockets (by-passing essentially the container) for their own purposes. I know that it is strange to want to do that, but the reason I am asking is because, I have read that a javax.xml.endoi...

counting letters in an array (java)

Hi, level: beginner Below snippet is part of code that counts letters in an array. How do you say this in english? counts[letters[i] - 'a']++ ; I understand the substraction mechanism but i'm a bit confused by the shorthand way to write the letter count incrementation. full code: class CountLettersInArray { public static void...

Default context for AlertDialog.Builder for map view?

Hey, I've been trying to follow this tutorial on using Google Map View in Android. In the second part, they create an mContext member variable and then pass that into AlertDialog.Builder(mContext), but the constructor that they call to create an instance of an HelloItemizedOverlay doesn't instantiate mContext, so it's just left null as ...