Questions tagged [contain]
214 questions
-1
votes
2 answers
Insert html based on contain
In this situation, I have one page, which will load with all different kinds of content (example: 5 different clothing catalogs).
I'm looking for a way to insert html based on specific text in a header.
I know this isn't right, but this may give…

Jgammel
- 65
- 1
- 1
- 6
-1
votes
2 answers
Check if string contains JS in PHP
I'm trying to create a function which would delete any potentional script tags, but not other tags like p, li, ol, span, h1, ...
This is what I have so far. I also wrote < and > as encoded chars "%3C" and "%3E" and as HTML name and number. Tried to…

IEMSlovenia
- 19
- 5
-1
votes
1 answer
Store objects in arrays and call their methods in Javascript
I would like to have a Javascript object obj that contains an array of other objects and is able to call their methods. I would also want any object to be able to register into the array by calling a special function of the object obj and pass a…

Golemp
- 1
-1
votes
2 answers
Variable contains in the array? JavaScript
how to check that the variable occurs in an array?
In Example
var X = 5;
var newArray = [1,2,5]
And now something like this
if(X.isin(newArray)
{ document.write( "YES");}
something like this exist? :P

Adacho
- 99
- 4
- 13
-1
votes
2 answers
Checking if Container has Value (c++)
I have a custom class 'team' and one of its attributes is its 'name.' After each 'team' is created, I add it to a vector teamList.
I would like to implement a function that continuously prompts the user for a team name which is not already taken by…

Michael Hang
- 199
- 2
- 2
- 15
-2
votes
1 answer
How to call multiple str.contains on same column to take out data in pandas
I created a working example like this:
appart = OrderedDict([ ('Description', ['A LOUER F2 GRENOBLE Quartier Île Verte Rue Eugène Delacroix, place Dr Girard, proche tramway B et ligne de bus, 50,60 m² 4 ème étage avec ascenseur.', 'Actuellement…

M-M
- 440
- 2
- 16
-2
votes
3 answers
using contain operator or equivilant
in SAS how to to use a contain (or alternative) operator when you have more than one set of letters to choose. eg where have_variable= abd, afg, afd, acc and want_variable=abd, afg, afd (containing ab or af only)

ZEE
- 19
-2
votes
2 answers
I have a a C# List issue to do with searching a string list for an integer value?
I have a list that lists transactions of a bank account, the strings are formatted as:
("Withdrawn" + amount)
("Deposited" + amount)
they look like
Withdrawn 200
Deposited 200 etc..
In the list, I'm meant to created a method that finds the…

KyronxLK
- 1
-2
votes
1 answer
python: read a folder with file name and file concept
I have a dataframe (below), for the column 'name',
I want to delete the (for example the first row)
'/Users/xccxken/Desktop/NNRelease/paperVersion/'
and
'.txt'
just keep the word like (example of first…

Lyu Keting
- 83
- 3
- 8
-2
votes
3 answers
Iterate through a list and return the element that contains a specific word
i have this code below:
wordSearch = "ghi"
lst = ['c:/test/abc.bat','c:/test/test1/def.bat','c:/123/ghi.exe','c:/test/testing/aa/jkl.bat']
by searching "ghi" I would like it to return "c:/123/ghi.exe". So, ultimately i want it to iterate through…

Jaff
- 155
- 1
- 4
- 14
-2
votes
1 answer
How to check if a string contains a dot followed by a number in PHP
I am trying to check if a string contains .2.
The following code works if I try to check if it contains a dot:
strpos($string, '.') !== false
But it doesn't work when use the following code:
strpos($string, '.2') !== false
nor
strpos($string,…

Nicolas123
- 47
- 1
- 1
- 8
-2
votes
1 answer
Java - Search an integer array for list of random values
I have an array int[] myArray = new int[] { A, B, C, D, E };
The a,b,c,d,e are randomly set to the values of 6,4,5,1,1 from previous code.
I need to find a way to look for: IF array contains a 6, 5, or 4. I have to have a 6 first, then a 5, and then…

RazorSharp
- 179
- 1
- 3
- 15
-2
votes
1 answer
If textbox contain a specific string do some function - javascript
I am wondering how to search specific string in big textbox (which contains 200 words) so I can make function to color them. Ex. In textbox there is a sentence "my dog is happy" and i want string "dog" to become red by button or sth else. Is it…

Javascript
- 3
- 3
-3
votes
1 answer
howto implement a class that evealuates contains in a list
I have:
- MyClass with hashCode() overwritten
- I'll try to avoid adding a second instance of MyClass with the same content to an List using the contains() method of the List.
How can I achive this ? I thought this is done by just overriding the…

mcfly soft
- 11,289
- 26
- 98
- 202
-3
votes
3 answers
SQL declared variable as nvarchar. Use dec variable as 'like' or 'Contains' in where clause
I have declared my variable:
declare @search as nvarchar
set @search = 'road'
Then I effectively want to have this in my Where clause:
where
unit.BuildingName like '%@search%' or
property.Street like '%@search%' or
unit.Street like…

Dasal Kalubowila
- 103
- 5
- 22