Get root part of link
How can you get the "real" HttpContext within an ASP.NET MVC application?
Let $(x_n)_{n\in \mathbb{N}}$ be a sequence of real numbers. A well known result is:     The sequence $(x_n)_{n\in \mathbb{N}}$ converges to $a\in \mathbb{R}$ if and only if every subsequence $(x_{n_k})_{k\in \mathbb{N}}$ converges to $a\in \mathbb{R}$.   Now, I'm working on an exercise which essentialy asks to prove the following:     The sequence $(x_n)_{n\in \mathbb{N}}$ converges to $a\in \mathbb{R}$ if and only if for every subsequence $(x_{n_k})_{k\in \mathbb{N}}$ there is a (sub)subsequence $(x_{n_{k_j}})_{j\in \mathbb{N}}$ which converges to $a$.   Now, one direction is trivial. If in fact $(x_n)_{n\in \mathbb{N}}$ converges to $a$, then by the result I've mentioned, every subsequence of $(x_{n})_{n\in \mathbb{N}}$ converges to $a$. Let then $(x_{n_k})_{k\in \mathbb{N}}$ be an arbitrary subsequence. In that case, we know that it is a subsequence of itself, and hence we've found a (sub)subsequence which converges to $a$.  The other way around seems quite complicated for me. The reason is as follows: I must assume that every subsequence $(x_{n_k})_{k\in \mathbb{N}}$ has a (sub)subsequence which converges to $a$ and the proof that the original one converges to $a$.  My problem is exactly that "a". If it had all (sub)subsequences converging to $a$, then by the result i've mentionted, the subsequence $(x_{n_k})_{k\in \mathbb{N}}$ would converge to $a$. In that case, we would have every subsequence converging to $a$ and the result would follow.  My idea to prove the claim was then:  First remember that a subsequence is the restriction of the original one $x: \mathbb{N}\to \mathbb{R}$ to an infinite subset $\mathbb{N}'\subset \mathbb{N}$. In that case a (sub)subsequence is the restriction of $\tilde{x} = x|\mathbb{N}'$ to an infinite subset $\mathbb{N}''\subset \mathbb{N}$. But since $\tilde{x}$ is the restriction of $x$ to $\mathbb{N}'$ and since $\mathbb{N}''\subset \mathbb{N}'$, the restriction of $\tilde{x}$ to $\mathbb{N}''$ is itself the restriction of $x$ to $\mathbb{N}''$.  In other words, every (sub)subsequence can be viewed as a subsequence of the original one. Considering this, by hypothesis every subsequence has a (sub)subsequence which converges to $a$. But by this argument, this means that we can replace every subsequence with a convergent one. And then we can use the result I stated.  Is my idea correct? Is this really the way to prove the claim? My only doubt is that I need every subsequence converging to $a$ to use the result. In this case I can't see how I can argue that this implies every subsequence converges to $a$.  How can I finish this proof? Ratios in Regression, aka Questions on Kronmal Recently, randomly browsing questions triggered a memory of on off-hand comment from one of my professors a few years back warning about the usage of ratios in regression models. So I started reading up on this, leading eventually to Kronmal 1993.  I want to make sure that I'm correctly interpreting his suggestions on how to model these.   For a model with a ratio with the same denominator on both the dependent and independent side: $ Z^{-1}Y = Z^{-1}1_n\beta_0 + Z^{-1}X\beta_X + \beta_Z + Z^{-1}\epsilon $   Regress dependent ratio on the (inverse) denominator variable in addition to the other ratios Weight by the (inverse) denominator variable  For a model with dependent variable as a ratio: $ Y = \beta_0 + \beta_XX + Z1_n\alpha_0 + ZX\alpha_X + Z^{-1}\epsilon $   Regress numerator by original variables, denominator, and denominator times original variables [what about categorical variables?] Weight by (inverse) denominator  For model with only independent variable ratios: $ Y = \beta_0 + X\beta_X + Z^{-1}1_n\beta_{Z^{-1}} + W\beta_W  + Z^{-1}W\beta_{Z^{-1}W} + \epsilon $   Include numerator and (inverse) denominator as main effects, ratio as interaction term.    Are my interpretations here correct? Say that we have a secure random number generation that outputs 32 bit random numbers, so it's output is a true random number between 0 and a MAX.  What is the best way to map this random number to a defined range (say I want something random between X and Y) without loosing too much entropy? ensurepip is disabled in Debian/Ubuntu for the system python I am trying to make a virtual environment for the development of my Django application. The commando's which I am using:   vagrant@vagrant:/var/www/djangogirls$ python3 -m venv myvenv The virtual environment was not created successfully because ensurepip is not available.  On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.      apt-get install python3-venv  You may need to use sudo with that command.  After installing the python3-venv package, recreate your virtual environment.  Failing command: ['/var/www/djangogirls/myvenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']   vagrant@vagrant:/var/www/djangogirls$ sudo apt-get install python3-venv Reading package lists... Done Building dependency tree        Reading state information... Done python3-venv is already the newest version (3.5.1-3). The following packages were automatically installed and are no longer required:   javascript-common libjs-jquery libjs-sphinxdoc libjs-underscore python-pbr python-pkg-resources   python-six python-stevedore python3-virtualenv virtualenv virtualenv-clone Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 108 not upgraded.  vagrant@vagrant:/var/www/djangogirls$ python3 -m ensurepip ensurepip is disabled in Debian/Ubuntu for the system python.  Python modules for the system python are usually handled by dpkg and apt-get.      apt-get install python-&lt;module name&gt;  Install the python-pip package to use pip itself.  Using pip together with the system python might have unexpected results for any system installed module, so use it on your own risk, or make sure to only use it in virtual environments.   vagrant@vagrant:/var/www/djangogirls$ rm -r myvenv/   vagrant@vagrant:/var/www/djangogirls$ python3 -m venv myvenv The virtual environment was not created successfully because ensurepip is not available.  On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.      apt-get install python3-venv  You may need to use sudo with that command.  After installing the python3-venv package, recreate your virtual environment.  Failing command: ['/var/www/djangogirls/myvenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']   As you can see, I am trying to make a myvenv, which cannot be created due to the python3-venv missing. I have already installed this, but the ensure pip is missing. After searching it seems that the system (Ubuntu 16.04) discourages the usage of the package. Could someone help me work around this problem? how to prevent cell color to cover table's borders? When I change the background color of a cell in a table, the color covers the borders, however I want the horizontal lines to remain.  I have a simple command \cellcolor[gray]{0.9} in my table. Can anybody help me with this problem? Upgrading my Wubi 11.04 to 11.10 I want to upgrade my current Wubi installation (Ubuntu 11.04) to Ubuntu 11.10. Is this possible to do inside Wubi? Or do I have delete Wubi from Windows, therefore deleting my current Ubuntu installation; and then install 11.10 via the Wubi installer?  Thanks Can I still use logistic regression if some variables are not applied to all the observational units? Some of the variables are questions that are not being asked to every single person in the questionaire depending on how they answered previous question(s). So would I still be able to use a logistic regression if some of the questions (the independent variables) are only measuring the responses of SOME of the respondents? Shell script to delete directories older than n days How is an instance initializer different from a constructor? How can I manually interpolate string escapes in a Perl string? \foreach not behaving in axis environment Am hesitant to ask yet one more embarrassing question, but I can't seem to see the problem with the \foreach in the MWE. It should produce several horizontal lines but only produces the one with the yValue as specified in the \newcommand{\yValue}{0.3}:  Code: \documentclass{article} \usepackage{pgfplots}  \newcommand{\yValue}{0.3}  \begin{document} \begin{tikzpicture} \begin{axis} [  ymin=0,  ymax=1,  xmin=0,  xmax=1, ]  \foreach \yValue in {0.00,0.1,...,1.00} {     \draw [red] (axis cs:0,\yValue) -- (axis cs:1,\yValue); }  \end{axis} \end{tikzpicture} \end{document} Display header and footer in all PDF pages using VF My vf page     &lt;apex:page renderAs="pdf" Controller="testpdf1"&gt;     &lt;head&gt;         &lt;style type="text/css" media="print"&gt;             @page              {                 size: 8.5in 11in;/* width height */             }              @page              {                 @top-center                  {                     content: element(header);                 }                  @bottom-left                  {                     content: element(footer);                 }             }              div.header              {                 padding: 10px;                 position: running(header);             }              div.footer              {                 display: block;                 padding: 5px;                 position: running(footer);             }              .pagenumber:before              {                 content: counter(page);             }              .pagecount:before              {                 content: counter(pages);             }         &lt;/style&gt;     &lt;/head&gt;      &lt;div class="header"&gt;             &lt;div align="right"&gt;Header&lt;/div&gt;     &lt;/div&gt;      &lt;div class="footer"&gt;         &lt;div&gt;Page &lt;span class="pagenumber"/&gt; of &lt;span class="pagecount"/&gt;&lt;/div&gt;     &lt;/div&gt;      &lt;div class="content"&gt;         &lt;p&gt;             &lt;apex:repeat value="{!opp}" var="item"&gt;                 &lt;tr&gt;                     &lt;td class="tableContent"&gt;{!item.Name}&lt;/td&gt;                 &lt;/tr&gt;             &lt;/apex:repeat&gt;         &lt;/p&gt;     &lt;/div&gt; &lt;/apex:page&gt;   Controller  public class testpdf1 {     public list&lt;Account&gt; opp{get;set;}      public testpdf1()     {         opp=[SELECT Name  from Account limit 50];     } }   I am getting all records in pdf format but able to get header in first page only and i am not getting header from second pages how can i display header to all pages. My office is going to buy a bulk number of desktop PCs (for developmental purposes).  I encouraged them to buy PCs without a pre-installed OS and then install Linux. My colleagues agree with me but they are not regular users of any Linux-based OS, so they want to choose a Linux OS which is best for our purposes and user-friendly and I suggested Ubuntu.  Now I want some data to support my position, what's so good about Linux and specifically Ubuntu? What happens with the appearance of the folder icons in dark mode of macOS Mojave Finder? In High Sierra I used some custom icons for my folders in the Finder; but with the new update to Mojave and the dark mode, the predefined icons also become darker. However the custom icons don't.  Inspecting an element you find a dark preview, but when you extract the icon this is the clear, the same as there was in High Sierra. E.g.:   Previously visualization of the developer predefined icon. It's dark:  But if you extract that icon, it's clear:    There are no dark icons in the system library, at least not in the same directory as always:  /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources   Are they being actively obscured by the operative system without there being icons with that real appearance? In this case, any idea to apply this method to the custom icons without modifying it into a new coloration? I try to clean my mid-2015 Macbook Pro with Retina display by wiping the screen with a damp cloth and then immediately drying.  However, there seems to be left some residue/streak marks, which look very oily. Sometimes these disappear after a few minutes, but they are still very unsightly, and a bit worrying (is there something wrong with my screen?)  I'm wondering if there are other cleaning techniques which avoid this issue, or whether this is completely normal behaviour.  Thank you! Batch script to resize height of all layers to same height but keeping their original aspect ratio I have hundreds of product image layers and I am trying to resize them all to the same height (ignoring the width) and retaining their individual aspect ratio's.  Is there a script available that does this? Or a feature I am unaware of?  Thanks! Among any three consecutive positive integers one is a multiple of 3 Is everything in .NET an object? Why is it dangerous to eat meat which has been left out and then cooked? How to add home directory path to be discovered by Unix which command?