(Firmware Update) My android doesn’t have a physical home button, can be forced off, or has a removable battery

I’ve heard people suggest to force the phone off with the Off button, and the sound buttons, but that doesn’t seem to work. I also can’t remove the battery. I’m not sure what to do, whether I should just let the phone die or something. I also don’t think I can take it to a phone shop or something, because I’m in Mexico on vacation rn with limited money. I’m so glad my phone decided to do this dumb shit right now. Anyway, last time I’m relying on an android ;b

seo – Google image site search doesn’t show the images I’d like to have indexed, instead mostly pdf images and video thumbnails

On my magento 1.7 site, the images aren’t visible on Google image search. When I search for site:example.com, I find mostly PDF images and pictures from videos.

PDF-youtube image

How do you configure Magento to for google image to index only the images shown in the HTML?

RNG Event and Registration module doesn’t work with my Drupal 9.0.9

i receive this message and i can’t use module 🙁

Not compatible
RNG – Events and Registrations (Not supported) 3.x-dev 3.0.0-alpha1

any suggestions ?
thanks a lot

8 – Cart API doesn’t fire the “update cart” event

Following this documentation I have created a custom event subscriber for add, update and remove items from cart. It works good and events are fired in every case you add,update or remove items from the cart on the cart page or from the shop view.
I have installed Commerce Cart Fly Out, that uses Commerce Cart Api and a fly-out window to show the cart, and It uses REST to update and remove. If you remove an item, then my remove event is fired. But if you update the quantity, update event is not fired. I have followed, with xdebug, the execution progress until class CartUpdateItemsResource and its patch method, that save the order item. The line is updated well but my update event is not fired. I don’t know the reason.

This is my custom Event subscriber:

 * Cart Event Subscriber.
class MyCartEventSubscriber implements EventSubscriberInterface {

  protected $database;

  protected $messenger;

  protected $cartManager;

  public function __construct(MessengerInterface $messenger, CartManagerInterface $cart_manager) {
    $this->messenger = $messenger;
    $this->cartManager = $cart_manager;
    $this->database = Drupal::database();

  public static function getSubscribedEvents() {
    return (
      CartEvents::CART_ENTITY_ADD => (('addToCart', 100)),
      CartEvents::CART_ORDER_ITEM_REMOVE => (('removeFromCart', 100)),
      CartEvents::CART_ORDER_ITEM_UPDATE => (('updateCart', 100)),

  public function addToCart(CartEntityAddEvent $event) {
    Drupal::logger('CartEvent')->notice('add to cart');
    // ... some code

  public function removeFromCart(CartOrderItemRemoveEvent $event) {
    Drupal::logger('CartEvent')->notice('remove from cart');
    // ... some code

  public function updateCart(CartOrderItemUpdateEvent $event) {
    Drupal::logger('CartEvent')->notice('update cart item');
    // ... some code

8 – Multisite doesn’t properly work

I tried to install a second site on a multi-site installation, following the instructions on Set up a multisite.

I am using WAMP Stack. The steps I have followed are the following.

  • I installed Drupal Core 8.9.x
  • I configured the directory alias on the Apache server
  • I renamed /sites/exmaple.sites.php to sites.php and added the $sites['localhost.sa'] = 'localhost.sa'; line
  • I copied the example.setting.php file from /site/default to the directory for the second site

The installation of the second site has been successful. The front page loads, but any link redirects to the main site, not the second site.

The Apache virtual host configuration file contains the following lines.

<VirtualHost *:80>

  ServerName localhost

  ServerAlias localhost

  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local

The Apache directory alias is defined as follows.

Alias /sa "C:wamp64wwwdrupal8portal/"

<Directory "C:wamp64wwwdrupal8portal/">
    Options Indexes FollowSymLinks MultiViews
  AllowOverride all
  <ifDefine APACHE24>
        Require local
    <ifDefine !APACHE24>
        Order Deny,Allow
    Deny from all
    Allow from localhost ::1

postgresql – When doing an UPSERT, how do I return the record even if the update doesn’t actually make a change?

This is a problem for me because I am processing upserts off a queue that can not be made to be FIFO. So we have the application sending us a timestamp with the record to upsert. We only want to update if the timestamp is newer than the record in the DB, but we always want to return the record.

Currently the query looks something like:

INSERT INTO people (firstName, lastName, email, timestamp) 
firstName = EXCLUDED.firstName,
lastName = EXCLUDED.lastName,
timestamp = EXCLUDED.timestamp
WHERE people.timestamp < EXCLUDED.timestamp

Which does exactly what I need it to do, EXCEPT, when I get a stale record from the queue. The DB record is more current than the queue record, and I want that current DB record returned.

I am trying to do this without making separate checks from the application to reduce latency between the DB and app code.

So I want something like:

INSERT INTO people (firstName, lastName, email, timestamp) 
IF people.timestamp > EXCLUDED.timestamp
  SET email = EXCLUDED.email #essentially forcing an update that doesn't really update anything
  firstName = EXCLUDED.firstName,
  lastName = EXCLUDED.lastName,
  timestamp = EXCLUDED.timestamp
  WHERE people.timestamp < EXCLUDED.timestamp

How would I do something like this?

stack exchange – Why do i get a: This question doesn’t meet our quality standards?

Stack Exchange Network

Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

unity – Comparing strings doesn’t work

I’m making something for a dialogue system that reads “cues” from a textfile to identify which emotion to show in the character’s portrait during a conversation. Basically if the current line says “2”, it means change the portrait to where the character is smiling. “1” for neutral, etc. Unfortunately the part that compares the emotion variable, and the string from the text file doesn’t return true.

I already checked using debug.log if the string from the text file is showing the right number, and it does. I tried comparing them using “==” sign and “.equals();” but neither seems to work.

public TextAsset textFileP;
public string() textLineP;   
public GameObject character;
public Animator anim;
public string smile = "2";

void Start()
    anim = GetComponent<Animator>();
    if (textFileP != null)
        textLineP = (textFileP.text.Split('n'));

void Update()
    if (DialogueParser.nextLine < DialogueParser.textLine.Length - 1)
        //change portrait
        if (Input.GetKeyDown(KeyCode.Mouse0))
            string cue = textLineP(DialogueParser.nextLine);
            // Debug.Log(cue);
            if (cue.Equals(smile))
                anim.SetInteger("2", 2);


hooks – woocommerce_order_status_changed doesn’t fire when I change Order Status from Woocommerce Dashboard

I updated Woocommerce to 4.7.0 and woocommerce_order_status_changed hook doesn’t fire anymore. It has been working before perfectly.

Now when I go to the Dashboard, Woocommerce -> Orders -> Select Order -> Change Status (dropdown) -> Save.
The hook doesn’t fire / run the necessary function at all.

We have many custom statuses, so we need to handle these from code by this hook.

How can I catch the status changes of an order from this version?

sharepoint server – Creating a new document in a Modern library doesn’t work properly

I was hoping someone could point me in the right direction on a strange problem. In our SharePoint 2019 system we recently installed when you go to a library and click New Document and select a content type with an associated Word template we named “Blank Document”, Word is not launched. Instead a new item called “Document” is automatically created in the Modern library called “Document” but with no extension. When you open the “document” you see what looks like binary but there is a enough readable text to indicate that it is the “blank Document” template. After downloading the item and adding .the docx extension I was able to confirm that it was indeed the “blank document” template.

Here’s the funny part if in the library you switch to Classic mode, everything works fine. So I was wondering whether Modern actually supports the ability to create a document from a template. If does support it what issue could be stopping if from working given it works in Classic? I should point out the above behavior described above is not localized to one just library but happens in every library in our system.