Is the accuracy of Google Translate relative to the grammatical accuracy of the input?

So if your grammar is correct, the translation will be better, and vice versa. Is that so?

Relative error of a number in machine epsilon units

I came across an estimation of the relative error between two representations of the same number, one implemented in C++ and another one via a computer algebra program, that was in units of machine epsilon. My question is trivial, though I wasn’t able to find an answer:
If I say that the number has 3 machine epsilons relative error, how many digits does it mean that the approximated number looses compared to the true number?

Is the accuracy of Google Translate relative to the grammatical accuracy of the input?

So if your grammar is correct, the translation will be better, and vice versa. Is that so?

how to do rigidbody movement relative to player rotation in unity c#?

in my game the player is to walk around a sphere, I’m using rigidbody to apply movement with a joystick like this;

rb.velocity = new Vector3(move.x, move.y)* speed;

The problem is that when a character walks around a sphere, they rotate, so the movement gets messed up, how do I make them move relative to the current rotation and not the world?

I’m new to unity and coding in general so showing example code would help a lot!

unity – Rotate 3D object relative to the camera

I really need the help of an expert. I’m trying to rotate an object in all 3 axes relative to the camera in response to the gamepad sticks. I have succeeded but with an unexpected error, depending on its orientation, the object can rotate in the opposite direction of the stick direction.

For example, if the object is on its back, when I move the stick to the left the object rotates to the left. But, when the object is facing the camera, when I move the stick to the left the object rotates to the right. The same happens in all 3 axes, on each axis I have 180 degrees with the correct stick orientation and 180 degrees with inverted sticks. Also, both the camera and the object can freely move adding more complexity to this problem.

I would like to find a way where the orientation of the rotation always follows the direction of the stick. This is solved with a minus sign applied to the angle according to the object orientation (relative to the camera) but I can’t find out how.

This is the code I’m using, it works fine except for the orientation problem. Can anyone find the solution to this problem?

public void ObjectRotate(int dir, float angle) // Object is defined elsewhere
{
    var rotate = 360 * Time.deltaTime * angle;
    var target = Object.transform;
 
    if(dir == 1) { target.RotateAround(target.transform.position, Camera.main.transform.right,  rotate ); }
    else if(dir == 2) { target.RotateAround(target.transform.position, Camera.main.transform.up, rotate); }
    else if(dir == 3) { target.RotateAround(target.transform.position, Camera.main.transform.forward, rotate); }
}

path aliases – How to reference URL relative to current page in a block

