wildcard

Can I use wildcards in "IN" MySQL statement?

I would like to run something like: select * from table where field in ("%apple%", "%orange%") Is there a way? Or at least is there a better way than dynamically building query for every keyword: select * from table where field like "%apple%" or field like "%orange%" Thanks. ...

generics error: not applicable for the arguments

Can someone explain to me why the following code does not work? public class Test { interface Strategy<T> { void execute(T t); } public static class DefaultStrategy<T> implements Strategy<T> { @Override public void execute(T t) {} } public static class Client { private Strategy<?> a; public void setStrategy(Strat...

Bash: what expands to all files in current directory recursively

I know **/*.ext expands to all files in all subdirectories matching *.ext, but what is a similar expansion that includes all such files in the current directory as well? ...

F# String Pattern-Matching with Wildcards

As part of a project I have assigned myself as a way of improving my knowledge of F# and functional programming in general, I am attempting to write a string pattern-matching algorithm from scratch without using any loops or variables (or regular expressions, or String.Replace and friends). As this is purely a learning project, I'm not i...

Get String That Matches Wildcard in PHP

I need a very specific function in PHP. Basically, I have two strings as arguments, one of which is a pattern that contains wildcards of variable length (*), and one of which is a string that matches that pattern. I need to get an array of the strings from the latter string that fill in the wildcards in the pattern. For example: Arg...

Vim script: expand wildcards in a string

There is a vim variable with the string value like this: foo%:p:r:sbar %:p:r:s is a vim wildcard. How can I expand all wildcards in the string variable? Unfortunately expand(my_variable) doesn't help. Do I need to specify any additional argument or use other vim function? Thanks. ...

Searching files in NTFS

Hi, We have a fairly large disk array with roughly 2-3 million XML files on it. The disk is formatted with NTFS and we would like to search the filesystem using wildcards. So something like * SomePartOfTheFilename * would be a typical search query. We are using .Net and are finding that using DirectoryInfo appears to be slow. Director...

CRM Dynamics Search wildCard

Hi there I'm exploring Dynamics CRM 4 and when I search a record for example, a contact, ex. Abcd, Dynamics is searching by Abcd*, including, by default, the WildCard in the end. Is there any way to also include the Wild Card, by default, in the beggining? Ex. Abcd --> *Abcd* ...

SOLR - wildcard search with capital letter

I have a problem with SOLR searching. When i`am searching query: dog* everything is ok, but when query is Dog*(with first capital letter), i get no results. Any advice? My config: <fieldType name="text" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> ...

What does List<?> mean in java generics

What does List<?> mean, does it mean simply a list of objects of unspecified type? Googling for the string <?> returns nothing useful (: ...

Open Files from current directory using a wildcard C++

Is it possible to open files from a given directory in C/C++ using wildcard characters? In the sense, If I want to open files that end with "to(node_id)" from a given current directory in my program. Example : I need to open files whose filenames end with "to4". Desired Output : It must open all the files in the current directory with ...

Sql wildcard: performance overhead?

I've Googled this question and can't seem to find a consistent opinion, or many opinions that are based on solid data. I simply would like to know if using the wildcard in a SQL SELECT statement incurs additional overhead than calling each item out individually. I have compared the execution plans of both in several different test querie...

Nokogiri and random div name

Using Nokogiri and Ruby. I have a page to parse with div id's like: div id="some-list-number^875" Numbers after ...-number^ changes random, and i just can't do doc.css('#wikid-list-genres^875').each do |n| puts n.text.to_s end But the base structure is always the same -number^..some digits... So i need some kind of wildm...

Xpath Wildcard (for example: "/Data/Customers/D*")

I am selecting some nodes using XPath, and would like to use wildcards. Is this possible? Something like the following would be useful: foreach (XmlNode xml_node in xml_document.SelectNodes("/Data/Customers/D*")) { // } ...

How to apply wildcard in instr() in MySQL?

Using a wildcard so all records will be matched. My code: if(empty($tag)) { $tag="%"; } mysql_query("select * from mytable where instr(tag,'$tag')>0") or die(mysql_error()); But it returns zero result. Even if if(empty($tag)) { $tag="*"; } It still returns zero result. How to resolve this problem? ...

Java generic class and wildcards

Hi all, I've got a problem with generic classes in java. I've got this class: public abstract class MyMotherClass<C extends AbstractItem> { private C item; public void setItem(C item) { this.item = item; } public C getItem() { return item; } } An implementation of this class can be: public...

MySQL LIKE statement

Hi guys. I have a SQL query SELECT * FROM table WHERE column LIKE '%pdd%'. The problem is I need to get all results excluding those which start with "pdd", I mean find everything where "pdd" is not at the beginning. How could it be done? Thank you. UPD. Sorry, I should've clarified my question a little bit more. I do need to match "p...

List<? super B> lsb = new ArrayList<A>(); Logical error in java?

We have: class A{} class B extends A{} class C extends B{} class D extends C{} we can define Lists like: List<? super B> lsb1 = new ArrayList<Object>(); //List<? super B> lsb2 = new ArrayList<Integer>();//Integer, we expect this List<? super B> lsb3 = new ArrayList<A>(); List<? super B> lsb4 = new ArrayList<B>(); //List<? super B...

Nmake getting a list of all .o files from .cpp files

I'm using nmake to compile multiple source files into an elf. However I do not want to specify the .o files in a long list like this: OBJS = file1.o file2.o file3.o What I would prefer is to use a wildcard that specifies all .o files in the current directory as dependencies for the .elf. However, the .o files don't exist until I've co...

make wildcard subdirectory targets

I have a "lib" directory in my applications main directory, which contains an arbitrary number of subdirectories, each having its own Makefile. I would like to have a single Makefile in the main directory, that calls each subdirectory's Makefile. I know this is possible if I manually list the subdirs, but I would like to have it done au...