family-tree

“Family Tree” Data Structure

霸气de小男生 提交于 2019-12-17 10:29:33
问题 I'm looking for a way to represent a family tree in PHP. This means that children will need to inherit from two (or more) parents. Here are the requirements: 1, 2, or more parents Bonus points if I can attach metadata like a last name or relationship status Here is my non-working attempt (no arrays as keys, sadly): $tree = array( 'uncle' => false, // no children array('mom', 'dad') => array( 'me' => false, array('brother', 'sister-in-law') => array( 'niece' => false ) ) ); The question is,

How do you create a family tree in d3.js?

时间秒杀一切 提交于 2019-12-17 03:50:47
问题 I'm currently working on a small genealogy experiment and would like to implement a simple family tree like in the picture below. The best search results so far for this only yielded examples where a child can only have a parent node. But what I need is the ability to create links between entities (from father to mother) and links between nodes and other links (from child to the father-mother link). Currently I don't have a fixed data schema for this. I've chosen d3.js for this because it

creating horizontal tree with css

随声附和 提交于 2019-12-12 16:45:14
问题 I have an array that i populate a genealogy table with. It is in order like this: ---------3 ----1 --------4 0 --------5 ----2 --------6 and so on... an example is http://bullybloodlines.net/dogdetails.php?name=muscletone%27s+lucky+bam+bam+of+power+line+bullys my code for this is: <?php $generations = 4; $genTableArray = array(); for($genCol = 0; $genCol <= $generations; $genCol++) { $genRowCount = pow(2, $genCol); $rowspan = pow(2, $generations) / $genRowCount; for($familyGenCount=0;

determine the old line of succession prolog

妖精的绣舞 提交于 2019-12-11 04:47:23
问题 Given the british royal family, Using only male(X),female(X) and parent(X,Y) where the parent of X is Y, how to create the line of succession(X,Y) where Y is the successor of X in prolog I have defined all the males and female and parent I have tried this as well: son(X,Y) :- parent(X,Y), male(Y). daughter(X,Y) :- parent(X,Y), female(Y). successor(X,Y):- (son(X,Z);daughter(X,Z)) , (Y=Z;successor(Z,Y)). apparently it only work before anne after louise, it should go anne but not peter... I have

Grappa Graphviz dot-Visualization Problem and Questions

萝らか妹 提交于 2019-12-10 09:57:30
问题 i am using this dot-Code for my Test: digraph G { edge [dir=none]; p1 [shape=circle,style=filled,label="",height="0.01",width="0.01"]; q1 [shape=circle,style=filled,label="",height="0.01",width="0.01"]; q2 [shape=circle,style=filled,label="",height="0.01",width="0.01"]; q3 [shape=circle,style=filled,label="",height="0.01",width="0.01"]; {rank=same; father->p1; mother->p1}; {rank=same; q1->q2->q3}; {rank=same; son1; daughter1; daughter2}; p1->q2; q1->son1; q2->daughter1; q3->daughter2; } My

Node placement in family tree visualization with Dot/Graphviz

自作多情 提交于 2019-12-08 09:16:35
问题 I'm trying to generate family tree visualizations from a database using Dot/Graphviz. First results look promising, but there is one layout issue that I haven't been able to fix yet. When I use the code listed below, it will produce I'm totally happy with this. But as soon as I try to add another node between families F4/M4/M5 and F2/M2, which can be done by uncommenting the two lines in the code below, it will give me Male2 is now placed far away from Female2 and between Female4 and Male4.

Pedigree/Family tree chart from database

℡╲_俬逩灬. 提交于 2019-12-06 15:38:22
问题 I am trying to generate pedigree (in other words family tree :) ) table from database... My schema: CREATE TABLE `horses` ( `horse_id` int(10) NOT NULL AUTO_INCREMENT, `horse_name` varchar(32) NOT NULL, `horse_sire` int(10) DEFAULT NULL, `horse_dam` int(10) DEFAULT NULL, PRIMARY KEY (`horse_id`), KEY `FKsire` (`horse_sire`), KEY `FKdam` (`horse_dam`), CONSTRAINT `FKdam` FOREIGN KEY (`horse_dam`) REFERENCES `horses` (`horse_id`), CONSTRAINT `FKsire` FOREIGN KEY (`horse_sire`) REFERENCES

Grappa Graphviz dot-Visualization Problem and Questions

微笑、不失礼 提交于 2019-12-05 20:47:44
i am using this dot-Code for my Test: digraph G { edge [dir=none]; p1 [shape=circle,style=filled,label="",height="0.01",width="0.01"]; q1 [shape=circle,style=filled,label="",height="0.01",width="0.01"]; q2 [shape=circle,style=filled,label="",height="0.01",width="0.01"]; q3 [shape=circle,style=filled,label="",height="0.01",width="0.01"]; {rank=same; father->p1; mother->p1}; {rank=same; q1->q2->q3}; {rank=same; son1; daughter1; daughter2}; p1->q2; q1->son1; q2->daughter1; q3->daughter2; } My Java Code to create the Graph is the following: Graph graph = null; graph = program.getGraph();

Family Tree CSS

人走茶凉 提交于 2019-12-05 14:03:03
Is there a way to get a child element to follow its parent? The problem is that if there is only one child and the parent has a huge text to it, the position of the connector becomes really bad. How can I fix it? Fiddle demo * {margin: 0; padding: 0;} .tree ul { padding-top: 20px; position: relative; transition: all 0.5s; -webkit-transition: all 0.5s; -moz-transition: all 0.5s; } .tree li { float: left; text-align: center; list-style-type: none; position: relative; padding: 20px 5px 0 5px; transition: all 0.5s; -webkit-transition: all 0.5s; -moz-transition: all 0.5s; } /*We will use ::before

graph database for genealogy [closed]

隐身守侯 提交于 2019-12-05 05:56:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . could someone point me to a working use of a graph database for genealogy? I would like to learn neo4j and I use python so I was looking to make a genealogy graph db for myself to learn graph db's. I searched for examples to emulate and learn from (any graph db, any language) but was surprised how little I found.