How to decompose any permutation uniquely into k rotation products without common elements

I see the following theorem on page 3 of this book:

enter image description here

theorem 1.1

In addition to the identity permutation $left(begin{array}{l}
1,2, cdots, n \
1,2, cdots, n
end{array}right)$
(i.e. all elements are invariant), any permutation must be decomposed into the product of K rotations without common elements (i.e. the elements in any two rotations are different from each other, and the permutation is a rotation when k = 1), and the decomposition formula is unique (regardless of the order of the rotation factors).

The permutation $left(begin{array}{l}
1,2,3,4,5,6,7,8,9,10 \
3,5,4,1,2,6,8,10,7,9
end{array}right)$
in the book can be decomposed into the product of three rotations of $(1,3,4)(2,5)(7,8,10,9)$ without common elements.

wordpress.org – Woocommerce: how to make only certain products shippable?

I’m new to Woocommerce and am struggling to find a way to make only certain products shippable. I am creating an e-shop of physical products (food) and I want to configure that some of these products could be shipped and others could not (because some are too delicate). That is said, when the customer choose a non-shippable product he can pay it on the eshop and has to collect it in the store but can’t get it delivered.

Is there is way to specify a certain property when creating a new product. Or do I need to download a pluggin? Which one could make the trick?

Thank you

Iterative processing of Sentinel-2 for obtaining snow cover products in R

I´m working snow cover issues with Sentinel-2 images. I have managed to make a script on R to process the images 1 by 1 and get the snow cover product according the parameters given in Gascoin et al. 2019: NDSI > 0.4 and reflectance in red band >0.1.
I would like to be able to make this process with all the images in a directory automatically. Does anyone know how could i do it ???
My code is the following:

#Packages needed
library(RStoolbox)
library(raster)
library(ggplot2)
library(gridExtra)
library(rgdal)

setwd('/Desktop/images/s2') #Working directory

sentinel <-"20170225T105021_20170225T105020_T30TYN.tif" #image

swir <- raster(sentinel, band = 12) # Swir band
green <- raster(sentinel, band = 3) # green band
red <- raster(sentinel, band = 4) #red band

ndsi <- (green-swir)/(green+swir) # NDSI calculation 
ndsi(ndsi>1) <- 1; ndsi(ndsi< (-1)) <- -1 # rescale for avoiding outliers

r <- stack(ndsi, red) # layerstack with ndsi and red band

snow_reclass <- function(x1,x2) { #reclass function with snow cover paranmeters
  ifelse( x1 > 0.4 & x2 > 0.1, 1, 0)
}

snowcover <- overlay(r, fun=snow_reclass) #Apply the function to the layer stack (red and NDSI)

writeRaster(snowcover, "snowcover170225.tiff", #Export the result
            format="GTiff",
            overwrite=TRUE,
            NAflag=-9999)

Selling – Digital Products Web Store

Why are you selling this site?
As a webdeveloper i setup and develop custom sites, i set this up for interested clients who would like to use it to build their own online store

How is it monetized?
Via selling products on the websites the ones of your choice

Does this site come with any social media accounts?
Not currently, but i can setup the required accounts for you

How much time does this site take to run?
It should be as much as you want, from 30 minutes to 5 hours up to amount of products you want to list, and i will provide the required training for you to be able to speed things up and get time required to check orders or add products to the minimal amount possible

What challenges are there with running this site?
Alone a lot of things will be big challenges, but with help and support our team would provide there shouldn’t be any challenges
SEMrush

What will i get if i ordered this site ?
* Domain name registered at namecheap which is catchy and short name
* Ready to go store with latest version of opencart which is one of the best business stores software
* 1 Year unlimited hosting plan
* Training and support

 

javascript – Largest Triple Products without using sort?

I implemented the Largest Triple Products algorithm, but I use sort which makes my time complexity O(nlogn). Is there a way to implement it without a temporary sorted array?

The problem:
You’re given a list of n integers arr(0..(n-1)). You must compute a list output(0..(n-1)) such that, for each index i (between 0 and n-1, inclusive), output(i) is equal to the product of the three largest elements out of arr(0..i) (or equal to -1 if i < 2, as arr(0..i) then includes fewer than three elements).
Note that the three largest elements used to form any product may have the same values as one another, but they must be at different indices in arr.

Example:

