I have a large (more than 100K objects) collection of Java objects like below.
public class User
{
//declared as public in this example for brevity...
public String first_name;
public String last_name;
public String ssn;
public String email;
public String blog_url;
...
}
Now, I need to search this list for an obje...
I am a student and preparing myself for job.
Being an ASP.NET(C#) developer, do I actually need to learn JSP(Java) or PHP?
Being a web programmer, do I actually need to learn CSS and JavaScript libraries(i.e. jQuery/ExtJS/MooTools, etc.)?
And can I only concentrate on programming. I.e. keeping away from business processes.
Please, I...
I want to know how to identify subclasses at run time in java. In my program I am calling a method that returns a superclass object. The object can be an instance of any one of its sub-classes. I want to know the object is instance of which sub-class at run-time so that I can cast it to that subclass and access subclass methods. Can anyo...
i have entity A that has foreign key to entity B, does entity B need to have foreign key back to entity A? if yes, how?
coz entity B, id already used for primary key
entity A --> id, entity_a_name, foreign_key_entity_B
entity B ---> id, entity_b_name
...
i am writing a standalone java app. the app's properties should be configurable from a webpage deployed with the app. how do i achieve this ?
Thanks in advance
note: the app has an embedded HTTP client/server module. it should only run from command prompt
...
I want to use a bunch of non-universal (thin?), x86_64, C libraries from a Java application.
The problem is that I only have static versions of them (.a files) and the jvm needs them to be dynamic.
I tried using libtool to combine the files into a single dynamic library but I just got error messages saying that many of the symbols (poss...
Hello,
I have two programs- First one being a C program that writes in to mysql database. Second is a java program that reads the data from mysql database. The C program reads list of files in a particular directory and inserts the file names in DB. The Java program reads these rows and tries to do some file processing using these fil...
Class A {
private B instanceB;
@Autowired
public setInstanceB(B instanceB) {
this.instanceB = instanceB;
}
}
Above one versus this one.
Class A {
@Autowired
private B instanceB;
public setInstanceB(B instanceB) {
this.instanceB = instanceB;
}
}
Will the behavior differ based on the access modi...
I have an entity A that has a foreign key of entity B:
entity A --> id, entity_a_name, foreign_key_entity_B
When I call
return session.createCriteria(EntityA.class).list();
I get the property of entityB inside entity A as well. How do I make it lazy load so it will not load enityB if not needed?
...
Standard Runnable interface has only non-parametrized run() method. There is also Callable<V> interface with call() method returning result of generic type. I need to pass generic parameter, something like this: interface MyRunnable<E> {
public abstract void run(E reference);
}
Is there any standard interface for this purpose or I must...
I had this doubt for sometime now, some people say that there's no such thing called entity beans in EJB 3.0. Is there any possibility to say so, EJB 3.0 uses JPA to persist the data and there's no enhancement to the entity beans from the previous version (EJB 2.1) it's just brought back.Another fact is EJB 2.1 uses abstract POJOs and EJ...
I want to replace the last String which is a "," with ")"
Suppose the string is
Insert into dual (name,date,
to be converted to
Insert into dual(name,date)
...
Hi,
Quick question. I am pretty new to thread-safe programming, and was wondering if I have something like below, would this be safe from deadlock once compiled and run?
public class Foo
{
protected CustomClass[] _mySynchedData = new CustomClass[10];
public void processData()
{
synchronized(_mySynchedData) {
...
entity A --> id, entity_a_name, foreign_key_entity_B
entity B ---> id, entity_b_name
when i delete entity B record, it suppose to auto delete entity A that has foreign_key_entity_B ?
Error: ORA-02292: integrity constraint (schema.FKA630D2FB5F0F1180) violated - child record found
...
We have an application which is deployed on JBoss 5.1, JDK 1.6.
We also have scripts written in PowerShell for testing. These scripts access the application using a web-service.
I would like to check the code coverage of the scripts. Any ideas?
Most of the tools I saw are checking a JUnit test coverage and I don't see how we can use them...
I'm using an extended version of BaseAdapter based on the EfficientAdapter example from the SDK demo samples.
My data is basically an object (ListPlaces) which holds an ArrayList with the actual list of places, accessible via listPlaces.getValues(). This ArrayList data is sorted by range and the ArrayList consist of some special items (...
i am currently struggling with HTTP Session replication on tomcat with complex objects.
some objects implement Serializable but hold non-serializable members.
unfortunately, the stacktraces do not provide much useful info here by default.
there is a flag -XX:???? to enable verbose class names in the stacktrace when a NotSerializableEx...
I'm looking for a hash function that:
Hashes textual strings well (e.g. few collisions)
Is written in Java, and widely used
Bonus: works on several fields (instead of me concatenating them and applying the hash on the concatenated string)
Bonus: Has a 128-bit variant.
Bonus: Not CPU intensive.
...
hi i have 3 jsp pages 1.parent 2. child 3.grandChild
how can i access a radio button in grandChild jsp in Parent Jsp
can i access like this
parent.parent.document.forms['AccountClosureForm']['DECISION'][0]==true
...
Hello! I'm working on summary on the eclipse modeling project and it's various sub - projects. It is not going to get published, it's sole purpose is to help my colleagues and above all my boss to get an overall impression of the topic.
For better understandability i took diagram from the eclipse GEF User Guide and modified it. I want t...