What would be the best way to create an item with two actions?

Context: The user must navigate through a tree structure and select an item from the content (including the parent members).

I am often confronted with this situation. I have a component that requires two actions from the user. In this case, the user must be able to expand and select (or highlight) all parents and children.

Enter image description here

I struggle to find good examples, so I thought I would show it to the community to see if I could do something.

List item can not be inserted with Javascript if custom list columns are used

I'm adding JavaScript to a SharePoint site. Part of the functionality is to insert elements into a SharePoint list. I have previously done this with a single column ("Title") and try to update it to insert multiple columns for each new item (especially "Title" and "AIT #"). Here is the function I use:

/**
 * Inserts new items to a List
 * 
 * @params 
 * @params string listName
 * @params string() listItemFields
 * 
 * @returns void
**/
function insertListItems(newListItems, listName, listItemFields) {  
    console.log(newListItems);
    var clientContext = new SP.ClientContext.get_current();
    var olist = clientContext.get_web().get_lists().getByTitle(listName); 

    // Get SP list   
    var itemCreateInfo = new SP.ListItemCreationInformation();

    for(var i = 0; i < newListItems.length; i++) {

        oListItem = olist.addItem(itemCreateInfo);
        oListItem.set_item("Title", newListItems(i)("Title"));
        oListItem.set_item("AIT#", newListItems(i)("AIT#"));
        // for(var j = 0; j < listItemFields.length; j++) {
        //  oListItem.set_item(listItemFields(j), newListItems(i)(listItemFields(j)));
        // }

        oListItem.update();
    }

    clientContext.load(oListItem); 
    clientContext.executeQueryAsync(
        this.successHandler("Items inserted to " + listName), 
        this.errorHandler()
    );  
}

If I only use the title column, this works fine even if there are several elements. However, if you add the AIT # column (a custom column I've added to the list), the response will be reported as successful, but the list will not contain any of the items that were allegedly added. Can someone give me an insight why that is?

Also, I've noticed that if the function queries SharePoint like this, calling the successHandler also calls the errorHandler, even if the answer is a success.

python – To quickly see if there is an item in a large amount of data

If you knew that every article has a DOI, you can simply save a hash table of the DOIs of the papers you have already harvested. Of course, in practice, many newspapers have no DOI or do not list their DOI.

If you knew the paper was listed with the correct title and authors, you could use a hash of the titles and authors and save it in a hash table. Of course, in practice, it's common for titles to be spelled incorrectly, or for variations in the collection (such as capitalization changes, list the full first name of each author, or just the first initial, and so on continued).

If you know the list of all variations, you can try to canonize the title and authors (for example, the title in lowercase, just the author's last name, and so on). Of course we probably can not know all the variations in practice.

Assuming that all variations are within close working distance, you can use fuzzy matching and some kind of database that will allow a rough search for matches. (For example, an efficient map data structure that supports an approximate search, how quickly can we identify doubles in a list of strings, how can millions of strings be compared / grouped?) In practice, however, the editing distance may not be sufficient Find all matches , In addition, there is a risk that you end up in conflict with two different articles (for example, I have seen a number of articles with titles like "Catching the Bugblatter, Part I" and "Catching the Bugblatter, Part II" by the same authors)). ,

I hope that's all an indication that in practice the problem is probably messy and there is no clear answer. Perhaps it is a pragmatic solution to use some of the above techniques to find obvious matches, with the idea that this will provide for most cases of matches. By the way, just accept that you may save the article several times, but hopefully this will not happen too often. After all, storage is extremely cheap, so it's probably not too bad to stock the same item a few times.

magento2.3 – Magento 2: Add a custom button column to the Item Order section (on the Information tab) in the Order View

I need to be able to execute logic for every item ordered within an order. Next to each item, there must be a button that calls a third-party API when pressed to activate the item. I see many posts explaining how to add a custom button to the main order view toolbar.