var arr_2 = (2, 4, 7, 1, 5, 3);
var expected_2 = (-1, -1, 56, 56, 140, 140);

My solution:

function findMaxProduct(arr) {
  // Write your code here
  if(!arr || arr.length === 0)  return ();
  
  let helper = arr.slice();
  helper.sort((a,b)=>a-b);   // THIS IS THE SORT
  
  let ans = ();
  let prod = 1;
  for(let i=0; i<arr.length; i++) {
    if(i < 2) {
      prod *= arr(i);
      ans.push(-1);
    }
    else {
      if(i === 3) {
        prod *= arr(i);
        ans.push(prod);
      } else if(arr(i) < helper(0)) {
        ans.push(prod);
      } else {
        const min = helper.shift();
        prod /= min;
        prod *= arr(i);
        ans.push(prod);
      }
    }
  }
  
  return ans;
}

magento2 – Magento 2 – Get custom attribute of child products of a configurable

I tried to get value of my custom attribute of child products in product details of a configurable but without success.

This is my code but not work:

$simple_collection = $_product->getTypeInstance()->getUsedProducts($_product);
foreach($simple_collection as $simple_product){
echo $simple_product->getResource()->getAttribute('my_custom_attribute')->getFrontend()->getValue($simple_product);
}

Thanks for any help

Most Sustainable HYIP (Worth Referring) – Combines Trading + Real Products = Sustainable

PRAETORIAN Group Intl – Combines Trading with Products – Sustainable with 1 to 2% daily (Secured)
SECURE AND RELIABLE INVESTMENT (1 to 2% a day)
Are you looking for a cryptocurrency trading company that can give you a stable, reliable, safe and secure returns or profits on your investment? A company that has real faces behind, physical offices, holding regular video conferencing and meetings with you? And rewards you greatly through their referral programme? A company that combines trading with tangible products that generate income daily? Referral is not compulsory, you do so at wish. Selling products is not compulsory, you do so at wish. You can do only investment side. Then look no further. You are at the right place.
YOUR OPPORTUNITY FOR 2020 HAS COME TO YOU !

Please register through my link and join in the success.
https://pgiglobal.trade/left/otukwesidaniel

THE ONLY COMPANY WITH TANGIBLE PRODUCTS THAT GENERATE IT INCOME DAILY AND THAT GUARANTEES ITS SUSTAINABILITY

PASSIVE INCOME
You Earn between 1 – 2% of your Trading Package daily, Monday – Sunday Passive Income until you’ve earned 200% of your package value
Right Now PGI is Paying 1% AVERAGE 7 days a week

What are the Packages❓
First of All, Annual Software fee is only $19 .

SAPPHIRE
$100 | $300 | $500
Worth of BTC

RUBY
$1,000 | $5,000 | $10,000
Worth of BTC

EMERALD
$20,000 | $50,000 | $100,000
Worth of BTC

DIAMOND
$500,000 | Without Limit worth of BTC

ACTIVE INCOME (COMPENSATION PLAN)

Direct Referral
✅Sapphire – 6%
✅Ruby – 8%
✅Emerald – 10%
✅Diamond – 12%

Binary Bonus

Binary max pay per day

✅Sapphire – 8%
✅Ruby – 8%
✅Emerald – 8%
✅Diamond – 10%

Please register through my link and join in the success.
https://pgiglobal.trade/left/otukwesidaniel
Boost Up Bonus
if you have 2 Directs within 30 days 1 left and 1 right you earn an extra 2% on direct referral and binary
So as follows:

✅ Sapphire ✅
Direct – 6% to 8%
Binary – 8% to 10%

✅ Ruby ✅
Direct – 8% to 10%
Binary – 8% to 10%

✅ Emerald ✅
Direct – 10% to 12%
Binary – 8% to 10%

DIAMOND
Direct – 12% to 15%
Binary – 10% to 12%

Career Plan
✅ Montblanc Pen
✅ Latest iPhone or Samsung
✅ MacBook Air
✅ 5 Days Asian Cruise
✅ Honda Civic
✅ Rolex
✅ Mercedes Benz 0KM
✅ Tesla
✅ Lamborghini

NB: THE ONLY SYSTEM THAT OFFERS YOU A MASTERCARD TO WITHDRAW YO MONEY FROM WHEREVER YOU’RE, WOOW, THIS IS INCREDIBLE

REAL COMPANY, REAL PRODUCTS, What a new concept in network marketing

