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
31
votes
3 answers

Communicating between Docker containers in different networks on the same host

Any possibility to make containers in different networks within the same host to communicate? Please note that I am not using docker-compose at the moment. The following is a summary of what I did. I created two networks using the following…
Abraham Jaison
  • 469
  • 1
  • 6
  • 14
31
votes
2 answers

How to get a last element of ES6 Map without iterations?

How to get a last element of ES6 Map/Set without iterations(forEach or for of) pass through a full length of the container?
Kirill A. Khalitov
  • 1,225
  • 4
  • 16
  • 24
31
votes
3 answers

How to set min-height for bootstrap container

I have some issues with the container in bootstrap. My goal is to have a container which is only as high as the content. For example:
In the example above, the…
Clems
  • 445
  • 1
  • 5
  • 11
31
votes
2 answers

Lazy vs Strict implementations of data structures

There's a list of data structures having lazy and strict implementations: Data.Map.Lazy and Data.Map.Strict Data.IntMap.Lazy and Data.IntMap.Strict Data.HashMap.Lazy and Data.HashMap.Strict Data.ByteString.Lazy and…
Nikita Volkov
  • 42,792
  • 11
  • 94
  • 169
31
votes
13 answers

Why STL containers are preferred over MFC containers?

Previously, I used to use MFC collection classes such CArray and CMap. After a while I switched to STL containers and have been using them for a while. Although I find STL much better, I am unable to pin point the exact reasons for it. Some of the…
Naveen
  • 74,600
  • 47
  • 176
  • 233
31
votes
5 answers

"Container is not defined" Google chart

I have solved my issue but can't answer it myself since I am too new to this site: turns out I needed to use the following: chart = new google.visualization.PieChart(document.getElementById('pie_today_div')); I was using JQuery to access the…
Mike
  • 321
  • 1
  • 3
  • 6
30
votes
4 answers

NodeJS 14.x - Native AWS Lambda Import/Export Support

I am looking to make use of the native import/export that comes with ES6. I am using Serverless Containers within AWS Lambda. I have my Dockerfile which looks like this: FROM public.ecr.aws/lambda/nodejs:14 COPY app ./ RUN npm install CMD […
user3180997
  • 1,836
  • 3
  • 19
  • 31
30
votes
4 answers

Is it recommended to use Database as a container in Production environment?

Assuming we are using a micro service architecture for a product and we decide to use 'Database per service' model, and deploy in cloud servers by provider like AWS. It is convenient to have databases running as a container for development and test…
30
votes
8 answers

Update max_map_count for ElasticSearch docker container Mac host

I'm using this container to start elasticsearch in docker. In accordance with the manual I have to update max_map_count to start the container sudo sysctl -w vm.max_map_count=262144 but.. I can update it in my host (container) AFTER I start it…
Mando
  • 11,414
  • 17
  • 86
  • 167
30
votes
3 answers

Get Docker Container CPU Usage as Percentage

Docker provides an interactive stats command, docker stats [cid] which gives up to date information on the CPU usage, like so: CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O 36e8a65d 0.03% 4.086 MiB/7.798 GiB …
Dan LaManna
  • 3,431
  • 4
  • 23
  • 35
29
votes
2 answers

General use cases for C++ containers

What are the general use cases for the C++ standard library containers? bitset deque list map multimap multiset priority_queue queue set stack vector For example, a map is generally better for a paired search.
Elpezmuerto
  • 5,391
  • 20
  • 65
  • 79
29
votes
4 answers

Access container view child properties swift

What I want to achieve: User presses the button in the ViewController then, the color of the button placed in the container view should change its color to red. How can I get access of the button placed in the container view, from the…
Tom el Safadi
  • 6,164
  • 5
  • 49
  • 102
29
votes
2 answers

Download shared App Group Container from XCode

Is it possible to download a shared app group container with XCode similar to how the sandboxed container is downloaded for a particular app? I haven't been able to find any definitive Apple documentation on this.
user3508447
  • 291
  • 3
  • 4
29
votes
2 answers

WPF: What is the generic container control?

In HTML the generic container control is a DIV. It doesn't do a anything on its own, but it makes for a great place to hang stuff off. Likewise in WinForms the generic container control was the Panel. Again, this is what I would use as a place…
Jonathan Allen
  • 68,373
  • 70
  • 259
  • 447
29
votes
3 answers

Tomcat--Web Server or Web Container?

I've a small doubt in my mind; could anyone please clarify me is the Tomcat web server or Web container?
Pauo
  • 315
  • 2
  • 4
  • 6