Children is the set of all nodes within a hierarchical data structure which have a node above them.
Questions tagged [children]
1638 questions
8
votes
3 answers
Rails, Deleting Children without Deleting Parent using :has_many
I have
class MyContainer < ActiveRecord::Base
:has_many MyObjects, :dependent => :destroy
end
I want to delete all the MyObjects in the container without having to delete the MyContainer. My model does have :dependent => :destroy, however I don't…

Dex
- 12,527
- 15
- 69
- 90
8
votes
3 answers
Get all extended Classes in PHP
Say I got a class like:
class ObjectModel {
}
and I got some other classes like:
class SomeNewClass extends ObjectModel {
}
class SomeOtherNewClass extends ObjectModel {
}
Is there a way to get the children (SomeNewClass &…

Andre Zimpel
- 2,323
- 4
- 27
- 42
8
votes
1 answer
Adding an Image inside a Button programmatically
In WPF:
How can I mimic this in C#? I can't find any method in the Button class that adds children.

Wilson
- 8,570
- 20
- 66
- 101
8
votes
2 answers
JQuery: How to find out how many children an element has?
How can I use jQuery to find out how many children an element has?
Say I have the following structure:

Antonio Moore
- 930
- 4
- 14
- 21
7
votes
3 answers
jQuery: create a javascript ARRAY from an Element's CHILDREN
I am trying to create a JavaScript ARRAY, and get the name of an element's children.
(I do not need span elements, only input, select and textarea)
HTML:
ID:
Date:
…

Omar
- 11,783
- 21
- 84
- 114
7
votes
1 answer
How do you use refs to access the values of mapped children in React?
I have an app that pulls data from a GraphQL database and then .maps it into custom form components (quantity number textboxes). Right now, the components themselves are holding state of their individual quantities, but I need to be able to access…

ep84
- 315
- 2
- 17
7
votes
3 answers
React - how to determine if a specific child component exists?
If I have this structure:
const MyComponent = (props) => {
return (
{props.children}
);
}
and I use it like this:
How can I check to see if…

JoeTidee
- 24,754
- 25
- 104
- 149
7
votes
1 answer
mongodb sorting children of an array in a document
My data looks like this:
{
"name":"dan",
"somestring":"asdf",
"friends":[
{
"name": "carl",
"height":180,
...
},
{
"name": "john",
…

McDermott
- 1,025
- 2
- 16
- 28
7
votes
2 answers
How to get as e.target the exact element at which onClick is specified?
I have a React Component and give it onClick event handler:
function Item(props) {
return {props.children}
}
Then I use the Component like this:
-
This…

olegzhermal
- 799
- 10
- 26
7
votes
1 answer
Swift 3 (SpriteKit): Changing the alpha value of the parent which affects all children
Say for instance I create SKShapeNode and create children for it (an example is a cross and its two intersecting lines). The cross is the parent, and the intersecting lines are the children. How could you change the alpha value of all the parent's…

J.Treutlein
- 963
- 8
- 23
7
votes
2 answers
Windows Forms, getting a property from parent form
I'm having a bit of a problem. I have a datatable in the parent form. I open a dialogbox form that gets the datatable property and creates a checkboxlist. This will be used to export those columns. But when I run the application the parentform…

Joe Chin
- 452
- 5
- 9
7
votes
15 answers
What is a good programming language to start my Grade 1 son learning?
Possible Duplicates:
How to get kids into programming
Suggestions on starting a child programming.
Is there a really simple programming language that I can use to teach my 6 year old son concepts of programming, syntax and logic?

Brent
- 16,259
- 12
- 42
- 42
7
votes
2 answers
NHibernate save / update event listeners: listening for child object saves
I have an Area object which has many SubArea children:
public class Area
{
...
public virtual IList SubAreas { get; set; }
}
he children are mapped as a uni-directional non-inverse relationship:
public class AreaMapping :…

James Allen
- 6,406
- 8
- 50
- 83
7
votes
3 answers
Getting child element of a child element of a parent with ID
I need to get to the child of the child of the child of an element with an id = "part1" with javascript. So essentially, I want to get to the 3rd row of the 3rd table of the span element but I can't seem to get it to work :(

Alpotato
- 103
- 1
- 1
- 7
7
votes
2 answers
Silverlight: Find all controls of type in layout
I'm looking for a reliable method to build a list of controls of contained in a specific derived control - this includes those that are direct children, and those which are children of children and so on.
The most obvious way was to…

David
- 24,700
- 8
- 63
- 83