Questions tagged [containers]

A container is a class, a data structure, or an abstract data type whose instances are collections of other objects. Containers typically make use of generics or templates so that a wide variety of objects can be added.

Containers are available in most programming languages, allowing programmers to store, transfer, and read back data within a program. Common containers include arrays, lists, queues, stacks, sets, and maps, each providing different levels of efficiency for tasks such as adding or removing elements, searching for elements, or iterating through elements.

11206 questions
19
votes
2 answers

Spark on YARN resource manager: Relation between YARN Containers and Spark Executors

I'm new to Spark on YARN and don't understand the relation between the YARN Containers and the Spark Executors. I tried out the following configuration, based on the results of the yarn-utils.py script, that can be used to find optimal cluster…
19
votes
3 answers

OS containers isolation vs process isolation

How is the isolation provided by operating system containers different than that provided by the kernel between many processes? Each process is already isolated from any other process running on the same kernel. How is this isolation different than…
berkeleyjuan
  • 516
  • 4
  • 10
19
votes
8 answers

Caching the end iterator - Good idea or Bad Idea?

Generally speaking is it a good idea to cache an end iterator (specifically STL containers) for efficiency and speed purposes? such as in the following bit of code: std::vector vint; const std::vector::const_iterator end =…
Hippicoder
  • 1,565
  • 3
  • 17
  • 21
19
votes
3 answers

What container to store unique values?

I've got the following problem. I have a game which runs on average 60 frames per second. Each frame I need to store values in a container and there must be no duplicates. It probably has to store less than 100 items per frame, but the number of…
KaiserJohaan
  • 9,028
  • 20
  • 112
  • 199
19
votes
4 answers

How do I position two divs horizontally next to each other?

On two different projects I learned two different methods of positioning two divs horizontally next to each other. Is one better than the other, or is it just a matter of personal taste, or maybe one is only working by coincidence? Method…
Michel
  • 23,085
  • 46
  • 152
  • 242
18
votes
5 answers

Is it possible to do a partial string match on a Dictionary string key?

I have a Dictionary> in my code which I am using in the following manner: Key Values 2011-07-15 1, 2, 3 2011-07-20 4, 5, 6 2010-02-11 7, 8, 9 My code needs to be able to query for all values matching a…
LeopardSkinPillBoxHat
  • 28,915
  • 15
  • 75
  • 111
18
votes
11 answers

Not able to start docker Desktop in Windows

I am not able to start the Docker container in Microsoft Windows 10 profession. As I found the cause of this error is due to the docker engine is failing to start. After installing docker I am able to run only the docker version command. -> docker…
user3552342
  • 657
  • 1
  • 5
  • 14
18
votes
4 answers

What does this mean in Prism/Unity: Container.Resolve()

(from the StockTraderRIBootstrapper.cs file in the Prism V2 StockTrader example app) What is the difference between this: ShellPresenter presenter = new ShellPresenter(); and this: ShellPresenter presenter = Container.Resolve(); I…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
18
votes
1 answer

How to run docker images in containerd using ctr in CLI?

Am exploring on how to use containerd in place of dockerd. This is for learning only and as a cli tool rather than with any pipelines or automation. So far, documentation in regards to using containerd in cli (via ctr) is very limited. Even the…
BharathYes
  • 787
  • 2
  • 9
  • 25
18
votes
2 answers

Install Oracle Instant client into Docker container for Python cx_Oracle

I'm trying to connect to an Oracle database at my company through my docker container that contains some of my python scripts with the package cx_Oracle. After i build and run the container, i get the following error: conn =…
codemonkey
  • 515
  • 2
  • 6
  • 18
18
votes
6 answers

Unable to resolve domain names inside docker container

I'm runing a linux VM in virtualbox on my windows PC. I installed docker in the VM. Then I started an alpine container using docker run -it alpine. In this container, I can ping external IPs successfully. But when I tried to ping domain names, e.g.…
user1576177
  • 181
  • 1
  • 1
  • 5
18
votes
1 answer

Docker Unknown flag --mount

I want to mount a directory from the host to a container using the mount flag over volume but I am getting ` This is only experienced when using mount flag and not with volume *Command:* docker run -d -it --name devtest --mount…
Ndifreke
  • 732
  • 1
  • 8
  • 13
18
votes
2 answers

What are the advantages of running Jenkins in a docker container

I've found quite a few blogs on how to run your Jenkins in Docker but none really explain the advantages of doing it. These are the only reasons I found:reasons to use Docker. 1) I want most of the configuration for the server to be under version…
qacwnfq q
  • 335
  • 1
  • 2
  • 8
18
votes
1 answer

docker-compose: connection refused between containers, but service accessible from host

TL;DR: How do I have to change my below docker-compose.yml in order to allow one container to use a service of another over a custom (non-standard) port? I have a pretty common setup: containers for a web app (Padrino [Ruby]), Postgres, Redis, and a…
crn
  • 323
  • 1
  • 2
  • 8
18
votes
10 answers

How to increase width of Bootstrap container on Max width?

I've placed a DataTable within a Bootstrap div of type container. When I run the website on the browser's max width the container for the table adds a scrollbar and cuts off the last column in the table. I did try using a container-fluid div type as…
Brian Var
  • 6,029
  • 25
  • 114
  • 212