Microsoft Office – Is there a way to store variables in MS Word and use them in the app to display them?

I have a scenario where I provide more than 20 hyperlinks of a VM. So if the VMs IP is changed, I need to change manually everywhere in the document.
Is there a way to store variables like

vm_ip = "ec2-13-211-bla-bla.amazonaws.com"

So instead of giving a hyperlink ec2-13-211-bla-bla.amazonaws.com/swagger-ui.html/food-controller, I can give {vm_ip} /swagger-ui.html/food-controller

Something like that. I was looking in the macro, but it was confusing and I don't know how it works.

Assuming the variables are real and positive

I thought the following code would work,

Clear[a, h]
$Assumptions = Element[{a, h}, Reals && a > 0 && h > 0]
s = 3 a;
b = 2 a;
h = h /. Solve[{h^2 + b^2 == s^2}, h]

but $ h $ is always defined on a list.

It worked;

Clear[a, h]
s = 3 a;
b = 2 a;
h = h /. Solve[{h^2 + b^2 == s^2 && h > 0 && a > 0}, h, Reals] // Simplify // Normal

but not all assumptions can be made in advance, instead of an argument for Solve? TIA.

Annotation of variables in replacement rules

How to decorate or annotate a variable in a replacement rule?

for example

{(e((-X + Y)^2 || f))} //. {e((-a_ + b_)^2 || f) -> (-a + b)^2}

Ideally would come back:

(-lagXdt + lagYdt) ^ 2

Update:
What follows does not come back lagXdt and lagYdt but rather lagadt and lagbdt:

{(e((-X + Y)^2 || f))} //. {e((-a_ + b_)^2 || 
     f) -> (-Symbol("lag" <> ToString@a <> "dt") + 
      Symbol("lag" <> ToString@b <> "dt"))^2}

Global vs local variables in Arduino

In each example of an Arduino script I've seen, they declare the variables before configuration. I know that in C, it is considered bad practice to declare variables like this globally. Is there any reason why we declare some of them globally in Arduino instead of passing them to functions like C?

Guess the number with PHP session variables

I am trying to make you write a number between 1 and 9999, whether it is correct or not, but I can't do it, I pass the code in case you see the failure because I don't fully understand the session variables.
I also need to delete the number of attempts, which I imagine will be done with one to increase the variable, but I don't want to move on with that until I get the right number or not .

Adiv.php file



Adivina el número    


Adivina el número

Este juego trata de adivinar un número aleatorio entre 1 y 9999.
Escribe un valor que esté entre estos 2 valores y prueba suerte.

Adiv_Num.php file




Adivina el número





terminal – shell variables in the stand-alone application of the bash script

I have a bash script that mounts a fuse file system created with the borg backup tool. Mounting the file system requires a passphrase. The borg mount command reads the passphrase of an export in my shell script. So the first two lines of my script look like something

#!/bin/bash
export BORG_PASSPHRASE='mypassphrase'

Then I mount the filesystem with the mount command

borg mount user@server:/mntpoint::backup_repository /localmntpoint

The script works perfectly well. However, I would like to create a stand-alone application that runs this script. So I called the Borg script and created a Borg.app directory that contained Contents and MacOS as subdirectories and in MacOS I put the Borg shell script. This seems to be the usual way of turning a shell script into a clickable application. I am aware that one can click on the shell script itself and that a terminal will fire and run the script. I prefer the other option.

Unfortunately, nothing happens by clicking on my Borg.app. I suspect the problem is the early export command that is somehow missed by the mount command in this configuration.

Any help to solve this problem is greatly appreciated.

cv.complex variables – Learning roadmap for complex geometry

I am interested in pursuing my graduate studies in complex geometry, but unfortunately, I have not found many references regarding the learning roadmap for complex geometry on the website. (most of them are of algebraic geometry) I wish to study a bit as preparation before starting the graduate program. What prerequisites do I need to be able to read Philip Griffith's books in the future? Currently, I have studied / followed courses in

1) Modern algebra (up to the field extension)

2) Differential collector, Riemannian geometry

3) Complex and real functional analysis.

4) Basic EDP.

bash: How to avoid developing variables, etc.?

Sorry for the vague subject. What I'm looking for is a way to ssh on a server when copying my favorite profile to the server. The general idea is to do something like ssh -t [server] "cat a_profile > .bashrc;bash -li", where I expanded a_profile as a document here:

function ssh
{
  h=$1
  /usr/bin/ssh -t $h "cat >.bashrc <

It seems to work, except that the if [ "id -u" -eq 0 ] a part is evaluated when I call the ssh function, so that the test reads if 1000 -eq 0 ]. And anyway, I think I have to work on the quotes, they can not be healthy, nested like that. Any ideas on how to make this work?

magento2 – Magento 2 defines and accesses variables between controllers

I have a problem with storage and access to the variables on the controllers.

i have controller 1 there i fix the variable (register and session tried)
as a block of this controller I have both registry and session variables ..
then we visit the product page and from there we go to controller 2, the session and registry variables are empty.

tried to follow catalog sessions and persist

another way to pass variables between controllers?

so the flow is:

Controller1 (defined variable) -> Block1 -> product view page -> Controller2 (access variable) -> Block2