ag.algebraic geometry – About condition for structure sheaf of a scheme being compact object in a category of sheaf of module over X

I found the condition for one direction :
Categorical interpretation of quasi-compact quasi-separated schemes

This article said that if $X$ is quasi compact and quasi separated, $mathscr{O}_X$ is a compact object in $Qcoh(X)$. A comment said that if the structure sheaf is compact( the global section functor preserves a colimit in $Qcoh(X)$), then $X$ is quasi compact.

Is there any result about quasi-separatedness?

magento2 – How to Create an ‘AND’ Condition for Layered Navigation Magento 2?

Filtering with layered navigation on attribute 1, attribute 2 and attribute 3, I get the parent product because the child products have filtered attributes like child product 1 => attribute 1, child product 2 => attribute 2 and attribute 3, but I need to show this parent product which one child has 3 attributes together, for example child 1 => attribute 1, attribute 2 and attribute 3.
Is it possible ?
Plugin bellow

IndexBuilder.php

      <?php

namespace VendorModulePluginCatalogSearchModelSearch;
use MagentoFrameworkDBSelect;
use MagentoFrameworkSearchRequestFilterInterface;
use MagentoFrameworkSearchRequestFilterBoolExpression;
use MagentoFrameworkSearchRequestQueryFilter;
use MagentoFrameworkSearchRequestInterface;
use MagentoFrameworkSearchRequestQueryInterface as RequestQueryInterface;
use MagentoFrameworkAppResourceConnection;
use MagentoCatalogApiCategoryRepositoryInterface;
use MagentoCatalogModelCategoryFactory;
use MagentoCatalogModelProduct;
use MagentoFrameworkDataHelperPostHelper;

class IndexBuilder
{
    /**
    * @var MagentoFrameworkAppConfigScopeConfigInterface
    */
    protected $scopeConfig;

    /**
    * @var MagentoStoreModelStoreManagerInterface
    */
    protected $storeManager;
    protected $_stockFilter;
    private   $layerResolver;
    protected $categoryRepository;
    protected $_categoryCollectionFactory;
    protected $_date;
    protected $_filterData;
    protected $_productRepository;
    protected $_productDependant;
     /**
     * @var MagentoCatalogModelResourceModelProduct
     */
    private $resourceProduct;
    /**
     * @var MagentoCatalogModelCategoryFactory
     */
    protected $_categoryFactory;
    protected $_registry;
    protected $_request;
    private $resourceConfigurable;

    public function __construct(
        MagentoStoreModelStoreManagerInterface $storeManager,
        MagentoCatalogModelResourceModelProductCollectionFactory $productCollectionFactory,
        MagentoCatalogModelProductVisibility $productVisibility,
        MagentoCatalogHelperCategory $categoryHelper,
        MagentoFrameworkRegistry $registry,
        MagentoCatalogInventoryHelperStock $stockFilter,
        MagentoCatalogModelLayerResolver $layerResolver,
        CategoryRepositoryInterface $categoryRepository,
        MagentoCatalogModelResourceModelCategoryCollectionFactory $categoryCollectionFactory,
        CategoryFactory $categoryFactory,
        MagentoFrameworkAppRequestHttp $request,
        MagentoFrameworkStdlibDateTimeTimezoneInterface $date,
         ShoogaSearchByFilterModelFilterData $filterData,
         ShoogaLinkedDependantsModelFilterData $productDependant,
        MagentoCatalogModelProductRepository $productRepository,
        MagentoCatalogModelResourceModelProduct $resourceProduct,
        MagentoConfigurableProductModelResourceModelProductTypeConfigurable $resourceConfigurable
    ) {
        $this->storeManager = $storeManager;
        $this->_productCollectionFactory = $productCollectionFactory; 
        $this->_productVisibility = $productVisibility;
        $this->categoryHelper = $categoryHelper;
        $this->_registry = $registry;
        $this->_stockFilter = $stockFilter;
        $this->layerResolver = $layerResolver;
        $this->categoryRepository = $categoryRepository;
        $this->_categoryCollectionFactory = $categoryCollectionFactory;
        $this->_categoryFactory = $categoryFactory;
        $this->_request = $request;
        $this->_date =  $date;
        $this->_filterData = $filterData;
        $this->_productRepository = $productRepository;
        $this->_productDependant = $productDependant;
        $this->resourceProduct = $resourceProduct;
        $this->resourceConfigurable = $resourceConfigurable;
    }

