Is there a way in Java or OpenCv ; preferably Java, that i can have an HSV histogram give RGB image.
I tried exploring JAI but it creates histogram for RGB image.
Thanks
Harshit
When I am using the IAM Eclipse Plugin for Maven I get an error while executing the sonar:sonar goal in
clean install sonar:sonar
The error in eclipse is
23:02:55 MESZ Starting Starting mojoExecution sonar-core:internal
23:03:44 MESZ fatal org.sonar.maven2.BatchMojo#execute() caused a linkage error (java.lang.NoSuchMethodError). Check the realms:
...
java.lang.NoSuchMethodError:
org.apache.maven.execution.ReactorManager.<init>(Ljava/util/List;)V
Any idea how to fix it?
Currently, I have a machine on which I am working in Eclipse, it says that the JRE System Library version is sun-jdk-1.5.0.11 but on my active development machine, it is java-6-sun-1.6.0.16.
What is the difference between these two (of course, besides the versioning)?
Is there any way I can make the first machine to use the same "java-6-sun-1.6.0.16" version without having sudo permissions on the machine?
I'm trying to use the java machine learning library MOA to train on a training data stream, then predict classes for a test data stream. The first part works fine, using (for example)
java -cp .:moa.jar:weka.jar -javaagent:sizeofag.jar moa.DoTask "LearnModel -l MajorityClass -s (ArffFileStream -f atrain.arff -c -1) -O amodel.moa"
But then I cannot figure out how to use the trained model (amodel.moa) on another stream (atest.arff) to predict the classes. Has anyone done this before?
Hi Experts,
I am looking for examples of share calendar and share event using google calendar API in any programming language java, .net, java script.
Thanks,
Aqeel
If I have a high-end server, for example with 1T memory and 8x4core CPU...
will it bring more performance if I run multiple App Server (on different JVM) rather than just one App Server?
On App Server I will run some services (EAR whith message driven beans) which exchange message with each other.
btw, has java 64bit now no memory limitation any more?
http://java.sun.com/products/hotspot/whitepaper.html#64
in this page of tutorial : http://java.sun.com/javaee/6/docs/tutorial/doc/bnadu.html discuss about hello2 application on samples folder.
i download samples from this link and installed correctly:
https://glassfish-samples.dev.java.net/servlets/ProjectDocumentList?folderID=5214&expandFolder=5214&folderID=0
but "hello2" folder not on the "web" folder.
where is source codes for sun JavaEE6 Tutorial Volume I ?
thanks alot
soapui.bat
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cl
i/CommandLineParser
Where can I find this library? I already put JAVA HOME to my sdk and I am using windows XP. Any ideas how I can resolve this?
Right, so if you have to decide on a server-side language for a distributed Linux-based server backend, would you choose:
PHP
Mono ASP.net
Java
As a C++ programmer, I'm thinking Java+Tomcat, but I'd love to hear experienced thoughts here, especially relating to debugging and IDE (likely Eclipse).
Also, please, it's not a flame question. I'm seeing excellent sites written in all, I'm just thinking about the compile/debug/release cycle.
Cheers,
Shane
How to import import Msn contact in our application?
I want to learn about importing msn contact list in my java appication.
Need help on this and where can i find the sample java code for achieving this?
I need to create a program which will show how elliptic curve cryptography works. I was considering using Java Swing to create the GUI, but the main problem is what tool to use to plot the elliptic curve itself, and how to integrate that with Java Swing.
I would like the plot to be included in the user interface and also allow changes to be made to it. Can you suggest any tools that would help with this?
When running a JNLP file, the application is downloaded from the Internet. Where does it store these downloaded files? I'm trying to figure out how to copy the application to a computer without Internet access.
FYI, I'm working with Java 1.6 (C:\Program Files\Java\jdk1.6.0_17).
Can you people please suggest some good books / weblinks from where I can get to learn about above mentioned concepts?
(Please note that I am a Java programmer and have NO prior experience with functional programming. I have been studying Scala since last one month and would appreciate the resources that try to teach the above mentioned concepts with Scala. (or even Java, if posible))
I understand that double locking in Java is broken, so what are the best ways to make Singletons Thread Safe in Java? The first thing that springs to my mind is:
class Singleton{
private static Singleton instance;
private Singleton(){}
public static synchronized Singleton getInstance(){
if(instance == null) instance = new Singleton();
return instance;
}
}
Does this work? if so, is it the best way (I guess that depends on circumstances, so stating when a particular technique is best, would be useful)
I'm looking for a new web hosting service, currently I'm using GoDaddy's Economy plan but it offers only PHP server-side scripting. For my next project it looks like I'm gonna need to use Java.
Currently I pay ~60 USD per year for both the domain and the web hosting plan.
Anyone knows of a web hosting service that supports Java and isn't much more expensive than this?
Thanks,
God bless
Hello everyone,
I have the following code adding an ActionListener to a JTextField:
chatInput.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
chatInputMouseClicked(evt);
}
});
Now how do I remove this MouseListener using chatInput.removeMouseListener(), since this function needs an argument?
Why are Python exceptions named "Error" (e.g. ZeroDivisionError, NameError, TypeError etc)
and not "Exception" (e.g. ZeroDivisionException, NameException, TypeException etc).
I come from a Java background and started to learn Python recently, as such this is confusing because in java there is a distinction between error and exception.
Is there a difference in Python also or not? Can someone explain or point me to some documentation explaining it?
Thank you!
Is it necessary to code RTOS in C language always? Why can't that be coded in java or some other technology..?? Is that because of the absence of pointer concept in java?
From DateTimeFormatter javadoc:
Zone names: Time zone names ('z') cannot be parsed.
Therefore timezone parsing like:
System.out.println(new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy").parse("Fri Nov 11 12:13:14 JST 2010"));
cannot be done in Joda:
DateTimeFormatter dtf = DateTimeFormat.forPattern("EEE MMM dd HH:mm:ss z yyyy");
System.out.println(dtf.parseDateTime("Fri Nov 11 12:13:14 JST 2010"));
//Exception in thread "main" java.lang.IllegalArgumentException: Invalid format: "Fri Nov 11 12:13:14 JST 2010" is malformed at "JST 2010"
//at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:673)
How to create an own installer using Java? I am not asking about any Java installer software. Anyone knows the logic or method please tell me. Is there any API available for these?
Would you consider autoboxing in Java to be a form of polymorphism? Put another way, do you think autoboxing extends the polymorphic capabilities of Java?
What about implicit conversions in Scala?
My opinion is that they are both examples of polymorphism. Both features allow values of different data types to be handled in a uniform manner.
My colleague disagrees with me. Who is right?
I am trying to write a program in PHP which I had already written in Java.
I had used the following statements to setup proxy in Java
System.setProperty("http.proxyHost",proxyhost);
System.setProperty("http.proxyPort",proxyport);
How do I do the same for PHP?
I am running a signed applet that needs to provide the ability for the user to select the input and output audio devices ( similar to what skype provides).
I borrowed the following code from other thread:
import javax.sound.sampled.*;
public class SoundAudit {
public static void main(String[] args) { try {
System.out.println("OS: "+System.getProperty("os.name")+" "+
System.getProperty("os.version")+"/"+
System.getProperty("os.arch")+"\nJava: "+
System.getProperty("java.version")+" ("+
System.getProperty("java.vendor")+")\n");
for (Mixer.Info thisMixerInfo : AudioSystem.getMixerInfo()) {
System.out.println("Mixer: "+thisMixerInfo.getDescription()+
" ["+thisMixerInfo.getName()+"]");
Mixer thisMixer = AudioSystem.getMixer(thisMixerInfo);
for (Line.Info thisLineInfo:thisMixer.getSourceLineInfo()) {
if (thisLineInfo.getLineClass().getName().equals(
"javax.sound.sampled.Port")) {
Line thisLine = thisMixer.getLine(thisLineInfo);
thisLine.open();
System.out.println(" Source Port: "
+thisLineInfo.toString());
for (Control thisControl : thisLine.getControls()) {
System.out.println(AnalyzeControl(thisControl));}
thisLine.close();}}
for (Line.Info thisLineInfo:thisMixer.getTargetLineInfo()) {
if (thisLineInfo.getLineClass().getName().equals(
"javax.sound.sampled.Port")) {
Line thisLine = thisMixer.getLine(thisLineInfo);
thisLine.open();
System.out.println(" Target Port: "
+thisLineInfo.toString());
for (Control thisControl : thisLine.getControls()) {
System.out.println(AnalyzeControl(thisControl));}
thisLine.close();}}}
} catch (Exception e) {e.printStackTrace();}}
public static String AnalyzeControl(Control thisControl) {
String type = thisControl.getType().toString();
if (thisControl instanceof BooleanControl) {
return " Control: "+type+" (boolean)"; }
if (thisControl instanceof CompoundControl) {
System.out.println(" Control: "+type+
" (compound - values below)");
String toReturn = "";
for (Control children:
((CompoundControl)thisControl).getMemberControls()) {
toReturn+=" "+AnalyzeControl(children)+"\n";}
return toReturn.substring(0, toReturn.length()-1);}
if (thisControl instanceof EnumControl) {
return " Control:"+type+" (enum: "+thisControl.toString()+")";}
if (thisControl instanceof FloatControl) {
return " Control: "+type+" (float: from "+
((FloatControl) thisControl).getMinimum()+" to "+
((FloatControl) thisControl).getMaximum()+")";}
return " Control: unknown type";}
}
But what I get:
Mixer: Software mixer and synthesizer [Java Sound Audio Engine]
Mixer: No details available [Microphone (Pink Front)]
I was expecting the get the real list of my devices (My preferences panels shows 3 output devices and 1 Microphone). I am running on Mac OS X 10.6.7.
Is there other way to get that info from Java?
I am looking for a tool which will make able to edit parts of Java code visually using something like inspector and place code back.
For example:
Person p = new Person();
p.setName("Bill Libb");
p.setAge(25);
This code should be generated from visual inspector and copied into Java IDE.
This will help quickly create sample objects for testing.
Java allows identifier to start with or contain $ (dollar sign).
e.g int a$b;
But why # is not allowed in an identifier? What is the specific reason? Is # an operator or something in Java?
e.g int a#b;