Skip to main content

Posts

Image features extraction

I have a visual marker like this one and a blob detection algorithm in Java .. How can I extract the regions of the image so that I can run the blob detection algorithm on each one separately so that it can detect 1, 1, 3 blobs respectively. Thanks a lot in advance !

Android navaigation bar with ListView

i just did ListView like this: All source: ListView Now i want to add navigation bar like iPhone on top of this window: I was searching for some source how to do but just kind find. Maybe someone have bookmarked good tutorial how to do this ?

Making a dynamic sequence(in Java)

Hey guys im having a problem trying to program out a set of logic. I want to make a Go(the board game) problem. What i want my program to do is read in an xml file that represents a series of steps a person can make to complete the puzzle, or a even a dead end. So in the xml it would look something like <Step x="4" y="5"> <Response x="4" y="6" /> <Step x="3" y="6" victory="true"> </Step> </Step> <!-- This is a dead end --> <Step x="4" y="4"> <Response x="4" y="5" /> <Step x="5" y="5" defeat="true"></Step> <Step x="6" y="4" defeat="true"></Step> </Step> My thought is to make a link list of sorts where my xml handler(im using SAX) uses the step class to store a step inside a step, but i cant conceptualize how i would

In a test I can find a xml, in another I can"t

I have an interesting problem, I have two web services defined in a spring-conf.xml file and I have two test classes that live in the same package and every class has its own link to this spring-conf.xml file to call their particular webservice. I am able to get beans from one of my test classes but from the other one I can't and the code is equal in both classes. In one I have this import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class WSFirstTest { private ApplicationContext context = new ClassPathXmlApplicationContext( "WEB-INF/spring-conf.xml"); private WSFirst ws = (WSFirst) context .getBean("serviceFirstDefault"); in the other one I have this import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class WSSecondTest { private ApplicationContext context2 = new ClassPath

Want to convert a string in one form into another form in JAVA?

I have a string like "isnull(col_name,0)<>1 or isnull(col1_name,0)=0 and isnull(col2_name,0)>=100... " I want to convert above string in below form as: " (col_name is null or col_name<>1) or (col1_name is null or col1_name=0) and (col2_name is null or col2_name>=100) ... " I want to implement this in JAVA. I have tried with using split function but the case is not the similar everytime(means is between two there may be 'OR' or 'AND', so how to split?). Then I tried with contains function but how to replace that complete part of isnull in required form. (I have also tried with using character array,it works somewhat fine but fails somewhere according to my code.) Actually I tried a lot with different ways but I am not able to build the good logic which will work fast. Pls suggest me some good idea for this. Sorry for my bad english. Thanks.

Is it good practice to keep a Lucene IndexWriter & IndexSearcher open for the lifetime of an app

It states in the Lucene documentation that it is fastest to use one instance of an IndexWriter and IndexSearcher across an application. At the moment I have a static instance of IndexWriter open at all times, and a static instance of IndexSearcher that is kept open at all times but rebuilt when if the IndexWriter performs any CRUD operations on the index. I have implemented a Dispose method on my index management class that closes both the IndexWriter and IndexSearcher when the application ends (however it is a web app so this is potentially months of running without being called). Does that sound like reasonable way to go about doing things? And also does using static instances present problems with multi-threading..? I.e. should I be locking my writer and searcher when in use?