air travel – Can I still fly to Pakistan if my passport number on my Pakistan Origin Card does not match my current passport number?

I think you can (but would be worth checking!) since there is no qualification of:

  • Seven years card validity (except foreign spouse)

at High Commission for Pakistan London. (The foreign spouse exclusion merely is to limit the validity to five years.)

Timatic is not very helpful with:

Visa required, except for Passengers with a Pakistan origin
card (POC) or a national ID card for overseas Pakistanis

since there is no mention of the numbers having to match (though lack of that is a good sign, in a way).

Getting current page type in model?

Magento 2.3.4

Is it somehow possible to get the current page in a model? I am using some sort of page speed optimizer and want to disable some of its features on the product page. I checked the code and the place to do that would be in a model class.

Possible?

Getting current page type in model?

Magento 2.3.4

Is it somehow possible to get the current page in a model? I am using some sort of page speed optimizer and want to disable some of its features on the product page. I checked the code and the place to do that would be in a model class.

Possible?

linux – Debian – How to create an image file .img of your current system as a backup

I am new to Linux Embedded, and I am now trying to make sure I back up my system before making changes. I intend to use dd if=/dev/sdX of=/destinationPath/backup.img to create the image file and save it to my 16GB sd card, so if something goes wrong, I can just reboot my device using the backup.img file.

My question is how to determine which partition should I use as the input sdX in the command line dd dd if=/dev/sdX of=/destinationPath/backup.img. Specifically, this is my system:

root@fun-shrimp:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0  7.3G  0 disk
├─mmcblk0p1  179:1    0  128M  0 part /boot
├─mmcblk0p2  179:2    0    1M  0 part
├─mmcblk0p3  179:3    0    2G  0 part /home
└─mmcblk0p4  179:4    0  5.1G  0 part /
mmcblk0boot0 179:32   0    4M  1 disk
mmcblk0boot1 179:64   0    4M  1 disk
mmcblk0rpmb  179:96   0    4M  0 disk
mmcblk1      179:128  0 14.9G  0 disk  <------ My 16GB SD card
└─mmcblk1p1  179:129  0 14.9G  0 part
root@fun-shrimp:~#

Also, is there anything I should be aware of when doing this?

currencies – Current sentiment: Positive (Both stock market and bitcoin)…. Can you use bitcoin to invest in Stocks?

I was playing with the idea of enhancing portfolio risk/return characteristics. And one thing institutions do is hedge currency risk by investing in multiple different currency denominated assets. (Using complex solutions, swaps, derivatives, etc).
So. What exchanges if any allow you to use bitcoin / crytpto deposits to purchase stock market public equities or etf’s?
And wouldn’t this equate to bitcoin denominated ownership in Apple / MSFT / ADBE / KO / JNJ etc?

Stock market goes up – you win.
Bitcoin goes up – you win.

Thoughts? Advise?

woocommerce – Return product list based on current product attribute

I have modified my single-product.php and want to pop in a block of other products that share the same brand name which I have specified in a product attribute called ‘brand’.

This is my code so far but it is returning all the products and NOT filtering by the pa_brand.

<!-- Custom 4 up product filtered by Brand attribute -->    
    <ul class="products">
                <?php
            $args = array(
                'post_type' => 'product',
                'posts_per_page' => 4,
                'taxonomy' => 'pa_brand',
                'field'    => 'slug',
                'terms'    => $product->get_attribute( 'brand' )
                );
            $loop = new WP_Query( $args );
            if ( $loop->have_posts() ) {
                while ( $loop->have_posts() ) : $loop->the_post();
                    wc_get_template_part( 'content', 'product' );
                endwhile;
            } else {
                echo __( 'No products found' );
            }
            wp_reset_postdata();
        ?>
    </ul><!–/.products–>

lightning network daemon – How do I explore the current commitment transaction for a channel?

I would like to see how a commitment transaction for a given payment channel looks like (without actually closing the channels and transmitting the transaction to the network 🙂

I assume that all of the building blocks (such as balances) are somewhere in channel.db. Is there a way to quickly get this information out and construct the commitment transaction out of it without much coding?

php – How do you show the current page when refreshing AJAX pagination?

I created a numeric pagination that loads the data via AJAX.

This is the code:

 $(document).ready(function(){  
      load_data(1); 
     
      function load_data(page)  
      {          
        $.ajax({
                url:"pagination2.php",  
                method:"POST", 
                data:{page:page},  
                success:function(data){  
                     $('#load_data').html(data);
                } 
           }); 
      }  

      $(document).on('click', '.pagination_link', function(event) 
        {
            event.preventDefault(); 
            var page = $(this).attr("id"); 
            load_data(page);
            //Now push PAGE to URL
            window.history.pushState({page}, `Selected: ${page}`, `${'page=' +  page}`)
            return event.preventDefault(); 
      });
            window.addEventListener('popstate', e => {
            var page = $(this).attr("id");
            load_data(e.state.page);
            console.log('popstate error!');
    });
    
 }); 

The code works, but when I refresh the page the data are loaded again from the first page. test_ajax

Ex: If I click the button that loads the page 2 when I refresh the page the data are displayed from the page 1.

There is a way to remain on the same page even after the page refresh?

macos – Unable to open a new pane or window in the current directory in tmux

While using tmux version 3.1c, whenever I try to split the current pane into a new pane or a new window I get the following error

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Undefined error: 0

In the new split pane or window
$PWD automatically sets itself to the home directory

doing ls in the new pane, shows the content of the current directory as the content of the home directory.

How to debug this error?

PS: using bash 5.0.18 as the default shell

What is the current status of Representation Theory of $n$-ary groups in terms of hypermatrices?

An n-ary group is a generalization of the usual concept of a group where the binary operation (2-argument operation) is instead an n-ary (n-argument) operation. More info here

I was thinking about how to study n-ary groups and realized a lot of our understanding of groups is dependent on the fact that we have a concrete linear representation theory of them. I.E. a group $G$ can be thought of very concretely as collections of matrices, and then abstract questions about the group $G$ become concrete questions in linear algebra/algebraic geometry about the set of matrices, and sometimes that makes the questions tractable.

There is a generalization of the concept of a matrix to a concept called a hyper matrix (it’s an N-dimensional array of numbers as opposed to just 2 dimensional). And these hypermatrices support a very natural $N$-ary associative multiplicative operation on them (made by splicing the N-dimesional arrays of numbers into (N-1) dimensional sub arrays across each index and the taking dot products) , making them a ripe candidate for generalizing linear representation theory to the n-ary world.

It appears people know about this nice multiplication property, at least according to this guy.

But after digging through google and whatever free resources I have I was not able to find any reference in the literature on using hypermatrices to create a representation theory for $n$-ary groups. Just resources about hypermatrices themselves or n-ary groups themselves.

Does anyone know if such a project has been conducted before? and if so what are some papers/humans to get a general idea on the status of the field?