seo – Change the canonical URL within a product variations group when one goes out of stock?

Ecommerce shop has different pages for different product sizes:

  • /shirt-size-s/
  • /shirt-size-m/
  • /shirt-size-xl/

They all point to /shirt-size-s/ as canonical and only this page goes to sitemap.xml

What should happen when /shirt-size-s/ goes out of stock, but sizes M and L are still available? I guess I should:

  1. Remove /shirt-size-s/ from sitemap
  2. Add /shirt-size-m/ to sitemap
  3. Set canonical to /shirt-size-m/

Is this the best practice with current site structure?

How do I change option name?

I have sort link ‘Best’ in exposed form. I want after user click this link, link title changes to ‘New’

I’m try this, but it don’t work:

function helper_form_views_exposed_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
    if($form('#id')== 'views-exposed-form-pozdravleniya-taxonomy-term-page-1') {
      $form('sort_by')('#title') = '';
      $form('sort_by')('#options')('created') = '';
      if ($form('sort_by')('#value') == 'count') {
        $form('sort_by')('#options')('count') = 'New';
      }
    }
}

Also I’m try this, it don’t work too:

function helper_form_views_exposed_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
    if($form('#id')== 'views-exposed-form-pozdravleniya-taxonomy-term-page-1') {
      $form('sort_by')('#title') = '';
      $form('sort_by')('#options')('created') = '';
      if ($form_state->getValue('sort_by') == 'count') {
        $form('sort_by')('#options')('count') = 'New';
      }
    }
}

Screenshot form dump

python 3.x – Tkinter – Can I change the background color for a TTK Label set in ReadOnly mode? I tried but it didn’t work

In according with the TTK documentation (https://tkdocs.com/shipman/ttk-map.html), in my code, I tried to change the background color only for the TTK labes placed in readonly mode, but unfortunately it doesn’t work. I replicated the issue below:

from tkinter import *
from tkinter import ttk

class MainWindow:
    def __init__(self):
        self.parent=Tk()
        self.parent.geometry("350x250")
        self.parent.title("Test")
        self.parent.configure(background="#f0f0f0")

        style=ttk.Style()
        # only the "foreground" option works, but the "background" one not. why?
        style.map("TEntry", background=(("readonly", "white")), foreground=(("readonly", "red")))
        
        self.MyEntrySV=StringVar()
        self.MyEntry=ttk.Entry(self.parent, textvariable=self.MyEntrySV, state="readonly", width=48)
        self.MyEntrySV.set("why is background grey and not white?")
        self.MyEntry.place(x=10, y=10)
        
        self.parent.mainloop()

obj=MainWindow()

I’m working on Windows 10 Professional x64. if nobody know how o solve the issue, how can I contact the Tkinter team? it’s a really frustrating issue, and I want to solve it!

applications – Change layout onclick button

i have one fragment and two button within, btn1 , btn2
if click btn1 i want to show one chart and if click btn2 i want to show one table with same data as Chart

what is your opinion to do this?

dnd 5e – Can the Wish spell change my spell list?

Ignoring the stress aspects caused by using Wish in this way, this is the important part of the spell for you:

You might be able to achieve something beyond the scope of the above examples. State your wish to the DM as precisely as possible. The DM has great latitude in ruling what occurs in such an instance, the greater the wish, the greater the likelihood that something goes wrong. This spell might simply fail, the Effect you desire might only be partly achieved, or you might suffer some unforeseen consequence as a result of how you worded the wish. For example, wishing that a villain were dead might propel you forward in time to a period when that villain is no longer alive, effectively removing you from the game. Similarly, wishing for a legendary magic item or artifact might instantly transport you to the presence of the item’s current owner.

So short answer, yes, the spell can do what you want but the DM gets the final say.
For something like allowing a PC to change their spells I would hope the DM would say yes to your request without trying to trick you.

google maps – If we want to give the apps fake geolocation datas is it enough to change only the GPS data or i need to change all datas that are transsmitted?

When we change the GPS data using fake GPS app the cell id of our BTS still shows completely different region (the region of our real location). Isn’t that enough for third-party applications to understand that the received Gps datas are fake ? We know that most of positioning systems using hybrid thechnologies for positioning and not a specefic one .In this case if we want to give the third party apps fake datas is it enough to change only the GPS data or i need to change all datas that are transsmitted (Gsm,wi fi, ect.)

Change header (top and bottom)

I would like to make the space at the top and bottom of the header smaller. Also, I want to make sure that the entire header (logo and menu) is not included when I scroll down.

What is the best way to get this done?

I am using the theme: Conceptly

Header:
enter image description here

Header on text:
enter image description here

graphics – Change mesh density of Graphics3D object made of Triangles

I am new to mesh discretisation on Mathematica. I have a Graphics3D object made up of Triangles, that I would like to convert into a MeshRegion object using DiscretizeGraphics (see https://reference.wolfram.com/language/ref/DiscretizeGraphics.html).

In particular, I would like to control the mesh density. The above link tells me to use the MaxCellMeasure option, but it doesn’t seem to make any difference to my graphics!

Thus,

Table(DiscretizeGraphics(g, 
  MaxCellMeasure -> {"Area" -> m}), {m, {0.3, 0.01, 0.001}})

gives:
enter image description here

As you can see, the meshing is unchanged. It doesn’t matter if I replace “Area” by “Volume” or “Length”.

Can someone please tell me how to do this properly? Is this happening because my Graphics is already made up of triangles?

¿Which Mac Book/Mac Book Pro is LAST models users can change battery, memory, and hard drive?

¿Which Mac Book/Mac Book Pro is LAST models users can easy change/replace/upgrade battery, memory, and hard drive? Now (year 2021) no Mac Book/Mac Book Pro allow user easy upgrade. Easy upgrade means Apple allow user upgrade, no lose warranty.

How to change option name in Drupal 8 form element?

I have sort link ‘Best’ in exposed form. I want after user click this link, link title changes to ‘New’

I’m try this, but it don’t work:

function helper_form_views_exposed_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
    if($form('#id')== 'views-exposed-form-pozdravleniya-taxonomy-term-page-1') {
      $form('sort_by')('#title') = '';
      $form('sort_by')('#options')('created') = '';
      if ($form('sort_by')('#value') == 'count') {
        $form('sort_by')('#options')('count') = 'New';
      }
    }
}

Also I’m try this, it don’t work too:

function helper_form_views_exposed_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
    if($form('#id')== 'views-exposed-form-pozdravleniya-taxonomy-term-page-1') {
      $form('sort_by')('#title') = '';
      $form('sort_by')('#options')('created') = '';
      if ($form_state->getValue('sort_by') == 'count') {
        $form('sort_by')('#options')('count') = 'Новые сверху';
      }
    }
}

Screenshot form dump