Questions tagged [containment]

94 questions
26
votes
2 answers

How to check whether the elements of an ArrayList are all contained in another ArrayList

How can I easily check to see whether all the elements in one ArrayList are all elements of another ArrayList?
troyal
  • 2,499
  • 6
  • 25
  • 28
24
votes
2 answers

What is the difference in ECore between containment and reference?

When creating references between ECore entities there is the possibility to mark a reference as "containment". Can somebody explain me in easy words what's the difference between a plain reference and a containment? The definitions and explainations…
Kosi2801
  • 22,222
  • 13
  • 38
  • 45
11
votes
1 answer

MFMessageComposeViewController and UIAppearance, apple says don't customize

Question In the docs for MFMessageComposeViewController apple says: Important The message composition interface itself is not customizable and must not be modified by your application. But navigationbar and barbuttonitems in the…
overeasy
  • 404
  • 5
  • 12
10
votes
2 answers

Restrict jQuery draggable items from overlapping/colliding with sibling elements

I need to use jQuery UI to restrict the containment area for draggable object with some additional restriction. I need prevent the draggable element from overlapping with other elements within the same container. I need to allow movement in…
vaclav_o
  • 1,705
  • 3
  • 15
  • 24
9
votes
4 answers

Java - Best way to return multiple object types from a method

In my DAO i have a method where i build 2 different objects and I want to return both of those objects, but i'm not sure what the best way is to do it. I've looked at using ? extends myObject, creating another class that holds both of my objects…
Catfish
  • 18,876
  • 54
  • 209
  • 353
9
votes
1 answer

Do python lists have an equivalent for __contains__ that tests for identity?

For the built-in python containers (list, tuple, etc) the in operator is equivalent to any(y == item for item in container) with the caveat that the former method is faster (and prettier): In [13]: container = range(10000) In [14]: %timeit (-1 in…
ChrisB
  • 4,628
  • 7
  • 29
  • 41
7
votes
2 answers

Does the 'in' operator use "==" or "is" for comparisons?

In a Python expression like str in [str1, str2, str3] or 1 in [1, 2, 3], does the in operator use == or is to compare the first object with the objects in the list?
Julien Chien
  • 2,052
  • 4
  • 16
  • 32
7
votes
4 answers

JQuery UI draggable: Exceed containment on one side

I am using JQuery UI to implement resizable/draggable elements. Now I would like to define a containment for these elements that limits the resizing/dragging on exactly three(!) sides. E.g. have a look at this JSFiddle example. You can see that the…
Bastian
  • 4,638
  • 6
  • 36
  • 55
6
votes
3 answers

jQuery Draggable containment visible window?

I'm trying to contain my draggable element so it cannot be dragged outside of the viewable window, which works well if the user is at the top of the page, however if you scroll down at all then it messes it all up. How can I do…
Dylan Cross
  • 5,918
  • 22
  • 77
  • 118
6
votes
2 answers

Add a UINavigationController nested inside a container view controller to a UITabBarController

I have a UIViewController (red) set as the first tab of a UITabBarController as shown in the storyboard below. This view controller is a container view controller and loads a UINavigationController inside its contentView (the white rectangle inside…
Mischa
  • 15,816
  • 8
  • 59
  • 117
6
votes
1 answer

Using view controller containment, children lose parent

New iOS developer writing first commissioned app for iPhone. Modally called parent view controller has six children which are transitioned using a segmented control in the parent. I am getting the error: Children view controllers and must have a…
Adam Strait
  • 365
  • 1
  • 14
4
votes
4 answers

JQuery calling a function while you drag an item

I am new to jQuery. But I would like to use its drag and drop functionality in my project. While I drag my item I would like to call a function but to not cancel my dragging. I want to be still holding the item after running the function. Here is…
akd
  • 6,538
  • 16
  • 70
  • 112
4
votes
1 answer

jq select and contains error: null (null) and string ("randomtext1") cannot have their containment checked

command: cat test.json | jq -r '.[] | select(.["$link"] | contains("randomtext1")).id' I was expecting to have both ids (a and b) show up as result of the above command since they both contains "randomtext1" text under "input"|"obj1"|"$link" and…
Mr Janitor
  • 81
  • 1
  • 8
4
votes
3 answers

Multiple Bounding Boxes containment detection algorithm

Does anyone know of Multiple Bounding Boxes containment detection algorithm (or a implementation references) with the following description: Lets have collection of Axis Aligned Bounding Boxes, some of them may intersect and a simple 3D shape, for…
4
votes
3 answers

jquery dom resizable draggable containment issue

Why is jquery resizable() not resizing to full width and height of the containment id assigned to it. You can try it at http://jsfiddle.net/C8YSU/6/ and see what i mean. Try to resize the created div, it will not resize to full width and height on…
Hussein
  • 42,480
  • 25
  • 113
  • 143
1
2 3 4 5 6 7