Lazy programmer alert. :)
Cassandra stores column values as bytes (Java example). Specifying a LongType comparator compares those bytes as a long. I want the value of a long into a Cassandra-friendly byte[]. How? I poked around for awhile. I think you people can help me faster.
I have multiple Java projects in Eclipse. I would like to reuse some classes in my new project from my old project. What is the best way to do that in Eclipse?
I.e. is it possible to add another "project folder" to the build-path for my new project?
is there a dictionary i can download for java?
i want to have a program that takes a few random letters and sees if they can be rearanged into a real word by checking them against the dictionary
Hi is there any tool available in Java world that will parse/read a source file and pull SQL statements out in to a text file. This is a complex task given that you can write SQL statements in different fashion within the source (ex: using + sign or using .append()) or even conditional building of SQL.
Hi,
We have discussion in my job place about question (We use 1 of the php frameworks):
Why program with php frameworks big web application if it can be done better with rubi on rails, python or java?
Please say our opinion
thanks
Hi i have a column (type date).I want to insert custom date and time without using Preparedstatement .i have used
String date = sf.format(Calendar.getInstance().getTime());
String query = "Insert into entryTbl(name, joinedDate, ..etc) values ("abc", to_date(date, 'yyyy/mm/dd HH:mm:ss'))";
statement.executeUpdate(query);
but am getting literal doesnot match error. so even tried with "SYSDATE".Its inserting only date not time.So how to insert the datetime using java into oracle?please any one help..
I've created java webservices and clients using Netbeans. However, the clients seem to have the WSDL already 'built-in'.
Is there an easy way of making my client fetch and parse the WSDL code upon execution, so that if the webservice moves to another server, the client is just invoked with a different commandline argument for where to find the webservice?
Hi all,
I want to genrate following JSON dataobject using org.json.simple.JSONObject, how to do it in java?
{
friends : [
{
name: 'David',
interests: 'Cooking',
},
{
name: 'Charles',
interests: 'Hiking',
},
{
name: 'Mary',
interests: 'Football',
},
]
}
If code snipet is provided then that will be really helpful!
Regards,
Abhi
I am using JNI to initialize classes in my jar files present at the classpath. But created executable uses java and displays ugly command prompt when my program starts. I want to configure my JNI to use javaw instead. How can I achieve it?
Platform: Windows 7
I want to write a plug-in which tracks the updates to a text file and stores them in a separate file.
Should I first write a simple java program which does this and then try to convert it into a plug-in?
Super constructor invocation definition:
[Primary.] [NonWildTypeArguments] super ( ArgumentListopt ) ;
A super constructor call can be prefixed by an Primary expression. Example (taken from JLS):
class Outer {
class Inner{ }
}
class ChildOfInner extends Outer.Inner {
ChildOfInner() {
(new Outer()).super(); // (new Outer()) is the Primary
}
}
Does a Primary expression exist that makes the call to super() the invocation of a constructor of the calling class? Or Java prevents that?
Do you know a tutorial how to create a CXF web service from existing Java code and embed it in Tomcat, and also generate a wsdl file so that any .NET system would be able to generate client code easily?
I miss that WSDL creation point in, for example this
http://www.ibm.com/developerworks/library/ws-pojo-springcxf/
tutorial. No wsdl file is generated. But still it should be present in my case to provide system interoperability.
I have a Class<? extends Annotation> and tried calling newInstance() but Java yelled at me for the obvious reason that I can't instantiate an interface. But I know frameworks like EasyMock are perfectly capable of instantiating interfaces. What would it take to get a completely dumb Annotation instance out of my Class?
In Java, an array IS AN Object. My question is... is an Object constructor called when new arrays is being created? We would like to use this fact to instrument Object constructor with some extra bytecode which checks length of array being constructed. Would that work?
Hello all,
When running a thread in Android/Java:
public void run()
{
while (running)
{
if (moreTasksToExec())
{
task = getNextTask()
task.exec();
}
}
}
Is it OK to let it run and not using a semaphore to block while no work needs to be executed?
I am only using one thread, so I need no inter-thread synchronization.
Hello,
How can I clone Array List but also clone its items in Java 1.5?
For example I have:
ArrayList<Dog> dogs = getDogs();
ArrayList<Dog> clonedList = ....something to do with dogs....
And I would expect that objects in clonedList are not the same as in dogs list.
Thanks for any answer!
Hi All,
I have a JAR on the build path of a medium sized Java application and I would like to know where it's used. At the most basic level if someone could tell me how to 'Find References' for a Jar that would be great.
Whilst I'm looking at dependencies it would be great to find a tool that would map all of my package / external library usages and graph them. I used to have a free plug-in for eclipse that did just that but I haven't been able to rediscover it.
Thanks,
Gav
Hi guys.
First I want to say is that I am 37 years old and not from programmer background (actually from biology). And my question is should I start learning Java? I have coded in PHP and JavaScript for a year and a half. Every answer would be appreciated.
Thanks in advance
Bobi.
how to take user input in Array using Java?
i.e we are not initializing it by ourself in our program but the user is going to give its value..
please guide!!
I have a xml document like this rootXMLDoc=<root></root> . I need to insert paramxmlDoc= <parameter par='1'>abc</parameter>. how to insert paramxmlDoc to rootXMLDoc in java.?
In Python, I can do this:
>>> import string
>>> string.letters
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
Is there any way to do something similar in Clojure (apart from copying and pasting the above characters somewhere)? I looked through both the Clojure standard library and the java standard library and couldn't find it.