filter – In a grouped list, how to display items of an intersection of two groups

Provided I have a category which gives x non mutually exclusive options.
I have a list of items which can be tagged with several of these mutually non exclusive options.

  • Item 1
  • Item 2
  • Item 3
  • Group C …

A user can now select one/several of the options so they retrieve a list of items according to each options they selected and the union of these options, if needed.

  • Group A — selected
  • Group B — selected
  • Group C

I have a constraint when it comes to displaying the result: the items must be grouped under the options they are tagged with.

This is where I am faced with a choice to make in order to display the items which are tagged with several of the select options – hence are at the intersection of several groups.

The alternatives are: display each items several times, one under each group they belong to, like so:

Or display a group for each intersection of groups

  • Group A
  • Group B
  • Group A + B

Solution 1 result in a duplication of the content (the item), solution 2, a duplication of the meta-information (the categories).

Now, this was an imaginary explanation. My real case implies 5 categories each with between 3-5 options and two nested grouping based on 2 of these categories. As a result, whichever solution comes with a big overload of duplicated information – just think of the possible combination of groups.
Nonetheless, I would like to have your opinions and knowledge on which would be the worse of two evils out of these two solutions ?

I might add that the value proposition I am working with for this content is partly, the number of items of content. Hence, albeit being more readable, I believe that solution 1 could be perceived as bearing disingenuity as it increase that number. Solution 2 would be worse in terms of readability though.

Of course, I am also investigating alternatives to grouping altogether but would like to put this problem out there for reflexion and see if someone comes with different angles than mine.

comment form not display – Drupal Answers

In D8, I create sub theme of Classy. In content type xyz create a field comment of comments field type.
And create a node of type xyz, but when view node, comment form not display. see only “Add new comment” heading.

In abc.theme file write code (abc is theme name)


  • Implements hook_preprocess_HOOK() for node.html.twig.

function abc_preprocess_node(&$variables) {

// Remove the “Add new comment” link on teasers or when the comment form is
// displayed on the page.

if ($variables(‘teaser’) || !empty($variables(‘content’)(‘comments’)(‘comment_form’))) {



when theme change to bartik comment form display perfectly.

Plz help how to display in custom (abc) theme?

how to display highest no?

It’s time for the highest bid. Ask three friends of yours to enter their bid for a Harry Potter antique broomstick and find out the highest bid by writing a program to calculate so in just a single line.

Display only 1 comment and then option to show more

I want to display only 1 comment and then have an option to “show more” to show the rest of the comments.

The story behind this is that I’ve on the homepage a feed with cards for blog posts and I added the comments section to this post card, so when the post has many comments they are all shown and it makes the post card look bad and the homepage too long.

I tried lazy load comments plugin but it just implement the lazy loading of the comments either on click or on scroll but still, when the comments are loaded they are shown all.


Google Sheets: How can I query all names and display it in another sheet according to it’s category?

You have a table of employees and skills. The skills are represented by checkboxes, and a “checked” box indicates that the employee has the relevant skill for that column.

You want to create a dropdown list of skills that will display the names of the relevant employees

Enter this formula in Cell B6 of the sheet containing the dropdown.

=query(data!A1:D5,"select A where "&SUBSTITUTE(ADDRESS(1,match(B3,data!B1:D1,0)+1,4), "1", "")&" = true",0)


  • employee/skills data is on sheet=”data”.
  • the headers are in row 1.
  • dropdown is on a separate sheet; the name of the sheet is unimportant.
  • dropdown is in cell B3


The select statement is completely predictable:

  • dropdown = WordPress: “select A where B=true”
  • dropdown = HTML; “select A where C=true”
  • dropdown = Bootstrap; “select A where D=true”

In each case, the variable is the column letter for the dropdown choice. This value is supplied by the following formula.

SUBSTITUTE(ADDRESS(1,match(B3,data!B1:D1,0)+1,4), "1", "")

This can be broken down as follows:


  • gets the index number of the dropdown string (from B3) in the data headers.
  • the purpose of +1 is to adjust for Column A.
  • the result is an integer that equals the column number of the dropdown string in Cell B3.


  • returns the cell address of the dropdown string (assuming row#1 – the header row).

SUBSTITUTE(ADDRESS(1,match(B3,data!B1:D1,0)+1,4), "1", "")

  • takes the cell address returned by “ADDRESS()”. The address will refer to a cell in row 1, and the “SUBSTITUTE” function will remove the row number (1).
  • result is the column letter of the dropdown string which is inserted into the where clause of the query.

file – How to display server read data to a particular client in java?

I have made server program which should send the file read content to a particular client. how can I achieve this in java socket programming to send the data to only particular clients using multitheading concepts.
serverPrgram -> connection made -> reads file content -> sends data -> particular clients.
How can one code this writing of file content to a particular client.

display – Can’t activate 1280 * 720 scaling on my 2K external monitor but 1280 * 800 works

I’m using a Lenovo 1440p display on my MBP through a DP to TB3 cable. The UI looks way too small on the native resolution so I’d like to achieve a 2x scaling to 1280 * 720. However, it seems I just can’t enable 1280 * 720 for some reason, but 1280 * 800 works (although with the black bars on the side because it’s 16:10 on a 16:9 monitor.)enter image description here

In SwitchResX, I can see the 1280*720 HiDPi option but notice that the “scaled” checkbox is unchecked while it should be checked, and selecting it doesn’t do anything.

Can anyone spot the problem here?

8 – Display the fields of the current taxonomy with an exposed form

I’m using the Taxonomy term view.

I expose the “Has taxonomy term” filter to my users.

I want to display the title and the fields of the current taxonomy even when a term has been typed in the exposed form.

However, apparently, when the view is filtered, views no longer finds the argument in the url since the url contains an all?tid=.

Do you know how to do it ?

7 – Display the fields of the current taxonomy with views and an exposed form

I’m using the Taxonomy term view.

I expose the “Has taxonomy term” filter to my users.

I want to display the title and the fields of the current taxonomy even when a term has been typed in the exposed form.

However, apparently, when the view is filtered, views no longer finds the argument in the url since the url contains an all?tid=.

Do you know how to do it ?

display – Ubuntu Through VirtualBox – Scaling Issues in 4K Screens

I have recently leaped into Ubuntu through VirtualBox on my laptop, and I am loving the experience. However, I have one problem that is bothering me all the time.

From VirtualBox, I am using the guest addition to auto-resize my VM screen when I change the window size. I have got it to work with the 4K panel on my laptop, and the scale of 200% works perfectly; the default 100% is too small to use on a 15 inch display. The problem is that every time I resize the window, the display scale goes back to 100%. I have to manually go to settings and select the 200% scale, which is quite inconvenient.

Thus, I was wondering if there is any way to fix the scale to 200%, even while using the auto-resize function. I have searched the Internet for nearly an hour, but haven’t seen any similar cases nor solutions…