When I wrote best I meant:
Speed,
Have an IDE, a debugger,
Compiling to machine code or some other language,
Quality of implemenation and,
Completeness.
I am using Lucene MultiFieldQueryParser and the implementation is as shown below
QueryParser parser = new MultiFieldQueryParser (Version.LUCENE_30,new String[] {"First Name","Middle Name","Last Name"}, standardAnalyzer); Query query = parser.parse(queryString);
and using it to find a match for the input string in my DB columns First Name, Middle Name and Last name .
I am able to get the hits with normal search and fuzzy search - The only problem I am facing is finding which column of the three generated the hit - Can you pls help me here - Thanks
How does Trie and B+ tree compare for indexing lexicographically sorted strings [on the order some billions]?
It should support range queries as well.
From perf. as well as implementation complexity point of view.
what is the syntax (i.e. code example) in Lua so you can call a function prior to it being defined? i.e. how do you kind of create the function, but then add it's implementation further down in code.
So roughly like this:
define function name (doX) here somehow (i.e. subject of this question)
call doX here (further down in the code)
doX implemention here (i.e. all functions down at the bottom of the file)
I want to define a custom PropertySourcesPlaceholderConfigurer in spring context xml. I want to use there multiple PropertySources, so that I can load part of the configuration from several property files and provide other part dynamically by my custom PropertySource implementation. The advantage is that it should be then easy to adjust the order of loading these property sources just by making modifications to the xml spring configuration.
And here I run into a problem: how to define an arbitrary list of PropertySources and inject it into PropertySourcesPlaceholderConfigurer, so that it uses the sources defined by me?
Seems to be a basic thing that should be provided by spring, but since yesterday I cannot find a way to do it. Using namespace would enable me to load several property files, but I also need to define the id of the PropertySourcesPlaceholderConfigurer (as other projects refer to it), and also I want to use my custom implementation. That is why I am defining the bean explicitly and not using the namespace.
The most intuitive way would be to inject a list of PropertySources into PropertySourcesPlaceholderConfigurer like this:
<bean id="applicationPropertyPlaceholderConfigurer" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="ignoreResourceNotFound" value="true" />
<property name="order" value="0"/>
<property name="propertySources">
<list>
<!-- my PropertySource objects -->
</list>
</property>
</bean>
but unfortunately propertySources is of type PropertySources and does not accept a list. The PropertySources interface has one and only implementor which is MutablePropertySources, which indeed stores list of PropertySource objects, but has no constructor nor setter through which I can inject this list. It only has add*(PropertySource) methods.
The only workaround I see now is to implement my own PropertySources class, extending MutablePropertySources, which would accept list of PropertySource objects on creation and manually add it via using add*(PropertySource) method. But why so much workaround would be needed to provide something that I thought was supposed to be the main reason of introducing the PropertySources (having flexible configuration manageable from spring configuration level).
Please clarify what am I getting wrong :)
Programming language : VB6
I have a problem to copy region within a picture deteremined by 4 points(p1,p2,p3,p4), and reskew it to a another picture with fixed rectangle (P1,P2,P3,P4), as shown :
thank you so much in advance for your help
I have a list L of objects (for what it's worth this is in scons). I would like to create two lists L1 and L2 where L1 is L with an item I1 appended, and L2 is L with an item I2 appended.
I would use append but that modifies the original list.
How can I do this in Python? (sorry for the beginner question, I don't use the language much, just for scons)
Hi,
I am developing an iPhone application which needs to show some font in language other than English like Malayalam or Arabic. Is it possible to do that? Please give me appropriate direction to do this.
Thanks in advance.
I want to copy a large a ram-based file (located at /dev/shm direcotry) to local disk, is there some way for an efficient copy instead of read char one by one or create another piece memory? I can use only C language here. Is there anyway that I can put the memory file directly to disk? Thanks!
Hi,
I am using C language and Linux as my programming platform.
I am learning how to create a daemon, and I want to create a log file so that I write a debug message in my daemon. My question is where should I put the log file in my system. Should I put it in the var folder?
Please advice.
Many thanks.
I have the following questions concerning the differences between the four options:
What is the main difference between the four options?
Which of the above support int64_t or long long without suffix LL. I want a data type of the range 2^63 - 1
If your answer to my second question is not C(gcc 4.3.2) , whether the code I write in C(gcc 4.3.2) for C language will be valid in rest of the three options or do I have to modify something, then what will be those modifications.
Which is the best programming language to use for creating a screensaver?
I am thinking of creating a screensaver to showcase projects i have done before for self satisfaction.
How should i go about it?
Thanks
I tried to make a private property in my *.m file:
@interface MyClass (Private)
@property (nonatomic, retain) NSMutableArray *stuff;
@end
@implementation MyClass
@synthesize stuff; // not ok
Compiler claims that there's no stuff property declared. But there's a stuff. Just in an anonymous category. Let me guess: Impossible. Other solutions?
hi guys , i want to design a small website like stackoverflow (but in deferent language) and i want to use an opensource secure scalable cms to do that , so what cms to use ? ( i prefer using java )
thanks .
I have a list of items sorted alphabetically:
list = [a,b,c,d,e,f,g,h,i,j]
I'm able to output the list in an html table horizonally like so:
| a , b , c , d |
| e , f , g , h |
| i , j , , |
What's the algorithm to create the table vertically like this:
| a , d , g , j |
| b , e , h , |
| c , f , i , |
I'm using python, but your answer can be in any language or even pseudocode.
Thanks
I am a c# developer which finds himself having to relearn c++. The last time I programmed in c++ was in school and am looking for good books as a refresher. I want something that assumes previous programming exposure and gets straight to the point. Is there a book similar to K&R for c++? I know the language is bloated so a book that covers a subset of c++ would be ideal.
Is it possible to run Lua interpreter on the iphone?
If yes, are there any libraries that have bindings to Iphone's SDK?
If its not possible with Lua, what are the other language options?
When I derive an activity from NativeActivity, I can access Workflow executionproperties using the NativeActivityContext like this:
context.Properties.Find("propertyname");
Some of my activities derive from Activity, because I they define a coded workflow using the Implementation property. An Activity has an ActivityContext, which does not provide access to the workflow execution properties, it does not have a Properties property.
Is there another way to get access to the workflow execution properties from within an Activity
Hi All
Visual studio allow you to create "inlined" classes (if I am not mistaken with the name).
So class header and implementation all in one file.
H. file contain definitions and declarations of the class and functions, there is no .cpp file at all.
So I was wondering if there is any penalty for doing it that way? any disadvantages ?
Thanks a lot
Which programming language and tools can i use, to develope a complete stand-alone gui-application? This application will be burned on a cd and should run on every windows-pc without any installations.
Hi,
I often cross this kind of code transformation (or even mathematical transformation)
(python example, but applies to any language)
I've go a function
def f(x):
return x
I use it into another one.
def g(x):
return f(x)*f(x)
print g(2)
leads to 4
But I want to remove the functional dependency, and I change the function g into
def g(f):
return f*f
print g( f(2) )
leads to 4 too
How do you call this kind of transformation, locally turning a function into a scalar ?
Was discussing over lunch why several ports of languages to the .net framework are prefixed with 'Iron'.
e.g.
IronPython
IronRuby
IronLisp
IronScheme
IronPHP
Anyone out there know?
(language list sourced from http://www.dotnetpowered.com/languages.aspx)