## Math Genius: Prove that \$f_n(x) = frac{x^2 + nx + 3}{n}\$ converges uniformly over [1,2]

Original Source Link

Let $$f_n(x) = frac{x^2 + nx + 3}{n}$$, with $$f_n$$ defined on $$[1,2]$$. I must show that $$lim_{n to infty} f_n$$ converges uniformly to $$x$$ over $$[1,2]$$.

I start by defining the set

$$S = {x : exists lim_{n to infty} f_n(x)}$$

Then I define the function

$$f(x) = lim_{n to infty} f_n(x) = x$$

This seems to prove that $${ f_n(x)}$$ converges pointwise. Then I try to determine an $$epsilon > 0$$, such that

$$|f_n(x) – f(x)| < epsilon, forall x in S$$

And here I get stuck. I tried finding a maximum value of $$|frac{x^2 + nx + 3}{n} – x|$$ using derivatives, but unfortunately this function doesn’t have any around $$[1,2]$$.

Also, I have no idea how should I find a $$N_epsilon$$ after finding the $$epsilon$$ itself. Any ideas or help would be really appreciated. Thanks!

First note that:
$$left| frac{x^2+nx+3}{n}-xright|=left|frac{x^2+nx+3-nx}{n}right|=frac{x^2+3}{n}le frac{7}{n}$$
So, given $$varepsilon>0$$, take $$N$$ such that $$frac{7}{N}< varepsilon$$. Then $$|f_n(x)-f(x)| for every $$nge N$$ and every $$xin [1,2]$$.

first we know that $$x in [1,2] implies (x^2+3) in [4,7]$$

$$|frac{x^2+nx+3}{n} – x| = |frac{x^2+3}{n}| < frac{7}{n} < epsilon$$

hence $$n> frac{7}{epsilon}$$ suffices hence it converges uniformly

Tagged : / /

## Code Bug Fix: How to export TFS Shelveset comments to text or excel

Original Source Link

Can we export code review comments in a TFS Shelveset to an excel or any Text file.
I have attached this image. The comment in Red circle needs to be exported to excel or any Text file.

Reason– For audit purpose, need to track review comments being given to developer. Right now we have to manually enter these comments inside an excel code review sheet.

Please advise.

You could write a PowerShell script that queries the REST API see to get a particular shelveset, I would do a List first then a Get Shelveset change and try and get the full changes including the comments then you can save that to a txt file for you auditors. I haven’t tried it so I don’t know if comments are returned but I think so.

There is no built-in or documentary way to get the comments on the Shelvesets tab, but if you try to capture the network log, you would see you can get the comments using the following API:

``````Get http://TFS2018:8080/tfs/DefaultCollection/_apis/discussion/threads?artifactUri=vstfs%3A%2F%2F%2FVersionControl%2FShelveset%2F{CodeReviewName}%252526shelvesetOwner%25253D{ownername}
``````

Tagged : / /

## Server Bug Fix: Nginx proxy SOAP request

Original Source Link

looking for a right way to accomplish the following:

there is an app that have URL(1) hardcoded and no way/time to change it in the source

``````http://dev.server.com/example.com/admin/soap/action/index?pr=1
``````

and it should use (and get response from) URL(2)

``````http://example.com/admin/soap/action/index?pr=1
``````

what should I configure in Nginx (apache as backup used) conf on dev.server.com in order to give that app when it asks URL(1) answer from URL(2)?

On dev.server.com Apache has virtual host: dev.server.com enabled.

Also I’ve tried to proxy in apache instead of nginx by using ProxyPass:

``````    <Directory /var/www/dev>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
<Location /example.com/admin/soap>
ProxyPass http://example.com/admin/soap
</Location>
``````

Try with this location in Nginx config file:

``````location /example.com/admin/soap/action/index {
proxy_pass http://example.com/admin/soap/action/index;
}
``````

A possible solution on apache is:

``````<Location /example.com/admin/soap/action/index>
ProxyPass http://example.com/admin/soap/action/index
</Location>
``````