I have a custom block where I need to reference a URL relative to the current page (such as node/7/images or node/293/images) that will link to the “Images” view mode I made for the node. I am using a module so that a view mode is accessible via URL (which I have as node/#/images), but I am having trouble getting a working link to /images that would work on any given node.

I have tried to link it to /images and /#/images but have gotten a 404 each time, likely because it is going to example.com/images or example.com/#/images. I have also tried using the Token for current page URL which 404’d as well.

Is there a way, hopefully through the UI, in which I can reference the current node in a way that on any given node the link to the “Images” view mode will link to /node/(current node #)/images?

I have seen ways to implement it using custom modules or code, but I am not very experienced with putting custom code into Drupal and prefer to use the UI is possible.

update

I briefly had a fix, but then I broke it.
I had got it working adding a link that referenced “images/” (without the quotations). While viewing the node, the custom block originally linked to example.com/node/#/images as intended.

However, I then configured the block to be hidden on */images (wasn’t necessary to link to the view while viewing it). After I did this, the link broke on the node page, instead now referencing to example.com/node/images, missing the node # in the URL. I have no idea how this got broken as I only worked through the UI

I tried deleting the block then adding it again with no effect

Using “#/images” will direct to /node/123#/images (adding the actual # into the URL) – while this gets the current node id into the URL it doesnt work with the presence of the # symbol

linux – How to mirror a sub-directory with lftp using an exclude-glob file relative to a fixed parent directory?

I’m writing a bash script for some personal usage, which uses lftp to mirror a local directory to a remote host.

Suppose the local directory foo has the following structure:

foo/
    bar1/
        data1/
        dir/
            data2/
    bar2/
        ...

The script I’m writing is expected to be flexible, which means that it can be run under every sub-directory in the structure above, and it will only mirror the directory it is running under. For example, the following commands will only mirror the directory foo/bar1:

cd foo/bar1
/path/to/script.sh

For some reason, I want to exclude all the sub-directories named data* in bar* when mirroring the directory, but directories matching bar*/dir/data* should be included. When only running the script under foo, it is easy. Writing bar*/data*/ into an excluding glob file and using --exclude-glob-from=FILE can reach our goal. But this method won’t work when I run the script under bar1. Moreover, if I write data*/ into the excluding file, bar*/dir/data* will also be excluded, which is not expected.

Is there an elegant way to exclude such files/directories from mirroring, relative to a fixed parent directory?

If it is not possible with lftp, is there an easy way with bash script?

ag.algebraic geometry – When is the relative dualizing sheaf trivializable?

Let $varphi: X to Y$ be a finite locally free morphism of schemes. Then we have a right adjoint $varphi^!$ to the pushforward $varphi_*$ of quasicoherent sheaves along $varphi$. The relative dualizing sheaf $omega_{X/Y}$ of $varphi$ is defined to be $varphi^! mathcal{O}_Y$. My question is:

Are there any conditions on $X$, $Y$, or $varphi$, which guarantee that $omega_{X/Y}$ is isomorphic to $mathcal{O}_X$?

If $varphi$ is of degree $d$, we may construct the norm map $Nm_{varphi}: pi_* mathcal{O}_X to mathcal{O}_Y$, and so under these circumstances we have a global section of $omega_{X/Y}$ corresponding to the norm by adjunction. Can this map ever be an isomorphism?

404 – Completely confused about linking relative to the root versus linking relative to the document

I posed a question around 404 errors appearing on our website last year where i am seeing URLs now still coming out of Search Console appearing like this:

https://www.example.com/managed-hosting.html

or

https://www.example.com/services/services/managed-hosting.html

But where the actual URL is this:

https://www.example.com/services/managed-hosting.html

The answer as i’d understood it was to use ‘root relative linking’ and not ‘document relative linking’. As the URLs in my HTML are relative, this suggested that somewhere in the site, possibly in the navigation, i have an error (i still do not understand where), and this is where the concept of root relative linking was suggested.

So instead of using a nav link that reads:

href=”../../about/history.html”

i should use a nav link that reads:

href=”/../../about/history.html”

But there seems to be a problem with this. Unless i’m mistaken, the additional forward slash at the beginning tells the browser that the link i’ve inserted is relative to the root directory.

this means that i can add a link to any page at any depth on the website that reads “href=”/../../../../../directory/document.html” as long as the file path listed above is correct?

This seems to be leading to more 404 errors at this stage.

What this leaves me with is the question: should i still be using the standard file path indicator of “../” dependent on how deep the document i am linking from is located?

Basically, with SEO and 404 errors in mind, which of the following is the correct option to use when linking within HTML documents?

href=”../../about/history.html” (without the leading slash)

or

href=”/../../about/history.html” (with the leading slash)

In a nutshell – should i use root relative linking for all my links across the website? or document relative links? And should this extend to all image and document files as well?

I’ll apologise (again) in advance if this sounds dim, and also if the explanation is less than clear. But it’s driving me crazy at this point!

nt.number theory – If we denote $X$ to be the set of primes $p$ such that $N_p(f)>1$ for polynomial $f(x)$, is it true that $X$ has positive relative density?

Let $f(x)in mathbb{Z}(X)$ be an irreducible polynomial and $N_p(f)$ be the number of solutions of congruence $f(x)equiv 0pmod{p}$ for some prime $p$.

Then if we denote $X$ to be the set of primes $p$ such that $N_p(f)>1$, is it true that $X$ has positive relative density in the set of primes?