clickhouse – Display COUNT(*) for every week instead of every day

Let us say that I have a table with user_id of Int32 type and login_time as DateTime in UTC format.
user_id is not unique, so SELECT user_id, login_time FROM some_table; gives following result:

┌─user_id─┬──login_time─┐
│    1    │  2021-03-01 │
│    1    │  2021-03-01 │
│    1    │  2021-03-02 │
│    2    │  2021-03-02 │
│    2    │  2021-03-03 │
└─────────┴─────────────┘

If I run SELECT COUNT(*) as count, toDate(login_time) as l FROM some_table GROUP BY l I get following result:

┌─count───┬──login_time─┐
│    2    │  2021-03-01 │
│    2    │  2021-03-02 │
│    1    │  2021-03-03 │
└─────────┴─────────────┘

I would like to reformat the result to show COUNT on a weekly level, instead of every day, as I currently do.
My result for the above example could look something like this:

┌──count──┬──year─┬──month──┬─week ordinal┐
│    5    │  2021 │    03   │       1     │
│    0    │  2021 │    03   │       2     │
│    0    │  2021 │    03   │       3     │
│    0    │  2021 │    03   │       4     │
└─────────┴───────┴─────────┴─────────────┘

I have gone through the documentation, found some interesting functions, but did not manage to make them solve my problem.
I have never worked with clickhouse before and am not very experienced with SQL, which is why I ask here for help.

json formatting – How to display past list items related to a column value?

In order to display a custom hover card, you need to use customCardProps element. See more details here. It has the following properties:

openOnEvent

  • hover – card appears on mouse hover;
  • click – card appears on click on the field.

directionalHint

  • topCenter bottomCenter leftCenter rightCenter
  • isBeakVisible – boolean. if true the card has a beak.

enter image description here

Sample JSON

{
    "elmType": "div",
    "txtContent": "@currentField.title",
    "customCardProps": {
        "openOnEvent": "hover",
        "directionalHint": "rightCenter",
        "isBeakVisible": true,
        "formatter": {
            "elmType": "div",
            "style":{ "display": "block", "font-size": "15px", "padding": "10px" },
            "children": [
                {
                    "elmType": "div",
                    "style": { "display": "block", "width":"100%", "text-align": "center", "padding": "10px" },
                      "children":[
                        {"elmType": "div", "txtContent":"Jour 1: 11-05-2021"},
                        {"elmType": "div", "txtContent":"Jour 2: 12-05-2021"},
                        {"elmType": "div", "txtContent":"Jour 3: 13-05-2021"},
                        {"elmType": "div", "txtContent":"Jour 4: 14-05-2021"}
                      ]
                   
                }
            ]
        }
    }
}

In your case, you will have to create a new multiline field that would include all this information. Then, you can create a Power Automate flow that is responsible for populating this new field automatically.

This way, your JSON formula will simply need to reference a single field to display correct content.

You can make your card as fancy as you want. For example:

enter image description here

Display Author Registration Date – WordPress Development Stack Exchange

In author archive, I want to show author registration date in the following format:

January 16, 2021

I have found this code:

$user_ID = $post->post_author;
echo the_author_meta( 'user_registered', $user_ID );

But its output format is:

2021-01-16 10:40:52

How can I strip off time and get my desired format?

I am using date format F j, Y

Display color representation quality (IPS vs VA technology)

I always thought that IPS is superior in colors (and viewing angles) to the VA panels. However, I’m now buying a monitor, and as I was reading about various parameters, I’ve come across color gamuts and HDR. I’ve noticed that many cheaper VA displays have better percentages on measured color gamuts (sRGB, Adobe RGB and DCI-P3) and higher number HDR (with same viewing angles – usually 178° both vertically and horizontally).

Am I missing something, or is color quality primarily dependent on those and is no longer “bound” to the IPS technology?

(I am aware that VA can have black smearing issues and also probably worse blur but I’m currently only focusing on color quality – connected also with viewing angle because it can affect it a lot.)

9 – Programmatically enable the entity view display

I figured it out. You can enable Layout Builder by running the following code in a custom module:

$entity_type = 'node';
$content_type = 'article';
$view_type = 'default';

Drupallayout_builderEntityLayoutBuilderEntityViewDisplay::load("{$entity_type}.{$content_type}.{$view_type}")
  ->enableLayoutBuilder()
  ->setOverridable()
  ->save();

