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
24
votes
6 answers

What are the containers in Java

Could anyone please give me a brief full list of containers in Java? Some of the ones I know are Array, Arraylist, Hashtable, HashMap, HashSet, Node, NodeList, TreeNode, and TreeMap.
derrdji
  • 12,661
  • 21
  • 68
  • 78
23
votes
5 answers

How do I make a group box's text bold but not the text of controls contained in it?

I went and created a tab containing a good amount of controls, most of which are contained within what I'll just call the top-level group box. Now I decide I'd like the text of the top-level group box to be bold, but nothing else. When I set the…
RobC
  • 1,303
  • 3
  • 15
  • 32
23
votes
4 answers

What is the easiest way to wrap a raw .aac file into a .m4a container

This question is overflow from the following question: How do I programmatically convert mp3 to an itunes-playable aac/m4a file? Anyway, I learned how to create an aac file and then i found out that an aac is not just an m4a file with a different…
kwork
23
votes
3 answers

Difference between Container port and targetport in Kubernetes?

How is container port different from targetports in a container in Kubernetes? Are they used interchangeably, if so why? I came across the below code snippet where containerPort is used to denote the port on a pod in Kubernetes. apiVersion:…
23
votes
9 answers

How to stop running Container, if error response from daemon is: Cannot Kill Container [...] permission denied?

Tough task: Everytime I try to stop or kill a running container, I get permission denied as an error response from Daemon. I just started learning how to use docker by using a Ubuntu18.04 VM. I was running a container for the first time. I was not…
icoe
  • 539
  • 1
  • 3
  • 9
23
votes
4 answers

Attach to running process inside docker from VS2017

Is there an easy way to debug a process running inside a Linux container on a remote host from Visual Studio? Imagine a scenario where we have multiple services deployed on some remote machine, running inside docker containers - dev environment.…
Tomáš Bezouška
  • 1,395
  • 1
  • 10
  • 25
23
votes
3 answers

Error 1 ERROR: `make' failed when installing sqlsrv

I'm trying to install sqlsrv by using the commands from this page. However, when running pecl install sqlsrv-4.2.0preview I get the error: Error 1 ERROR: 'make' failed. I tried : apt-get update apt-get install build-essential apt-get install…
Edeholland
  • 377
  • 1
  • 3
  • 7
23
votes
2 answers

How can I remove shutdown Docker Service tasks after a rolling update?

I'm using Docker Swarm to test services on AWS. I recently applied an update to the service like this: docker service update --image TestImage:v2 --update-parallelism 2 \ --update-delay 10s TestService2 The update worked as intended, and the…
Haris Khan
  • 442
  • 1
  • 5
  • 10
23
votes
8 answers

kubectl: Connection to server was refused

When I run kubectl run ... or any command I get an error message saying The connection to the server localhost:8080 was refused - did you specify the right host or port? What exactly is this error and how to resolve it?
Rumu
  • 403
  • 1
  • 3
  • 10
23
votes
2 answers

Why Doesn't string::data() Provide a Mutable char*?

In c++11 array, string, and vector all got the data method which: Returns pointer to the underlying array serving as element storage. The pointer is such that range [data(); data() + size()) is always a valid range, even if the container is empty. …
Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
23
votes
14 answers

Is there a concise opposite of "empty"?

Interfaces to string classes typically have of method named IsEmpty (VCL) or empty (STL). That's absolutely reasonable because it's a special case, but the code that uses these methods often has to negate this predicate, which leads to a "optical…
Wolf
  • 9,679
  • 7
  • 62
  • 108
23
votes
4 answers

C++ "move from" container

In C++11, we can get an efficiency boost by using std::move when we want to move (destructively copy) values into a container: SomeExpensiveType x = /* ... */; vec.push_back(std::move(x)); But I can't find anything going the other way. What I mean…
GManNickG
  • 494,350
  • 52
  • 494
  • 543
22
votes
2 answers

Associated types and container elements

I think I may have asked this on Haskell-Cafe at some point, but damned if I can find the answer now... So I'm asking it again here, so hopefully in future I can find the answer! Haskell is fantastic at dealing with parametric polymorphism. But the…
MathematicalOrchid
  • 61,854
  • 19
  • 123
  • 220
22
votes
5 answers

Docker standard_init_linux.go:228: exec user process caused: no such file or directory

Whenever I am trying to run the docker images, it is exiting in immediately. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ae327a2bdba3 k8s-for-beginners:v0.0.1 …
UME
  • 323
  • 1
  • 2
  • 7
22
votes
1 answer

In h264 NAL units means frame.?

I am working on a h264 video codec. I want to know: Is a single NAL unit in H264 equivalent to one video frame?
Jeegar Patel
  • 26,264
  • 51
  • 149
  • 222