containers

Share a (container)control from a (custom)control?

Soo... I am making a control like the Windows Update "panels". Everything's fine up to the "container" part. What I want to do is to allow the designer to place controls in a Panel which is inside my control. (The panel's variable is held in my control's class and inside the control itself.) How do I bypass this? As a reference, yo...

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. ...

Why does storing references (not pointers) in containers in C++ not work?

In my program I have a STL set. set<string> myStrings; To improve efficiency I changed it to only hold pointers. (I don't need actual string copies to be stored.) set<string*> myStrings; I read that it is a good practice to substitute pointers with references when possible. (Of course only if the actual functionality of a pointer i...

how can I implement iteritems function for my custom iterator?

Objective of the following program is to learn python generators and iterator implementation,in order to understand Python magic methods, I've started working on the following example, Here goes my code, I've stucked implementing the iteritems function - also I want to know whether I'm going on right direction or I'm conceptually wrong ...

How to addClass() to the pictures of a certain format

Hi, I need to style images of a JPG format only. (jQuery) I need class to be applied to jpeg's when it's placed in specific container (not all jpg's on the page). For example: <img src="non-jpeg.jpg"> <!--no changes made--> <img src="jpeg-image.jpg"> <!--no changes made--> <div class="spec-container"><img src="jpeg-image.jpg"></div> ...

Assigning null to ArrayList items in Java

Hi, I have the following code: static ArrayList<PreparedStatement> alPrepStmts = new ArrayList<PreparedStatement>(); static PreparedStatement m_stmtOne; static PreparedStatement m_stmtTwo; static PreparedStatement m_stmtThree; ... static PreparedStatement m_stmtOneHundred; private static void init() { alPrepStmts.add(m_stmtOne); ...

flex4: removeAllElements removes the element from the stage but does not delete it completely

I have a container (vgroup) that has some timers and event listeners attacked to it. when i remove the element from the page i can see that it's still running (by having a timer that sends a trace message). how can i make sure that the object is completely erased ?! kfir ...

J2EE containers allow direct server sockets?

Hi, I have a question, that may sound strange. I am interested to know if J2EE containers allow to the applications deployed, to open direct server sockets (by-passing essentially the container) for their own purposes. I know that it is strange to want to do that, but the reason I am asking is because, I have read that a javax.xml.endoi...

How prevent container control from being moved in user control during design-time?

I have a custom control that contains 6 panel controls that act like containers for other controls that are dropped in during design time. This was done by creating a custom designer inheriting from ParentControlDesign. In the designer, I use EnableDesignMode to enable design time functionality for each panel control. The problem is t...