Applying replacement rules to products doesn’t work as expected

I have the following issue: I’d like to apply some replacement rules, for example

rules:={f(x)/t :> ff(x), g(x)/t :> gg(x)}

to an expression, e.g. like this:

(f(x)*g(x)/(t^2))/. rules

Surprisingly, this doesn’t give the expected result

ff(x)*gg(x)

How do I fix this? Sorry if it’s an easy question, I’m still a beginner with Mathematica.

Copying and applying retention labels in sharepoint using C# script

I’ve got to transfer retention labels from one structure to another (same structure of directories) in Sharepoint. I’ve done a lot of research but I’m unable to find any solution for C# script code, could anyone point me in right direction or provide some documentation please?

usa – Risks with applying for National Interest Exception for Travel to the US

I imagine that due to the drop in international travel, the CBP may have considerably more time to examine each VWP traveler more thoroughly, and maybe having a National Interest Exception would invite even more scrutiny?

Or that they have less personnel working at the borders.

The plan is for us to travel with exceptions and ESTAs.

This sounds weird to me. Either you travel with an exception, or with an ESTA. An ESTA is specifically valid for business trips, where your company has legitimate interest to send you to the US, and you are paid by your own company for that. Or if you pursue future business interests in the US (e.g. seek a business agreement)

To answer your question

Are we likely to face significantly stricter scrutiny of whether our activities are permissible under the VWP, either due to the exception or due to the special COVID situation in general?

Don’t assume any. Never. You should never travel assuming you won’t get sufficient scrutiny. Border officers are trained and do their job very well. So expect to be scrutinized with the same attention they will pay in non-pandemic times. Your employer is doing paperwork for you, so this counts towards you.

Will a rejection of an application for a National Interest Exception for Travel lead to permanent negative consequences for future travel to the US?

Reading it correctly, likely no. Being denied a visa or entry under VWP (if you are rejected at the border) will have consequences. But an application for an exception is not a classic visa application, so you should be fine with a no as an answer.

In general, yes, I am sorry. It will also affect your future travel everywhere. Affecting means that you will be likely questioned a lot on almost every country you visit that exchanges passengers data with the US, for some extended periods of time. When you will be requesting a visa, a past rejection from the US may require explanation, but won’t necessarily deny you visa or right to enter.

I haven’t read the other full question, but it is my personal belief that if your employer is on err, officers will take this into account when examining future requests, which you will have to explain.

Recent experience applying for a UK Fiance visa from South Africa

Just wanting to know how long between ‘Your visa application has been sent to the Decision Making Centre for processing.’ status to ‘application received by DMC’ to ‘application transferred to VAC’. At which stage are you informed of the decision? I know guide processing time is 12 weeks but just trying to establish how accurate this is?

covid 19 – Applying for a US visa interview at another country as a non-resident

I am an international PhD student at a US university. Due to COVID-19 embassy closure, my spouse can not apply for an F-2 dependent visa at the local embassy to travel to the US. However, it is possible for her to apply for a visa at the US embassy in another country. She will have to apply for a visa for our 3 years old child. However, she would like to travel alone to the other country to attend the visa appointment. My question is: can she apply for the visa for him without him being present? Since his passport will not be stamped at the airport (since he won’t leave my home country as my spouse travels abroad to attend the interview), will this pose any problem at the airport when they both travel to the US?

Thank you

lo.logic – Reference on a corollary for applying Deduction Theorem multiple times in FOL

This question is from “Introduction to Mathematical Logic” by Elliot Mendelson , forth edition , page 75.

In page 75 of the book , there is a corollary in a paragraph that can be used to apply the Deduction Theorem multiple times in a row.

The new proof of $Gamma vdash mathscr B to mathscr C$ (in Proposition 2.4 $Gamma vdash mathscr C$ )
involves an application of Gen to a wf depending upon a wf $mathscr E$ of $Gamma$ only if
there is an application of Gen in the given proof of $Gamma, mathscr B vdash mathscr C$ that involves
the same quantified variable and is applied to a wf that depends upon $mathscr E$.

But there seems to be no justification/proof about this corollary.I searched online but non of them seem to mention this corollary.Are there any references about this I can read or is it just too trivial?

Here is an failed attempt of mine for justifying this corollary.

1.Technique for applying deduction multiple times in Mendelson Logic.

opengl – Applying spacing between moving, rotated rectangles

I am trying to implement basic Snake game with movement based on timestep. For now I’ve got something along those lines:

Update function:

glm::vec2 headPosition = glm::vec2(m_segments.begin()->m_sprite.get_position());
float angle = m_segments.begin()->m_sprite.get_angle();

m_segments.begin()->move();
    
for (auto it = m_segments.begin() + 1; it != m_segments.end(); it++)
{
    glm::vec2 oldPosition = it->m_sprite.get_position();
    float oldAngle = it->m_sprite.get_angle();

    it->m_sprite.set_position(headPosition);
    it->m_sprite.set_angle(angle);

    headPosition = oldPosition;
    angle = oldAngle;
}

Move function:

glm::vec2 position(m_sprite.get_position());
position.x +=  cosf(glm::radians(90.0f - m_sprite.get_angle())) * VELOCITY_SCALAR;
position.y += -sinf(glm::radians(90.0f - m_sprite.get_angle())) * VELOCITY_SCALAR;

m_sprite.set_position(position);

Basically I set next segment position to the old position of previous segment. As expected spacing between those segments is equal to timestep value. How can I calculate position so I can manipulate spacing between those segments?

linux – Applying systemd control group resource limits automatically to specific user applications in a gnome-shell session