    /**
    * Build index query
    *
    * @param $subject
    * @param callable $proceed
    * @param RequestInterface $request
    * @return Select
    * @SuppressWarnings(PHPMD.UnusedFormatParameter)
    */
    public function aroundBuild($subject, callable $proceed, RequestInterface $request) {
        $select = $proceed($request);
        $storeId = $this->storeManager->getStore()->getStoreId();
        $rootCatId = $this->storeManager->getStore($storeId)->getRootCategoryId();
        $productUniqueIds = $this->getCustomCollectionQuery();
        $select->where('search_index.entity_id IN (' . join(',', $productUniqueIds) . ')');

        return $select;
    }
        public function getProductsSkus($id){
      return $this->resourceProduct->getProductsSku($id);
    }
    public function getCurrentCategory()
    {        
        return $this->_registry->registry('current_category');
    }
  
    /**
    *
    * @return ProductIds()
    */
    public function getCustomCollectionQuery() {
       
        $todayStartOfDayDate = $this->_date->date()->setTime(0, 0, 0)->format('Y-m-d H:i:s');
        $todayEndOfDayDate = $this->_date->date()->setTime(23, 59, 59)->format('Y-m-d H:i:s');
        $websiteId = $this->storeManager->getStore()->getWebsiteId();
        $collection = $this->_productCollectionFactory->create();
        $collection->addAttributeToSelect('*');
        $collection->addAttributeToSelect(array('entity_id','sku'));
        
      
               $collection->addAttributeToFilter(
        'news_from_date',
        (
            'or' => (
                0 => ('date' => true, 'to' => $todayEndOfDayDate),
                1 => ('is' => new Zend_Db_Expr('null')),
            )
        ),
        'left'
    )->addAttributeToFilter(
        'news_to_date',
        (
            'or' => (
                0 => ('date' => true, 'from' => $todayStartOfDayDate),
                1 => ('is' => new Zend_Db_Expr('null')),
            )
        ),
        'left'
    )->addAttributeToFilter(
        (
            ('attribute' => 'news_from_date', 'is' => new Zend_Db_Expr('not null')),
            ('attribute' => 'news_to_date', 'is' => new Zend_Db_Expr('not null')),
        )
    );

        $collection->setOrder('sort_order', 'ASC');
            
    
       
        $collection->addWebsiteFilter($websiteId);
        $collection->setVisibility($this->_productVisibility->getVisibleInSiteIds());
        $collection->addAttributeToFilter('status',MagentoCatalogModelProductAttributeSourceStatus::STATUS_ENABLED);
        $collection->setPageSize(
                    $collection->getSize()
                )->setCurPage(
                    1
                );
       /*You can write your custom logic here...*/

        $getProductAllIds = $collection->getAllIds();
        $getProductUniqueIds = array_unique($getProductAllIds);
        return $getProductUniqueIds;
    }

    

}

Achieve peak condition of your business with SolusVM! | NewProxyLists

1. SolusVM Extended modules for WHMCS 1.10.0

The buzz around Proxmox VE 7.0 release may be slowly calming down, but our motivation to build software dedicated exclusively to top system management platforms seems to only grow stronger over time (and so is our Kickstarter project!).

Today we present you not one but two marvelous updates of that kind with much to commend them! Obtain the 1.10.0 edition of either SolusVM Extended VPS For WHMCS or SolusVM Extended Cloud For WHMCS (or both!) to experience flawless WHMCS 8.2 support as well as empower your customers to easily change the main or additional IP addresses for their VPS servers. Additionally, the varied range of details stored neatly in the client area has been stretched even further to cover the current operating system and assigned CPUs!