Tagged : / /

## Code Bug Fix: implement leaflet-responsive-popup plugin with react leaflet

Original Source Link

It is more theoretical question, rather than some problem. I am kind of a newbie to adding maps to my app. I have found that using react leaflet is somewhat manageable . however lately I stumbled upon a plugin for the original leaflet `leaflet-responsive-popup` that will allow me to change the display of popups. however I am strugling on how to implemente it with react leaflet.

Thanks for your help

Tagged : /

## Linux HowTo: PS4 + Linux + POL + space engineers? [closed]

Original Source Link

A friend recently purchased space engineers for me. I quickly discovered my PC could not handle it on windows, much less POL. Because of my old CPU socket and the fact my CPU would clench my GPU if I upgraded it enough to run the game, i’d have to pretty much build another PC in order to run this game. However, I have seen around the internet people have found ways to install linux on the PS4. I don’t understand how drivers would work, but of course the community has found ways. My questions are:

1: Would this run like a normal computer

2: Could I run space engineers on it via POL

(if not)

3: Can I install windows and run it there

1. Would this run like a normal computer

It is possible to run linux on it, but as it is now, it depends on a quite old firmware on the PS4 and many parts of the system won’t work properly.

2. Could I run space engineers on it via POL

Sadly POL doesn’t support Space Engineers. The system requirements for space engineers are quiet high. If you would like to run it on linux in wine you might need an even more powerful computer and I think the PS4 is not capable of that much power.

3. Can I install windows and run it there

There is no way of installing Windows on a PS4. The bootloader of the PS4 is blocking it and through the custom hardware of the PS4 Windows doesn’t have the driver to run.

I think that the only way to run your game is to buy a new computer…

Tagged : / / /

## Code Bug Fix: how to create a 2-d array in python

Original Source Link

I tried doing with list but what I actually want to know can we create using array package in python
example
from array import *
a=array(‘I’)

# This will create a array of 1-D how can I do to create a 2-D array or is the only way of creating 2d #array using list

Thank you in advance

This is not possible with array module. For mathematical operations you indeed should use numpy. array.array is just a wrapper for C arrays.

Tagged : /

## Server Bug Fix: Using a subdomain to send email through Google Apps without migrating email from primary domain

Original Source Link

Is it possible to set up email through Google Apps such that a single box, such as [email protected], can be used for bulk email without having to migrate all company email across to Google services and if so what would the MX records have to look like to achieve this split?

The desired end result would be that a single email created as a subdomain such as [email protected] would be sending to an opt-in mailing-list through the Google account but the regular company email accounts would remain under their current hosting provider using the regular @mydomain.com format.

If this can’t be done, are their any services that can offer something like this?

All you have to do is properly configure MX records. If you have standard MX configuration in place then probably following configuration should be sufficient to achieve what you want:

Add new records, e.g:

``````mailer.mydomain.com IN MX 1 ASPMX.L.GOOGLE.COM
mailer.mydomain.com IN MX 5 ALT1.ASPMX.L.GOOGLE.COM
mailer.mydomain.com IN MX 10 ALT2.ASPMX.L.GOOGLE.COM
``````

And leave your current config in place:

``````mydomain.com IN MX 10 your.mail.server
``````

The new configuration will not affect your current config. All mails to @mailer.mydomain.com will go through Google, while mails to @mydomain.com will go to your current mail server.

Please verify whether MX records are correct for you GApps. I copied them from my old setup and they might be no longer relevant.

You can find more information about MX for GApps here:
https://support.google.com/a/answer/174125?hl=en

Also you have to remember that MX configuration is one thing, second is domain verification, so probably you will have to add some special CNAMEs, but this will be provided during domain registration in GApps.

Tagged : / / /

## Making Game: Why do Windows file transfer speeds top out at around 1.5 gigabytes /second?

Original Source Link

