My application is using struts 1.1.
I'm trying to group URL forwards, using wildcards.
For example, if the action is like this:
action path="/edit/product" type="classname"
forward
name="success"
path=".myapp.main"
action
Replacing the first line above with
action path="/edit/*" type="classname" doesn't work. Any...
Is there a simple way to support wildcards ("*") when searching strings - without using RegEx?
Users are supposed to enter search terms using wildcards, but should not have to deal with the complexity of RegEx:
"foo*" => str.startswith("foo")
"*foo" => str.endswith("foo")
"*foo*" => "foo" in str
(it gets more complicated when...
I have a couple of questions about java generics wildcards:
1) whats the difference between
List<? extends T>
and
List<? super T>
2) What is a bounded wildcard and what is an unbounded wildcard?
Thanks!
...
I don't know if it's legit at StackOverflow to post your own answer to a question, but I saw nobody had asked this already. I went looking for a C# Glob and didn't find one, so I wrote one that others might find useful.
...
I know this is a pretty basic question, and I think I know the answer...but I'd like to confirm.
Are these queries truly equivalent?
SELECT * FROM FOO WHERE BAR LIKE 'X'
SELECT * FROM FOO WHERE BAR ='X'
Perhaps there is a performance overhead in using like with no wild cards?
I have an app that optionally uses LIKE & wild cards. T...
If the search query contains a leading wildcard character (* or ?), the QueryParser's Parse function throws an error.
Dim q As String = "*abc"
Dim qp As New QueryParser("text", New StandardAnalyzer())
Dim query As Query = qp.Parse(q)
Is there any way to solve this problem in Lucene.NET v2.0.0.4?
...
I think I saw once that it was possible to use the functionality of windows' search feature(s) in code. That it was possible to search for files using a sql query (something like "select filename from filestore where directory = 'c:\somedir' and extention in ('.doc','.txt','.me') and datemodified >= '2009-01-01 00:00:00'"
Anyway, even ...
I asked about finding in subdirs with criteria. First answer was use FindFirstFileEx(). It seems the function is no good for this purpose or I'm using it wrong.
So can someone explain how I would go about searching in a folder, and all it's subfolders for files that match (to give some sample criteria) .doc;.txt;*.wri; and are newer ...
I'm developing an application where I the need to invoke a method of a generic class and I don't care about the instances actual type. Something like the following Java code:
public class Item<T>{
private T item;
public doSomething(){...}
}
...
public void processItems(Item<?>[] items){
for(Item<?> item : items)
item.doSomethi...
In this question, TofuBeer was having problems creating a genericized IterableEnumeration.
The answer came from jcrossley3 pointing to this link http://www.javaspecialists.eu/archive/Issue107.html which pretty much solved the problem.
There is still one thing I don't get. The real problem, as effectively pointed out by erickson, was ...
I am trying to query a mysql table which contains strings of numbers
(i.e. '1,2,3,4,5').
How do I search to see if it has '1' but not '11' bearing in mind if it is '9,10' '9%' doesnt work??
Fixed!
(field like '10' OR field like '%,10,%' OR field like '%,10' OR field like '10,%')
...
Another question from an long-time Unix/Linux user who finds himself in a Windows world. First let me explain exactly what I'm trying to do. I'm using the Windows cmd.exe shell, and I want to list all directories below the current directory that contain a bin\Debug hierarchy, and determine if they contain any files (e.g.: trying to fig...
This problem is similar to blind SQL injections. The goal is to determine the exact value of a string, and the only test you can do is to see if a DOS-style wildcard (? = any character, * = any number of any characters) you specify is matched by the string. (So practically you only have access to a bool DoesWildcardMatch(string wildcard)...
I need a comparator in java which has the same semantics as the sql 'like' operator.
For example:
myComparator.like("digital","%ital%");
myComparator.like("digital","%gi?a%");
myComparator.like("digital","digi%");
should evaluate to true, and
myComparator.like("digital","%cam%");
myComparator.like("digital","tal%");
should evaluate...
A bit more specific than this question, can someone tell me what is the difference between Scala's existential types and Java's wildcard, prefereably with some illustrative example?
In everything I've seen so far, they seem to be pretty equivalent.
Edit: A few references. Martin Odersky mentions them; Google's top hit for my question
...
Hello,
I have some filters in the following form:
Object A
+/- Start End
----------------------------------------------
+ 000000080000 000000090000
- 000000800500
+ 054*
Object B
+/- Start End
----------------------------------------------
+ 000000090000 000000100000
+ 00??00900500
- 000000900500
+ ...
Java can often infer generics based on the arguments (and even on the return type, in contrast to e.g. C#).
Case in point: I've got a generic class Pair<T1, T2> which just stores a pair of values and can be used in the following way:
Pair<String, String> pair = Pair.of("Hello", "World");
The method of looks just like this:
public st...
Hello all,
I'm running into a problem when trying to select records from my 2005 MS-SQL database (I'm still very new to SQL, but I learned and use the basic commands from w3schools already). In theory, all my manufacturer records should be unique. At least that is how I intended it to be when I did my first massive data dump into it. Un...
I was looking at email validation. I read in RFC specs that consecutive . (dot) are not allowed, like, [email protected].
But are different wild characters allowed to occur consecutively? Like, [email protected].
And if so, how do I make a regular expression which will take only single occurance of wild characters as long as they a...
Hello all!
Thanks in advance for your help!
I have a VBA macro for Microsoft Word that I am trying to improve.
The purpose of the macro is to bold and italicize all words in a document that match the search terms in the first table of the document.
The problem is the search terms include wildcards which are the following:
the hy...