Make giant strides in the quality of your SolusVM server offerings!

2. Products Reseller For WHMCS 1.2.2

Products Reseller For WHMCS delivers one compelling new feature of single sign-on support for cPanel products that clients aquired by your resellers can now take full advantage of in their day-to-day workflows. This, along with various refinements in the functional powers, have been introduced to the 1.2.2 version to unlock an even greater reselling experience!

Make your reseller business spot-on with Products Reseller For WHMCS!

3. Upscale your reselling business with WHMCS!

Make your next stop at the EasyDCIM blog, where the brand-new article has just popped up as a part of the series solving mysteries around dedicated servers. This time we are offered a chance to see Products Reseller For WHMCS module from the perspective of its integration with EasyDCIM Dedicated Servers For WHMCS in a brand-new light!

This publication is full of a fresh insight into this modern WHMCS software equipment, and how it will help you make a name for yourself on the fiercely competitive market, as well as cater for your resellers with attention down to the last detail, yet almost zero effort.

Open your business to the world!

Need Custom Software Development For Your Business?

Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!

Counting the number of permutations which staisfy the condition

Problem

I really have a clue on how to proceed forward, I do have the solution but I do not quite understand it.

Join two lists according to False condition

I am new to MMA. I have a question of joining two lists according to a condition. Suppose I have two lists with same number of elements,

l1={a>b,x>y,m>n}
l2={c>d,False,j>k}

I want to join the two lists according to a condition: join each list’s element according to their positions in the list if they both are inequalities. If there is a False in l2, then ignore both elements of that position. For example,

  1. The first element of l1 is a>b, and the first element of l2 is c>d, then the first element of the new list will be {a>b,c>d}.
  2. The second element of l1 is x>y, but the second element of l2 is False. So we will ignore position number 2.
  3. The third element of l1 is m>n, and the third element of l2 is j>k, then the second element of the new list will be{m>n,j>k}.

Therefore, the new list will be {{a>b,c>d},{m>n,j>k}}.

Another example:

l3={a>b,c>d,x>y,j>k}
l4={False,False,False,m>n}.

Then the new list I want will be {{j>k,m>m}}

Thank you in advance for your generous help!

python – Calculate the mean of a nested group if the condition holds

I own a dataset (df) which contains the historical daily (date) demand (demand) of different supermarkets (id_store). Each id_store offers different products (id_product), but the assortment varies daily, so the same id_product is not offered every day.

My goal is to find the mean demand of the last four identical weekdays (t-7, t-14, t-21, t-28) for each id_product of the respective id_store, if the id_product was offered in the id_store on more than one identical weekday. If the id_product was not offered on any or only one identical weekday, NaN should be returned.

import numpy as np
import pandas as pd

def mean_weekday_4w(df):

    query = "id_store == '%s' & id_product == '%s' & (date == '%s' | date == '%s' | date == '%s' | date == '%s')"
    mean_weekday_list = ()

    for i, row in df.iterrows():
        df_query = df.query(query % (row("id_store"),
                                     row("id_product"),
                                     row("date") - pd.Timedelta(days=7),
                                     row("date") - pd.Timedelta(days=14),
                                     row("date") - pd.Timedelta(days=21),
                                     row("date") - pd.Timedelta(days=28)))
    
        if df_query.shape(0) >= 2:
            mean_weekday_list.append(df_query("demand").mean())
        else:
            mean_weekday_list.append(np.nan)


    df.loc(:, "mean_weekday_4w") = mean_weekday_list

    return df

I know using iterrows is very inefficient but all my attemps using groupby have failed.

bitcoin core – OP_IF condition in P2SH transaction fails on publishing

I am trying to build a simple payment transaction with the condition such that after 105 blocks are mined I can take back the locked funds. I am doing this in regtest.
Following is the redeem script:

