When I are using Java we put System.out.println() for identifying errors, where it went wrong.
A very naive method.
With android, I cannot even use this method to isolate why the app crashed.
With Rails we would read the log file.
But as I am new to Java and android, I don't know which is the best practice.
I believe there is a best ...
Hi. I've been working on a text-based RPG in java, just for fun. After spending many hours of tedious work writing almost a dozen classes for weapons, spells, cmbat systems, shopping systems, etc. I wrote a simple class to start and run the game. All it really does is display a main menu, and create an object which in turn creates every...
Hi all,
I am looking to develop a management and administration solution around our webcrawling perl scripts. Basically, right now our scripts are saved in SVN and are manually kicked off by SysAdmin/devs etc. Everytime we need to retrieve data from new sources we have to create a ticket with business instructions and goals. As you can...
I have a web application running on tomcat. I want to deploy it on a weblogic server but i get some problems.
Error(s) found in module 'BatchMonitoring'. Publish was cancelled. See "Problems" view for details.
Target runtime SpringSource dm Server (Runtime) v1.0 is not defined. at BatchMonitoring
Java compiler level does not match t...
So, I need to test the Service Layer for an application (I need to test some methods - this is my first contact with the testing section)
public void testGetAllOrderedDescByRating() {
FAQ faq1 = initFAQ(new FAQ(), 5, 1L);
FAQ faq2 = initFAQ(new FAQ(), 3, 2L);
FAQ faq3 = initFAQ(new FAQ(), 11, 3L);
EasyMock.expect(faqDa...
I have a large (3Gb) binary file of doubles which I access (more or less) randomly during an iterative algorithm I have written for clustering data. Each iteration does about half a million reads from the file and about 100k writes of new values.
I create the FileChannel like this...
f = new File(_filename);
_ioFile = new RandomAccess...
Hi
I have been programming in Java for the past 2 years and now i want to get into Designing applications. So far i am only into coding ie; i am given design document/class diagram etc and asked to code. Now i want to learn how to design, i mean i want to lean when should a class be interface not a concrete class, coming up with design g...
The graph is very large but undirected. Edges are unweighted..
In my implementation, I have to find the vertex with max degree and do deletion on both vertexes and edges...
Linked list? ArrayList? Map?
Which one is better for my implementation?
...
Tired of old EL in JSP not being able to invoke methods on beans etc.
Can I use SpEL from Spring 3.0 in my JSP:s?
...
I have a Spring/Hibernate application with H2 database and I have a few issues with configuring H2 to run in an embedded mode (in memory):
1. I want spring to start the H2 database so I created the following Spring beans:
<bean id="org.h2.tools.Server" class="org.h2.tools.Server"
factory-method="createTcpServer" init-method="sta...
I like to use Eclipse's shortcut Ctrl+O which outlines the current source. Is there an equivalent shortcut in IntelliJ IDEA?
...
Luke, the wonderful Lucene index viewer, is now hosted under Google code.
As a default, it supports using several Lucene Analyzers out of the box.
However, I would like to use it to view an index I built using my own custom Analyzer,
Let's call it MyAnalyzer.
Can you please tell me how to add MyAnalyzer to Luke, along with the default an...
After doing JUnit i am doing some document based testing that has the following items in a table
Input Variables - Expected Outcome - Actual Outcome ..... Pass or Fail ....
If i pass my method a date and a time
"01AUG07" "14:40" the method should return me a gregorian calander which it does
how can i check that it has created the c...
The following is the piece of java code by using filters that shows the error page at every time if the username and password is also correct. Please help me, I don't have much knowledge on this concept.
String sql="select * from reg where username='"+user+"' and pass='"+pwd+"'";
rs=st.executeQuery(sql);
if(rs.next())
{
chain.doFilt...
does java mail API uses streaming? where can i get the source code to confirm this.
also i am tryign to send the mail using raw and non-raw mode.
in raw mode i can pass an input Stream to MimeMessage constructor:[/b]
new MimeMessage(session, doc.getBodyInputStream());
In Non-raw mode, i have to do the following
Since there can be any ...
First the basic facts: Java webapp, Spring, Hibernate, MySQL.
The situation is that I have a complex object model of e.g. a Car. It's
composed of many objects (Engine, Tires, ...) with many-to-one and one-to-many relationships between them.
Now there are many cars, and every now and then someone inspects a car and creates a Report of...
Hi,
I would like to know if there is anyway I can do something similar to the following thing with JPA:
@ManyToMany(cascade=CascadeType.PERSIST)
List<String> trackKeywords;
Or do I need to create another model with a String attribute?
...
I am new to JSP. I used the following code in a class that implements HttpSessionListener to get SESSION OUT when the session times out:
public void sessionCreated(HttpSessionEvent arg0) {
System.out.print("SESSION Created");
}
public void sessionDestroyed(HttpSessionEvent arg0) {
System.out.print("SESSION...
I’m building email notification service, requirement is to send an email to user when he is registered.
Currently what I’m thinking of execution of some function defined in trigger, can be a java function, which have to be outside the mysql process, rather monitoring mysql from outside for row addition in database.
Is there any function...
Is there an easy way (aka: not using a proxy) to get access to the raw request/response XML for a webservice published with JAX-WS reference implementation (the one included in JDK 1.5 and better) ?
Being able to do that via code is what I need to do.
Just having it logged to a file by clever logging configurations would be nice but enou...