reference request – Citation Style Used

I am sharing latex version of a citation example. I am supposed to use this style in my paper, I have checked referrence styles provided in Bibliography management with bibtex Does anyone recognize what style below referrence is based on? Is there a guide to follow the same style whatever that style is?

David Gale, emph{Neighborly and cyclic polytopes}, Proc. Sympos. Pure Math,

vol.~7, 1963, pp.~225–232.

reference request – Covering number of smooth functions from $mathbb{R}^d$ to $mathbb{R}$

Let $(mathcal{X},d)$ be a space of function $f: mathbb{R}^d to mathbb{R}$ where $d=| cdot |_infty$ (i.e., $d(f)= sup_{xin mathbb{R}^d} |f(x)|$. )

Let $D_alpha f= frac{partial^alpha}{ partial x_1^{p_1} …. partial x_d^{p_d} }$ where $alpha=p_1 +…+ p_d$ where $p_i$‘s are non-negative integers and we let $D^0f =f$.

Suppose we consider the following subset
begin{align}
mathcal{F}_beta = { f: | D_alpha f |_infty<c_alpha, forall alphale beta }
end{align}

I am interested in the upper bound on the covering number of $mathcal{F}_beta$. Given the history of covering numbers and metric entropy, I would think that this result exists. However, I just cannot find it anywhere, firm upper bounds.

customs and immigration – Can I request for Carta D’identità with the receipt of Permesso di Soggiorno?


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




reference request – Compression bounds on the Copeland-Erdös constant

Motivation:

Given the set of prime numbers $mathbb{P} subset mathbb{N}$, the Copeland-Erdös constant $mathcal{C}$ is defined as (1):