OP_IF 
   OP_2 037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f7 
     02fcb1c7507db15576ab35cd7c9b1ea570141a8b81c9938dae0320392b0f7034d0 OP_2 
     OP_CHECKMULTISIG 
OP_ELSE 105 OP_CHECKSEQUENCEVERIFY OP_DROP 
   037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f7 OP_CHECKSIG 
OP_ENDIF

The corresponding address is:

2MvtqHu88v1u6ovi8teTNeoz3frk3fH5zMH

I get the following funding transaction:

$ bitcoin-core.cli -regtest -rpcuser=test -rpcpassword=test generatetoaddress 1 2MvtqHu88v1u6ovi8teTNeoz3frk3fH5zMH
(
  "43dbc0a0fd995f70fea89fb6eb6098a4f881cd64a30f417b884b549b52e54cce"
)
$ bitcoin-core.cli -regtest -rpcuser=test -rpcpassword=test getblock 43dbc0a0fd995f70fea89fb6eb6098a4f881cd64a30f417b884b549b52e54cce|jq .tx
(
  "624d92839eb89104d0909df89f95785cb8bb77f0fec66c6c40cf3ad2804a3966"
)

I create the following signature preimage:

01 00 00 00 (version)
01 (input count)
66394a80d23acf406c6cc6fef077bbb85c78959ff89d90d00491b89e83924d62 (previous tx)
00000000 (previous txout index)
71635221037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f72102fcb1c7507db15576ab35cd7c9b1ea570141a8b81c9938dae0320392b0f7034d052ae670169b27521037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f7ac68 (redeem script)
ffffffff (sequence)
02 (output count)
00ca9a3b00000000 (amount)
1976a914bfbca807e507802e27a64c2b9c2915819033990c88ac (P2PKH)
f0006bee00000000
1976a9142004e0ff6a6f08115d048fd9af177fae702f681a88ac (p2PKH)
00000000 (locktime)
01000000 (sighash_all)

which is signed by private keys:

L26JcHRhqEQv8V9DaAmE4bdszwqXS7tHznGYJPp7fxEoEQxxBPcQ for 037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f7

and

KxR8HHyfAwFPidCw2vXThXqT4vSMNeufirHFapnfCfkzLaohtujG for 02fcb1c7507db15576ab35cd7c9b1ea570141a8b81c9938dae0320392b0f7034d0

And the following transaction is created:

$ bitcoin-core.cli -regtest -rpcuser=test -rpcpassword=test decoderawtransaction 010000000166394a80d23acf406c6cc6fef077bbb85c78959ff89d90d00491b89e83924d6200000000fd06010047304402204c287224a6d18870e35d282069a10c3d18712616b8c7abe90cf8a12b2dc1927c02203f4f7c4a1ee3af7835473512b7e094131974fb54d91c574fc109e343f91c931a0147304402205b71bb4e032e830a645c7466c720a892a69770767eb0efeabcf2cfbc73229f3102204732229df52bfea9e44fba9a945db8c4d04880bae74d5a819328a04182ca8daf0101014c71635221037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f72102fcb1c7507db15576ab35cd7c9b1ea570141a8b81c9938dae0320392b0f7034d052ae670169b27521037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f7ac68ffffffff0200ca9a3b000000001976a914bfbca807e507802e27a64c2b9c2915819033990c88acf0006bee000000001976a9142004e0ff6a6f08115d048fd9af177fae702f681a88ac00000000
{
  "txid": "1dbffb942c0abe5b238a09846d29eeae5f3859e74657e122d556f3f832715021",
  "hash": "1dbffb942c0abe5b238a09846d29eeae5f3859e74657e122d556f3f832715021",
  "version": 1,
  "size": 383,
  "vsize": 383,
  "weight": 1532,
  "locktime": 0,
  "vin": (
    {
      "txid": "624d92839eb89104d0909df89f95785cb8bb77f0fec66c6c40cf3ad2804a3966",
      "vout": 0,
      "scriptSig": {
        "asm": "0 304402204c287224a6d18870e35d282069a10c3d18712616b8c7abe90cf8a12b2dc1927c02203f4f7c4a1ee3af7835473512b7e094131974fb54d91c574fc109e343f91c931a(ALL) 304402205b71bb4e032e830a645c7466c720a892a69770767eb0efeabcf2cfbc73229f3102204732229df52bfea9e44fba9a945db8c4d04880bae74d5a819328a04182ca8daf(ALL) 1 635221037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f72102fcb1c7507db15576ab35cd7c9b1ea570141a8b81c9938dae0320392b0f7034d052ae670169b27521037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f7ac68",
        "hex": "0047304402204c287224a6d18870e35d282069a10c3d18712616b8c7abe90cf8a12b2dc1927c02203f4f7c4a1ee3af7835473512b7e094131974fb54d91c574fc109e343f91c931a0147304402205b71bb4e032e830a645c7466c720a892a69770767eb0efeabcf2cfbc73229f3102204732229df52bfea9e44fba9a945db8c4d04880bae74d5a819328a04182ca8daf0101014c71635221037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f72102fcb1c7507db15576ab35cd7c9b1ea570141a8b81c9938dae0320392b0f7034d052ae670169b27521037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f7ac68"
      },
      "sequence": 4294967295
    }
  ),
  "vout": (
    {
      "value": 10.00000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 bfbca807e507802e27a64c2b9c2915819033990c OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914bfbca807e507802e27a64c2b9c2915819033990c88ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": (
          "mxzmMmVycLDgAA48VtHDeh389eDAwiJqwQ"
        )
      }
    },
    {
      "value": 39.99990000,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 2004e0ff6a6f08115d048fd9af177fae702f681a OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a9142004e0ff6a6f08115d048fd9af177fae702f681a88ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": (
          "miSFmBeKXf5Wp7Luj46XTu3Yh57nAwhZAo"
        )
      }
    }
  )
}

On publishing I get the following error:

$ bitcoin-core.cli -regtest -rpcuser=test -rpcpassword=test sendrawtransaction 010000000166394a80d23acf406c6cc6fef077bbb85c78959ff89d90d00491b89e83924d6200000000fd06010047304402204c287224a6d18870e35d282069a10c3d18712616b8c7abe90cf8a12b2dc1927c02203f4f7c4a1ee3af7835473512b7e094131974fb54d91c574fc109e343f91c931a0147304402205b71bb4e032e830a645c7466c720a892a69770767eb0efeabcf2cfbc73229f3102204732229df52bfea9e44fba9a945db8c4d04880bae74d5a819328a04182ca8daf0101014c71635221037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f72102fcb1c7507db15576ab35cd7c9b1ea570141a8b81c9938dae0320392b0f7034d052ae670169b27521037fadaea6edf196bf70af16cefb2bd3c830e54c0a6e9a00bf7806b241933547f7ac68ffffffff0200ca9a3b000000001976a914bfbca807e507802e27a64c2b9c2915819033990c88acf0006bee000000001976a9142004e0ff6a6f08115d048fd9af177fae702f681a88ac00000000
error code: -26
error message:
non-mandatory-script-verify-flag (Data push larger than necessary)

Not sure where I made mistake. Please help resolve this issue.

Flow number condition returning false

Flow condition is returning False, even though the condition is actually true.

Condition: if Total score is greater than or equal 7.

flow image

Any ideas?

probability distributions – A condition for the vacuum generating functional

In Theorem 1 of this paper Segal stablish a relation between states and generating functionals. He assert that in order to μ be a generating functional must satisfy

enter image description here

Then, as an example he show the functional

enter image description here

is the zero-interaction vacuum generating functional.

The question is: Why this functional satisfies the desidered condition?

What is the difference between a race condition and a TOCTOU attack

I assume that a malicious actor can exploit both a race condition and a TOCTOU for personal gain, but how do these attacks differ. An explanation with example would be greatly appreciated