This is so weird - I am trying to password protect a folder in nginx, and it's sorta working... here is my config block:          location /private/ {                 auth_basic "Restricted";                 auth_basic_user_file /usr/share/nginx/htpasswd;                 index index.php;         }   ...and when I visit http://example.com/private, I am prompted for an .htaccess password (good), but BEHIND that prompt I see the browser partially loading the page (some broken HTML and images)-- obviously very bad. It seems like the images subfolder is being allowed through, even before the user enters a user/pass.  How can I prevent the /private dir (and EVERYTHING under it) from being served before the user gives the correct user/pass?
So to help prevent brute force attacks against my phpmyadmin install I've configured nginx to require HTTP Basic Auth (extra username and password) and then the requests need to come from a whitelisted IP Address. However the IP Address whitelist works fine if I run  however without adding the extra .php block I could load  without my IP being whitelisted. This issue doesn't affect the HTTP Basic Auth. Is there a reason this happens? Anyway to get around having to add extra .php blocks? A copy of the config area for phpmyadmin is below.  # Setup and secure phpMyAdmin location /phpmyadmin/ {   allow 1.2.3.4;   deny all;   auth_basic "phpMyAdmin - HTTP Basic Login";       auth_basic_user_file /etc/nginx/pma_pass;     location ~ \.php$ {     include snippets/fastcgi-php.conf;             fastcgi_pass unix:/run/php/php7.0-fpm.sock;     allow 1.2.3.4;     deny all;     } }
Question is :  For a differentiable function $f:\mathbb{R} \rightarrow \mathbb{R}$ what does $\lim_{x\rightarrow +\infty} f'(x)=1$ imply?  Options:    $f$ is bounded $f$ is increasing $f$ is unbounded $f'$ is bounded   I could not find counter examples but then, I strongly feel $\lim_{x\rightarrow +\infty} f'(x)=1$ would just imply that $f'(x)$ is bounded.  I do not have much idea why would other three are false.  I would be thankful if someone can suggest me some hints.  Thank You. I am trying to compute this integral/limit, I don't feel like I have any good insight...   $$\lim_{n \to \infty} \int_0^{n^2} e^{-x^2}n\sin\frac{x}{n} \, dx.$$  I have tried to make a change of variable to get rid of the $n^2$, I changed to $X=\frac{x}{n^2}$ but got something even worse, I've tried to reach a situation where I could use a convergence theorem for Lebesgue Integrals,... I'm not sure I'm even on the right track!  Could you give me a hint on how to start this?  Thank you very much! How bias arises in using maximum likelihood to determine the variance of a Gaussian? While reading , I ran into the following explanation for why there is an error in estimating the variance of Gaussian distribution using Maximum Likelihood. On ,      Illustration of how bias arises in using maximum likelihood to   determine the variance of a Gaussian. The green curve shows the true   Gaussian distribution from which data is generated, and the three red   curves show the Gaussian distributions obtained by fitting to three   data sets, each consisting of two data points shown in blue, using the   maximum likelihood results (1.55) and (1.56). Averaged across the   three data sets, the mean is correct, but the variance is   systematically under-estimated because it is measured relative to the   sample mean and not relative to the true mean.   I'm pasting figure 1.15 and the required equations (1.55, 1.56) here for convenience.  $\mu_{ML} = \frac{1}{N}\sum_{n=1}^{N}x_n$   $\sigma_{ML}^2 = \frac{1}{N}\sum_{n=1}^{N}(x_n - \mu_{ML})^2$    I can imagine how maximum likelihood estimation would look pictorially. However, I'm not able to understand the figure or the explanation. I would appreciate if someone could label the figure or explain what points are considered in each part of the figure and why the curve could look like that in each case.  I looked up , and I'm able to understand why there is a factor of $\frac{N-1}{N}$ between the true $\sigma^2$ and $\sigma_{MLE}^2$.  ${\rm I\!E}[\sigma_{MLE}^2]= (\frac{N-1}{N})\sigma^2 $ While attempting to delete a question which was answered by myself, and with no other answers, I got the following warning:     Delete this answered question?      We do not recommend deleting questions with answers because doing so   deprives future readers of this knowledge.      Repeated deletion of answered questions can result in your account   being blocked from asking. Are you sure you wish to delete?   I understand that deleting your question when someone else has answered it is effectively nullifying the effort that person put into that answer, which is bad. But is it bad if the only answer that's deleted along with your question is your own? Help with Dual Javascript countdown clock I am having a little trouble figuring out how to make this work properly, I am trying to put a small countdown clock in the left column and one in the right column, which will show a countdown to two separate dates. I was able to create a single countdown clock using the below code and was hoping to be able to be able to tweak the code enough to allow it to run on a second CEWP with a different date. Is it possible to run two Javascript files on the page without them interferring with eachother? Thank you anyone that can lend a quick hand.      &lt;style type="text/css"&gt; .container{     text-align: center;     background: #f63536;   font-family: sans-serif;   font-weight: 100;   height:115px;   width:215px; }  h3{   color: #FFFFFF;   font-weight: 100;   font-size: 16px;   margin: 0px 0px 5px;   padding-top:3px; }  #clockdiv{     font-family: sans-serif;     color: #fff;     display: inline-block;     font-weight: 100;     text-align: center;     font-size: 20px; }  #clockdiv &gt; div{     padding: 5px;     border-radius: 3px;     background: #ff5b5b;     display: inline-block; }  #clockdiv div &gt; span{     padding: 5px;     border-radius: 3px;     background: #ab0202;     display: inline-block; }  .smalltext{     padding-top: 5px;     font-size: 13px; }  &lt;/style&gt;  &lt;div class="container"&gt;  &lt;h3&gt;Countdown Clock Left&lt;/h3&gt; &lt;div id="clockdiv"&gt;   &lt;div&gt;     &lt;span class="days"&gt;&lt;/span&gt;     &lt;div class="smalltext"&gt;Days&lt;/div&gt;   &lt;/div&gt;   &lt;div&gt;     &lt;span class="hours"&gt;&lt;/span&gt;     &lt;div class="smalltext"&gt;Hrs.&lt;/div&gt;   &lt;/div&gt;   &lt;div&gt;     &lt;span class="minutes"&gt;&lt;/span&gt;     &lt;div class="smalltext"&gt;Min.&lt;/div&gt;   &lt;/div&gt;   &lt;div&gt;     &lt;span class="seconds"&gt;&lt;/span&gt;     &lt;div class="smalltext"&gt;Sec.&lt;/div&gt;   &lt;/div&gt; &lt;/div&gt;&lt;/div&gt;  &lt;script&gt; function getTimeRemaining(endtime){   var t = Date.parse(endtime) - Date.parse(new Date());   var seconds = Math.floor( (t/1000) % 60 );   var minutes = Math.floor( (t/1000/60) % 60 );   var hours = Math.floor( (t/(1000*60*60)) % 24 );   var days = Math.floor( t/(1000*60*60*24) );   return {     'total': t,     'days': days,     'hours': hours,     'minutes': minutes,     'seconds': seconds   }; }  function initializeClock(id, endtime){   var clock = document.getElementById(id);   var daysSpan = clock.querySelector('.days');   var hoursSpan = clock.querySelector('.hours');   var minutesSpan = clock.querySelector('.minutes');   var secondsSpan = clock.querySelector('.seconds');    function updateClock(){     var t = getTimeRemaining(endtime);      daysSpan.innerHTML = t.days;     hoursSpan.innerHTML = ('0' + t.hours).slice(-2);     minutesSpan.innerHTML = ('0' + t.minutes).slice(-2);     secondsSpan.innerHTML = ('0' + t.seconds).slice(-2);      if(t.total&lt;=0){       clearInterval(timeinterval);     }   }    updateClock();   var timeinterval = setInterval(updateClock,1000); }  var deadline = 'October 31 2015 00:00:50'; initializeClock('clockdiv', deadline); &lt;/script&gt; What makes a chewy brownie? I've tried many different brownie recipes and most of mine bake to a cake-like consistency. The brownie holy grail for me is crusty top chewy brownies. What can I add/remove/do that will make my brownies chewier? I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it? I was wondering if there were any two integers $a$ and $b$ where $a^3=b^2$. How do I enable automatic updates? A reward becomes a penalty if I am working to build a reinforcement agent with DQN. The agent would be able to place buy and sell orders for a day trading purpose. I am facing a little problem with that project. The question is "how to tell the agent to maximize the profit and avoid the transaction where the profit is less than 100$".  I want to maximize the profit inside a trading day and avoid to place the pair (limit buy order, limit sell order) if the profit on that transaction is less than 100$. The idea here is to avoid the little noisy movements. Instead, I prefer long beautiful profitable movements. Be aware that I thought using the "Profit &amp; Loss" as the reward.  "I want the minimal profit per transaction to be 100$" ==> It seems this is not something that is enforceable. I can train the agent to maximize profit per transaction, but how that profit is cannot be ensured.  At the beginning, I wanted to tell the agent, if the profit of a transaction is 50 dollars, I will remove 100 dollars, then It becomes a penalty of 50 dollars for the agent. I thought it was a great way to tell the agent to not place a limit buy order if you are not sure it will give us a minimal profit of 100$. It seems that all I would be doing there is simply shifting the value of the reward. The agent only cares about maximizing the sum of rewards and not taking care of individual transactions.   How to tell the agent to maximize the profit and avoid the transaction where the profit is less than 100$? With that strategy, what guarantee that the agent will never make a buy/sell decision that results in less than 100 dollars profit? Does the sum of reward - # transaction * 100 can be a solution? In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template &lt;typename T, typename Tail&gt; // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template&lt;typename U&gt; struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion&lt;U&gt; dummy;      };     template&lt; &gt; struct inUnion&lt;T&gt; {     }; }; template &lt;typename T&gt; // For the last node Tn. struct UnionNode&lt;T, void&gt; {     // ...     template&lt;typename U&gt; struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template&lt; &gt; struct inUnion&lt;T&gt; {     }; };   The problem I have is in the typedef Tail::inUnion&lt;U&gt; dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion&lt;U&gt; names a type and not a function? Why didn't Skynet kill Kyle Reese? Can markdown mini replace an en dash with a normal hyphen in URLs? How do you run Ubuntu Server with a GUI? Why every polynomial over the algebraic numbers $F$ splits over $F$? Getting inverse of a transposition key Biblatex with Biber: Configuring my editor to avoid undefined citations Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools Why isn't my Minecraft LAN server working? My LAN server won't let my cousin join me or me join my cousin. It won't show up on the multiplayer screen - it keeps saying "scanning for LAN servers" but it never finds it. I am at his house and we use different computers but it won't connect. How can I fix this? I want to attach a code file to my question, but I am not able to find a link to do it. Is attaching files possible at all? Showing the norm' is non-negative