*SEE YOU OVER THE TOP WITH PGI
Please register through my link and join in the success.
https://pgiglobal.trade/left/otukwesidaniel
Ask me all other questions on whatsApp +233244732694 or join our global chat group here https://chat.whatsapp.com/EKMgGv1sSxNKGZUfwsCBfk

Most Sustainable HYIP found (Combines Trading + Real Products)

PRAETORIAN Group Intl – Combines Trading with Products – Sustainable with 1 to 2% daily (Secured)
SECURE AND RELIABLE INVESTMENT (1 to 2% a day)
Are you looking for a cryptocurrency trading company that can give you a stable, reliable, safe and secure returns or profits on your investment? A company that has real faces behind, physical offices, holding regular video conferencing and meetings with you? And rewards you greatly through their referral programme? A company that combines trading with tangible products that generate income daily? Referral is not compulsory, you do so at wish. Selling products is not compulsory, you do so at wish. You can do only investment side. Then look no further. You are at the right place.
YOUR OPPORTUNITY FOR 2020 HAS COME TO YOU !

Please register through my link and join in the success.
https://pgiglobal.trade/left/otukwesidaniel

THE ONLY COMPANY WITH TANGIBLE PRODUCTS THAT GENERATE IT INCOME DAILY AND THAT GUARANTEES ITS SUSTAINABILITY

PASSIVE INCOME
You Earn between 1 – 2% of your Trading Package daily, Monday – Sunday Passive Income until you’ve earned 200% of your package value
Right Now PGI is Paying 1% AVERAGE 7 days a week

What are the Packages❓
First of All, Annual Software fee is only $19 .

SAPPHIRE
$100 | $300 | $500
Worth of BTC

RUBY
$1,000 | $5,000 | $10,000
Worth of BTC

EMERALD
$20,000 | $50,000 | $100,000
Worth of BTC

DIAMOND
$500,000 | Without Limit worth of BTC

ACTIVE INCOME (COMPENSATION PLAN)

Direct Referral
✅Sapphire – 6%
✅Ruby – 8%
✅Emerald – 10%
✅Diamond – 12%

Binary Bonus

Binary max pay per day

✅Sapphire – 8%
✅Ruby – 8%
✅Emerald – 8%
✅Diamond – 10%

Please register through my link and join in the success.
https://pgiglobal.trade/left/otukwesidaniel
Boost Up Bonus
if you have 2 Directs within 30 days 1 left and 1 right you earn an extra 2% on direct referral and binary
So as follows:

✅ Sapphire ✅
Direct – 6% to 8%
Binary – 8% to 10%

✅ Ruby ✅
Direct – 8% to 10%
Binary – 8% to 10%

✅ Emerald ✅
Direct – 10% to 12%
Binary – 8% to 10%

DIAMOND
Direct – 12% to 15%
Binary – 10% to 12%

Career Plan
✅ Montblanc Pen
✅ Latest iPhone or Samsung
✅ MacBook Air
✅ 5 Days Asian Cruise
✅ Honda Civic
✅ Rolex
✅ Mercedes Benz 0KM
✅ Tesla
✅ Lamborghini

NB: THE ONLY SYSTEM THAT OFFERS YOU A MASTERCARD TO WITHDRAW YO MONEY FROM WHEREVER YOU’RE, WOOW, THIS IS INCREDIBLE

REAL COMPANY, REAL PRODUCTS, What a new concept in network marketing

*SEE YOU OVER THE TOP WITH PGI
Please register through my link and join in the success.
https://pgiglobal.trade/left/otukwesidaniel
Ask me all other questions on whatsApp +233244732694 or join our global chat group here https://chat.whatsapp.com/EKMgGv1sSxNKGZUfwsCBfk

magento2.3 – How to programatically assign multipe Bundle Products into one bundle product?

I have one project requirement, which have one Bundle product, in which requires multiple bundle products (nested levels) same as Simple Products Options association allows. Is there any way to customize this kind of functionality in Magento 2?

Please me give me some idea how to do it using code customisation.

rest api – WooCommerce return related products

I’m making a mobile app for my store.
What I want is that I when fetch the products from REST API, it should not just contain the related_ids but I just want to add an extra property to each product and that is related_products which should hold the actual product data of those related ids.

Because loading each related products separately is cumbersome user experience.
How can I customize the REST API to include the related_products property ?
Thanks in advance