8 – Sum the grouped results in the template

I have an aggregated view result grouped by taxonomy terms and shown like the following.

TaxonomyTerm1
1
1
TaxonomyTerm2
1
TaxonomyTerm3
1
1
1

I want the result to be added and shown like the following.

TaxonomyTerm1
2
TaxonomyTerm2
1
TaxonomyTerm3
3

I tried to calculate the result in views-view-fields–reports.html.twig file with the following code.

{% set total = 0 %}
{% for field in fields -%}
  {% set total = total + 1 %}
{%- endfor %}
{{ total }}

Instead of the expected result, I get the original values again.

permissions – On Windows 10, how to move a bunch of folders grouped into one folder multiple times?

Sorry if I don’t word myself better,

basically I have these bunch of folders: F1, F2, F3, F4, … , F1000

I want to automatically make new folders and group certain amount of these folders into them. Like it’d make a “New Folder” and put folder F1 through F10 in it, then it’ll continue making the next “New Folder (1)” and put folder F11 through F20 in it, and so on until there’s just not enough folders left.

The newly made folder’s name isn’t important, I can bulk rename them later, I just want to group them alphabetically/in order into several folders that’s filled with 10 folders inside.

Summary:

what I have is Folder1, Folder2, Folder 3, Folder 4, …. , Folder1000

what I want is for Folder1 to Folder10 are moved inside a newly created folder, and then it’ll automatically make new group-folder and move the next folders (Folder11 to Folder20) into it.

sharepoint online – Highlighted Content for “Approval Status” or Custom View based on ‘Grouped by Approval Status’

How would I go about displaying documents across 10 document libraries on a site when the documents “Approval Status” is set to “Pending”?

I have created a view on each library which can show this data, but I would like to display all data on one page if possible. Either all items in one list, or multiple lists for each of the document libraries on the site.

Is this achievable using a query within a Highlighted Content web part?

Image of Column Name / Properties

Google SpreadSheets query: how to join “grouped by” cells in a list?

Suppose I have this table:

| Name   | Amount | Category |
| name_1 | 10     | A        |
| name_2 | 2      | B        |
| name_3 | 3      | B        |
| name_4 | 6      | C        |

Thanks to this answer, I know how to write a query that groups the rows by category, and gives me sum of Amount by category, like this:

=QUERY(A2:C5,"select C, sum(B) group by C order by sum(B)")

enter image description here

My question is: how do I add a third row to my query, such that it lists the Name of every row in that group (possibly, but not necessarily, comma-separated)?

In other words, I’d like the result to look like this:

|   | sum | items          |
| B | 5   | name_2, name_3 |
| C | 6   | name_1         |
| A | 10  | name_4         |

javascript – Restructuring JSON to create a new JSON where properties are grouped according to similar values

I have a JSON structure in the following example format:

(
  {date: '01-01-2021', name: 'House 1', value: '500'},
  {date: '01-01-2021', name: 'House 2', value: '600'},
  {date: '01-01-2021', name: 'House 3', value: '700'},
  {date: '01-01-2021', name: 'House 4', value: '800'},
  {date: '01-02-2021', name: 'House 1', value: '200'},
  {date: '01-02-2021', name: 'House 2', value: '100'},
  {date: '01-02-2021', name: 'House 3', value: '300'},
  {date: '01-02-2021', name: 'House 4', value: '1000'},
)

I have written logic to group it in the following format:

(
  {date: '01-01-2021', 'House 1': 500, 'House 2': 600, 'House 3': 700, 'House 4': 800},
  {date: '01-02-2021', 'House 1': 200, 'House 2': 100, 'House 3': 300, 'House 4': 1000},
)

Below is code I have written. It works and seems to be efficient, but I am curious if this was the best approach or if there is a simpler way to accomplish this task? The actual data set contains a total of 2274 objects that is reduced to an array of 748 objects.

Code:

const housing_table_data = ((json_data) => {
        const unique_dates = housing_data.reduce((accumulator, current_value) => {
            if (accumulator.indexOf(current_value.date) === -1) {
                accumulator.push(current_value.date);
            }
            return accumulator;
        }, ());

        let table_data = ();

        unique_dates.forEach((date, index) => {
            table_data.push({date: date});

            let house_groupings = housing_data.filter(data => data.date=== date);

            house_groupings.forEach(group => {
                table_data(index)(group.name) = group.value;
            });
        });

        return table_data;
    })(housing_data);

plotting – How to obtain the grouped separate line curves from the disorder data?

The sample point data and codes are listed as following. The point-image tells us that the data can be divided into nine groups. However, why are they divided into two groups by FindClusters? Which can be verified by the fact that the curves are made up of two colors (Two colors in Mathematica V11.3, the colors become very complex in Mahtematica V9). Why aren’t they divided into nine groups? I want to group and sort the data correctly, then to get the nine line-curves of them. How can I do it? Thank you!

Note: The Mathematica I used is Version 11.3

The codes I used:

I don’t know how to obtain the line curves, so have to use ListPointPlot3D. But to obtain the grouped separate line curves is my objective.

data={{0.0437345989867765`,0.027448540404927828`,150.79644737231007`},{0.04938016838673953`,0.047424756126886125`,113.09733552923255`},{0.051145420890910294`,0.05640776878763274`,75.39822368615503`},{0.051913378583851665`,0.060949057004484324`,37.69911184307752`},{0.0521370840290226`,0.06236303245723473`,0.`},{0.07387951657435363`,0.03584091853506918`,452.3893421169302`},{0.07654465510290173`,0.05239273610718475`,414.6902302738527`},{0.08105897684618887`,0.06157833047013417`,376.99111843077515`},{0.08802205450905072`,0.06820467365922271`,339.29200658769764`},{0.09705754646890652`,0.07595131661019748`,301.59289474462014`},{0.10032955423298524`,0.04363467030286158`,753.9822368615503`},{0.10314578115014386`,0.060828862119676176`,716.2831250184728`},{0.1042046313855752`,0.08605760821182902`,263.89378290154264`},{0.10641004791962101`,0.07165630123732109`,678.5840131753953`},{0.10828395343169178`,0.0954940813695602`,226.1946710584651`},{0.11054650458528836`,0.07859357613128073`,640.8849013323178`},{0.11063700114233449`,0.10316772151880929`,188.49555921538757`},{0.112076922285799`,0.10913045784518863`,150.79644737231007`},{0.11298329423049283`,0.11357133707487609`,113.09733552923255`},{0.11354180551907977`,0.11664335529865477`,75.39822368615503`},{0.11384692393567411`,0.1184484958235665`,37.69911184307752`},{0.11394410033576455`,0.11904406760884173`,0.`},{0.11623873168645853`,0.0824805082917696`,603.1857894892403`},{0.12137154305002183`,0.03177972219291105`,1130.9733552923256`},{0.12487786712514205`,0.057055365180551425`,1093.274243449248`},{0.12496706526139975`,0.083795354526819`,565.4866776461628`},{0.12883938165919614`,0.0715430690052577`,1055.5751316061705`},{0.1335685528212502`,0.08130183054963443`,1017.8760197630929`},{0.13945230914903417`,0.08805368066885977`,980.1769079200154`},{0.14051755814658035`,0.0851640867219403`,527.7875658030853`},{0.14700532349883821`,0.09289566224228514`,942.4777960769379`},{0.1564387442328299`,0.09719257566376534`,904.7786842338604`},{0.15858493121395373`,0.09745867546014358`,490.0884539600077`},{0.16675243924485`,0.10186040783930457`,867.0795723907829`},{0.16790066303711032`,0.11295171204071847`,452.3893421169302`},{0.17300723392105788`,0.12614694970670487`,414.6902302738527`},{0.17621101765590919`,0.13718489194428604`,376.99111843077515`},{0.1774474637996235`,0.10601155962022256`,829.3804605477054`},{0.17838146781798134`,0.14646424623790574`,339.29200658769764`},{0.1799225809281175`,0.15428341702857554`,301.59289474462014`},{0.1810494649428829`,0.16085383838236203`,263.89378290154264`},{0.18188721284899426`,0.16632684844597892`,226.1946710584651`},{0.18251304989449663`,0.17081231851047196`,188.49555921538757`},{0.18297657559953864`,0.17439058773924723`,150.79644737231007`},{0.18331032827080163`,0.17712010926433094`,113.09733552923255`},{0.18353562258119296`,0.17904238874314235`,75.39822368615503`},{0.18366587854125027`,0.180185160097525`,37.69911184307752`},{0.18370850697895516`,0.18056435191811288`,0.`},{0.1900984890566589`,0.10917617408500022`,791.6813487046279`},{0.20718593829091334`,0.11363672229024746`,753.9822368615503`},{0.22612570143610758`,0.12587283248386555`,716.2831250184728`},{0.23840631119068065`,0.14284325465610756`,678.5840131753953`},{0.24560422669463586`,0.1585720468438524`,640.8849013323178`},{0.24725265873267674`,0.14513101734156722`,1130.9733552923256`},{0.2502703130143015`,0.17230610168494592`,603.1857894892403`},{0.2535391295789955`,0.18429638459968092`,565.4866776461628`},{0.25594825541749705`,0.1948261924481059`,527.7875658030853`},{0.25778595516966246`,0.20411647186367649`,490.0884539600077`},{0.2592221275728078`,0.21233310098471608`,452.3893421169302`},{0.2596005547451709`,0.1469580821198297`,1093.274243449248`},{0.26036404597739776`,0.21960161036587833`,414.6902302738527`},{0.26128299039842295`,0.22601849248592365`,376.99111843077515`},{0.2620281901144365`,0.23165901914009074`,339.29200658769764`},{0.2626346615169767`,0.23658259001871448`,301.59289474462014`},{0.26312786733527893`,0.24083643594939128`,263.89378290154264`},{0.26352661145028455`,0.24445822513061083`,226.1946710584651`},{0.2638449010621096`,0.2474779247254969`,188.49555921538757`},{0.2640931764664956`,0.24991914462910214`,150.79644737231007`},{0.26427913741050385`,0.2518001111022964`,113.09733552923255`},{0.26440830165923707`,0.25313436754061786`,75.39822368615503`},{0.26448437801992614`,0.2539312667308417`,37.69911184307752`},{0.2645095040151279`,0.25419629672435523`,0.`},{0.2764805809083421`,0.14896525901359706`,1055.5751316061705`},{0.29834790139029344`,0.15674009899494196`,1017.8760197630929`},{0.3169282184792892`,0.17310950090049038`,980.1769079200154`},{0.3288218708795855`,0.1911814837563566`,942.4777960769379`},{0.33665508274590805`,0.2079032012828503`,904.7786842338604`},{0.3421915308860309`,0.22295066954011425`,867.0795723907829`},{0.3463185154042127`,0.23648682984549355`,829.3804605477054`},{0.34951326786173315`,0.24871605605582042`,791.6813487046279`},{0.3520552506823944`,0.25981294486697926`,753.9822368615503`},{0.35411994151270926`,0.2699173386975112`,716.2831250184728`},{0.355823706852308`,0.2791403660181393`,678.5840131753953`},{0.3572470960116221`,0.28757095980235664`,640.8849013323178`},{0.35844780494441103`,0.29528106417144967`,603.1857894892403`},{0.35946831941741797`,0.302329524318339`,565.4866776461628`},{0.36034064148564077`,0.30876495384722696`,527.7875658030853`},{0.3610893307860184`,0.31462785658887427`,490.0884539600077`},{0.36173352787220503`,0.3199522124347432`,452.3893421169302`},{0.3622883388300219`,0.32476667650548807`,414.6902302738527`},{0.362765805781157`,0.32909549644896724`,376.99111843077515`},{0.363175601106083`,0.33295922150871465`,339.29200658769764`},{0.36352553260525683`,0.3363752555172978`,301.59289474462014`},{0.36382191628045063`,0.33935829113072236`,263.89378290154264`},{0.36406985442791717`,0.34192065228260415`,226.1946710584651`},{0.3642734446002833`,0.34407256454660046`,188.49555921538757`},{0.36443593704204336`,0.3458223678776083`,150.79644737231007`},{0.36455985286521736`,0.3471766824057532`,113.09733552923255`},{0.36464707155936577`,0.3481405351404705`,75.39822368615503`},{0.3646988938342773`,0.34871745330382947`,37.69911184307752`},{0.36471608389871285`,0.3489095283413733`,0.`},{0.47412284887567074`,0.33172680041939506`,1130.9733552923256`},{0.47734833022577405`,0.3438211571296524`,1093.274243449248`},{0.48007828777631756`,0.3550967810609886`,1055.5751316061705`},{0.48241520339166705`,0.3656278110433649`,1017.8760197630929`},{0.48443446099699605`,0.3754774862795998`,980.1769079200154`},{0.48619287393988203`,0.384699706951713`,942.4777960769379`},{0.4877341504674113`,0.3933405578158219`,904.7786842338604`},{0.4890925133884253`,0.40143962676087847`,867.0795723907829`},{0.4902951671917905`,0.4090310963485377`,829.3804605477054`},{0.49136402250725525`,0.41614463213539593`,791.6813487046279`},{0.49231692844513175`,0.42280610192581464`,753.9822368615503`},{0.49316857061460967`,0.42903815848578486`,716.2831250184728`},{0.49393113692516355`,0.43486071325371006`,678.5840131753953`},{0.49461481885561515`,0.4402913232709481`,640.8849013323178`},{0.49522819404484003`,0.44534550889891594`,603.1857894892403`},{0.4957785218834969`,0.4500370160952323`,565.4866776461628`},{0.4962719743833954`,0.45437803402647764`,527.7875658030853`},{0.4967138182420737`,0.4583793764650679`,490.0884539600077`},{0.4971085596416555`,0.4620506336133762`,452.3893421169302`},{0.49746006025762024`,0.46540029960174456`,414.6902302738527`},{0.4977716307760598`,0.46843587982284585`,376.99111843077515`},{0.49804610665023313`,0.47116398141901933`,339.29200658769764`},{0.49828590968197667`,0.4735903895754227`,301.59289474462014`},{0.4984930981673345`,0.47572013174744343`,263.89378290154264`},{0.49866940771186974`,0.4775575315327355`,226.1946710584651`},{0.4988162843410503`,0.4791062535624693`,188.49555921538757`},{0.498934911162064`,0.4803693405133677`,150.79644737231007`},{0.4990262295460541`,0.4813492431177032`,113.09733552923255`},{0.49909095557224964`,0.482047843861275`,75.39822368615503`},{0.49912959229126924`,0.4824664749003613`,37.69911184307752`},{0.4991424382126344`,0.48260593059087814`,0.`},{0.6890221358019264`,0.602044445041995`,1130.9733552923256`},{0.6901424586135346`,0.6087687711085732`,1093.274243449248`},{0.6911781145815982`,0.6151899055051402`,1055.5751316061705`},{0.692136520865002`,0.6213178160239101`,1017.8760197630929`},{0.6930241990398274`,0.6271616492896728`,980.1769079200154`},{0.6938469035529896`,0.6327298071274196`,942.4777960769379`},{0.6946097282092561`,0.6380300141303938`,904.7786842338604`},{0.6953171949635522`,0.6430693774607419`,867.0795723907829`},{0.6959733283591203`,0.6478544398119352`,829.3804605477054`},{0.6965817182439317`,0.6523912263575782`,791.6813487046279`},{0.6971455728543183`,0.656685286411686`,753.9822368615503`},{0.6976677639352774`,0.6607417304337899`,716.2831250184728`},{0.6981508652394128`,0.6645652629307821`,678.5840131753953`},{0.6985971854901323`,0.668160211734524`,640.8849013323178`},{0.6990087966918044`,0.6715305540710332`,603.1857894892403`},{0.6993875585084892`,0.6746799397817881`,565.4866776461628`},{0.6997351393036964`,0.6776117120094399`,527.7875658030853`},{0.7000530343297282`,0.6803289256188161`,490.0884539600077`},{0.700342581471317`,0.6828343635877485`,452.3893421169302`},{0.7006049748790173`,0.6851305515709283`,414.6902302738527`},{0.7008412767724382`,0.6872197708128671`,376.99111843077515`},{0.7010524276464273`,0.6891040695619546`,339.29200658769764`},{0.7012392550750067`,0.6907852731169997`,301.59289474462014`},{0.7014024812760586`,0.6922649926193655`,263.89378290154264`},{0.7015427295721395`,0.6935446326874227`,226.1946710584651`},{0.7016605298604665`,0.6946253979760311`,188.49555921538757`},{0.701756323185066`,0.6955082987305854`,150.79644737231007`},{0.7018304654874046`,0.6961941553938515`,113.09733552923255`},{0.7018832305966485`,0.6966836023130709`,75.39822368615503`},{0.701914812507843`,0.696977090585234`,37.69911184307752`},{0.7019253269840611`,0.6970748900692321`,0.`},{1.0405474664726269`,1.0538165273583022`,1130.9733552923256`},{1.0411747834325211`,1.057770462705052`,1093.274243449248`},{1.0417712303059607`,1.0615758459270794`,1055.5751316061705`},{1.042337990105685`,1.065234317348892`,1017.8760197630929`},{1.0428761663960429`,1.0687474338299476`,980.1769079200154`},{1.0433867886751198`,1.072116671968147`,942.4777960769379`},{1.0438708172716455`,1.0753434311059498`,904.7786842338604`},{1.044329147804037`,1.0784290361484092`,867.0795723907829`},{1.0447626152430431`,1.0813747402025853`,829.3804605477054`},{1.0451719976152904`,1.0841817270468967`,791.6813487046279`},{1.0455580193804133`,1.086851113439083`,753.9822368615503`},{1.0459213545112027`,1.08938395127052`,716.2831250184728`},{1.0462626293027175`,1.091781229574598`,678.5840131753953`},{1.0465824249334432`,1.094043876396209`,640.8849013323178`},{1.0468812797994982`,1.0961727605287999`,603.1857894892403`},{1.0471596916398445`,1.0981686931254018`,565.4866776461628`},{1.047418119469387`,1.1000324291892274`,527.7875658030853`},{1.0476569853343283`,1.101764668949142`,490.0884539600077`},{1.0478766759028073`,1.1033660591249634`,452.3893421169302`},{1.0480775439027161`,1.104837194087162`,414.6902302738527`},{1.0482599094167058`,1.106178616914803`,376.99111843077515`},{1.048424061043624`,1.1073908203558624`,339.29200658769764`},{1.0485702569345743`,1.108474247693046`,301.59289474462014`},{1.0486987257105909`,1.109429293518246`,263.89378290154264`},{1.0488096672680864`,1.110256304418358`,226.1946710584651`},{1.0489032534777334`,1.1109555795749961`,188.49555921538757`},{1.0489796287810274`,1.111527371279859`,150.79644737231007`},{1.0490389106888538`,1.1119718853680611`,113.09733552923255`},{1.0490811901849078`,1.1122892815704075`,75.39822368615503`},{1.0491065320369908`,1.1124796737863076`,37.69911184307752`},{1.0491149750178124`,1.1125431302778894`,0.`},{1.8843069000466044`,2.295648962549785`,1130.9733552923256`},{1.8849454993257413`,2.297406870281081`,1093.274243449248`},{1.88556057624188`,2.2991038490486133`,1055.5751316061705`},{1.8861523326736003`,2.3007400385234744`,1017.8760197630929`},{1.8867209619847338`,2.30231557328454`,980.1769079200154`},{1.8872666491883834`,2.303830582835307`,942.4777960769379`},{1.8877895711029193`,2.305285191621074`,904.7786842338604`},{1.8882898965003854`,2.3066795190461034`,867.0795723907829`},{1.8887677862472398`,2.3080136794904504`,829.3804605477054`},{1.8892233934378546`,2.3092877823269777`,791.6813487046279`},{1.8896568635209927`,2.3105019319377877`,753.9822368615503`},{1.8900683344193192`,2.311656227730523`,716.2831250184728`},{1.8904579366423016`,2.31275076415416`,678.5840131753953`},{1.8908257933924066`,2.3137856307144276`,640.8849013323178`},{1.8911720206651474`,2.3147609119886785`,603.1857894892403`},{1.8914967273427485`,2.3156766876402215`,565.4866776461628`},{1.891800015281824`,2.3165330324319964`,527.7875658030853`},{1.892081979395013`,2.3173300162396906`,490.0884539600077`},{1.8923427077269301`,2.3180677040641062`,452.3893421169302`},{1.8925822815242876`,2.3187461560428506`,414.6902302738527`},{1.8928007753004716`,2.319365427461208`,376.99111843077515`},{1.8929982568946222`,2.319925568762326`,339.29200658769764`},{1.8931747875251743`,2.320426625556547`,301.59289474462014`},{1.893330421838256`,2.320868638629892`,263.89378290154264`},{1.8934652079506473`,2.3212516439517734`,226.1946710584651`},{1.8935791874875891`,2.321575672681816`,188.49555921538757`},{1.893672395615476`,2.3218407511756847`,150.79644737231007`},{1.893744861069353`,2.3220469009902156`,113.09733552923255`},{1.8937966061754674`,2.3221941388875855`,75.39822368615503`},{1.8938276468686797`,2.3222824768383887`,37.69911184307752`},{1.8938379927049098`,2.3223119220240993`,0.`}};
gx = FindClusters(data);
ListPointPlot3D(gx)

The point-image I obtained:

enter image description here

how to order grouped fields in the sidebar on a node form

On my old Drupal 7 site, I was able to group a set of fields and display them as a tab in the sidebar. I’m moving it to Drupal 8 and using the adminimal theme. I created groups and am using the details sidebar widget. I’d like my custom groups to appear at the top of the sidebar. I’ve assigned a weight of -5 in Manage Form Display, but they still appear in the middle of the sidebar (even after clearing caches). Is there a way to control the order of groups in the sidebar, or am I maybe using the wrong widget? Thanks.

Google sheets: how to create a grouped per-30-day total without filling thousands of cells?

I have a google spreadsheet that counts a number of events that happened per day. This is what it currently looks like:

enter image description here

I would like to have a 30-day total running alongside, i.e., the total events for every 30 days. It would look something like this:

enter image description here

Here, U7 consists of the sum of the first 30 events (T7:T36), U8 is the sum of the next 30 (T37:T66), U9 sums the next 30 and so on.

I can quite easily do this by filling all of the cells in column U with:

=SUM(OFFSET($T$7,30*(ROW()-7),0,30,1))

but this means every cell has to be filled and it is a bit slow in the scheme of this spreadsheet, particularly as I will need numerous columns like this. Is there a way to do this with a single filter in the top cell or something of the sort? I haven’t been able to figure out a way to do that.

magento2 – Magento 2 – How to change fotorama nav shaft thumbnail image size – for grouped products?

I need to change the size of the small images below the gallery, but only for products of type grouped

enter image description here

Normaly you can change the size in the file THEME/etc/view.xml:

<?xml version="1.0"?>
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
    <media>
        <images module="Magento_Catalog">
            ...
            <image id="product_page_image_small" type="thumbnail">
                <width>110</width>
                <height>110</height>
            </image>
            ...

So I tried to change it for grouped products only like this:

<?xml version="1.0"?>
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
    <media>
        <images module="Magento_GroupedProduct">
            <image id="product_page_image_small" type="thumbnail">
                <width>129</width>
                <height>129</height>
            </image>
        </images>
        <images module="Magento_Catalog">
            ...
            <image id="product_page_image_small" type="thumbnail">
                <width>110</width>
                <height>110</height>
            </image>
            ...

Then I flushed the cache. But it does not work. The image size still stays 110px instead of 129px.