graphs – How to get started with multi-level pairwise combinations

Let’s say we have 4 ranks: 1-4

Every rank has a set of unique nodes, each pair of same-rank nodes can be combined to create a node of a rank 1 level higher, in any number of combinations:

1-A + 1-B = 2-C
1-A + 1-A = 2-B
1-A + 1-C = 2-C
1-B + 1-C = 2-A

These combinations are deterministic, we have a lookup table to get any pair-result combination and the result is not unique.

Once combined, they cannot be used again. So in the example above, we can do:

We have (1-A, 1-A, 1-B, 1-C)
We perform 1-A + 1-A = 2-B
Now the only nodes we have left are 1-B and 1-C = 2-A

Rank 4’s cannot combine, they are the final rank.

Let’s say I have a random set of Rank 1, 2, and 3 nodes.

I would like to build a “planner” where the user can see paths to Rank 4 and decide which nodes to use.

I have a simple algorithm where I calculate all combinations of each rank, get the results and pass it up to the next rank to perform the same algorithm:

1. starting set = (1-A, 1-A, 1-B, 1-C, 2-A)
2. split into buckets: (1-A, 1-A, 1-B, 1-C) and (2-A)
3. go through Rank 1, create all combinations: C(4,2) = 6
4. add the resulting 6 to the single node of Rank 2 for a total of n = 7
5. repeat step 3-4 for Rank 2: C(n,r) = 21
6. repeat step 3-4 for Rank 3: C(n,r) = 210

The problem here is that with a small set of 5 starting nodes, the possibilities exponentially grow and with 210 possible Rank 4 paths, will get very noisy.

Since any two nodes can only be used once, with a starting set of length 5, if I choose a random 2 to merge, this will remove pretty much all the later paths.

How do I somehow reduce the noise? I’m not sure if I should be looking at Graph Theory, some other simple algorithm, or do a grouping/counting of unique nodes.

sharepoint online – Create multi-level hierarchy (Multiple depths) left navigation menu with expand/collapse

I am on SharePoint Online and i am using Wiki pages to manage our content.
I have successfully implemented a code to make the menu as expand/collapse, like below:
enter image description here

However, i want a solution to implement multi-level hierarchy, or nested hierarchy, meaning that a header may contain sub-header which could be expandable,… etc.

Is this possible?

Here’s the code i am using to achieve the expand/collapse:

