Skip to content
Setup existing Word...
Clear all

Setup existing Wordpress site for local development and testing using docker

1 Posts
1 Users
Illustrious Member
Joined: 4 months ago
Posts: 57399
Topic starter  

I am trying to setup an existing wordpress site in docker in my local system, I have all the site content copied to a folder in my local system and using 'Volumes' in docker compose file to tell docker which folder to use as the content but when i try to run docker compose and initialize containers website starts but it setups default wordpress template instead of using the existing content present in the local system.

Also i dont want to use any plugins to migrate content from the existing site as the content size is very huge, Could someone guide me through the best approach to clone the site.


Unreplied Posts

An inequality about the 2-Wasserstein distance


Let $W_2(mu,nu)$ denote the $2$-Wasserstein distance between two given probability measures $mu$ and $nu$ on $mathbb R^n$. For a probability measure $mu$ and $f:mathbb R^nto mathbb R^n$, let $f_{#}mu=mucirc f^{-1}$ denote the push-forward of $mu$ under $f$, i.e. $(f_{#}mu)(B)=mu(f^{-1}(B))$ for every Borel set $B$ in $mathbb R^n$. Why does the following inequality hold true?
$$W^2_2(f_{#}mu,g_{#}mu)leq int_{mathbb R^n}|f(x)-g(x)|^2,dmu(x) $$
for all $mu$-measurable functions $f,g:mathbb R^ntomathbb R^n$.

Some comment: the product measure $f_{#}muotimes g_{#}mu$ is a so-called transport plan and by definition of the Wasserstein distance
$$W^2_2(f_{#}mu,g_{#}mu)leq int_{mathbb R^ntimes mathbb R^n}|x-y|^2,d(f_{#}muotimes g_{#}mu)(x,y)=int_{mathbb R^ntimes mathbb R^n}|f(x)-g(y)|^2,dmu(x),dmu(y).$$


Is it possible to set up a task that will trigger only when a file is copied or moved into a specific folder?

My overall goal is to get a notification every time a file is copied or moved into a specific folder. I would like to try and avoid using external tools if possible. In order to achieve that I’ve created a task in task manager. This task should run every time a user copies or moves a file into this folder. I’m using the XML script that you can see below for the trigger.

Here is what ChatGPT spit out after several tries and refining of the request:

  <Query Id="0" Path="Security">
    <Select Path="Security"> 
            *[System[(EventID=4663 or EventID=4660) and 
                (EventData/Data[@Name='AccessMask'] = '0x2' or 
                EventData/Data[@Name='AccessMask'] = '0x1') and 
                (EventData/Data[@Name='ObjectType'] = 'File' or 
                EventData/Data[@Name='ObjectType'] = 'File (AD)') and 
                (EventData/Data[@Name='ObjectName'] = 'C:TA Data' or 
                starts-with(EventData/Data[@Name='ObjectName'], 'C:TA Data\'))]] 

When I copy or move a file into the folder the task doesn’t run.

Can someone help please?

Monoid with torsion elements


I am currently studying construction of the Grothendieck group of a commutative monoid $M$. I was looking for an example of a monoid that is torsion, namely, I have the following query.

Does there exist a monoid $M$ (written multiicatively with identity element denoted by $1$) that is not a group such that $x in M$ implies $x^n = 1$ for some $n in mathbb{N}$?


paging function for similar posts shows the right links when hovering, but stays on page 1

i show similar posts based on tags:

  //similar posts
  $postID = get_queried_object_id();
  $tags = wp_get_post_tags($postID);
  foreach ($tags as $tag) {
      //make array $xtag
      $xtag[] = $tag->slug;
      $count_tag = $tag->count;

 $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
            //echo $paged;
            $args = array( 
                    'exclude'   => $postID,
                    'order' => 'ASC',
                    'orderby' => 'name',
                    'posts_per_page' => 2,
                    'paged' => $paged,
                    'tax_query'  => array(
                            'taxonomy'  => 'post_tag',
                            'field'     => 'slug',
                            'terms'     =>  $xtag //apply $xtag array

$customPostQuery = new WP_Query($args);
//checking the max number of pages
echo $customPostQuery->max_num_pages;

//etc. printing the posts in a foreach loop

This works. Then i call a paging function, that should show similar posts by page:

if (function_exists("similar_post_pagination")) {                            

This is the similar_post_pagination function. It prints the pagination and when hovering the links also shows the correct links, but stays on page 1. I noticed that global $wp_query is empty. Apperently nothing happens here.

function similar_post_pagination($pages = "", $range = 2) { 
            $showitems = $range * 1 + 1;

            global $paged;
            if (empty($paged)) {
                $paged = 1;

            if ($pages == "") {
               global $wp_query;
               **//this is empty**
               $pages = $wp_query->max_num_pages;
               echo 'empty $pages '.$pages;
               if (!$pages) {
                   $pages = 1;

            if (1 != $pages) {
                echo "<div class='archiv-pager'>";

                if ($paged > 2) {
                   echo "<a class='page-numbers' title='" .
                       $first ."' href='" . get_pagenum_link(1) . "'><<</a><span>| </span>";

                if ($paged > 1) {
                   echo "<a class='page-numbers' title='" . $prev . "' href='" . get_pagenum_link($paged - 1) . "'>< </a>";

               for ($i = 1; $i <= $pages; $i++) {
                   $delimiter = "  ";
                   if ($i > 1) {
                       $delimiter = "•  ";
                   } else {
                       $delimiter = "";
                   if (
                       1 != $pages &&
                            (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) ||
                           $pages <= $showitems)
                    ) {
                       if ($paged == $i) {
                           echo $delimiter . "<span class='page-numbers current'>" . $i . "</span>";
                       } else {
                           echo $delimiter . "<a class='page-numbers inactive' title='" . $page . $i . "' href='" . get_pagenum_link($i) . "' >" . $i . "</a>";
               if ($paged < $pages) {
                   echo "<a class='page-numbers' title='" . $next . "' href='" . get_pagenum_link($paged + 1) . "'> ></a>";
               if ($paged + 1 < $pages) {
                   echo "<span>| </span><a class='page-numbers' title='" . $last . "' href='" . get_pagenum_link($pages) . "'>>></a>";
                echo "</div>";
                } else {
                 echo '<div class="dummy-pager"></div>';

What do i have to use in this function for the pagination to work? Another query? Is it a scope issue? The same function works for archiv pages, but not for the similar posts.
Sorry about the length of this question and thanks for your interest. gurky

Can generating functions be used to solve evolution matrix differential equations and recurrence relations of matrices?


Generating functions seem to be a powerful tool in discrete mathematics for solving differential equations and recurrence relations. I’ve been trying to figure out if these methods can be expanded to differential equations that involve matrices, such as Schrodinger’s equation. Is there anything that prevents a solution to these types of differential equations being written using generating functions? For example, given a solution to Schrodinger’s equation as

$$ U = Te^{-i hbar int_{0}^{t’} H(t) ,dt} $$

Where H(t) is some time-dependent Hamiltonian matrix and T is the time-ordering operator. This form seems very reminiscent to exponential generating functions. For example, the generating function for the Bessel functions is given by $$ e^{frac{x}{2}(t-frac{1}{t})}=sum_{n=-infty }^{infty} J_n(x)t^n $$

So, if the time evolution of the Hamiltonian gave something similar to the generating function above, where x is now the matrix Hamiltonian, can the exponential be re-written in a form using the Bessel functions of matrix argument? I’d assume that the matrix argument of a Bessel function would be similar to an analytic function of matrix argument, but everything I find seems to write Bessel/Hypergeometric functions in terms of zonal polynomials, and the wikipedia page for hypergeometric functions of matrix argument even mention that these types of functions aren’t similar to writing other functions in terms of matrix arguments. That doesn’t make sense to me though since these special functions have these generating function relations. Any help would be appreciated if someone could point me towards the literature too.


there a 1px red line on my monitor screen

it might sound kinda stupid I know, “it’s just a line at the top” but it bothers me because of the toc.

obs: it interacts with what’s behind it, it’s not a simple line. sometimes it looks like it’s turning off and on smoothly


about it, it’s not from the browser, although it seems, I used a program that I have that deletes everything, I deleted the browser, and after I restarted the computer limiting it to microsoft applications, the line continued.
(it doesn’t appear on screenshots)

Calculating L-smoothness constant for logistic regression.


I am trying to find the $L$-smoothness constant of the following function (logistic regression cost function) in order to run gradient descent with an appropriate stepsize.

The function is given as $f(x)=-frac{1}{m} sum_{i=1}^mleft(y_i log left(sleft(a_i^{top} xright)right)+left(1-y_iright) log left(1-sleft(a_i^{top} xright)right)right)+frac{gamma}{2}|x|^2$ where $a_i in mathbb{R}^n, y_i in{0,1}$,$s(z)=frac{1}{1+exp (-z)}$ is the sigmoid function.

The gradient is given as
$nabla f(x)=frac{1}{m} sum_{i=1}^m a_ileft(sleft(a_i^{top} xright)-y_iright)+gamma x $.

My ideas was that the smoothness constant $L$ has to be bigger than all the eigenvalues of the hermitian of the given function, this follows from the fact that if $f$ is $L$-smooth, $g(x)=frac{L}{2} x^T x-f(x)$ is a convex function and therefore the hessian has to be positive semi-definite.
The second-order partial derivatives of $f$ are given as

$ frac{partial^2 }{partial x_k partial x_j}f(x)=frac{1}{m} sum_{i=1}^ms(a_i^{top} x)left(1-s(a_i^{top} x)right)[a_i]_k[a_i]_j+gammadelta_{ij} $

from the following github post ( i know that $ L=frac{1}{4} lambda_{max }left(A^{top} Aright)+gamma$ , where $lambda_{max }$ denotes the largest eigenvalue, which seems good since i figured out that $s(a_i^{top} x)left(1-s(a_i^{top} x)right)leq frac{1}{4}$ for all $x$.

But i am not able to fit everything together. I would appreciate any help.


GnuCash – Help Buttons Not Working

GnuCash 2.6.15 – Debian Stretch

gnucash-docs and yelp packages installed.

While in GnuCash, when I activate a sub-window “Help” button (e.g. as seen by clicking Edit -> Find… -> Help), the mouse pointer changes from a pointer icon to the active processing icon for about 15 seconds. It then changes back to a pointer icon without any other action. No help dialog is created.

However, when clicking (on the main toolbar menu) Help -> Tutorial and Concepts Guide, said guide comes up as is should!

I suspect I may be missing a package, but which one?

Ultrafilters and compactness


A topological space is compact if and only if every ultrafilter is convergent.

While I was reading the proof of the one Side of theorem above, there is something I could not understand. Following is the proof of of the one side of the theorem.

Let $X$ be compact and assume that $mathcal{F}$ is the ultrafilter on $X$ without a limit point. Then for each $xin X$, there exists an open neighborhood $U_{x}$ of it such that each $U_{x}$ does not contain any member of $mathcal{F}$. Since $mathcal{U}={U_{x} : xin X}$ is an open cover of $X$, there exists a finite subfamily ${U_{x_{i}}: i=1,2,…,n}$ of $mathcal{U}$ such that $X=bigcup_{i=1}^{n} U_{x_{i}}$. Let $Ainmathcal{F}$ be fixed. Then $A=(Acap U_{x_{1}})cap (Acap U_{x_{2}})…(Acap U_{x_{n}})inmathcal{F}$ and thus there exists an $iin{1,2,…,n}$ such that the subset $Acap U_{x_{i}}$ is in $mathcal{F}$ which is a contradiction.

The thing that I could not understand, why there exists $iin{1,2,…,n}$ such that $Acap U_{x_{i}}$ must be in $mathcal{F}$? If you clarify this, it would highly be appreciated. Thank you.