Gutenberg Block Filter Hook Key

I’m wanting to add some functionality to the featured image block in the Gutenberg editor. I’ve got pretty close:

enter image description here

The problem is, I’m unable to select an image, and posts that already had a featured image assigned, are not loading the image in the block.

I think this must be due to the original block object’s key not being set. I’ve tried a random value, the post id, the media post id, ‘render’, ‘thumbnail’, and ‘post-thumbnail’, but no dice. What is ‘my-key’ suppose to be set to? Why is the featured image not loading, and not able to be set and saved?

window.wp.hooks.addFilter(      'editor.PostFeaturedImage',      'myplugin/myhook',      function( original ) {          console.log (original);         return function() {              return (                 window.wp.element.createElement(                      'div',                      { key: 'outer' + Math.random() },                      [                         'Prepend above',                         _.extend( original( {} ), { key: 'my-key' } ),                         'Append below'                      ]                 )             );         }      }  ); 

Magento 2.3 MGS front-end block not working correctly on live website

I am facing a strange issue in Magento 2.3.

I am using Unero template with MGS front-end builder which contains a block to show products by attribute.

It was working fine until recently I noticed it ignores the attribute I define and shows only grouped products regardless of the selected attribute.

The strange part is that the same block is working correctly on local development machine with an exact copy of the live website and DB.

Of course I’ve already tried clearing the cache multiple times and tried even disabling cache but it didn’t help.

What am I missing here?

Positive semi-definite block diagonal covariance matrix with exponential decay

I am implementing Kalman filtering in R. Part of the problem involves generating a really huge error covariance block-diagonal matrix (dim: 18000 rows x 18000 columns = 324,000,000 entries). We denote this matrix Q. This Q matrix is multiplied by another huge rectangular matrix called the linear operator, denoted by H.

I am able to construct these matrices but it takes a lot of memory and hangs my computer. I am looking at ways to make my code efficient or do the matrix multiplications without actually creating the matrices exclusively.

library(lattice) library(Matrix) library(ggplot2)  nrows <- 125  ncols <- 172  p <- ncols*nrows  #--------------------------------------------------------------# # Compute Qf.OSI, the "constant" model error covariance matrix # #--------------------------------------------------------------#    Qvariance <- 1   Qrho <- 0.8    Q <- matrix(0, p, p)     for (alpha in 1:p)   {     JJ <- (alpha - 1) %% nrows + 1     II <- ((alpha - JJ)/ncols) + 1     #print(paste(II, JJ))      for (beta in alpha:p)     {       LL <- (beta - 1) %% nrows + 1       KK <- ((beta - LL)/ncols) + 1        d <- sqrt((LL - JJ)^2 + (KK - II)^2)       #print(paste(II, JJ, KK, LL, "d = ", d))        Q[alpha, beta] <-  Q[beta, alpha] <-  Qvariance*(Qrho^d)     }   }     # dn <- (det(Q))^(1/p)   # print(dn)    # Determinant of Q is 0   # Sum of the eigen values of Q is equal to p    #-------------------------------------------#   # Create a block-diagonal covariance matrix #   #-------------------------------------------#    Qf.OSI <- as.matrix(bdiag(Q,Q))    print(paste("Dimension of the forecast error covariance matrix, Qf.OSI:")); print(dim(Qf.OSI)) 

It takes a long time to create the matrix Qf.OSI at the first place. Then I am looking at pre- and post-multiplying Qf.OSI with a linear operator matrix, H, which is of dimension 48 x 18000. The resulting HQf.OSIHt is finally a 48×48 matrix. What is an efficient way to generate the Q matrix? The above form for Q matrix is one of many in the literature. In the below image you will see yet another form for Q (called the Balgovind form) which I haven’t implemented but I assume is equally time consuming to generate the matrix in R.

Balgovind form for Q

Magento 2 include template with form in CMS Block

I have been struggling trying to put a template functionally working inside a CMS Block. When I put this code inside my CMS block the template is correctly implemented

{{block class="Experius\DonationProduct\Block\Donation\ListProduct" name="cms.donation.list" template="Experius_DonationProduct::donation.phtml"}} 

However , the template has a pop up window that comes up when you click a button, and that pop up has a form. The problem is that the pop up window does not comes up when its in the CMS block, its like if JS functions were not working.

The template is located in app/design/frontend/Vendor/Theme/Experius_DonationProduct/templates/donation.phtml its override from the original module. What can I do? Thank you and greetings!

Magento 2.3 Add/Update Block

In Magento 2.3 EE, If we are going to add or update block, there we can get the Row and inside that we have to place HTML Code. But this row makes my page layout which is different than the previous block and the layout got changed because of this new Row section added in the Block. Please suggest me any solution in Magento 2.3 where I can get the previous layout of block or is there any way to remove row from that block.

How to block Twitter accounts/pages in firewall that show offensive/adult material?

Instead of blocking all twitter pages/accounts, I would like to block that ones only that may have adult content. Since these accounts are somehow flagged by twitter (you are asked, if you really want to see the contents and you have to give it an okay), I thought there must be a way to block these accounts by a firewall. Actually we are using a Sophos XG with HTTPS decrypt & scan. Any ideas?

Magento Observer to block spam orders not working

I’m facing some issues with orders placed by bots.

enter image description here

I noticed that all orders are made by a specific phone number and also by a specific street. So I looked for a way to block orders that are made with that phone number or this street.

I found the following link https://www.ashsmith.io/2012/12/making-use-of-observers-in-magento/.
I followed the steps to create an observer with the event sales_order_place_before, to compare the parameters sent in the order to the parameters that I want to block.

  1. I created the file Blockbots_Observer.xml on /html/app/etc/modules;
  2. I created the file Config.xml on /html/app/code/local/Blockbots/Observer/etc;
  3. Finally, I created the file Observer.php on /html/app/code/local/Blockbots/Observer/Model;

After all these steps, the implementation did not work (I am still receiving orders from bots).

Here is the code on files:

Blockbots_observer.xml: enter image description here

Config.xml: enter image description here

Observer.php: enter image description here

What could be wrong with implementation? Any idea how I can fix it?

block executing before modal click

I have a modal with 2 buttons that have a click function. Inside of each of these click functions is a block that’s suppose to only be executed when clicked. However the block seems to be executed before one of the buttons are clicked.

buttons: [             {                 text: $  .mage.__(`Don't Allow`),                 class: 'dontAllow',                 click: function(){                     console.log(`I clicked Don't Allow`);                     <?= $  block->disableAdminUsage(); ?>                     this.closeModal();                 },             },             {                 text: $  .mage.__('Ok'),                 class: 'action',                 click: function(){                     console.log("I clicked Ok");                     <?= $  block->enableAdminUsage(); ?>                     this.closeModal();                 },             }         ], 

OS X Firewall Block all incoming Connections Affecting Software Updates?

I just bought a 2017 Macbook Pro with the latest OS (Mojave). In the OS X Mojave Security and Privacy-Firewall settings, I set Firewall to “Block all incoming connections” as I am extra cautious, but will my software (such as Chrome web browser, Firefox, etc.) still get new updates? For example, will my Firefox browser still get the latest software updates or will I have to manually check for software updates because the firewall is blocking all incoming connections?