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

Container doesn't resize itself after invoking validate

After manually swapping components via add and remove, I invoke validate() on the container. According to the documentation, The validate method is used to cause a container to lay out its subcomponents again. It should be invoked when this…
mre
  • 43,520
  • 33
  • 120
  • 170
3
votes
1 answer

avoiding code duplication in const and non-const member functions

Well I'm currently refactoring a class I made quite a long time ago. The class is a container type. Many functions can use advantage of the class structure, and are thus implemented as member functions. However it now seems to be a lot of function…
paul23
  • 8,799
  • 12
  • 66
  • 149
3
votes
1 answer

Unity Container, Interface infinite loop

I need help with configuring MS Unity. I have a class implementing an interface: public class ProjectService : IProjectService which works fine with this configuration: _conainer.RegisterType(); I another, caching,…
3
votes
8 answers

Which one to use c++ stl container or the MFC container?

For every stl container there is a MFC container available in visual c++.Which is better than the other one in what sense and what do you use? I always use STL container is that wrong?
yesraaj
  • 46,370
  • 69
  • 194
  • 251
3
votes
3 answers

What is the best way to access elements of a class member container from outside that class in c++?

In the following example, using pointers has caused me some complications that I'd like to avoid. So I'm wondering that the correct way of dealing with this situation would be. So I have a struct called Cars. It's a container to hold objects of…
3
votes
1 answer

Rights to read /dev/tty0 from pod

I'm trying to understand how securityContext work in my cluster (k8s v 1.24 & the node is an Ubuntu 18.04). I simply want to do a simple cat /dev/tty0 from the container. Here is my simplified configuration of the node : bash-4.2# ls -al…
Ptiseb
  • 795
  • 1
  • 7
  • 19
3
votes
0 answers

Java JIT/Inline compiler memory causing container OOMKilled event

I recently upgraded my web application from OpenJDK 8 to OpenJDK 17. During upgrade testing we realized that containers are being killed with OOMKilled (137) status. VM parameters provided for application -Xms1024m -Xmx1024m…
Viraj C
  • 33
  • 5
3
votes
2 answers

Custom Button using Stack

How to create button using stack widgets and curved desgin with out background images.
Mathan Tr
  • 47
  • 3
3
votes
0 answers

How to import an existing Linux WSL machine to use with podman desktop?

Currently you can run podman machine init, which will download Fedora CoreOS and install a new WSL distro. But is it possible to install a custom WSL distro (e.g., Debian), install podman on it and finally add it to the podman installed on windows…
3
votes
1 answer

Can't get microk8s running on my Ubuntu 22.04

As the title says, I am unable to start microk8s on Ubuntu 22.04. I have done the following: sudo snap install microk8s --classic --channel=1.17/stable Result: microk8s (1.17/stable) v1.17.17 from Canonical✓…
3
votes
1 answer

How to use HeapDump and JFR properly?

I'm running a Java application using a container, but I'm trying to output a HeapDump when an OutOfMemoryError occurs. However, there is also an opinion that it is better to use JFR. Please tell me how to use these. Also, I'm worried that the size…
YutaSaito
  • 387
  • 6
3
votes
1 answer

Persist data inside Azure container app that runs Postgres DB

I am new to Azure Container Apps. I had a requirement to deploy set of applications to Azure container apps. There was a problem with the setup when I deploy my Postgres DB as container when the container shut down data in the container will…
3
votes
2 answers

Is flat_map an STL container?

In the current draft of C++23s flat_map design, the type flat_map::reference is defined as pair, i.e. it is not a reference to flat_map::value_type = pair. (This seems to be mandatory, since the…
tommsch
  • 582
  • 4
  • 19
3
votes
0 answers

Codeforces 519B Using Vectors vs Some Other Container

To solve 519B I created three vectors that each hold different numbers and occurrences of those numbers for each line. These vectors are also sorted. eg if the line was 1 1 3 2, the vector would store <1, 2>, <2, 1>, <3, 1> From there, I would…
3
votes
1 answer

This error may indicate that the docker daemon is not running

I am new to Docker and after writing docker version in cmd I got this error: error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open…
1 2 3
99
100