Hopefully this helps someone else. Having to do it via the UI is painful if you have a lot of content types. I’m actually surprised this isn’t a Drush command yet. Oh well.

Source: https://www.drupal.org/project/drupal/issues/3158916

macbook pro – Mac heating up when conencting to an external display

macbook pro – Mac heating up when conencting to an external display – Ask Different

javascript – v-data-footer__pagination display wrong number in Vue

I using data-list in vue something like below

<data-list :payload="modelObj" v-model="pagination" class="product_table" :headers="headers" :total="total" :pagination="pagination" >

I implemented searching on this list
Code something like

data(){
    NewValueSearching:''
    filterObj: {
        search: ''
      },
}

The function get data something like this

   this.modelObj.loading = true
   this.modelObj.module = this.MODULE_URL
   this.filterObj.isChanged = 1
   if(this.filterObj.search !== this.NewValueSearching){
     this.filterObj.isChanged = 0
     this.NewValueSearching= this.filterObj.search
    
   }

Then i call get list data function when i searching like code below

 filterObj.search' () {
      this.getDataHandler ()
    }

My problem is when page loaded data i go to page number 2 or number 3 and i search the list display data but the current page display wrong number it should be return to page 1 when user go to page 2 ,page 3 and so on and try to search

enter image description here

In image above it is display 76 it should display 1.

Thank you so much

Webform Computed Data Display Grade and Text based on result

I am building a quiz using webforms and the computed data twig and have a question if something is possible and if there is documentation on how to build this.

The quiz is 20 questions and each answer has a value of 1-5, I have all of the computed data working and it is able to show the final score properly, but was wonder if I could assign a grade and give short text feedback based on the score.

For example:
A user scores less than 70 they would receive a grade of “Below Average”, 70-80 Average and 81-100 “Above Average” and then some text giving them feedback on their score depending on this range they scored in. Is this possible to do in webforms?

Thank you so much for any help!

Display constraint error in the ajax modal window

From within a form, I have added a link which open a modal form in which I can edit a Paragraph.
Here is the code for this link:

$form('my_modal_edit_form') = (
  'title' => $this->t('Edit'),
  'url' => $this->ensureDestination($url),
  'attributes' => (
    'class' => (
      'use-ajax',
    ),
    'data-dialog-type' => 'modal',
    'data-dialog-options' => Json::encode((
      'height' => '99%',
      'width' => '95%',
    )),
  )
);

This is working fine except when I have added a constraint on the Paragraph being edited:

When I wrongly encode this modal form to fire the constraint, the constraint error message will not be displayed in the modal form but in a “new” form which is not modal (I mean the same form but not modal).

This could lead to a data loose in the following scenario:

1-Change a field value of field AAA in the “original” form

2-Open the modal form to edit the paragraph

3-Wrongly encode it to fire the constraint

4-A new Paragraph Edit form is displayed (the modal is removed). This means that the “original” form is “replaced” thus we lost the encoding of the AAA field.

My question is: How can I make sure that the modal is not replaced by the “not modal” same form
when an error is displayed

Note: It looks like some constraints are working fine:

Working fine: A required “text” field will display some kind of popup near the missing value in the modal form

Not working: But a required “file” field will go into the problem. (A file field that you set as required in the Field UI)

Mirroring display in Recovery Mode with faulty lid sensor and LCD?

Today I bought a 2017 Macbook that has a water damaged LCD and a faulty closed-lid sensor. My intention is to factory reset it and use it as a build system (i.e. develop my app on my desktop, then remotely connect into the machine to compile / distribute).

When in MacOS, I can ⌘ Command+F1 to mirror to an external display, but obviously that doesn’t work in recovery mode. One suggestion was to boot to recovery, then simply close the lid to make the external display the primary display, but with a faulty “lid closed” sensor, I can’t do that.

Another suggestion was to close the lid, then run a fridge magnet over the corner of the unit to activate the closed-lid sensor. I tried this, but it just puts the unit to sleep, and I need to open the lid to start it back up.

Someone else suggested attempting to drag the window over from one screen to another, but I tried a bunch of times and had no luck because it’s a bit of a stab in the dark to hit something that thin.

I have a dock at work that I intend to try (so I can close the lid, do the magnet, then use an external keyboard to try and wake the device), but until I can get to it, I’m wondering if there’s a way to mirror the display, or at least move the window so I can proceed with reinstallation of MacOS?

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123