Questions tagged [contains]

The "contains" operator/method is used to determine if an entity collection contains an element with a particular property.

The contains operator/method is used to determine whether one (or more) of the entities in an entity collection has a particular property.

3008 questions
1
vote
1 answer

jQuery :contains with exclude

I want this to happen if it contains "Thing " (Thing 1, Thing 2) but not if it says "Things" $("nav#breadcrumbs:contains('Thing')").append("

I'm a Thing

");
nathanbweb
  • 717
  • 1
  • 11
  • 26
1
vote
2 answers

Entity Framework contains clause doesn't find

I use contains clause for searching in db table. But if the data has upper case letter and if I search with lower cases, it doesn't find what I search. But it can find when I search with upper case letter. It is the same with lower case searches.…
cagin
  • 5,772
  • 14
  • 74
  • 130
1
vote
1 answer

is search query set's __contains filter of any use?

I am running django-haystack v2.0.0 with pyelasticsearch v0.3 in one of my projects. I have a SearchView that renders a listing template and i want to integrate result filtering. The search runs fine, but the filters i am using are not working at…
Amyth
  • 32,527
  • 26
  • 93
  • 135
1
vote
2 answers

Check if input string is part of 2 dim array

I'm trying to check if a string is part of a 2dim array. geefNamenCat returns Input.readString(). Is there any way for me to easily check if geefNamenCat is part of TERADENWOORDEN[ ][ ]?. I've been browsing this site for quite a while now and I have…
Jente
  • 63
  • 1
  • 8
1
vote
3 answers

contains fails with ArrayList

the following is part of a big library i write so i only show a small piece of code. If more is required, let me know. I'm making a tool where i can select anchors of a bezier. The strange thing is, i select one anchor for example. Then i can hold…
clankill3r
  • 9,146
  • 20
  • 70
  • 126
1
vote
2 answers

JQuery Selectors: Select element with specific class and 'href' attribute using "contains:"

I need to modify the following code (which works fine): if ($("#cartable-items .cart-trigger[href='AC^ATZ^A10^4200']")) { alert('Found it!'); } To use the "contains:" selector like this: if ($("#cartable-items…
Jason Eyebe
  • 161
  • 1
  • 2
  • 11
1
vote
4 answers

Check dictionary Key Contains

I have to store two key one value in dictionary. So that i am using like this. Dictionary> dicThreatPurgeSummary = new Dictionary>(); I have added key, key and value. Dictionary innerdict…
user1182553
  • 53
  • 2
  • 7
1
vote
2 answers

Checking whether a String contains one of the words in an ArrayList

I was working on a program that was outputting glossary terms and definitions in HTML and I want to vary the output based on whether the definition I'm checking has a keyword. To do this I have an ArrayList holding all the keywords I'm looking out…
Tastybrownies
  • 897
  • 3
  • 23
  • 49
1
vote
1 answer

Why does the Contains() operator degrade Entity Framework' Linq queries?

I read here that in entity framework if you perform contains operation it reduces performance: Contains is converted to "WHERE IN" in SQL which cause performance degrades" Now I have nearly 10 tables having 10 column and while fetching records I…
Jigar Pandya
  • 6,004
  • 2
  • 27
  • 45
1
vote
2 answers

if username is not listed .remove the element

I am trying to make a code that is easy. I am not very good at jQuery, and I'm sorry for this. Need help with this code lol. Ok so what I am trying to do is make a code that has variables in it which in turns are the Usersnames, this is what I have…
EasyBB
  • 6,176
  • 9
  • 47
  • 77
1
vote
4 answers
1
vote
2 answers

MATLAB: compare elements in arrays

suppose there are arrays A and B, both of which can have any arbitrary numbers and size. for example A=[1 2 3] B=[4 8 52 7 10] i was wondering if there was any way to check if any of the elements in A are contained in B without using a loop? Once…
phomein
  • 71
  • 1
  • 4
1
vote
5 answers

Is there a better way to write new List {"a", "b"}.Contains(str)?

I want to test whether a certain string is contained in a short list of strings. Currently the code is like this: if (new List { "A", "B", "C" }.Contains (str)) { However, this seems bloated. For instance, iirc, in Java I could simply write…
mafu
  • 31,798
  • 42
  • 154
  • 247
1
vote
1 answer

Sitecore TreelistEx search with Lucene.NET

Is there a way to search contents of a TreeListEx field in a custom index inside Sitecore with Lucene.NET? I have tried to use a WildQuery to figure out if an item is part of the TreeListEx field but it's not working. Below is a code sample of what…
Gabbar
  • 4,006
  • 7
  • 41
  • 78
1
vote
2 answers

How to check if user defined entry in vector in java?

I have a vector of entries. Each entry is an instance of this class: public class Entry implements Comparable{ private String _key; private CustomSet _value; [...] @Override public int compareTo(Entry a) { …
Alexandru N. Onea
  • 423
  • 2
  • 6
  • 18