parent-child

Multiple children in single form in rails

I have a model that has an arbitrary number of children entities. For simplicity lets call the entities Orders and Items. I would like to have a create Orders form where I input the order information, as well as add as many items as I want. If I click the "Add another item" button, a new set of form elements will be added to input the ne...

AS3 Accessing Variables of Parent Class From Child

i'm trying to assign a parent's variable from the parent's child //Parent public class Main extends Sprite { public var selectedSquare:Sprite; public function Main() { //inits and adds new Square child class to display list } ... ------- //Child public function dragSquare(evt:MouseEvent):void ...

How to transform vertical table into horizontal table?

Hello, I have one table Person: Id Name 1 Person1 2 Person2 3 Person3 And I have its child table Profile: Id PersonId FieldName Value 1 1 Firstname Alex 2 1 Lastname Balmer 3 1 Email [email protected] 4 1 Phone +1 2 30004000 And I want to get data from these two tables in one row ...

T-SQL: Build Nested Set From Parent-Child Relationship

I have a table that stores my Customer hierarchy with a nested set (due to the specific design of the application, I wasn't able to leverage just a Customer/Parent Customer mapping table). To simplify maintenance of this table, I've built a couple of stored procedures to handle moving nodes around and creating new nodes, but it's signif...

how to access a different movieclip within the flash in AS3

I've been trying to learn Action Script 3 the past few weeks, making tiny interactive games to learn the basics. I stumble upon a problem every now and then but most of the times google helps me out. But this problem has got me stuck so please help: The main stage contains two objects(movieclips), the player and a wall. The player has ...

css3 nth child question

Hello. I am designing a 960px wide layout with an unordered list. Each list item is 240px wide, so 4 list items fit horizontally in a row. I have about 20 rows on the page.... I want every other list item to have a background of #ececec, so my css would be: ul li:nth-child(2n+2){ background-color:#ececec; } This works. The only p...

using jquery as an alternative to css nth child

Hi. I am using the following css to create list items with a chckerboard background ( every other list item has a grey background, which shift every row to create a checkerboard pattern: li:nth-child(8n+2), li:nth-child(8n+4), li:nth-child(8n+5), li:nth-child(8n+7) { background-color:grey; } Is there way I can do this using jquery...

C#: considering parent- child win forms, how much code should we put in the parent form?

hi consider we have 2 data entry win forms : form1 (parent) and form 2 child of that parent. As all we know, we can simply declare virtual methods in order to be overridden by any child in future. my question is how to construct blueprint of the parent form methods? I mean every method should be virtual? or what? Thank you ...

Dynamic Data custom page Insert to parent/child clears our parent but not child listviews

I'm new to Dynamic Data applications so please forgive me if this isn't clear. I have a custom page for an insert of a parent row. On that page at the bottom is a TabContainer with multiple tabs each with a ListView of a child table. When I click to insert a row for the parent, it clears out the parent properly but in the TabContainer ...

Calling child constructor by casting (ChildClass)parentObject; to track revisions

To track revisions of a Page class, I have a PageRevision class which inherits from Page and adds a revision ID (Guid RevisionID;). If possible, how should I cast an existing Page object to a PageRevision and ensure that the PageRevision constructor is called to create a new revision ID? I could could have a PageRevision(Page page) con...

Transferring object from parent to child

I'm currently developing an Custom Application using the IP.Board framework, which is in PHP, which by default, creates a IPSMember object for the logged-in user. However, I'm developing an additional class, basically class SpecialUser extends IPSMember Is there a way to get the parent object, which is IPSMember to change to Specia...

Is there a way to automatically add classes in multi-level lists with jQuery?

I have a multi-level lists like this: <ul> <li>Item 1 <ul> <li>Item 1's 1st Child <ul> <li>Item 1's 1st Grandchild <ul> <li>Item 1's Grand Grandchild</li> </ul> </li> ...

How do I fork a maximum of 5 child processes of the parent at any one time?

I have the following code, which I'm trying to only allow a maximum of 5 children to run at a time, but I can't figure out how to decrement the child count when a child exits. struct { char *s1; char *s2; } s[] = { {"one", "oneB"}, {"two", "twoB"}, {"three", "thr4eeB"}, {"asdf", "3th43reeB"}, {"asdfasdf", "thr33eeB"}, ...

Why does the add() method in PHP-GTK cause 2 parent-set signals to be emmitted?

I am going through the book PHP-GTK and trying out listing 4-1 One thing I notice is that with the following code some odd output occurs: <?php //listing4-1b.php function setParentFunction($widget) { //get the widgets parent $parent = $widget->get_parent(); //echo a mssg about the widget echo 'The ' . get_class($wi...

Ant calling child project parent project ivy.xml overriding child project ivy.xml

We've got a parent project and a child project java builds using ant and ivy. The child project needs to be able to build independently. When the parent project calls the child project the antfile command - the parent project's ivy.xml overrides the child project's ivy.xml Does anyone know how to keep the child project using its own i...

jQuery | Click child, hides parent

Hey, I have a list of using ul and li: <span class="important">Show/Hide</span> <div id="important" class="hidden"> <ul class="sub"> <li> Value one </li> <li class="child"> <img src="../img/close.png" /> </li> </ul> </div> $(".important").click(function () { $("#important"...

Adding childs to list of parents with jquery /mvc2

Hi, I have a table of products on my page, each product has zero or more colors, the colors are shown as a list beneath the product. After the colors I have a button to add a color. The button will do an ajax call with the parent product id to a controller which will return a JSON object with color information. My problem is where to st...

Linking Listbox child categories

Hello I have few monhts working with aspx, and now I'm developing a shopping cart website. For the employee to upload the products on the DB, every product needs to be linked to a category and sub category, and sub-sub category, and so on. Sometimes the sub-sub categories are up to 5. For example Electronics-TV-LCD-Samsung-40 inches. ...

Query only specified number of items from parent/child categories

I'm having trouble figuring out how to query every item in a certain category and only list the newest 10 items by date. Here is my table layout: download_categories category_id (int) primary key title (var_char) parent_id (int)</pre></code> downloads id (int) primary key title (var_char) category_id (int) date (date)</pre></code> ...

error C3662: override specifier 'new' only allowed on member functions of managed classes

Okay, so I'm trying to override a function in a parent class, and getting some errors. here's a test case #include <iostream> using namespace std; class A{ public: int aba; void printAba(); }; class B: public A{ public: void printAba() new; }; void A::printAba(){ cout << "aba1" << endl; } void B::printAba() new{...