Questions tagged [contain]
214 questions
5
votes
1 answer
AppleScript list/contains
set r to ""
set device to "IPHONE 6 PLUS SILVER 128GB-AUS"
set HighValueDevicesPass to {"IPHONE 7", "IPHONE 6", "IPAD PRO", "IPHONE 6S", "IPHONE 6 PLUS"}
if devices contains HighValueDevicesPass then
set r to "Pass"
end if
return r
I don't…

Kevin
- 1,076
- 4
- 22
- 49
5
votes
1 answer
background-size: contain too much whitespace when changing browser size
How do I eliminate the whitespace when the browser size changes if I am using background-size:contain;?
The whitespace between the image and the text is way too much with smaller browser sizes. site is: http://16debut.com/test.html
CSS is:
body {
…

AmyCarter
- 53
- 5
5
votes
3 answers
Mongodb - Array containing element and not containing another one
I'm trying to query one of my mongodb collection that looks like this:
> db.collection.find()
{name: "foo", things: [{stuff:"banana", value: 1}, {stuff:"apple", value: 2}, {stuff:"strawberry", value: 3}]}
{name: "bar", things: [{stuff:"banana",…

user1534422
- 511
- 1
- 8
- 14
5
votes
2 answers
Using box model to contain items within its parent div
Using the following HTML and CSS3 rules, I'm trying to make sure that the following criteria are adhered to:
I have all of the criteria working except for item 1 where the
children are exceeding their parent's width. Question: How to keep…

Philip Murphy
- 870
- 3
- 10
- 24
4
votes
4 answers
R - test if a string vector contains any element of another list
I have:
> lst_A <- c("TET","RNR")
> DT_result <- data.table(lst_B = c("RNR_B","BC_TET"))
I want:
> DT_result <- data.table(lst_B = c("RNR_B","BC_TET"), result = c(TRUE,TRUE))
> DT_result
lst_B result
1: RNR_B TRUE
2: BC_TET …

LeGeniusII
- 900
- 1
- 10
- 28
4
votes
1 answer
CakePHP 3. Containable select
I have a many to many relation where TrainingPrograms can contain many Exercises. They are a linked via the linktable ExercisesTrainingPrograms.
I want to select certain fields from my exercises:
$trainingPrograms = $this->TrainingPrograms->find()
…

Sebastian Aleksander Thomsen
- 78
- 1
- 8
4
votes
2 answers
Read line containing String (Bash)
I have a file, and its something like this:
Device: name1
random text
Device: name2
random text
Device: name3
random text
I have a variable: MainComputer
What I want to get (for each name, i have like 40 names):
MainComputer -> name1
…

Omnomnom
- 111
- 2
- 2
- 11
4
votes
2 answers
How do I retrieve a Value from a KeyValuePair inside a List?
I have the following list and I need to run a Contains() or similar method on it to retrieve the value associated with a specific key. How would I do this? I've searched everywhere and tried many things but I can't seem to figure it…

Kelyn Ferguson
- 143
- 2
- 7
4
votes
2 answers
SQLite select where column does not contain certain data
ok so I have a table that looks something like this...(using pipe symbol to separate columns)
example1 url|0
example2 url|0
example3 url|1
example4 url|1,2
example5 url|1,3,6
What I am trying to do is to select all rows where column 2 does NOT…

user2929075
- 61
- 1
- 1
- 3
4
votes
3 answers
is any of array items contained in a string
I have a keywords list and a blacklist.
I want to delete all keywords that contain any of blacklist item.
At the moment Im doing it this way:
my @keywords = ( 'some good keyword', 'some other good keyword', 'some bad keyword');
my @blacklist = (…

gib
- 738
- 1
- 8
- 16
3
votes
1 answer
Delete whole line NOT containing given string
Is there a way to delete the whole line if it contains specific word using sed? i.e.
I have the following:
aaa bbb ccc
qqq fff yyy
ooo rrr ttt
kkk ccc www
I want to delete lines that contain 'ccc' and leave other lines intact. In this example the…

user1240622
- 59
- 5
3
votes
5 answers
Search strings in list containing specific letters in random order
I am writing a code in Python 2.7 in which I have defined a list of strings. I then want to search this list's elements for a set of letters. These letters must be in random order. i.e. search the list for every single letter from input.
I have been…

Alex
- 146
- 2
- 2
- 10
3
votes
4 answers
Can not using contain cakephp 3
I want to select data of questions from quizdetails table. And data of questions will be join with answers table, too. So I using code php:
$questions = $this
->QuizDetails->find()
->contain([
'Questions' => function($q) {
…

Hùng KaKa
- 31
- 2
3
votes
1 answer
Cakephp 3 - limit () and contained model
I have two models, named Post and Comment, which are linked by Post hasMany Comment and Comment belongsTo Post.
I want to fetch all posts with the first five comments each. I would use this code:
$this->Posts->find('all')
->contain([
…

lupi
- 91
- 1
- 4
3
votes
1 answer
why isn't my element:contains(variable) work when using variable instead of string? jquery
I have a code to get the value of option element and when a button is clicked, it'll find where that value exist in the page so I can add more things into that table / container.
Somehow if I store the value into a variable, it doesn't work. If I…

Dora
- 6,776
- 14
- 51
- 99