containers

Why does zooming out cause CSS change to only one portion of my content?

http://dontcare.99k.org/demo/addpages.php.htm Try zooming out and you'll see that the small boxes on the left break apart and spill outside of their container. I'm not sure why this is happening. Please help, Many thanks!! ...

STL containers , remove object from two containers

Hello . Suppose I have two containers , holding pointers to objects ,which share some of their elements . from http://www.cplusplus.com/reference/stl/list/erase/ it says that : This effectively reduces the list size by the number of elements removed, calling each element's destructor before. How can I remove an object from b...

container of mixed types in C++ (similar to nsdictionary)

What I would like to do (in C++) is create a 'Parameter' data type which has a value, min, and max. I would then like to create a container for these types. E.g. I have the following code: template <typename T> class ParamT { public: ParamT() { } ParamT(T _value):value(_value) { } P...

Third tab panel is not accessible in Ajax tab container

Hi, I have an ajax tab container in an aspx page. Earlier I had 2 tab panels in the tab cotnainer. Now I want to add third tab panel. I could add the third panel but I am able to access the third panel, i.e. When I click on third panel, the panel is not shown(I didnt even get the handy cursor when i place the cursor on the third tab pane...

css image placement

I have a full width container (100%) and i like to have a image inside NOT A BACKGROUND for clicking purpose... How can i center the image into the container horizontally ? here is a sample : http://notrepanorama.com/test/ Solution : .centerimage { margin-left: -960px; width: 1920px; left: 50%; position: absolute...

Auto-incrementing C# container ID

Hey, If I have a list of objects, for example List<Cake>, is it possible to have a private int key in the Cake object that will store an auto-incremented value every time I add to the list. My reason for wanting this is so that I can populate a combobox containing all the "Cakes" in my list with a unique value for each element that I d...

Multi-agent system in C++ code design

Hi everyone, I have a simulation written in C++ in which I need to maintain a variable number of agents, and I am having trouble deciding how to implement it well. Every agent looks something similar to: class Agent{ public: Vector2f pos; float health; float data[DATASIZE]; vector<Rule> rules; } I need to maintain a v...

Is there a standard way to convert from container<Type1> to container<Type2> ?

I have two classes A and B, and an implicit conversion operator exists to go from one to the other, so that: A a; B b; b = a; // Works Is there a standard way to convert a std::list<A> to a std::list<B> ? (Or even from std::vector<A> to a std::list<B>). I know I can iterate trough to the list and build the second list item by item, b...

Comparing data bytewise in a effective way (with c++)

Question: Is there a more effective way to compare data bytewise than using the comparison operator of the c++ list container? I have to compare [large? 10kByte < size < 500kByte] amounts of data bytewise, to verify the integrity of external storage devices. Therefore I read files bytewise and store the values in a list of unsigned cha...

Java availableProcessors() in a Solaris Container

I'm using a Solaris Container with 2 cores (the physical machine has 32 with 8 threads, each one) to run a jvm (BEA Jrockit). The surprise is: Runtime.getRuntime().availableProcessors() returns 256 rather than 2 or, say 16. That is, the application (a sealed product) believe in 256 cores available, what may cause performance issues. A...

Android: Sliding button container widget

I am running out of room on my app for buttons, so I want to stick them into some sort of sliding container, like the one at the top of the Astro File Manager app. How do I go about doing this? I've Googled this and can't find anything. ...

storing mem_fun in a standard container

Is there a way to create a vector< mem_fun_t< ReturnType, MyClass > > ? The error i'm seeing is: error C2512: 'std::mem_fun1_t<_Result,_Ty,_Arg>' : no appropriate default constructor available ...

Problems with C++ containers

I have a std::list in a C++ program, which contains objects of a Class A. Lets say I have 10 objects in it. I have a reference to the 6th object stored, in another data structure say ref_6. Lets say I need to remove the 8th element from my list. To do this, I would use pop_front 8 times and store 8 objects in a vector and use push_front...

C++: How do I write a function that accepts an iterator and inserts elements?

template<class Container> void BlitSurface::ExtractFrames(Container & output, int frame_width, int frame_height, int frames_per_row, int frames_per_column, bool padding) const { SDL_Surface ** temp_surf = SDL_Ex_ExtractFrames(_surface, frame_width, fram...

A container for accessing contents by 2d/3d coordinates

There are a lot of games that can generally be viewed as a bunch of objects spread out through space, and a very common operation is to pick all objects in a sub-area. The typical example would be a game with tons of units across a large map, and an explosion that affects units in a certain radius. This requires picking every unit in the...

How do I avoid invoking the copy constructor with insertion iterators.

template<typename OutputIterator> void BlitSurface::ExtractFrames(OutputIterator it, int frame_width, int frame_height, int frames_per_row, int frames_per_column, bool padding) const { SDL_Surface ** temp_surf = SDL_Ex_ExtractFrames(_surfa...

Implementation of an enforced one-to-many relationship in C#?

In my app, I'm working with Simfile and Notechart objects. A Simfile is essentially a Notechart container, with the following constraints: 1) Every Notechart must be contained in exactly one parent Simfile, at all times. 2) Given a Simfile object, I need to be able to obtain all of its contained Notecharts (should be easy). 3) Given a N...

php container class: why does everyone use the more complicated method?

Hello, I have a question I was wondering for a while, often when I find scrips for php or look at php frameworks I see a "registry class" or a "container class" which often holds variables or other objects utilizing the __get magic method. Here is a oversimplified example of what I mean: example 1: class container { private $objects;...

Which sorted STL container to use for fast insert and find with a special key?

Hi, I have some data with a key associated with each data item. The key is made of two parts: let's call them color and id. I want to iterate the container by color to speed up rendering and I also want to find items in the container by id alone. I tried using std::map for this with a key class MyKey { public: int color; int id; ...

specifying a css div container so that elements exceeding its height continue in its next 'column'

Hi, How do I specify a css div container so that it enforces column-like behavior, such that when the height of the container is exceeded by the elements in its first 'column', the elements simply continue in the next 'column' of the container. My goal is not to specify columns but just the i) the container height and ii) whatever prope...