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
3 answers

jQuery - Find a word within a span and take that word and add the class to the span element

I need help. I have been assigned the task of grabbing a word out of a span element, and then assigning that word to the same span element as a class. I have written this piece of code: jQuery(".product span").each(function()…
patorikkuv2
  • 47
  • 3
  • 6
1
vote
1 answer

Return value of IEnumerable.Contains changes if called multiple times

I'm having trouble understanding why multiple calls of Contains return different values for the same parameter on the same enumerable. While I understand that the collection can be modified, thus changing the result in a subsequent call, this can be…
UweB
  • 4,080
  • 2
  • 16
  • 28
1
vote
2 answers

Java - JPanel contains point method error

I have a 2d array of Grids (JPanels) that are added to another JPanel using the GridLayout. That JPanel is added to the JFrame. Whenever a click happens on the JFrame I'm attempting to take the Point of the click and determine if any of those…
Andrew_CS
  • 2,542
  • 1
  • 18
  • 38
1
vote
1 answer

Check link variable with JavaScript

Take for example, a page as follows: http://www.example.com/Page.asp?Page=About With JavaScript, how can I check if the window's location contains ?Page=About? This is the code I have so far, but I can't seem to get it to…
henryaaron
  • 6,042
  • 20
  • 61
  • 80
1
vote
3 answers

Jquery - if statement match various criteria

I want to run some functions on clicking a link but I want to exclude links that match certain criteria... I'm not sure where I'm going wrong with this, but it still seems to be running the function on a link with the href of…
Tom
  • 12,776
  • 48
  • 145
  • 240
1
vote
1 answer

Select from SQL database all rows that CONTAIN a certain text string in specific column

I've been looking at other posts such as this and this but nothing works for my specific case. I have a table like this: | Name | Reference | Etc... | |------------|-----------------|--------------| | John Doe | |…
QuestionerNo27
  • 610
  • 6
  • 14
  • 30
1
vote
3 answers

Check if a value exists in between a key and its value in hash table

How to check if a value exists in between a key and its value in hash table? I want to check if a value is present in hash table or in between any of the key and its value I used the following code to check if a value is present as a key or…
user2133404
  • 1,816
  • 6
  • 34
  • 60
1
vote
5 answers

If Computer Name Contains

I need to create a batch file that moves computer name object in Active Directory only if computer name contains some string, like: If %computername% contains "LAP" ( dsmove "CN=%computername%,CN=Computers,DC=domain,DC=local"…
Nick
  • 499
  • 4
  • 11
  • 25
1
vote
1 answer

PHP SimpleXML XPath contains() to find other elements referenced by this element

I'm being given XML in the following format, and am parsing it with PHP's SimpleXML. 1
jezmck
  • 1,138
  • 3
  • 18
  • 38
1
vote
1 answer

string.contains is always returning true

I made a program that takes a text file, stores the lines as strings in an array. Now I want to "filter" those entries of the array. I am using the string.contains to see if each array entry has the substring "05/Aug". For some reason, it is always…
Max
  • 837
  • 4
  • 11
  • 20
1
vote
1 answer

Convert txt to HTML with batch file

I have plain txt file like: === Date:30.05.2013 **Header** text === Date:29.05.2013 **Header** text === etc. I want to convert it into html file…
pokatusher
  • 13
  • 1
  • 3
1
vote
2 answers

if div id contains text X, change text doesnt work

This is the code which returns the ID of a category in a table cell:
catid ? $this->escape($row->catid) : '-';?>
There are 8 different…
Rob
  • 59
  • 2
  • 2
  • 8
1
vote
2 answers

XPath for text between tags

I want to verify a xpath with canoo webtest. My HTML looks like this:
Firstname Lastname
The space between the firstname and the lastname was created with a " ". I tried something like the following but it always fails…
NDY
  • 3,527
  • 4
  • 48
  • 63
1
vote
1 answer

Linq to SQL search for wildcard in double

In a Linq to SQL I am trying to search for a value of the type double: var q = from a in db.GetTable() from g in db.HKKS_Get_grader_Kun_Grad(Convert.ToInt32(a.Skif)) where a.Aktiv == true && …
Peter Hansen
  • 81
  • 1
  • 8
1
vote
3 answers