var SP2013QLAccordion = {

// Options
useAnimation: true, // Animation is supported in IE9+
collapseOtherLevels: false, // Collapse sibling levels on expanding
expandTransition: ‘height 0.15s ease-out’,
collapseTransition: ‘height 0.15s ease-out’,

// Initialization function
init: function (){
var levels = document.querySelectorAll(‘.ms-core-listMenu-verticalBox li’);

if (levels.length) {
  for (var i = 0; i < levels.length; i++) {
    if (levels(i).querySelector('ul')) {

      // Create switch elements and append them to levels with sublevels
      var switchSpan = document.createElement('div');

      switchSpan.className = 'switch';
      switchSpan.className = 'switch';
      switchSpan.innerHTML = '<span><img alt="" src=""/></span>';
      levels(i).insertBefore(switchSpan, levels(i).firstChild);

      // Add 'expanded' class to selected branch and 'collapsed' to all other
      levels(i).className += (levels(i).querySelector('.selected') || levels(i).className.indexOf('selected') != -1) ? ' expanded' : ' collapsed';

  // Detect IE8 or lower to turn off animation
  if (document.all && !document.addEventListener) SP2013QLAccordion.useAnimation = false;

  var switches = document.querySelectorAll('.ms-core-listMenu-verticalBox .switch');
  // Add collapse/expand event to switch nodes
  if (switches.length) {
    for (var j = 0; j < switches.length; j++) {
      AddEvent(switches(j), 'click', ExpandCollapse);

// Function to get height of a hidden node
function CalculateHeight (node) {
  var initialStyles =,
    nodeHeight; = 'absolute'; = 'hidden'; = 'auto';
  nodeHeight = node.offsetHeight; = initialStyles;
  return nodeHeight;

// Expand/Collapse function
function ExpandCollapse (param) {
  var level = this.parentNode,
    sublevel = level.querySelector('ul'),
    sublevelHeight = CalculateHeight(sublevel),
    otherLevels = level.parentElement.children;

  // Close other levels on expanding
  if (SP2013QLAccordion.collapseOtherLevels && level.className.indexOf('collapsed') != -1 && !param) {
    for (var i = 0; i < otherLevels.length; i++) {
      if (otherLevels(i).className.indexOf('expanded') != -1), 'collapse');

  if (SP2013QLAccordion.useAnimation) {
    // Animated collapse
    if (level.className.indexOf('expanded') != -1 || param == 'collapse') { = sublevelHeight + 'px';
      level.className = level.className.replace(' expanded',' collapsed'); = SP2013QLAccordion.collapseTransition;
      sublevel.offsetHeight; // Force repaint = 0;
    // Animated expand
    } else { = 0;
      level.className = level.className.replace(' collapsed',' expanded'); = SP2013QLAccordion.expandTransition;
      sublevel.offsetHeight; // Force repaint = sublevelHeight + 'px';
      sublevel.addEventListener('transitionend', function transitionEnd(event) {
        if (event.propertyName == 'height') {
          sublevel.removeEventListener('transitionend', transitionEnd, false);
      }, false);
  } else {
    // Not animated collapse
    if (level.className.indexOf('expanded') != -1 || param == 'collapse') {
      level.className = level.className.replace(' expanded',' collapsed');
    // Not animated expand
    } else {
      level.className = level.className.replace(' collapsed',' expanded');

// Crossbrowser event attachment helper function
function AddEvent (htmlElement, eventName, eventFunction) {
  if (htmlElement.attachEvent)
    htmlElement.attachEvent("on" + eventName, function() {;}); 
  else if (htmlElement.addEventListener)
    htmlElement.addEventListener(eventName, eventFunction, false);


// SharePoint default DOM onLoad function


8 – Do multi-level multi-value relationships work in one view?

In Drupal 8 I have a content type historywith a multi-valued entity reference to the content type Project, which in turn has a multi-value reference to Team memberthat has a monovalent reference to person. I want to display a list of projects in my story node and a list of team members in each.

I have an embedded view (content type history), to which I pass the nid as a context filter, whereby 3 relationships are defined: referenced Projects, referred Team membersand referenced people. I'm pretty sure I've added fields from all three types, each using the correct relationship.

I get Project Fields correct in each case Project in a row. But I don't get anything for it Team members or people.

Are you asking this view to do something that views cannot by having multi-level references on two levels? Is there a better approach? I miss something

Flow – Multilevel approval and setting users as variables

I am working on an 8-step approval process for orders.
That'll get messy. And I would hate to have all of the email addresses buried in the terms. Is there a way to set

& # 39; Production Mgr & # 39; = Mike
& # 39; The Production Mgr Email & # 39; =
& # 39; Accounting Mgr & # 39; = Sue
& # 39; Accounting Mgr Email & # 39;

The only way I see is the initialize variable and I would have to have one for every single person / item. I already have several pieces of information that I bring with me from a power app form.

It would be great if I could use their Office365 tags, but I will settle them.
I looked at the 'Parse JSON' which, if that's my only choice, ok. But I'm overwhelmed and the easier it is for someone to take care of it, the better.

multilevel – layout of the user role assignment

I worked on a user interface where we create roles and assign users. The process of creating roles is as follows:

1. First select a module (The module is like a product version to which the role is applied.) So we currently have two – portal for end users and console for administrators.

2. Then enter the role name and description of the role

3. Then select Permissions. assign to the role. You can only select one authorization

4. Role Members – Here you add members to the role. However, depending on the selection in Step 1 – Console or Portal, this screen has a different behavior. If you select Portal in step 1, there is an additional assignment of contexts (basically like in environments like demo or production). If you selected Console in the first step, there is no context assignment.

Step 1 – The administrator clicks Add Permissions and selects the permissions to add
Enter the image description here

Step 2 – Administrator selects contexts from the list Enter the image description here

Step 3 – The context is selected and the administrator clicks on the next tab
The context is selected and the administrator clicks on the next tab

The contexts selected in the previous step are displayed when you move the mouse pointer over the tab.> However, if the list is too long, it cannot be scaled. Enter the image description here

Step 4 – Users are selected and added
Enter the image description here

Step 5 – role is created
Enter the image description here

So I thought one way to deal with it was to create some kind of wizard behavior. First select contexts and then add role members. With this method, however, the user loses sight of the selected contexts when on the Role Members tab. One possibility could be to display contexts when you move the mouse pointer over the Contexts tab. However, the visibility of the selected contexts is still less. If the user needs to change the contexts, they must return to the Contexts tab.

The requirement was that the administrator can assign multiple contexts to multiple people. But it is quite complex with many steps in creating a role, but the customer wanted it that way. I'm not sure I could explain it well, but I will appreciate any questions or answers. Thank you very much

What is the purpose of multilevel marketing software in the network marketing business?

The multi-level marketing business is one of the most profitable business zones. It was a credible platform for users looking for a way to create their own company websites. The strategy for turning marketing ideas into reality is revitalized with the MLM software.

The MLM Software offers a simple solution for easy management of your company. The functions contained therein completely fulfill the task initiated by the users. The software supports various business plans to improve a marketing business by managing a number of users and handling their activities. The structure of the plan helps monitor all the tasks to be performed. It also contains the best compensation functions.

The software was developed with a feature that supports reliable features, including multiple payment options, multiple currencies, self-replicated websites, E-Pin generator, marketing tools, lead capture system and more. If you want to purchase the high quality software, contact ARM MLM to get good results using a flexible product at the best price.

MY_MODULE_entity_bundle_field_info_alter is not triggered on the multi-level commerce checkout page

I'm trying to add a custom validation limit $fields('field_phone_number')->addConstraint('CommercePhoneNumber'); about MY_MODULE_entity_bundle_field_info_alter However, I'm having trouble getting the hook on my multi-level checkout page in the Commerce module to fire.

I tried MY_MODULE_entity_base_field_info_alter also, but that did not work either. I've seen many examples of adding custom restrictions using this method online, but this hook doesn't seem to work on my page. Maybe because it's a multi-level checkout page?

Can someone point me in the right direction here? Thanks a lot!

sharepoint online – How do I add Multilevel ListView Command Set Buttons with SPFX Extensiton?

Enter image description hereIn .manifest.json file I have structure like:

"items": {
"COMMAND_1": {
  "title": { "default": "Command One" },
  "iconImageUrl": "_layouts/15/images/itslidelibrary.png",
  "type": "command",
"COMMAND_2": {
  "title": { "default": "Command Two" },
  "iconImageUrl": "_layouts/15/images/dldsln16.png",
  "type": "command"


How can I add multi-level buttons / commands as shown in the picture above?