Having seen that GNOME now launches apps under systemd scopes I’ve been looking at a way to get systemd to apply some cgroup resource and memory limits to my browser.

I want to apply a MemoryMax and CPUShare to all app-gnome-firefox-*.scope instances per systemd.resource-control.

But GNOME isn’t launching firefox with the instantiated unit format app-gnome-firefox-@.scope so I don’t know how to make a systemd unit file that will apply automatically to all app-gnome-firefox-*.scope instances.

I can manually apply the resource limits to an instance with systemctl set-property --user app-gnome-firefox-92450.scope (for example) once the unit starts, but that’s a pain.

Is there any way to inject properties for transient scopes with pattern matching for names?

This isn’t really gnome-shell specific; it applies just as well to a user terminal session that invokes a command with systemd-run --user --scope.

Details

Firefox is definitely launched under a systemd scope, and it gets its own cgroup:

$ systemctl --user status app-gnome-firefox-92450.scope
● app-gnome-firefox-92450.scope - Application launched by gnome-shell
     Loaded: loaded (/run/user/1000/systemd/transient/app-gnome-firefox-92450.scope; transient)
  Transient: yes
     Active: active (running) since Wed 2021-03-31 09:44:30 AWST; 32min ago
      Tasks: 567 (limit: 38071)
     Memory: 2.1G
        CPU: 5min 39.138s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app-gnome-firefox-92450.scope
             ├─92450 /usr/lib64/firefox/firefox
             ....
  ....

Verified by

$ systemd-cgls --user-unit app-gnome-firefox-92450.scope
Unit app-gnome-firefox-92450.scope (/user.slice/user-1000.slice/user@1000.service/app-gnome-firefox-92450.scope):
├─92450 /usr/lib64/firefox/firefox
...

and

$ ls -d /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/app-gnome-firefox-*
/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/app-gnome-firefox-92450.scope

I can apply a MemoryMax (cgroup v2 constraint memory.max) to an already-running instance with systemctl set-property and it takes effect:

$ systemctl set-property --user app-gnome-firefox-98883.scope MemoryMax=5G
$ systemctl show --user app-gnome-firefox-98883.scope |grep ^MemoryMax
MemoryMax=5368709120
$ cat /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/app-gnome-firefox-*/memory.max
5368709120

It definitely takes effect – setting a low MemoryMax like 100M causes the firefox scope to OOM, as seen in journalctl --user -u app-gnome-firefox-98883.scope.

The trouble is that I can’t work out how to apply systemd.resource-control rules automatically for new instances of the app automatically.

I’ve tried creating a .config/systemd/user/app-gnome-firefox-@.scope containing

(Scope)
MemoryMax = 5G

but it appears to have no effect.

systemd-analyze verify chokes on it rather unhelpfully:

$ systemd-analyze  verify --user .config/systemd/user/app-gnome-firefox-@.scope 
Failed to load unit file /home/craig/.config/systemd/user/app-gnome-firefox-@i.scope: Invalid argument

If I use systemctl set-property --user app-gnome-firefox-92450.scope on a running instance and systemctl --user show app-gnome-firefox-92450.scope I see the drop-in files at:

FragmentPath=/run/user/1000/systemd/transient/app-gnome-firefox-98883.scope
DropInPaths=/run/user/1000/systemd/transient/app-gnome-firefox-98883.scope.d/50-MemoryMax.conf

It has Names containing the pid, so that can’t be matched easily:

Id=app-gnome-firefox-98883.scope
Names=app-gnome-firefox-98883.scope

and I’m kind of stumped. Advice would be greatly appreciated, hopefully not “gnome-shell is doing it wrong, patch it” advice. Some draft systemd docs suggest it’s using one of the accepted patterns.

Workaround

The only workaround I see so far is to launch the firefox instance with systemd-run myself:

systemd-run --user --scope -u firefox.scope -p 'MemoryMax=5G' -p 'CPUQuota=80%' /usr/lib64/firefox/firefox

and let that be the control process. But it looks like this isolates the firefox control channel in some manner that prevents firefox processes launched by other apps or the desktop session from then talking to the cgroup-scoped firefox, resulting in

Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile.

Edit: firefox remoting when launched manually via systemd-run is fixed by setting MOZ_DBUS_REMOTE in the environment both for my user session and as a -E MOZ_DBUS_REMOTE=1 option to systemd-run. It’s probably because I’m using Wayland.

Still a clumsy workaround – it should surely be possible to apply resource control rules to slices via .config/systemd/user ?

Applying for a Passport Card while I already have Passport Book

Hi everyone I was wondering if someone on here could help me with my question. I am looking to apply for a Passport Card. The thing is that I currently own a Passport Book. I don’t want to use form DS-82 because I still want my Passport Book to be valid and I don’t want to be without it during the processing time. Is it possible for me to use form DS-11 and apply in person and use my birth certificate as Proof of Citizenship. Also if I apply for the Passport Card will my Passport Book definitely still be valid or do I have to tell the State Department specifically to keep it valid and NOT cancel it. I just want to make sure because ultimately I want to have both a valid Passport Book and a valid Passport Card.
Any help would be appreciated.
Thanks!!

customs and immigration – Is changing the surname important after getting married in France for applying spouse visa?

I need to apply spouse visa for France and and my all previous documents, birth certificate etc are named with Tania Raza so now I’ve changed my ID card with the martial status married and husband name is mentioned but I’ve not changed my name as it is in previous documents I’ve kept it the same both in the passport and ID card. So is it fine or do I have to change my surname on my husband’s name before applying for the visa? What is important according to France laws,terms and conditions,Please help me out!