I noticed that file transfers on the same machine between a fast nvme m.2 ssd (general read speed 3.2GB/s and writes 2.7 GB/s) and a ram disk top out at around 1.4-1.5 GB/s. Why is that the case? I run Windows 10 Pro Workstation as OS and turned off any firewalls, virus scanners or other overhead. The drives individually benchmark both above 2.5 GB/s for reads and writes. Why is a windows file transfer of a single large file capped at around 1.5 GB/s? I am purely assessing sequential read and write performance. Is there a cap in Windows 10 when it comes to file transfers?

Summary of the comments on the post and of the results of the tests conducted
by the poster :

• It has been found that all copy utilities
functioned at about the same speed : Windows Explorer, copy, xcopy, robocopy,
TeraCopy.

• The only utility which managed to reach the upper read speed of the disk was
FastCopy.

The FastCopy utility distinguishes itself by doing reads and writes in parallel
and by not using the Windows cache for moving data.

The conclusion is therefore that the slowness experienced in copying files
when using the standard Windows mechanisms is due to :

• Lack of parallelism, so that reading is suspended while writing
• Inherent inefficiency in the cache mechanism of Windows.

The problem of slow file copy has been around Windows since a very long time
and since very early versions of Windows.
The above results might also explain why Linux is reportedly more
efficient on disk operations than Windows.

Tagged : / / / /

## Server Bug Fix: Monte-Carlo Simulations in inventory management

Original Source Link

I am using Monte-Carlo simulations in Microsoft Excel to determine optimum reorder points and safety stock levels. I have the demand patterns of the last one year of the product. Using that I can construct a cumulative distribution function of the demand to draw random samples from and construct a table of demand on each day for a whole year.

One problem that I found was that the simulation is based on demand patterns alone. That is, if the company did not forecast at all, then the individual runs of the simulation would generate the demand pattern that they can expect in a year. However, if the company is able to forecast demand with 100% accuracy, then there would be no need to keep a safety stock (or very little of it). Forecast accuracy is something I am not sure how to incorporate in my model. There are formulas for calculating safety stock such as using the Mean Absolute Deviation from the forecasted demand but I would like to develop a simulation model that takes into account forecast accuracy. Thanks in advance.

I’m in general agreement with Larry’s answer, but with one qualification. If you are generating random demand quantities from the sample CDF for a year, your demands will not conform to any trends or seasonal patterns (or even just short-term autocorrelation) in the historical data. If you then generate forecasts from the randomly sampled observations, the forecasts will also not contain trend or seasonality (and perhaps not autocorrelation, or the wrong autocorrelations), so you will be missing a chance for greater accuracy. If you use rolling forecasts from the historical data, then there will be a mismatch between forecasts and “actual” (meaning sampled) demand.

One way to mitigate this is to first analyze the historical data and see if you can suss out any patterns. Use them to build a model for the demand process. In the simulation, obtain demand observations from this model (using it to predict the current observation, then adding a bit of noise). Simultaneously use forecasts obtained from the simulated data (possibly using the same model, possibly using something similar such as exponential smoothing, perhaps with a seasonal component).

Why not build the forecasting directly into your simulation? So, in each period $$t$$, you generate a forecast $$y_t$$ using whatever method you want (moving average, exponential smoothing, etc.), and choose an order quantity based on the forecast and the current estimate of the standard deviation of the forecast error. Then generate the random demand, calculate the forecast error, and update the estimates of the SD of the FE.

Tagged : /

## Ubuntu HowTo: why does my vpn service cause the lan traffic to drop

Original Source Link

I have been looking for a new vpn service so i tried a few and did not get the desired results. i’ve been trying nord and whenever i connect the vpn shortly after my lan connection dies. the vpn traffic seems to continue. i really don’t want to give up on this vpn because it performs the best for me.

so this ubuntu box is my home theater pc and several of the programs running on it have a web UI’s that i normally access from my home lan.

if i disconnect the vpn i can open NM and turn lan connection off and back on and is stays up.
if i leave the vpn connection up the i can’t reconnect the lan.

using Ubuntu 18.04
any help would appreciated

Tagged : / /