How to group the delivery slots in the checkout?

I’m working on the online grocery shop, flexible delivery option is one of its key strengths. This interaction happens as the step of the checkout process.

I’m thinking of 2 options.

A. The buttons are aligned similar to the calendar view in Outlook, the size of the button represent the length of the timeslot. Each button has the time and the delivery price.

B. The price and short description are placed as subheaders on top of the buttons. The buttons show only the timeslot and have the similar size.

enter image description here

Which would you choose and why?

Grouping n points into groups of size m with objective to have least traveling distance in each group

Assumptions:

  • There are “n” jobs which are distributed over the city.
  • Company has “k” available workers.
  • Each worker can do “x” jobs per day.
  • “x” is dependent to the worker skills and the distance he travels each day so it’s not a constant.
  • Workers have no initial traveling distance.
  • “s” is a set that shows each workers can do how many jobs based on the distance he travels
  • “d” is the number of days that takes for company to do all the jobs.

Objective: Minimize the “d”


I know this problem is probably NP-hard so I don’t need the exact answer. I think it’s kinda a variation of Traveling salesman problem combining with scheduling and assignment problems.

My algorithm for this problem is to “some how” efficiently ( of course not the most efficient way ) grouping the jobs based on their traveling distance in the groups in to groups of “m” which is the mean of set “s”. Then after each day rerun the algorithm to get better results.

My question is what is the best way to do that grouping? Anyway if you know a better algorithm I would be more than happy to know them.

Can I use a clustering algorithm to group “commodities”

I am new to the site if I am posting on the wrong site sorry about that and please if so lead me to where I can post this…

I work in the automotive industry but specifically an area that deals with packaging, logistics, and the most efficient ways to ship parts from a supplier to an automotive plant (so that cars can be built).

We have a term we use called “Commodities” that is used to define a grouping of parts. For instance, there are vehicles that use the same type of rear view mirror and we will usually group this into the same commodity…BUT…

There are certain commodities that when you read them on paper seem the same but as you dig deeper and look at the characteristics of the part you notice it cannot be grouped into the same commodity. One of those factors are weight…because the weight is so much different we cannot lump commodity X with commodity Y because commodity y’s weight is 5 times that of X. Can you imagine the car wire harness for a small car vs that of a wire harness for a truck?

They are both “wire harnesses” but the wire harness for the truck weighs much more. On paper both parts may look like this:

Part Number  Part Description   Weight 123456       Wire-Harness        3 123777       Wire-Harness        12 124444       Wire-Harness        12.18 123222       Wire-Harness        12.34 

If we looked just at the part description we’d have one commodity called “Wire Harness”. However, since the weight plays a big factor (you cannot put in the same number of wire harnesses in a box to ship if their weight is that much off) we end up having to split this up into another commodity. In our data above the last three parts could possibly be in one commodity while the first part could be in its own commodity.

So on to my question…can I mathematically solve this using some sort of algorithm in which I can plot some data and see a trend on what should be seperated based on weight? Can I use some sort of clustering algorithm:

https://towardsdatascience.com/the-5-clustering-algorithms-data-scientists-need-to-know-a36d136ef68

And plot out, for instance using my example of a wire harness, all the weights we have for a wire harness and see what this leads me to in terms of how many commodities?

Unique Permissions for a group

I have a library with unique permissions on specific documents which were created by sharing those documents.

I have a SP group which I want to grand it a unique permission to each one of these documents.

I’m looking for a PowerShell solution as I can’t grant permission to each one by its own as it will take a lot of time.

Thanks

Can the wizard in our group prepare a spell from the spellbook of an NPC wizard?

Whether the players killed a mage and got his spellbook(s) or they met with a nice wizard who let him or her learn a spell from his spellbook, can a player prepare a spell from a spellbook that isn’t his or hers?

I’m asking because the PHB p. 114 says:

[…] Preparing a new list of wizard spells requires time spent studying your spellbook and memorizing the incantations and gestures you must make to cast the spell: at least 1 minute per spell level for each spell on your list.

  • emphasis mine

Further, the block on the left as a Copying a Spell into the Book (“the” Book as in “your” Book, since it appears in the block titled Your Spellbook), which explains how you can copy a spell from one book to another, assuming the book is from a stranger, it cost more and takes more time. It actually says:

[…] deciphering the unique system of notation used by the system of notation of the wizard who wrote it. […]

It continues saying that you have to learn the various parts of the spell (verbose, material, gesture.)

This makes it sounds like a wizard would have a really hard time to prepare a spell from another’s spellbook. Is that the case?

Unable to set a People or Group field as Read-Only inside our edit form

I have a custom list inside sharepoint online site, and inside the list’s Edit form i want to disable a People or Group field named “Project Manager” using jQuery, but i am not sure if this is possible, here is a screen shot of the markup:-

enter image description here

now i already have a jQuery function added to my Edit form inside a script editor web part, and i am able to disable some Input and Select fields using the below code, but not sure how i need to disable the People or Group fields? as seems they do not have any input as shown in the above markup..

$  (function() {        $  ("input[id^='ProjectEstimatedDate_']").attr('disabled', 'disabled');       $  ("select[id^='ProjectPriority_']").attr('disabled', 'disabled');       //code goes here for other input and select fields     }); 

Should I discourage a group of players from all playing the same class with very similar builds?


Concerns I have

Traditionally the D&D party has been a Cleric, Fighter, Magic User and a Thief.

  • Adventures have been balanced around the traditionally party composition listed above.
  • Players feeling upstaged by another player doing the same thing better.

    So if I’m dealing with a group that all the players want to be trip build Fighters, should I encourage them to rethink their decision?

Check user membership of current user in security group using javascript

I am working on SharePoint 2016 on-premises environment. I need to implement the some functionality based on the result whether the currently logged-in user is a part of a security group or not using javascript/jquery. Can someone advise on how I can check the user membership in a security group?

Get User Photo, Name &Title of an office 365 group using SPfx

I am trying get the user details i.e. UserName, Title and Profile picture of users that belong to a office 365 distribution group.

I tried this code sample, but i get an undefined error i.e. msGraphClientFactory is undefined.

export default class HelloWorldWebPart extends BaseClientSideWebPart<IHelloWorldWebPartProps> {   public render(): void {     // ...      this.context.msGraphClientFactory       .getClient()       .then((client: MSGraphClient): void => {         // use MSGraphClient here       });   }    // ... }` 

Can someone suggest what i might be doing wrong or suggest an alternative to get the groups members and their user profile info like photo, name an title.