containers

How do stl containers get deleted?

How does container object like vector in stl get destroyed even though they are created in heap? EDIT If the container holds pointers then how to destroy those pointer objects ...

What language(s) for very large lists?

Java (and maybe the underlying C-ish code) has max capacity of Integer.MAX_VALUE (~ 2 billion) for arrays and containers in java.util. Are there other languages that feature containers with larger capacities? ...

Is my parameters storing paradigm good?

Hi. I develop next application parameters storing paradigm: There is enum for each parameter roles enum ParameterRole { FileName, FileDir } Parameters are contained in special container as object class ParamContainer : Dictionary(ParameterRole, object) { public new object this[ParameterRole role] { get { if (base.Contain...

simple C++ templates suited for STL Containers

I need a template like this, which work perfectly template <typename container> void mySuperTempalte (const container myCont) { //do something here } then i want to specialize the above template for std::string so i came up with template <typename container> void mySuperTempalte (const container<std::string> myCont) { //check...

Why does C# List<T>.Find seemingly return NullReferenceException?

First off, according to http://msdn.microsoft.com/en-us/library/x0b5b5bc.aspx, the List.Find method is only listed as throwing ArgumentNullException. However I have the following test code which, when using Find with an anonymous delegate, throws a NullReferenceException when the object being searched for is not found. namespace MyTest...

How can I shift elements inside STL container

I want to shift elements inside container on any positions to the left or right. The shifting elements are not contiguous. e.g I have a vector {1,2,3,4,5,6,7,8} and I want to shift {4,5,7} to the left on 2 positions, the expected result will be {1,4,5,2,7,3,6,8} Is there an elegant way to solve it ? ...

How to store a url which is rejected by a security filter, to go to it after the user logs in

I use application managed security for an Intranet web application. I have the next filter in my web.xml file: <filter> <filter-name>employeeAccessFilter</filter-name> <filter-class>security.AuthorizationFilter</filter-class> <init-param> <param-name>roles</param-name> <param-value>employee</param-value> </init-pa...

In which scenario do I use a particular STL Container?

Greetings :) I've been reading up on STL containers in my book on C++, specifically the section on the STL and it's containers. Now I do understand each and every one of them have their own specific properties, and I'm close to memorizing all of them... But what I do not yet grasp is in which scenario each of them is used. Could a kind...

Best c++ container to strip items away from?

I have a list of files (stored as c style strings) that I will be performing a search on and I will remove those files that do not match my parameters. What is the best container to use for this purpose? I'm thinking Set as of now. Note the list of files will never be larger than when it is initialized. I'll only be deleting from the con...

How to display a popup from an external file in YUI ?

I am starting using YUI's Container control in my application to display messagebox popups and other dialogs. I am not clear what the recommended/cleanest way to create a popup sourced from an external HTML file would be. I'm talking about a popup showing 'further information' about a product - which would contain text and images. The ...

Using Spring Pitchfork to have JEE compliant code that runs in non-JEE container

I am facing the decision to abandon Java EE 5 (JEE) container to use web container instead (with Spring). According to Interface21 Spring Pitchfork allows elements of the JEE programming model to be used in Spring. Thus, I get a subset of JEE annotations inside of Spring container. Since I prefer to maintain compatibility with JEE this l...

Best way to iterate through a container

What are the Advantages/Drawbacks of these two ways of iterating through a container / which one do you prefer and why: for (MyClass::iterator i = m.begin(), e = m.end() ; i != e ; i++) { // ... } or for (MyClass::iterator i = m.begin() ; i != m.end() ; i++) { // ... } Subsidiary question: i++ or ++i? Why? ...

Extract element from 2 vectors?

I have 2 vector of with one has vec1{e1,e2,e3,e4} and the other one with vec2 {e2,e4,e5,e7} How to effectively get three vector from above vectors such that 1.has elements that is available only in vec1 similarly 2 has only vec2 elements and 3.with common elements ...

Specify authentication in container rather than web.xml

We distribute our web-application to our customers as a .war file. That way, the user can just deploy the war to their container and they're good to go. The problem is that some of our customers would like authentication, and use the username as a parameter to certain operations within the application. I know how to configure this using...

Jade Agent Containers

Can anyone tell me how to find available agent containers through java code? I am using the JADE agent framework and I have figured out how to create new containers but not find existing containers (so that agents can be deployed in them). ...

What OSGi Container Do You Recommend ?

For the purposes of building a service framework that works quietly behind the scenes in the JVM, logically separated from whatever the primary application running is, it seems like OSGi really lends itself to this purpose. Some of my challenges are class loader segregation, versioning, "plugability" and.... what's the term?.... updateab...

What container can I use to write binary?

I want to write a c array into a container and i prefer to modify it if possible. I was thinking of using vector but it does seem to have a write(*pchararray, len); function. String looked like the next best thing but that too doesnt have a write function? ...

jQuery FlyDown/FlyUp Menu sub-container

Hi there, I was wondering if its possible for anyone to provide me with a guideline for creating a menu using jQuery that is similar to Telerik's MultiColumn RadMenu (http://demos.telerik.com/aspnet-ajax/menu/examples/multicolumnmenu/defaultcs.aspx). I am desperate to make this work, and I don't want to fork out a pot-load of money for ...

container for quick name lookup

I want to store strings and issue each with a unique ID number (an index would be fine). I would only need one copy of each string and I require quick lookup. I check if the string exist in the table often enough that i notice a performance hit. Whats the best container to use for this and how do i lookup if the string exist? ...

HTML 'container' tags - proper usage?

For some time I've been making websites, but have never really seen discussion of the proper usage of the container tags. I've seen any number of different types of content in the collection tags, but it usually seems that the page creator just picks a style they like and sticks with it. The main discrepancy in my mind is that between ...