Ease of Use – Explore alternatives to a tree view to select a person's race

I work for a company that offers software as a service to the social industry. We revise the selection of races so that we can meet the standard needed for data sharing in healthcare. This means we need to store our data in the HL7 Race specification, which gets pretty complicated: https://www.hl7.org/fhir/v3/Race/cs.html

We originally planned to do a tree view check to select more specific race levels. In practice, however, we have found that the use does not feel very intuitive. People either do not notice that the knots are expanding, or they feel they need to fill them in the most specific way when they do. In general, we find that choosing the breed does not feel intuitive.

Some other possibly useful hints:

  • All levels of the hierarchy must be recorded for reporting
  • There are high revenues in the area of ​​social services and
    The controller must be operable with little to no training.
  • There is a way to configure the control to have levels below a certain level
    The layer is hidden for agencies that do not need it. Some agencies
    have to go at least to the third level.
  • I initially rejected the idea of ​​a search box to find a person's race. People will not necessarily know what they are looking for when they start filling it out.

To tackle the problem of people who feel that they should be the most specific, I had begun to wire a slightly different kind of tree view. It is a tiered check box selection with radio controls that control whether subselection is enabled or not. I am not sure if this really facilitates the selection process.

When a user encounters the control for the first time, this is just a radio button with the options Select and Unknown. If Select is selected, the list of initial check boxes is displayed.

Display of the start selection

When the user selects one or more items from the list, a secondary level is automatically displayed below the option with more option buttons and the next selection level. The default is Unknown, and the check boxes are cleared.

Secondary level is displayed for selection of breeds

When the user selects the Select option, the check boxes are checked and the pattern can be continued down.

Tertiary level is displayed to select the breed

It's hard for me to step back and see if there's an alternative to using a tree control. Does anyone have suggestions for alternative controls or ways to make better use of a tree view?

Architecture – Hierarchical Vs. chronological schema for a tree depth of 1

If you want your messages in chronological order, you must save them in a chronological schema. If you want your messages to be in hierarchical order, you must save them in a hierarchical schema.

There is no situation in which you would choose between them. So it makes no sense to ask about the advantages of one over the other.

Data Structures – Splitting a node into a B + tree with an odd number of keys

This and some other sources suggest Msgstr "Always a knot that receives the middle key from the lower divisions should drop an item for a new middle key",

To illustrate an example.

For 5-way B + tree

(24, 25, 44, 79) is one of the leaf nodes with its root (.., 24,80, …)

       (24, 25, 44, 79)

After insertion 40.

The knot (24, 25, 40, 44, 79) is overloaded and has to split up (even if the siblings are full).

In such a case, is there an advantage in dividing it as

(24, 25) (40, 44, 79)
Over (24, 25, 40) (44, 79)

Is this split A?

(..,24, 40, 80,...)           
    (24, 25)  (40,44, 79)

better than this split b?

 (..,24, 44, 80,...)           
 (24, 25, 40)  (44, 79)

If so, what does A do right and B do wrong, considering that both fulfill the rules of the B + tree.

I could not find a resource to substantiate my argument that B is just as correct as A.

java – counting tree nodes

What I'm trying to do is that my NodeArbol class works with the Nodes class, because it's a solution I've found on the Internet, but I have no idea how to relate it.
Thank you for your time in advance to read the publication.

public class NodoArbol {
int dato;
String nombre;
NodoArbol hijoIzquierdo, hijoDerecho;
public NodoArbol(int d,String nom){
public String toString(){
return nombre + " Su dato es " + dato;


public class cuentaNodos {
     //Raíz del arbol
    NodoArbol raiz; 

    /* Funcion para que cuente las hojas del arbol binario*/
    int cuentaHojas()  
        return cuentaHojas(raiz); 

    int cuentaHojas(NodoArbol nodo)  
        if (raiz == null) 
            return 0; 
        if (raiz.hijoIzquierdo == null && nodo.hijoDerecho == null) 
            return 1; 
            return cuentaHojas(raiz.hijoIzquierdo) + cuentaHojas(raiz.hijoDerecho); 


Ternary expression to the binary tree

This is my tested version in C # for this question.

TernaryExpression To Binary

class Node
    public char data { get; set; }
    public Node leftChild { get; set; }

    public Node rightChild { get; set; }

    public Node(char data)
        this.data = data;
        this.leftChild = null;
        this.rightChild = null;

    //Preorder Traversal

    public static void Pre(Node root)
        if (root == null)


class Program
    static Stack stackNode = new Stack();
    static void Main(string() args)
        string str = "a?b:c";
        Node root = convertExp("a?b?c:d:e", 0);    


    public static Node convertExp(String str, int i)
        if (i > str.Length)
            return null;

        Node node = new Node(str(i));
        if (i < str.Length && str(i) == '?')
            node.leftChild = convertExp(str, i + 1);

        int j = str.IndexOf(lastChild(node.leftChild)?.data ?? node.data);

        if (str.IndexOf(node.data) == j)
            return node;
            if (j < str.Length && str(j + 1) == ':')
                node.rightChild = convertExp(str, j + 2);

        return node;
    public static Node lastChild(Node root)
        if (root != null)
            if (root.leftChild != null)
            if (root.rightChild != null)
            return stackNode.Peek();
            return null;


This works for the given test cases.
But fails for certain values.
I can not imagine where that could explode.

What do you think of the code?

procedural generation – question about CDLOD Quad Tree

I dug and researched in CDLOD and there are some things that I do not understand.

https://github.com/fstrugar/CDLOD/blob/master/cdlod_paper_latest.pdf is:

The quadtree structure is generated from the input heightmap. It's from
constant depth, given by storage and granularity requirements.
Once created, the quadtree only changes with the source heightmap
Changes. Each node has four child nodes and contains at least and
maximum height values ​​for the rectangular heightmap area it has

That is, I calculate each Node and child node on the finest level in the setup phase (I do not divide and disconnect during execution)? If so, at what grossest stage do I start? And how do I get the minimum and maximum height from my perlin noise height map for a node area?

And how would CDLOD work if I zoomed in / out on a big planet (up-factor)? Can that bring in my imagination.

SQL Server – MS SQL 2017: Hierarchy Tree – Retrieve Number of Last-Level Components

There is a table with articles with their components. The component depth varies, d. H. Some items may have one level of components, others may have ten nested components. I have to determine the number of components of the last level (have no further children), eg.

SELECT ItemId=1, ComponentId=2, Quantity=11 INTO #Items
UNION SELECT ItemId=1, ComponentId=3, Quantity=12
UNION SELECT ItemId=2, ComponentId=3, Quantity=13
UNION SELECT ItemId=2, ComponentId=5, Quantity=14
UNION SELECT ItemId=2, ComponentId=6, Quantity=15
UNION SELECT ItemId=3, ComponentId=4, Quantity=16
UNION SELECT ItemId=3, ComponentId=6, Quantity=17

should return the following results:

ComponentId Quantity    
4           2288        (16x13x11)
5           154         (14x11)
6           2431        (17x13x11)

I've tried recursive cte, but I'm far from getting the right results. Any help would be appreciated.