Do docker images have the same root password?

If two persons are pulling the same docker image (let’s say Debian:10.4), they will obtain the same "files" (layers) from the docker repo.

So, from what I understand, launching a docker image is not exactly like a fresh install, it is more like a preinstalled OS. So I guess the two docker images debian:10.4 launched in two separate hosts should be as equivalent as possible to avoid difference in the behaviour from a host to another.

Considering this, I am asking myself if the root’s password is always the same on every debian:10.4 images.

I don’t know if we know the root’s password of this image or only the hash. But if someone could find a preimage of this hash, he would be able to log in in every SSH server based on a debian:10.4 ?

Or is there a minimal randomness applied at the start of a instance docker to ensure the dispersion of some security constant (root password, id_rsa key, …) ?

wc_get_products() not return the images details

When I try to fetch products using the official REST API, returned product contains the a property named images which is an array and contains the URL to image of product. But when I fetch using this method, it fetches other details but not the image.

    $  productsQuery= wc_get_products(array(         'limit' => 10,         'status' => 'publish',     ));     $  products = array();     foreach ($  productsQuery as $  product) {         $  products[] = $  product->get_data();     }     return new WP_REST_Response($  products, 200); 

how can I make this to return the images property as well.

What is the best way to draw 3d images of knots and show them on the web so that they can be rotated by the viewer? [closed]

On my html5 website , I would like to make graphics of tangles, similar to the following photo, a charged tangle , and I would like users to allow to rotate it and view it from all sides.

Is this the right forum to ask?

If so, what is the best way to realize this? ( I also have Mathematica and KnotPlot )

Any advice would be greatly appreciated.

Bulk upload images with custom URL

I am running a library system on WordPress. Right now, my book cover images are saved like this:
/wp-content/uploads/2020/06/[book_barcode].jpg

I want to change this to /wp-content/uploads/library/[book_barcode].jpg, but this would also be fine:
/wp-content/uploads/[book_barcode].jpg

I have a bunch of other images, so I can’t change the entire organization of my media folder. I will eventually have thousands of book cover images, so doing each one individually would be tedious. Is there any quick way to bulk upload?

Find angle between two images of a constellation

I am given two images of a constellation differing by an angle and I need to find that angle $ \theta$ . This is a problem of this past contest

Here is my idea:

  • If first image is $ [p_0, p_1, … p_n]$ then the other image would be $ [p_{\pi(1)}\cdot R_\theta,p_{\pi(2)}\cdot R_\theta,…]$ where $ R_{\theta}=\begin{pmatrix}\cos \theta&\sin\theta\-\sin\theta&\cos \theta\end{pmatrix}$ and $ \pi:{\mathbb Z_n }\mapsto{\mathbb Z_n}$ is a permutation.

  • We can consider the cyclic path from $ p_0$ to $ p_1$ and so on and back to $ p_0$ . We can find angle of rotation we make at a point $ p_i$ , i.e. if the angle between $ p_i-p_{i-1}$ and $ p_{i+1}-p_i$ . Let us denote this by $ \Delta\theta_i$ in first image and $ \Delta\theta’_i$ in second image.

  • This will remain same for both the images and we can find find the index $ j=\pi(1)$ such that $ \Delta\theta_1=\Delta\theta’_{j}$ .

  • Now the required angle would be the angle between $ p_2-p_1$ and $ p_{j+1}-p_j$ .

Now I wrote this code but I am getting ‘Wrong Answer’, so what am I doing wrong?

import           Control.Monad import           Control.Arrow import           Data.List import           System.IO  type Point = (Double, Double)  main :: IO () main = do     h         <- openFile "d.in" ReadMode     n         <- read <$  > hGetLine h     (ps, ps') <- splitAt n         <$  > replicateM (2 * n) ((\[a, b] -> (a, b)) . map read . words <$  > hGetLine h)     let qs    = getDeltas ps         qs'   = getDeltas ps'         rs    = getDeltas' qs         rs'   = getDeltas' qs'         idx   = getMatchingIndex rs rs'         theta = head qs - (qs' !! idx)         delta = head rs - (rs' !! idx)     when (abs delta > 1e-5) $   error "No soution"     h' <- openFile "d.out" WriteMode     hPrint h' $   if theta < 0 then theta + 2 * pi else theta     hClose h'  getDeltas' :: [Double] -> [Double] getDeltas' xs = map (\theta -> if theta < 0 then theta + 2 * pi else theta)     $   zipWith (-) (tail $   cycle xs) xs  getAngle :: Point -> Point -> Double getAngle (x, y) (x', y') =     let theta = atan2 y' x' - atan2 y x -- [-pi, pi] - [-pi, pi] = [-2pi, 2pi]     in  if theta < 0 then theta + 2 * pi else theta -- [0, 2pi]  getDeltas :: [Point] -> [Double] -- [0,pi] getDeltas xs =     zipWith (\(x, y) (x', y') -> getAngle (1, 0) (x' - x, y' - y)) xs (tail $   cycle xs)  getMatchingIndex :: [Double] -> [Double] -> Int getMatchingIndex xs ys = go 0 xs (ys ++ tail ys)   where     go k xs ys = if and (zipWith (\a b -> abs a - abs b <= 1e-5) xs ys)         then k         else go (k + 1) xs (tail ys) 

How to loop multiple images on a single page/post

Hello I am using openseadragon, and I was able to reference one image on my page via openseadragon, but how to do loop more images so I can have 5 more images on the pageā€¦

Currently I have this as my javascript

     var imagePath = "/wp-content/uploads/" + $  ('#materials-osd').attr('data-image');     var viewer = OpenSeadragon({         id: "materials-osd",         prefixUrl: "/wp-content/plugins/zoom-openseadragon/images/",         tileSources: {             type: "image",...
Code (markup):

How to loop multiple images on a single page/post