## Filtering – Why does e-commerce require the number of elements a filter returns?

For the sake of clarity, I refer to the faded numbers in brackets.

I think that if a user wants to filter his selection, he will do so according to his needs, not the number of results the filter offers.

I see a good thing in making the effect of the filter clearer, but a disadvantage of the noise.

Looking at some of the big players (Amazon, Ebay, Wayfair, Walmart) this practice seems to be dwindling.

Can one say with certainty that this is no longer a necessity or is I missing something?

## General algorithm for moving a selected group of elements of an array to a new location in the same array

I have an array: (1, 2, 3, …, N).

I need to move 1 or more items (selected by the user) starting with a new custom index.

I can already call a method that moves a single item to a new index.
Two situations are possible: The elements are moved to the right or to the left.

The new index could also be one of the indices containing selected elements.

## dnd 5e – elements that scale with the plane

I want to start DMing. I have a low-level item that I want to give, but it's not very useful from the start. I also want to say that I am unfamiliar with most of the available magical items. This is more of a homebrew question (s). I want to have an underwater section of my Level 5 campaign; That's why I have to set the party for it.

My item to ask is an amulet or brooch that has something worn around the neck (possibly from a shell or something similar). First, there would be the ability to breathe underwater, and you will not be exhausted. At level 5, you can then use the object of a set of characters up to your Zaubergrad 8 hours long underwater breathing. At the 8th level, you can cause a series of targets up to your magic level for one hour to ignore fatigue levels. At level 12, you can get Cold Resist 10 or aim at the target value of your target for up to 5 seconds. At level 16, cold resistance should be improved to 20/10 and at level 20 cold insensitivity, or targets should be assigned to target level 10 targets. Most of it would have the caveat that you can not do it again until you rest briefly.

How would this element match other elements of these layers (remember the scaling)? Which items would that be?

Are there any articles in the D & D books that are being scaled?

More clarity:

Suppose the fighter in the group takes this item and has no caster levels: Use the highest state modifier.

Or: Whenever a milestone is reached (5,8,12,16,20), when? Recognize magic is used and the object is within range, gives off another aura. At this point, players could have the object re-identified or just the updated values. I think that this is also a great RP aspect.

I want to do more. Weapons and armor become difficult. How can I balance these elements if I want to create more?

## Calendar – How the elements of the user's schedule are displayed does not necessarily coincide with the time

I am currently designing a schedule for a web app that displays appointments as scheduled.

The problem is that I think some important information needs to be displayed (title, time, customer) so that the user can anticipate the scheduled appointment. Too short dates must have a different width than the time they represent.

My question is, how can I explain to the user that the width of the appointment is wrong Necessary to adjust the time?

I came up with this idea, but I think that's not clear enough …

To update:
This is what the timeline looks like based on Ashwin's advice.

I am open to suggestions of any kind!

Many Thanks!

## Structured data – Multiple elements, only a few of which point to detail pages

First and foremost, I create a website for products that we need to rent. I can not find any reason why I should not use the structured product tag, unless something else suggests?

A category page containing different products (or recipes,
Videos or any other kind). Each entity should be marked with that
relevant schema.org type, e.g. Eg schema.org/Product for the product
Category pages. However, if an item is selected, all items should be displayed
marked. If this is not a carousel page, the marked elements should also be displayed
do not link to separate detail pages.

In a category list, some of my pages are linked to specific product pages with more details. This only applies to about 50% of the products, as many products do not require any further information. I'm just wondering what the best way is to make structured data markers. Should I just mark the products that have individual pages?

Does this even have an advantage?

## Spring-damping elements for viscoelastic materials

Why are viscoelastic materials represented by spring and damper? I ask this question while working on an actuator based on the electrochemical-mechanical concept, and I do not understand to what extent this abstraction to the dissipative spring element is a good approximation.

## interface – The best way to render elements with jQuery?

When the user selects some tags in my app, I generate them in a function like the following:

