Is there any framework or open source project for Java that does video conversion from any video format to any video format. Something similar to Panda Video Conversion framework.
Consider having a class:
public class Test
{
public static void main(String [] args)
{
for (int i = 0; i < args.length; i++)
{
System.out.println(args[i]);
}
}
}
What happens if you run it: java Test *?
Answer: it prints out all the filenames in current directory.
Got more such tricks?
I want to execute some sql scripts using Java's Runtime.exec method. I intend to invoke mysql.exe / mysql.sh and redirect the script file to this process.
From the command prompt I can run the command
<mysqInstallDir\/bin\mysql.exe -u <userName> -p <password> < scripts\create_tables.sql
I can invoke mysql.exe using Runtime.exec but how do I redirect data from sql file to mysql.exe ?
I need to establish a P2P UDP and TCP Connection between two Users. Both of them are behind a NAT.
A little research leads me to STUN, TURN and ICE.
Is there any Java solution (library) except jSTUN which seems to work only on UDP.
And TURN, ICE is much better for the symmetric NAT Problem.
Hi,
I have an executable jar Client.jar that requires jndi.properties file.
Since the jndi properties is not part of the Client.jar, and java -jar ignores the -classpath argument,
How can I execute the jar and let it know where the jndi.properties is?
Thanks
How to compare dates in between in java? Example:
date1 is 22-02-2010
date2 is 07-04-2010 today
date3 is 25-12-2010
date3 is always greater than date1 and date2 is always today. I forgot the main point, how to verify if today's date is in between date1 and date 3?
Anyone know how I can use httponly cookies for sessions and cookies on the app engine?
In the javadoc for the Cookie class, http://java.sun.com/javaee/6/docs/api/javax/servlet/http/Cookie.html#setHttpOnly(boolean) ,
there is a setHttpOnly method.
I get a compiler error when trying to use it when developing for app engine though.
The method was introduced in the Servlet 3.0 spec, so its pretty new.
I'm looking for a well-maintained Java bytecode manipulation library with an intuitive API. There seem to be quite a lot of them out there. Any suggestions on which ones to try?
im new to Java and have the following question regarding inner classes:
when implementing a inner class do i need to declare its attributes and methods scope i.e. public, private, protected?
I've found that java.lang.Integer implementation of compareTo method looks as follows:
public int compareTo(Integer anotherInteger) {
int thisVal = this.value;
int anotherVal = anotherInteger.value;
return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
}
The question is why use comparison instead of subtraction:
return thisVal - anotherVal;
Hi All,
I am using the Java POI package to access the excel files. I have an excel file for which i am updating the cell values. those values are being used in some other sheets (within the same excel file) however, when i open the file, those values don't updated. when i select the cell text and hit enter then all the remaining sheets get the value.
please suggest if I am missing something...
Thanks
ABH
On Java side, we have a servlet filter that handles authentication. We don't have to change all other servlet or JSPs to add authentication to the page, unless the page needs customized content.
How can we achieve the same on PHP? We don't use any frameworks on PHP.
Hi,
I have a HashMap in Java, the contents of which (as you all probably know) can be accessed by
HashMap.get("keyname");
If a have a HashMap inside another HashMap i.e. a nested HashMap, how would i access the contents? Can i do this like this, inline:
HashMap.get("keyname").get("nestedkeyname");
Thank you.
I have a fragment of bytes in a byte[]. The total size of the array is 4 and I want to convert this into a positive long number. For example if the byte array is having four bytes 101, 110, 10, 1 then i want to get the long number represented by binary sequence
00000000 00000000 00000000 00000000 00000101 00000110 00000010 00000001
which equals 84279809
What is the efficient way to do that in Java?
I would like to write a Java app that counts how long I have been using the keyboard or mouse w/o a break. Are there any built-in classes or 3rd party libraries that can detect global keyboard/mouse use?
Is it possible that we can access memory location in Java directly or indirectly?
If we tries to print a object, it will print hashcode. Does hashcode signify indirectly to memory location?
For two object at different memory location but still their hashcode can varies.
-Abhishek
Hello!
I want to implement eventhandling for my reports via java-classes... where do i have to put the files? And do i need .class-files or .jar-files?
BIRT 2.1.3, RCP - Designer
JAXB 1.5 installed under C:\Sun\jwsdp-1.5
J2SE 1.4.2 installed under C:\j2sdk1.4.2_08
copied sample.xsd file to C:\Sun\jwsdp-1.5\jaxb\bin
went to C:\Sun\jwsdp-1.5\jaxb\bin and ran xjc.bat -p com.package sample.xsd
got error message: Unrecognized option: -p
Could not create the Java virtual machine.
Please help me out, thanks a lot
I know Java doesn't allow unsigned types, so I was wondering how it casts an integer to a byte. Say I have an integer a with a value of 255 and I cast the integer to a byte. Is the value represented in the byte 11111111? In other words, is the value treated more as a signed 8 bit integer, or does it just directly copy the last 8 bits of the integer?
Thanks,
helixed
Hi,
I have rtf file in with I need replace some field values (with word I can do it with mail merge, but I need do this with java). I found iText (2.1.7) source code with can parse rtf files, but I can find hove to manipulate the content of file.
Or maybe there is some better solution for editing rtf?
I have a Java SWT GUI with a multiline Text control. I want to append lines of text to the Text control without affecting the position of the cursor within the text box. In particular, the user should be able to scroll and select text at the top of the Text control while new text lines are appended to the bottom.
Is this possible?
In every benchmark that I found on the web it seems that Ruby is slow, much slower than Java. The Ruby folks just state that it doesn't matter. Could you give me any example that the speed of Ruby on Rails (and the Ruby itself) really doesn't matter?
i want how to code for get only link from string using regex or anyothers.
here the following is java code:
String aas = "window.open("+"\""+"http://www.pageresource.com/jscript/jex5.htm"+"\""+")"+"\n"+"window.open("+"\""+"http://www.pageresource.com/jscript/jex5.htm"+"\""+")";
how to get the link http://www.example.com/jscript/jex5.htm
thanks and advance