What I need to do is add a custom PRO item button in the Article Ordering section (located under the Information tab) in the Order View.

Here's a snapshot of where I want to add the button.
https://gyazo.com/f32f0107d7a2446b8c950c9d627a1880

After the column "row sum" I would like to insert a column with the name "actions". There should be a button in each field of this column.

balance – Is an item that reinforces the magic of a magical school overwhelmed?

I play with the idea of ​​giving a magic wand to a player, and this wand would allow him to cast all necromancy spells one level higher if the spell is cast with a higher cast slot (eg, vampire touch, disease beam) ).

I have not seen a similar article so it's hard for me to sort it out. I am satisfied with this article, which has unusual / rare properties.

Powershell – SCCM Conformance Configuration Item

I have a configuration base on which to test deployment on a single machine. The script looks like this:

$sfcstr = findstr /c:"(SR) Verify complete" C:windowslogscbscbs.log
$sfclines = $sfcstr | Measure-Object -line

if($sfclines.lines -gt 0) {
    echo $true
} else {
    echo $false
}

I have set the settings on the CI to the value returned by the specified script equal to True.

I ran SFC / scannow on the computer. I can confirm that this script will execute locally after SFC returns true and previously False.

I ran the computer policy evaluation cycle and re-deployed the configuration baseline. I checked the version number, but it still reports an error.

Can someone help or suggest a better way to check if SFC / Scannow has been run?

javascript – How to stop after selecting an item from the array

For the following problem, I have a for that iterates through an array and checks if its status is copied because the goal is to replace the first item that has that status. My problem is that it should not be copied like for example 2. This replaces the two that crash the application.

My for:

for (let i = 0; i < localData.length; i++) {
                    const status = localData(i).status
                    if(data.url !== localData(i).url){
                        if (status === 'copyed') {
                            dataShort(i) = data;
                            localStorage.setItem('dataShort', JSON.stringify(dataShort))
                            break;
                        }
                        break;
                    }

                }

8 – How do I add an AJAX action for a selector item in a ContentEntityForm to change the value of another selector item?

I have a ContentEntityForm with two selected category and data_type elements. I would like to load the options for the second selector when the first selector changes. I tried to put the following into the buildForm function of the ContentEntity form, but this does not seem to add the Ajax trigger to the item. Any thoughts about what I'm doing wrong?

$form('category')('#ajax') = (
  'callback' => '_ajax_form_category_change',
  'event' => 'change',
  'wrapper' => 'ajax_id_data_type',
  'method' => 'replace',
);
$form('data_type')('#prefix') = '
'; $form('data_type')('#suffix') = '
';

_ajax_form_category_change is a function in my module

function _ajax_form_category_change($form, $form_state) {
  return $form('data_type');  
}

I've also added a form_alter in my module to change the options of $ form (& # 39; filing_type & # 39;).

Thank you in advance.

WooCommerce Shopping Cart will show no content when an item is added to the cart

I created a WooCommerce store for a customer, everything worked perfectly when I handed the website over to him. He added some plugins and I'm sure I've changed a few more things. Now a few things are broken on the site. The biggest problem is that the car is not working properly. The shopping cart page works as expected (displays empty shopping cart page) until an item is added to the cart and the content of the page is no longer displayed.

You can test it on drxpeptides.com

I disabled all plugins to see if that was the problem or not.
I am not sure where the problem lies.

UI – Home or Back button as the first item in the navigation bar?

If you have time, test the two options (a design with HOME as the far left and a design with BACK as the far left). After testing, measure which of the two methods was more successful and faster to use.

If you need to take photographs in the dark and choose an option, choose what is better known to the population. Do not re-invent popular rules. I would suggest that more people are used to the HOME button being on the left.

If the HOME button causes leftmost confusion, use the design to mark it. For example, HOME should be isolated while BACK, PAGE UP, PAGE DOWN should be grouped together because they are more closely related in their functionality.

Enter image description here

Enter image description here