``````// Show tags currently used in the search
var htmlNodes = & # 39;& # 39 ;;

// If there are no pinned nodes, reset undeleted nodes
if (graphFactory.existPinnedNodes () == false) {
graphFactory.updateNotFoundNodes ();
}

for (let x = 0; x <graphFactory.getNotFoundNodes (). length; x ++) {
htmlNodes = htmlNodes + & # 39;# + GraphFactory.getNotFoundNodes ()[x] + & # 39;& # 39 ;;
}

// add specified nodes as tags (blue)
for (let q = 0; q <graphFactory.getPinnedNodes (). length; q ++) {
htmlNodes = htmlNodes + & # 39;& # 39; + graphFactory.getPinnedNodes ()[q] + & # 39;& # 39 ;;
}

htmlNodes = htmlNodes + & # 39;& # 39 ;;
\$ (& # 39; # pinnednodeslist & # 39;). html (htmlNodes);
``````

Basically, I create one

``` ```
the class `keywords`add some `li` Elements each with a specific day and then render them into the `#pinnednodeslist` Element.

I wonder if this is the most efficient way to do that …

Maybe there is a better way, because I do not have to mix that much HTML with my code? For example, I thought about leaving all the elements there and just making them invisible by simply adding a class to display them and the HTML content to display them in … But maybe you know another better way , To do that?

## php – disable elements in a Select2

I have an element `Select2` which has 4 options loaded with an array.

``````

@foreach (\$ information as \$ i)
{!! \$ i['descripcion'] !!]
@endforeach

``````

The problem is that I arm it with a foreach, but if it brings a certain ID, I want it to appear on the `option` but that does not allow you to select it (`disabled = & # 39; disabled & # 39;`)

The question itself is, how can I sit down `disabled` an element `option` that I do it with one `foreach` with the `Select2 & # 39; library?

## Representation theory – characterization of even nilpotent elements in \$ mathfrak {sl} _n \$

Is there a "nice" rating of even nilpotente elements in $$mathfrak {sl} _n,$$ using the correspondence between nilpotent elements and partitions of n? By a straight element I mean an element $$e$$so for everyone (= everyone) $$mathfrak {sl} _2$$-triple $$(e, f, h)$$ in the $$mathfrak {sl} _n$$, $$ad (h)$$ only works with even eigenvalues.
By "nice" classification I mean an algorithm that takes a partition and says if (the corresponding element) is even or not.

## javascript – Returns a new array, where each element is the number of smaller elements to the right of this element in the original input

For an array of integers, return a new array containing each element
The new array is the number of smaller elements to the right of it
Element in the original input field.

For example, given the array [3, 4, 9, 6, 1], Return [1, 1, 2, 1, 0],
since:

• Right of 3 is 1 smaller element
• Right of 4 is 1 smaller element
• Right of 9 there are 2 smaller elements
• To the right of 6 there is 1 smaller element
• There are no smaller items to the right of 1
``````const lst = [3, 4, 9, 6, 1];
``````

My solutions:

``````const numberOfSmallerElem = lst => lst.map ((x, i) => lst.slice (i + 1) .reduce ((acc, y) => y < x ? ++acc : acc, 0));
console.log(numberOfSmallerElem(lst));

function numberOfSmallerElem2(lst) {
for (let i in lst) {
lst[i] = lst.slice(i).reduce((acc,y) => y <lst[i] ? ++ acc: acc, 0);
}
Return lst;
}
console.log (numberOfSmallerElem2 (lst));

Function numberOfSmallerElem3 (lst) {
const ret = [];
for (let i = 0, len = lst.length; i <len - 1; i ++) {
const reference = lst[i];
leave counter = 0;
for (let j = i + 1; j <len; j ++) {
if (lst[j] <Reference) {counter ++; }
}
ret.push (counter);
}
ret.push (0);

ret ret;
}
console.log (numberOfSmallerElem3 (lst));
``````