begin{equation}
mathcal{C} = sum_{n=1}^infty p_n cdot 10^{-(n+ sum_{k=1}^n lfloor log_{10} p_k rfloor} tag{1}
end{equation}

where $p_n$ is the nth prime number.

Now, it is generally known that $mathcal{C}$ is normal and that normal numbers are finite-state incompressible. As machine learning systems are finite-state machines it occurred to me that prime formulas are not PAC-learnable by machine learning systems regardless of their computational power (5). While there are probably several approaches to this question, compression bounds driven by the Shannon source coding theorem seem natural to me as it demonstrates that in the asymptotic limit it is impossible to compress i.i.d. data such that the average number of bits per symbol is less than the Shannon entropy of the source.

Question:

Might there be an effective information-theoretic approach to normal numbers motivated by the Shannon source coding theorem? In principle, such an approach would allow us to derive compression bounds for any normal number.

To clarify what I mean, I have added a description of my attempts to find an effective information-theoretic definition of normal numbers.

An information-theoretic approach to normal numbers:

An information-theoretic definition of normal number:

Given the alphabet $Sigma$ with $lvert Sigma rvert = alpha$ and $X = Sigma^{infty}$ we may define:

begin{equation}
Sigma^n cap X_N := bigcup_{w_i in Sigma^n} w_i cap {x_i}_{i=1}^{N-n+1} tag{2}
end{equation}

where $x_i = X((i-1)cdot n, i cdot n -1)$ and $limlimits_{N to infty} X_N = X$.

In this context, $X$ is normal to base $alpha$ if for any $Z_N sim U(Sigma^n cap X_N)$ with $N gg n$ the average amount of information gained from observing each digit in $Z_N$ converges to:

begin{equation}
log_2 lvert Sigma^n rvert = n cdot log_2 lvert Sigma rvert tag{3}
end{equation}

as $N to infty$.

Proof of equivalence with the usual definition:

From a frequentist perspective, we may define the probabilities:

begin{equation}
forall w_i in Sigma^n, p_{w_i} = lim_{N to infty} frac{mathcal{N}(X_N,w_i)}{N-n+1} = frac{1}{|Sigma^n|} tag{4}
end{equation}

where $mathcal{N}(X_N,w_i)$ counts the number of times the string $w_i$ appears as a substring of $X_N$.

We have a uniform distribution over $Sigma^n$ in the sense that:

begin{equation}
forall w_i, w_{j neq i} in Sigma^n, p_{w_i} = p_{w_{j neq i}} tag{5}
end{equation}

Now, we define the random variable $Z_N sim U(Sigma^n cap X_N)$ whose Shannon entropy is given by:

begin{equation}
H(Z_N) = – sum_{i=1}^{lvert Sigma^n rvert} P(Z_N = w_i) log_2 P(Z_N = w_i) tag{6}
end{equation}

(6) is defined for sufficiently large $N$ since:

begin{equation}
forall w_i in Sigma^n forall epsilon > 0 exists m in mathbb{N} forall N geq m, Biglvert P(Z_N = w_i) – frac{1}{|Sigma^n|} Bigrvert = Biglvert frac{mathcal{N}(X_N,w_i)}{N-n+1} – frac{1}{|Sigma^n|} Bigrvert < epsilon tag{7}
end{equation}

and therefore we have:

begin{equation}
lim_{N to infty} H(Z_N) = log_2 lvert Sigma^n rvert = n cdot log_2 lvert Sigma rvert tag{8}
end{equation}

Application to the Copeland-Erdös constant:

Given that $mathcal{C}$ is normal in base-10, it is finite-state incompressible. In particular, if $mathcal{A}$ is the description language for all finite-state automata(which includes all learnable programs) then we may deduce that for large $N$ (6):

begin{equation}
mathbb{E}(K_{mathcal{A}}(mathcal{C}_N)) sim N cdot log_2 (10) tag{9}
end{equation}

where $mathcal{C}_N$ denotes the first $N$ digits of $mathcal{C}$ and $K(cdot)$ denotes prefix-free Kolmogorov Complexity. From (9) we may deduce that a prime formula is not PAC-learnable.

References:

  1. Copeland, A. H. and Erdős, P. “Note on Normal Numbers.” Bull. Amer. Math. Soc. 52, 857-860, 1946.
  2. A. N. Kolmogorov Three approaches to the quantitative definition of information. Problems of Information and Transmission, 1(1):1–7, 1965
  3. Olivier Rioul. This is IT: A Primer on Shannon’s Entropy and Information. Séminaire Poincaré. 2018.
  4. Edward Witten. A Mini-Introduction To Information Theory. 2019.
  5. Shai Shalev-Shwartz and Shai Ben-David. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press. 2014.
  6. Peter Grünwald and Paul Vitányi. Shannon Information and Kolmogorov Complexity. 2010.

jquery – Updating sharepoint list items with batch pnp, in bad request

I’ve used this guide to create my batch and update the items.

var list = pnp.sp.web.lists.getByTitle("Categories");
list.getListItemEntityTypeFullName().then(entityTypeFullName => {
    var batch = pnp.sp.createBatch();
    $(`.${css.SortContent} table tbody tr`).each(function (ind, con) {
        var id: any = $(con).attr("data-catid");
        var newOrder: any = parseInt($(con).find(`.cat_select :selected`).text());
        list.items.getById(id).inBatch(batch).update({
            Order: newOrder
        }, "*", entityTypeFullName).then(() => {
            console.log("test");
        });
    });
    batch.execute().then(r => {
        console.log(r);
    }).catch((e) => {
        console.log(e);
    });
});

Information: There are 3 tr‘s inside the body. In my test, they give these results:

id = 1; newOrder = 2
id = 2; newOrder = 1
id = 3; newOrder = 3

When I run the code, this is the following result:

console.log(test) never runs
console.log(r) logs undefined
console.log(e) never runs

If I log batch just before it’s executed, I’m able to see 3 items inside. So I know the items are added to the batch.

But the items are never updated, and all I get is.

Error: Error making HttpClient request in queryable: (400) Bad Request

Image of the batch log:

enter image description here

Can anyone tell me what I’m doing wrong?

Update: It looks like "X-HTTP-Method": "MERGE" is missing.

enter image description here

What is the best solution to upload a image bytearray to a URL POST request in Java?

I am trying to upload the image to linkedin POST URL, to create an image based share.

fa.functional analysis – Reference request for type of specific integral equation in two variable:

Consider the following integral equation:

$$int_0^infty K(t,y)phi(t,x)dt=0$$

Here, $K(t,y)$ is trigonometric kernel and
$phi(t,x)$ is monotonic wrt x ( for fixed t).

I want to find the dependence of y on x , i.e. $y=f(x)$.

I want some methods and references on how to deal with such problems in general.

c# – Use Request with Fileupload in Controller

I wrote a fileupload function for my application. Basically the application is a web based folder structure, which has files included.

I don’t know, but I am not happy with it. Is it too long? Can I do some parts easier? Is the logging ok? So many questions… The FileModel is inerhiting from ParentModel.

   public ActionResult FileUpload()
        {
            int id = Convert.ToInt32(base.Request.Form("id"));
            bool isJson = Convert.ToBoolean(base.Request.Form("isJson"));
            try
            {
                if (id < 1)
                {
                    id = Convert.ToInt32(base.Request.Form("folderId"));
                }
                if (id < 1)
                {
                    Logging.LogToFile("Could not load " + id ".", 3);
                    base.Response.StatusCode = 500;
                    return Json(new
                    {
                        success = false,
                        errFileUploadMsg = string.Concat(DateTime.Now, " Folder ID ", id, " couldn't load. Please try again.")
                    }, JsonRequestBehavior.AllowGet);
                }
                ParentModel pm = new ParentModel
                {
                    Files = new Files()
                };
                
                Files fm = pm.Files;
                int lastPosition = _mainFolderRepository.GetLastNumberOfFileInFolder(id);
                int position = ((lastPosition.GetType() != typeof(DBNull)) ? (lastPosition + 1) : 0);
                
                for (int i = 0; i < base.Request.Files.Count; i++)
                {
                    HttpPostedFileBase file = base.Request.Files(i);
                    Stream str = base.Request.Files(i).InputStream;
                    BinaryReader br = new BinaryReader(str);
                    byte() FileBytes = br.ReadBytes((int)str.Length);
                    fm.FullTextSearch = "";
                    fm.File = FileBytes;
                    fm.ContentLength = file.ContentLength;
                    fm.FileName = Path.GetFileName(file.FileName);
                    
                    if (Regex.IsMatch(fm.FileName, "\d+_\d+"))
                    {
                        string() fileNameSections = Path.GetFileNameWithoutExtension(fm.FileName).Split(' ')(0).Split('_');
                        if (fileNameSections(0).All(char.IsDigit) && fileNameSections(1).All(char.IsDigit))
                        {
                            fm.FileName = fm.FileName.Replace("_", "/");
                        }
                    }
                    
                    if (_mainFolderRepository.IsFileNameInFolder(id, fm.FileName))
                    {
                        int fileIdForChange = _mainFolderRepository.GetFileId(id, fm.FileName);
                        _mainFolderRepository.UpdateFile(fileIdForChange, fm.File, fm.ContentLength);
                    }
                    else
                    {
                        if (!Helper.CheckIfExtensionStringAllowed(Path.GetExtension(file.FileName).ToLower()))
                        {
                            throw new FileFormatException(fm.Extension);
                        }
                        fm.Extension = Path.GetExtension(file.FileName).ToLower();

                        if ((fm.Extension == ".pdf" || fm.Extension == ".doc" || fm.Extension == ".docx") && fm.File.Length != 0)
                        {
                            fm.VolltextSuche = ConverterController.ConvertFileToText(fm.File, fm.FileName, fm.Extension);
                        }
                        _mainFolderRepository.FileUpload(fm.File, fm.ContentLength, fm.FileName, "", "", base.User.Identity.Name, DateTime.Now, isPublic: false, fm.Extension, id, fm.RessortId, position, fm.FullTextSearch, "");
                    }
                    position++;
                }
            }
            catch (FileFormatException ex)
            {
                Logging.LogToFile(ex, 3);
                if (!isJson)
                {
                    base.TempData("Error") = string.Concat(DateTime.Now, " - Extension ", ex.Message, " not allowed.");
                    return RedirectToAction("Index", "MainFolder");
                }
                base.Response.StatusCode = 500;
                return Json(new
                {
                    success = false,
                    errFileUploadMsg = string.Concat(DateTime.Now, " - Extension ", ex.Message, " not allowed.")
                }, JsonRequestBehavior.AllowGet);
            }
            return RedirectToAction("Index", "MainFolder");
        }

amazon web services – Site-to-Site VPN from AWS to DO Failing to Return Curl Request

I have a new AWS Site-to-Site VPN tunnel. The tunnel is currently “UP”. It uses a Customer Gateway that points to an Ubuntu server running strongSwan VPN in DigitalOcean.

I’m attempting to run curl https://ipinfo.io/ from an EC2 instance in AWS, and I want to see the IP of the droplet. (I have static routes defined in the Site-to-Site VPN Connection for that domain’s IPs.) However, I get no response on the EC2 side.

tcpdump in the droplet shows the following:

00:10:44.748628 IP 10.0.0.41.54800 > any-in-2615.1e100.net.https: Flags (S), seq 1054210552, win 26883, options (mss 1375,sackOK,TS val 2777091215 ecr 0,nop,wscale 6), length 0
00:10:44.748684 IP 10.0.0.41.54800 > any-in-2615.1e100.net.https: Flags (S), seq 1054210552, win 26883, options (mss 1375,sackOK,TS val 2777091215 ecr 0,nop,wscale 6), length 0

“any-in-2615.1e100.net” is the rDNS for that website, and 10.0.0.0/16 is the CIDR on AWS side, so I know the https request is making it’s way across the tunnel.

What am I most likely missing that prevents my curl command from completing?

centos – How to configure NGINX to route external request to my stage and production docker hosts

How to configure NGINX to route external request to my stage and production docker hosts

I have 2 FQDNs stage.external.domain.net and external.domain.net that resolve to the same external public IP address, e.g. 140.240.40.111 (configured on the external DNS)

This request to this IP (e.g. GET https://stage.external.domain.net) are then routed to my NGINX server that has one leg on the DMZ e.g. 172.20.180.111 and another to my internal network e.g. 10.222.20.1/16 on which I have 2 docker hosts that resolve internally as follow:

  • stage.internal.domain.net => 10.222.20.14
  • internal.domain.net => 10.222.20.15

I am trying to configure my NGINX to route:

  • external request stage.external.domain.net:443 to internal stage.internal.domain.net:443
  • external request external.domain.net:443 to internal internal.domain.net:443
stage.external.domain.net:443 -> 140.240.40.111:443 -> 172.20.180.111:443 (NGINX) -> 10.222.20.14:443 (stage.internal.domain.net)

external.domain.net:443 -> 140.240.40.111:443 -> 172.20.180.111:443 (NGINX) -> 10.222.20.15:443 (internal.domain.net)

I can see that requests are hitting my NGINX in the access.log, but then the request do not seem to be routed forward.

Hereafter the configuration that I have tried, any pointers are most welcome:

nginx.conf

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

include /usr/share/nginx/modules/*.conf;

events {
  worker_connections 1024;
}

http {
  log_format main '$remote_addr - $remote_user ($time_local) '
                  '"$request" $status $body_bytes_sent '
                  '"$http_referer" "$http_user_agent"';

  access_log /var/log/nginx/access.log main;
  error_log /var/log/nginx/error.log warn; 

  sendfile            on;
  tcp_nopush          on;
  tcp_nodelay         on;
  keepalive_timeout   65;
  types_hash_max_size 2048;

  include             /etc/nginx/mime.types;
  default_type        application/octet-stream;

  include /etc/nginx/conf.d/*.conf;

  upstream internal_stage {
    server 10.222.20.14:443; # docker host stage.internal.domain.net
  }

  upstream internal_production {
    server 10.222.20.15:443; # docker host internal.domain.net 
  }

  # Forward all requests to stage.external.domain.net:443
  server {
    listen 443;
    server_name stage.external.domain.net;
    location / {
      proxy_pass http://internal_stage;
    }
  }

 
  # Forward all requests to external.polylabs.net:443
  server {
    listen 443;
    server_name external.polylabs.net;
    location / {
      proxy_pass http://internal_production;
    }
  }
}