Questions tagged [contain]
214 questions
0
votes
0 answers
using image swap with background-size: contain
I'm not sure what to do. I want to use one image with two different pictures on it for the image swap (on hover) so there won't be a delay due to a new picture having to be loaded.
But, I'm using background-size: contain because there's a lot of…

Jonathan Grant
- 143
- 2
- 15
0
votes
1 answer
Underscore.js--- the relationship between _.contains and _.reduce
Can anyone explain how the _.reduce function works within _.contain function?
Why is it "false" for the third parameter of the reduce function?
_.contains = function(collection, target) {
return _.reduce(collection, function(wasFound, item) {
…

Someone
- 157
- 2
- 3
- 10
0
votes
0 answers
React component don't visually contain all of it's elements
I wrote a React component that contains some floated divs. Now these floated elements are not visually belonging to outer div as they should, although they continue to structurally belong (click on them, for example, is also a click on the…

LazyDal
- 189
- 1
- 2
- 8
0
votes
1 answer
Background-size contain logo image only when width size start touching logo
When adjusting the width size of the page i only want the logo starts containing when there is no room left on either sides of the logo so at that point adjust to the width of the page. Must be quite easy! In the fiddle example is seems to act like…

KP83
- 616
- 1
- 10
- 34
0
votes
0 answers
count rows where product.store_id = store.id from product table HABM association
I'm trying to get total no of products from products table where product.store_id = store.id in cakephp to shoq store owner his total products in his store and i'm using containable behavior to get this by this query
$stores =…

coder
- 156
- 3
- 23
0
votes
1 answer
Stack variable and .contains(Object o)
Im having trouble keeping track of nodes in my stack. My nodes contain a 2d int array which contains numbers 0-20 as well as another integer measuring the cost to get to the current node state (2d int array).
currently i cant figure out how to track…

George
- 337
- 2
- 7
- 16
0
votes
2 answers
cakephp: find ignores DISTINCT
i got the following cakephp find situation:
$data = $this->find('all', array(
'conditions' => array(
'Roster.league_id' => $league_id,
'Roster.season' => $season,
),
'fields' => array(
…

Cheetah
- 506
- 5
- 16
0
votes
2 answers
How to make background image to be displayed fully and to cover the full size
I have a header div, which I want to be fully covered with a background image. I want the image to be fully shown, so nothing is cropped. However, it seems to be stretching the image and cropping it.
css:
..header{
…

user3506938
- 563
- 2
- 8
- 17
0
votes
2 answers
Loading a list from API with Angular (ng-repeat), then add some additional information with jQuery
I asked this before and didn't get an answer. This time around I'll try to explain better.
So basically, I'm loading a list of Formula 1 constructors from the Ergast API. Because the API does not offer all the information I want, such as constructor…

Klisee
- 53
- 2
- 7
0
votes
2 answers
Is it possible to have a div's background be an HTML5 video with the "contain" property?
I'm looking to set a div's background as an HTML5 video/webm, and I was wondering if it's possible for it to have the "contain" property and maintain it's aspect ratio? I'm not looking to have the video cover the entire screen, but rather a div that…

user3258704
- 25
- 4
0
votes
7 answers
str.contains in Java
I am having 2 lists
allWords [book, pen, pencil]
subsetString [book pen , book pencil , pen pencil ]
I am expecting my output as
book pen => pencil
book pencil => pen
pen pencil => book
ie for each element in subsetString I will be…

USB
- 6,019
- 15
- 62
- 93
0
votes
1 answer
Background-size contain not working in internet explorer
I'm using Chrome and the code works fine, however, when I load it into Internet Explorer, it shows the image at it's actual size, not scaled to fit the screen. I want the image to be on the left side of the page and cover top to bottom, but not left…

sandorfalot
- 1,042
- 1
- 10
- 19
0
votes
6 answers
Java String contains "splitted" String
Which is the best way to check if a Java String A contains another String B, even if B chars are not contiguous?
For example: "takaderoka" contains "tkdr" but not "tkkr".
Is there a built-in function, or do I have to write my own?
Thank you.

Sebastian Ikaros Rizzo
- 260
- 2
- 15
0
votes
0 answers
Cakephp pagination using contain produces "not associated" warning
I've got the following models:
Run->hasMany ActualResult
ActualResult belongs to Status
When I view an ActualResult, Cake gets the corresponding Status without straight out of the box.
When I view a Run, I want to paginate the ActualResults. I…

pkbevans
- 23
- 4
0
votes
2 answers
Remove href containing specific text part
I need to remove href for the links containing "ext" text
Akti
I can't get it…

revoua
- 2,044
- 1
- 21
- 28