limits – Find \$f(2001)\$ if function satisfies the following conditions: \$f(1)=1\$; \$f(x+y)=f(x)+f(y)\$; \$f(1/x)=f(x)/x^2\$

My method is to find the derivative of $$f(1/(x+h))$$ by limit definition:
$$f'(1/(x+h))=displaystyle lim_{h to 0}{} frac{f(1/(x+h))-f(x)}{h}$$
Then use third and second condition to obtain:
$$displaystyle lim_{h to 0}{} frac{frac{f(x)+f(h)}{(x+h)^2}-frac{f(x)}{x^2}}{h}$$
But I got stuck because $$f(h)$$ is unknown. Any ideas, please

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
Transient: yes
Active: active (running) since Wed 2021-03-31 09:44:30 AWST; 32min ago
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` ?

pdf reader – Any simple graphic tool to split a pdf page exactly 50% down the middle for FREE WITHOUT LIMITS?

There’s a number of documents, namely instruction manuals at the moment, I want to be able to view in “book view” (two separate PDF pages side-by-side, like a book). For the majority of manuals, this works fine, but with “Donkey Kong Country” which Nintendo has made available for free for example, there is suddenly one page that is actually two, and then all the pages become misaligned after that (odd numbered pages suddenly on the left instead of the right). Some instruction manuals I’ve found online, have the majority of pages combined like this, and I’d still like to split these too, because I like having the option of viewing them in single-page view as well, they both have their pros and cons. In either case, I’d like to be able to split a PDF page right down the middle and make it into two separate pages.

I’m aware a similar question was satisfied with “Briss”, but in my use of the tool I did not find any way to make accurate measurements with it. It seems to be more suited for scanning a typical book where the texts are surrounded by very large margins, and thus there is a large enough margin of error for a user to be expected to just “eyeball it”. In my case, I want to conserve as much of the original page as possible without overlap, and thus the lack of any way to finely adjust the split in Briss would make this an extremely impractical, if not useless tool for my purposes.

One tool I found that did work wonderfully was sejda.com’s “split down the middle” tool, however the site imposes a limit of three operations per hour unless you pay up. I have hundreds of instruction manuals I’d like to split like this, so this would take forever. God I hate PDFs so much.

Limits Approaching a Value

I have a limit:

$$limlimits_{xto10^+}frac{sqrt{10x}-10}{x-10}$$

What would be the best way to find the value that I would be approaching as I approach 10 from the right?

I have a very large Google Docs document which can not be exported to PDF*, but I can download it in all the other supported formats, which unfortunately do not fit my needs.

What are the limitations of downloading a Google Docs document as a PDF, why can’t I export it into this format? (But why can I download it as a huge, 500 MB sized RTF?)

I didn’t find any relevant stuff in the official documentations.

*: all the 4 of us who have access to this document tried with different Google accounts, same results.

I have a huge Google Docs document (shared with a team) containing 168 pages, multiple images, lots of equations, drawings, tables, etc.
When I want to download the whole document as a PDF (clicking “Download as” > “PDF Document (.pdf)”), the browser (doesn’t matter which one of the popular browsers) starts to show the loading icon in the tab header (meaning it is processing the request), but about a minute later, it returns an “500 OK” HTTP Status Code (BTW not the usual “500 Internal Server Error”, “500 OK” instead), which means it could not export the document to PDF.

Why? I don’t think the reason is a size limit, because I can download the whole document in ALL the other currently supported formats such as `.docx`, `.odt`, `.rtf`, `.txt`, `.html`, and for example the downloaded `.rtf` file is 519 MB. (Really! The `.docx` format from the same document is only 71.8 MB, and the `.odt` is 48.7 MB.)BUT when I cut this document down to about 50 pages, I CAN download it as PDF!

Why can’t I export this document to PDF?

Problematic workarounds

There are some workarounds, although unfortunately they produce other problems:

• if I split this document into at least 3 parts as separate documents, I CAN download the whole thing as PDF
• it is obvious that it is a very uncomfortable solution (we want to edit the document as ONE large doc.), and this way all three documents should have separate table of contents part
• downloading the document in `.odt` (OpenDocument Text) or HTML format:
• this is NOT a good solution in my case, because the equations get downloaded as images, and they get messed up if they contain special characters which are NOT part of the equation toolbar (like bowtie symbol `⋈` (U+22C8) for natural joins in relational algebra) or accented characters (á, é, í, etc.), and get substituted by multiple question marks (`?`). Here’s an example:
• equation in Google Docs (correct):
• equation in `.odt` or HTML format (incorrect and uglier):
• equation in `.odt` or HTML format (incorrect and uglier):
• BTW this is exactly how these equations look like when I view the document from a tablet or a mobile phone (buggy appearance)
• downloading the document in `.docx` (MS Office) format:
• in some cases, indentations and spacings get messed up and font types get changed for some reason
• but without a doubt, this produces the most acceptable result

Here’s the output of the browser’s developer console when such a request is sent:

Sorry for being so verbose, I wanted to share all the information I could find out.

Calculate limits in multivariable calculus

Limits – multivariable-calculus

What
Limit of tan(xy)/(x^2+y^2)
as x→0 and y→0

Actual correct limits for Sharepoint Online choice field/column

I researched and tested on SP Online, I was able to add multiple choices (100+) in a single item column and able to store 8K+ choices in the choice field/column.

Is there an actual place where we can find the limit for this field type (not the number of columns but the size limit of the field value and choices)? I mean it for SharePoint Online.

I need to decide a way to add tags to a item which can still be used to filter the list but where you can add tags manually if desired, but never repeated ones.

This can’t be done with ootb, cause SP will lock the “enforce unique” if it is multchoice. I will leverage the filtering between out-of-the-box features and custom filtering with SPFX. So this information would be quite important.

Thank you all.

limits – Euler’s constant in probability mass function?

I was messing around with PMF and thought about what’d happen if the probability of getting a success was nearly impossible, and the amount of tries approached infinity (and we only wanted 1 success).
$$f(n,p,k)=frac{n!p^k(1-p)^{n-k}}{k!(n-k)!}hspace{0.1cm}Bigg|hspace{0.3cm} n=text{number of trials} \ p=text{probability of getting a success in one trial},hspace{0.5cm}k=text{number of successes desired} \(5pt) fleft(lim_{ntoinfty},lim_{pto 0},1right)=frac{1}{e}$$
Now why exactly does $$e$$ show up here? does it have any meaning? is the limit correct? I’m very confused and thanks in advance

Why ArcTan[x,y] limits yield different answers for symbolic and numeric input

I can’t find any reason why in version 12.1

``````Limit(ArcTan(3, x)/x, x -> 0)
(*1/3*)
``````

``````Limit(ArcTan(y, x)/x, x -> 0)
(*Indeterminate if Re(y^2)>0&&Re(y/Sqrt(y^2))>0*)
``````

Remove attach limits

Rapid submitted a new resource:

Remove attach limits – Remove attach limits

Description:

Allows viewing image attachments in quotes and other areas.

The default XenForo code forces all embedded image…