If $\sum a_n$ converges and $b_n=\sum\limits_{k=n}^{\infty}a_k $, prove that $\sum \frac{a_n}{b_n}$ diverges

Let $\displaystyle \sum a_n$ be  convergent series of positive terms and set  $\displaystyle b_n=\sum_{k=n}^{\infty}a_k$ , then prove that $\displaystyle\sum \frac{a_n}{b_n}$ diverges.   I could see that $\{b_n\}$ is monotonically decreasing sequence converging to $0$ and I can write $\displaystyle\sum \frac{a_n}{b_n}=\sum\frac{b_n-b_{n+1}}{b_n}$, how shall I proceed further?


Regression with percentage response variable (ratio of two counts but the counts themselves are not available) in R

I have a dataset where I'm trying to predict a student's percentage score on a school exam from some other collected IVs. I'm wondering how to correctly run this analysis in R.  A few related questions:  First, I've seen a number of questions on this topic (e.g. ) where the usual recommendation is to use logistic regression. I'm a bit confused about how logistic regression fits into this. I've never formally taken a class on logistic regression, and my understanding (from the machine learning world) is that the evaluation of the linear input through a logistic function is interpreted as the probability that this data point belongs to the majority (1) class. However, I don't have classes per se, so I'm confused about how a logistic model actually works in this case as I essentially have a continuous variable that is bounded by 0 and 100.   I've also seen Poisson regression being recommended in some places. However, that appears to predict integer values, and is likely not a good model for this?  Finally, what are the steps for running this in R? Would I convert my percentage DV to a logit, run the regular lm() function and interpret the coefficients (and their p values) like normal? Is the interpretation of the significance the same as linear regression (i.e. the IV is a significant predictor of the percentage DV when holding all other IVs constant)?  EDIT:  In the comments, it has been suggested that the answer can be found here:   The solution there, as proposed by Greg, is to use 2 columns, one specifying a proportion and another to specify the weight (number of total points). This won't work in my case.  In the dataset I only have access to the final percentage/proportion. The data comes from different classes and I have no way of knowing the number of points the individual received on the exam, nor the total number of points available for that exam (as it would likely be different for individuals in different classes)  Option #1 in Greg's post is also not possible because I don't have a binary/categorical response.


When trying to install anything:    You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  colord : Depends: libsane (>= 1.0.11-3) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   I tried running apt-get -f install and apt-get install libsane with no luck.


What should you do if other sites shamelessly copy content and the cc-wiki license is not adhered to?

Copying content is one thing, but copying content without referring to or quoting the original is just plain rude and violates the cc-wiki license and the clearly laid out  of this and related sites. When someone or some site does this, what action should we undertake towards the SO team to signal this? Should we worry at all?  Example of a full-copy [of a post and its thread][2] without linking back, violating cc-wiki and claiming it under their own cc-wiki. http://www.answerspice.com/c119/1540246/what-can-you-do-in-msil-that-you-cannot-do-in-c%23-or-vbnet Example of [the same post and only the accepted answer][3], with correctly linking back. http://efreedom.com/Question/1-541936/What-can-you-do-in-MSIL-that-you-cannot-do-in-C#-or-vb-NET The same .


I'm trying to make a 2d array using lists. From input I have a tuple with the specs of the lines and the columns. Something like this.  ((1, 2, 3, 4, 5), (9, 8, 7, 6, 5))   This means that i need a list like this:  [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]   (A 5x5 matrix)  to make the matrix, since i don't know the lenth of the specs tuple. I made a constructor to make the matrix. Something like this: (t is the specs tuple)  t=[[0] * len(t[0])] * len(t[1])   This makes exacly what I want, but when I try to change a value this happens: (y is the matrix)  >>>y[0][1]=2 >>> y [[0, 2, 0, 0, 0], [0, 2, 0, 0, 0], [0, 2, 0, 0, 0], [0, 2, 0, 0, 0], [0, 2, 0, 0, 0]]   It changes all the [1] index of all the lines. Why is it doing this?


Cannot boot Windows 7 after updating to Ubuntu 11.10

I had a dual boot setup on my system, with Ubuntu 11.04 and Win7. Yesterday I updated Ubuntu to 11.10. Now , I cannot seem to be able to load Win7. I do see an entry for it on the boot menu, but when I select that entry and the screen goes black, with everything coming to a standstill. I tried waiting for it to respond but nothing happened.  I went through the forums and tried grub-update but when I do that, nothing really happens. I am not sure of this, but I get no output from grub for up to 10 minutes (can grub-update be made verbose?)  How can I fix this and get back to booting both OSs properly?


If a function is compactly supported, then its Fourier series converge?

Suppose that $f$ is continuous on $\mathbb{R}$. Show that $f$ and the Fourier transform $\hat{f}$ cannot both be compactly supported unless $f=0$.   Hint: Assume $f$ is supported in $[0,1/2]$. Expand $f$ in a Fourier series in the interval $[0,1]$, and note that as a result, $f$ is a trigonometric polynomial.  I tried to solve this following the hint. Assume both $f$ and $\hat{f}$ are compactly supported, then if we follow the hint we get $$f(x)=\sum_{n=-\infty}^\infty \hat{f}(n)e^{2\pi inx}.$$ But since $\hat{f}$ is compactly supported, for large $n$, $\hat{f}(n)=0$, and we get that $f$ is a trigonometric polynomial, which is not compactly supported. However, my question is, for this to work out, we need the identity in the above, which is not guaranteed unless, say $f$ is $C^1$, but we only have that $f$ is continuous, so how can I get the result? I would greatly appreciate any help.  I've seen other solutions from this website based on the fact that $\hat{f}$ is not holomorphic, but in this book, holomorphic functions are not yet introduced. So I'm wondering if perhaps compactly supported guarantees the convergence of the Fourier series?


I am getting the following error:  Conversion loses qualifiers   when trying to implement indexing operator without the code duplication (I will show the segment of code):  Point* BufferedList::indexTemp(size_t idx) {     if (idx >= size) return nullptr;      return &arr[idx]; }  const Point* BufferedList::operator [](size_t idx) const {     return indexTemp(idx); } Point* BufferedList::operator [](size_t idx) {     return indexTemp(idx); }   However, the following works (this doesn't use the helper function indexTemp and it is duplication of code):  const Point* BufferedList::operator [](size_t idx) const {     if (idx >= size) return nullptr;      return &arr[idx]; } Point* BufferedList::operator [](size_t idx) {     if (idx >= size) return nullptr;      return &arr[idx]; }   Do I really need two functions for indexing (one that returns Point* and the other that returns const Point*)?


Grub and Ubuntu disappeared after Windows update

I had Windows 10 and Ubuntu 14.04 installed in dual boot.  Roughly 125GB each.   After the Windows update the PC only showed me the grub rescue terminal. I could neither use Ubuntu nor use Windows.  I inserted the liveCD and ran boot-repair.  After that Windows appeared normally, but no GRUB and no Ubuntu.  This is what I get when I run sudo fdisk -l:    Ubuntu must be either /dev/sda2 or /dev/sda4, since they are the biggest partitions, but neither of them is recognized as a Linux system.  What should I do?


For statements like the one below, I need a large left bracket to precede the array.  \Biggr\{ is not big enough.  Ideally I could use \left\{ and make the right bracket white, but there doesn't seem to be any way to do that.  \( P(Y = y) = \Biggr\{  \begin{array}{l l}  0.064&amp; \mbox{ for }y = -3 \\  0.360 &amp; \mbox{ for }y = 0 \\  0.360 &amp; \mbox{ for } y=3 \\  0.216 &amp; \mbox{ for } y=6 \\  0 &amp; \mbox{ otherwise.}  \end{array} \)


What is the mistake I'm making with simplifying powers?

I came across an issue when I tried to simplify an expression, like this: $$(-1)^{2x}=((-1)^2)^x=(1)^x=1$$ So now it looks like the expression I started with will always equal one. However, when I for example fill in $x=\frac{1}{2}$, I get this: $$(-1)^{2x}=(-1)^{2\cdot\frac{1}{2}}=(-1)^1=-1$$ It clearly does not equal one, so I made a mistake somewhere. Apparently the first step, $(-1)^{2x}=((-1)^2)^x$, is only true when $x$ is even. Why is this?  I thought maybe the rule does not apply if the base number is negative. But that would not explain why you get the same error when simplifying this: $$e^{2x\pi i}=(e^{2\pi i})^x=(1)^x=1$$ Again, if you fill in a half, the result should be -1 and not 1.


Click event doesn't work on Ajax loaded content

Can somebody see what I'm missing? I've been stuck on this for a while now. I've got a ajax post which dynamically loads products.content.php into my page. I want to bind a click event to a button which is created through this post, but I can only get it working when the data isn't loaded by ajax.              $.post('product.content.php',{'page': 0}, function(data) {              $("#products").append(data); //append data received from server          }).fail(function(xhr, ajaxOptions, thrownError) {              alert(thrownError); //alert any HTTP error         });            Works well, but then when I'd like to bind a click event to the appended data i recieve an error 'TypeError: thisSectionID is undefined' even after I delegated the event. (EDIT: changed var thisSectionID to $(this).attr('id'); to find clicked buttons ID instead of closest div ID)          $(document).on('click', '.popup_open', function () {              var thisSectionID   = $(this).closest('div').attr('id');             var pidValSplitter   = thisSectionID.split("_");             var pidVal         = pidValSplitter[1];              var productPopup     = $("#product_popup");              productPopup.popup("show");             productPopup.html('');              productPopup.load("product.popup.php", {'pid':pidVal},                  function (responseText, textStatus, req) {                     if (textStatus == "error") {                        productPopup.empty();                       productPopup.popup("hide");                      }else{                       productPopup.empty();                       productPopup.html(responseText);                            $('form').on('submit', function (e) {                               var action                  = "voegtoe";                                var aantalVal                = $("#aantal_" + pidVal).val();                                var dataString = 'action='+ action + '&pid=' + pidVal + '&aantal=' + aantalVal;                                var thisRow = $(this).closest('.row');                               thisRow.empty();                               thisRow.html('');                                $.ajax({                                   type: 'post',                                   url: 'functions.php',                                   data: dataString,                                   success: function (theResponse) {                                        productPopup.empty();                                       productPopup.popup("hide");                                       $("#cart_popup").popup("show");                                       $(".cart").html(theResponse);                                             },                                   error: function (jXHR, textStatus, errorThrown) {                                       alert(errorThrown);                                   }                               });                               e.preventDefault();                           });                            $('.product-popup-close').click(function (e) {                               e.preventDefault();                               productPopup.empty();                               productPopup.popup("hide");                           });                      }             });          });


How do I change the hostname without a restart?

I want to change the OS hostname but I do not want to restart.  I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this?


Motley fool says you can make $15,978 more per year with Social Security. Is this for real?

The Motley fool has an ad campaign that says you can make $15,978 more per year on Social Security by doing 17 minutes of work using a legal loophole.  I don't want to link to their ad (although, you can find it by searching ).  What are they talking about here?  Is there any truth to this?  If someone could explain it to me without me having to watch the entire ad video or subscribe to their newsletter, I'd appreciate it.


Is there a way to somehow map an XML file to entities, so that I can use Entity Framework with XML file as the data source. XML file is very similar to a database anyway.


How to change a single line in multiple files

I have ~750 .php files in the same directory that contain the line  include("path/to/file.php");   I would like to change this line in every file to  require_once("path/to/file.php");   What would be an efficient method to do so? So far I have tried the following Sed command with no luck:   sed 's#include("path/to/file.php");#require_once("path/to/file.php");#' *.php


Natural numbers that can be expressed as the product of two and three consecutive natural numbers

Looking for natural numbers larger than 210 which can be expressed as the product of two continuous natural numbers or the product of three continuous natural numbers at the same time.  $6 = 1 \cdot 2 \cdot 3 = 2 \cdot 3$ $210 = 5 \cdot 6 \cdot 7 = 14 \cdot 15$  I have made a program to find that numbers smaller than $1000000000$, only to find $6$ and $210$. Are there any other ones?


Density of $\mathbb{Q}^n$ in $\mathbb{R}^n$

$\mathbb{Q}$ is dense in $\mathbb{R}$ (with the standard topology). I'm pretty sure that $\mathbb{Q}^n$ is dense in $\mathbb{R}^n$ too. Is there an easy argument to prove that without reproducing the same argument to show "$\mathbb{Q}$ dense in $\mathbb{R}$"?


Showing $\mu(n) = \sum_{k} e^{2\pi \frac{k}{n} i}$ using cosine explanation

Who closed this question? the similar one is actually different, if you see the answer. The mobius function $ \mu (n)$, is a function with property:  $$\mu(1) = 1$$  $$\mu(n) = 0$$ if $n$ is of the form $p^{2} \times (...)$  $$\mu(n) = (-1)^{j}$$ if $n$ is exactly product of $j$ distinct primes   For example: $\mu(16) = 0$, $\mu(15)=1$, $\mu(14)=1$, $\mu(13)=-1$. My question is, how to show that it can be written using the complex form: $$ \mu(n) = \sum_{k} e^{2\pi \frac{k}{n} i}$$, for $1 \le k \le n$ such that $gcd(k,n)=1$  Attempt: For the complex part, it will be $\sin \left(2 \pi \frac{k}{n} \right)$, and this will be zero because if $k$ is such that $gcd(k,n)=1$ then we must also have $gcd(n-k,n)=1$, and both $\sin(2 \pi k/n)$ and $\sin((n-k)2\pi/n)$ will cancel each other. But how to see the relation of the cosine?


Convert a list into one row with dynamic column in MySQL

I have a list of row to be converted into a dynamic column that depends on the record in one particular column.  From this statement  FID  |Steps | Action  ---- |------|-------- 1416 | 1    | Sit     1416 | 2    | Run  1416 | 3    | Jump  1416 | 4    | Sit  1416 | 5    | Run  1416 | 6    | Skip  1416 | 7    | Hit   1416 | 8    | Run  1432 | 1    | Hit 1432 | 2    | Guard   Into :  FID | 1   | 2     | 3    | 4    | 5   | 6    | 7   | 8    | ----|-----|-------|------|------|-----|------|-----|------| 1416| Sit | Run   | Jump | Sit  | Run | Skip | Hit | Run  | 1432| Hit | Guard | null | null | null| null | null| null |   How do I do this? Please help. Thanks!


How to import a class from default package to jsp

I'm trying to pass a arrayList from servlet to jsp.  This is code from servlet  ArrayList<User> users = UserCollection.getInstance().getArray();          HttpSession session=request.getSession();         session.setAttribute("list", users);          response.sendRedirect("ListProfils.jsp");    This is code in jsp

             Email	             Phone Number	             City	             Address
           <%@page import="java.util.ArrayList"%>            <%            ArrayList<User> val=(ArrayList)request.getSession().getAttribute("list");            for (User user : val) { %>
             <%out.println(user.getEmail());%>	             <%out.println(user.getPhoneNumber());%>	             <%out.println(user.getCity());%>	             <%out.println(user.getAddress());%>
          <% }            %>
            But when i try to run code тhe following error is displayed  An error occurred at line: [37] in the jsp file: [/ListProfils.jsp] User cannot be resolved to a type 34:           <%@page import="java.util.ArrayList"%> 35:            36:           <%  37:           ArrayList<User> val=(ArrayList)request.getSession().getAttribute("list"); 38:            39:           for (User user : val) { %> 40:
   An error occurred at line: [39] in the jsp file: [/ListProfils.jsp] User cannot be resolved to a type 36:           <%  37:           ArrayList<User> val=(ArrayList)request.getSession().getAttribute("list"); 38:            39:           for (User user : val) { %> 40:
 41:             <%out.println(user.getEmail());%>	 42:             <%out.println(user.getPhoneNumber());%>	   I read in google for this bug, and I had to import my class User. But he is in a default package and i dont know how to import him. Please help me


iOS 11-13 - unable to paste into comments

I’m able to copy-paste from any application to any application. I’m able to copy from a comment or from a question or from an answer. I’m able to paste to a question or answer. However, if I attempt to paste into a comment, nothing happens. I am able to subsequently paste into another application, confirming that the text is actually on the clipboard.   However, copying SE links will paste them successfully, but all other text - including other links - still fails. This leads me to believe that it’s a SE issue and not an Apple one.   This has been an issue since 11.0 beta and persists through iOS 13 release.


Simpson's effect is key to understanding potential pitfalls in medical research, particularly in the area of meta-analysis, where multiple studies with dissimilar methodologies are brought together to provide a more definite answer to a problem. The cases reported tend to deal with count tables and ratios that change because of a "lurking" variable or confounder that is ignored (usually different group sizes). However, it is interesting to look at the continuous case to understand it conceptually.  Unsurprisingly, there are a number of posts touching on this issue, but hopefully this Q&A-post will provide with some discussion or entry level intuition, unrelated to any more specific question. To look into the paradox different studies composing a meta-analysis are regarded as random effects in a mixed model.


How to automate a script that requires an ssh-key password at regular intervals

I would like to automate a script that regularly runs rsync, and rsync prompts for my ssh key password each time I run it.  I don't mind typing the password once at the beginning of the script. I can't be prompted each time it runs an rsync command in a loop.  Is there a clean, safe way to prompt for the password once and continue using it?  My assumed solution would be to prompt for the password somehow (not sure how to do that off the top of my head) and store it in an environment variable, then use expect to make use of it. But I feel like there might be an easier approach that I'm not aware of.


Firefox NOT WORKING after Synaptic installed 67.0

After notification, I installed Firefox 67.0 with Synaptic. Firefox no longer loads anything! Worse, using Chromium, I can't find Firefox 66.0.5, the last version that worked on my Ubuntu 16.04 system.  Any suggestions?


SQL Server (2016) Setup removed permission to drives

I recently installed a new Sql Server 2016 and selected the root of drive N:\ for transaction logs and drive Z:\ for tempdb.  In the end the server was succesfully installed and running. But it was not possible to access the drives N or Z anymore.   I suspected Sql Server to expect a folder instead of the whole drive and to change the security settings / permissions on this folder - which in my case was performed on the drive's root and may have caused the symptoms  On the other hand I am pretty sure that I have already sees Sql Server installations using with the root of drives.  Now I wonder if there is a bug in the setup or if it was my fault to configure it that way. And how this can be fixed? Meanwhile IT has modified and opened access to the drives for me, so I can access them now, but Sql Server Service actually is stopped. Do I have to reinstall the sql server or do I have to change all the database's path / log path to a subfolder that has to be created?   Does anyone know what went wrong here?


what are the various fields in which circle is treated as infinite sided regular polygon?

What are the various fields in which circle is treated as infinite sided regular polygon? What I actually mean is , "can u suggest me some applications where circle is treated as infinite sided polygon." for example parallax method .


Does $\dim V=\dim(\operatorname{Ker}(T))+\dim(\operatorname{Im}(T))$ imply $V=\operatorname{Ker}(T)+\operatorname{Im}(T)$ iff $T$ is a homomorphism?

The will be linear transofmation $T:V \rightarrow V$   The formula says that $\dim V=\dim(\operatorname{Ker}(T))+\dim(\operatorname{Im}(T))$  and $\operatorname{Ker}(T)\subseteq V$ and $\operatorname{Im}(T) \subseteq V$  Does it implies that $V=\operatorname{Ker}(T)\oplus \operatorname{Im}(T)$ iff $T$ is a homomorphism?


Selecting events from SQL Profiler in 2005 for profiling a query

I need to profile a large SQL query (in a particular database, not the whole server), and I cant figure out how to setup the profiler. I tried reading MSDN SQL web site, but it has not helped.  I am stuck at the Trace Properties "Events Selection" window. I need help as to which items to select in "Events Selection" window.  I am more interested in finding out why the query is not populating the tables (as opposed to performance)  Thanks


Why the  is observed only for metals and not for non-metals?  Isn't it possible for the photon to release an electron from a non-metal surface?


reference a figure containing a `tikzpicture` with autoref

I use hyperref for referencing all my figures and it works great for everything except figures tikzpicture. For figures containing a graphic, the reference outputs Figure N. for tikz, it outputs section N of the nearest parent section.  Here is my sample code given:  \documentclass{article} \usepackage[utf8]{inputenc}  \usepackage{tikz} \usepackage{hyperref}   \begin{document} \section{my-section} \begin{figure} \centering \begin{tikzpicture}     \node(n) {$n$}; \end{tikzpicture} \label{my-label} \caption{my caption}  \end{figure}  aa \autoref{my-label} bb  \end{document}   It outputs aa section 1 bb. My desired output is aa Figure 1 bb.


I came across a fake/scraped version of Stack Overflow when Googling.   At first I thought it was just rogue Javascript popup ads that you guys might want to hear about but then my colleague pointed out that the site wasn't actually legitimate.  I've reported the site to Google is there anything else I should do?  It looks like it's scraping the real site as some of the results in the background are releveant to my original query, or is that just a coincidence?  EDIT:  After further navigating the site it looks like the real site with adverts on the top of it.


When does $(ab)^n = a^n b^n$ imply a group is abelian?

Suppose the identity $(ab)^n = a^n b^n$ holds in a group for some $n\in\mathbb{Z}$. For which $n$ does this necessarily imply the group is abelian? For example, when $n=-1$ or $n=2$, the group must be abelian. Are there any other such $n$, or can we construct a non-abelian group with this property for all $n\neq -1, 2$?


I've come across the word litotes, which means a rhetorical understatement. However, I’m having trouble understanding how to use it in colloquial English. Could someone please give an example?


What is the standard way to refer to shared code in conference papers?

Say I have a github repository with the shared code and data used for that conference paper? What is the standard way to refer to it in the paper itself?    Write something like. The code is available in [5], and then give the linkas a reference? Give the link in the paper text itself? Give the link as footnotes? Not mention the link in the paper itself, but send it separately as part of the submission?


Help with proving that $\pi$ is irrational

I was trying to prove that $\pi$ is irrational, just to see if I could do it. So far, I've tried to do this by using the fact that the sum   $$S=\sum\limits_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}$$ and arguing that $S$ is irrational instead, and thus implying that $\pi$ is also irrational.  To do this, I thought I could use partial sums $S_n$ of $S$:  $$S_n=\sum\limits_{k=1}^n \frac{1}{k^2}=\frac{A_n}{B_n}$$ where the fraction $A_n/B_n$ is written in lowest terms. We can note that the sequence $\lbrace S_n \rbrace$ is a strictly increasing sequence, with $\pi^2/6$ as its lowest upper bound, so I thought that maybe the sequences $\lbrace A_n \rbrace$ and $\lbrace B_n \rbrace$ both have no upper bound, and the sequences would tend to infinity, and if I were able to prove this, I thought I could use it to argue that $S$ is an irrational number, using the fact that every rational number can be written as the quotient between two finite integers.  We note that $A_n\geq B_n$ for all natural $n$, as $S_n\geq 1$, so all we would really need to prove in that case is that $\lbrace B_n \rbrace \rightarrow \infty$(if this assertion is even correct).  At first I thought that both $\lbrace A_n \rbrace$ and $\lbrace B_n \rbrace$ would be increasing sequences, but after checking with Maple I noticed that they weren't, sadly enough($S_9=\frac{9778141}{6350400}$ and $S_{10}=\frac{1968329}{1270080}$). However, they do indeed seem to get very large very quickly, so I'm thinking that my hypothesis about $\lbrace A_n \rbrace$ and $\lbrace B_n \rbrace$ is correct.  But I have trouble proving my hypothesis, and I'm kind of stuck, no knowing what to do. Is there a way to prove that $\lbrace B_n \rbrace \rightarrow \infty$? And of course, is this approach to prove that $\pi$ is irrational logically sound, or is it fundamentally flawed in some important aspect? In the latter case, what idea should I try next?


a = 1000, b = 1000. Why does `a is b` return true when run from command line, but not in an interpreter?

Based on , we know that Python returns a reference to integers from -5 <= x <= 256.  When I enter the following into an interpreter, I get the expected results:  big_num_1 = 1000 big_num_2 = 1000 print(big_num_1 == big_num_2, big_num_1 is big_num_2)   Which gives me:  True False   But if i save it inside the file myFile and simply do an import:  import myFile   It always give me the following output:  True True   Does Python handle these references differently when not run from an interpreter?


How to make pages metabox display all hierarchy in menu admin?

Running WP 3.9.1  I've got lots of pages and sub pages.  When I get to create menu lots of sub pages doesn't display on the right level, but some do?    The pages metabox should display something more like this    EDIT  Number in screenshot are a bit screwed sorry about that.   The problem is after the first few all the pages are displayed on the same level but they shouldn't.  It should look like this       Page 1                      SubPage A of Page 1             SubPage B of Page 1                                      SubPage 1 of SubPage B                     SubPage 2 of SubPage B                     SubPage 3 of SubPage B                                                 Page 2                      SubPage A of Page 2                                      SubPage 1 of SubPage A                     SubPage 2 of SubPage A                                           SubPage B of Page 2                                      SubPage 1 of SubPage B                     SubPage 2 of SubPage B                                               ...    Any idea what cause this or how to fix it, so i can manage my menu?


How to install Jupiter in Ubuntu 13.10 Saucy Salamander?

I used to use "Jupiter" on previous Ubuntu versions, but now I can't find a way to install it in the newer version of Ubuntu. Is there a way to download it?


Firefox opens 5 processes as soon I start, is it normal?

My Firefox is using a lot of memory. I noticed that as soon I open the firefox browser (with default tab), it opens 5 processes in the taskbar. After that it starts one process for each tab. Is this normal behavior of Firefox or is it some problem with my browser?


Application-priority based automatic bandwidth distribution in Windows?

Whenever my browser wants to download data, I want it to be granted as much of the bandwidth as it wants, while other applications must do with the leftover bandwidth; and when the browser is not transferring any data, other applications could be given the bandwidth. Something like the process priority in Windows task manager. Any method/software to accomplish this automatically?


Asymmetric uncertainties with siunitx package

Is it possible to typeset asymmetric uncertainties, e.g. $0.84_{-0.01}^{+0.02}$ with the  package?


What is the difference between LightGBM and XGBoost?

I found this post :   However, they did not explain clearly in terms of mathematical model. Could anyone make it more clearly please ?


Regex result negative only with Python re.match

The pattern [aeiou][^vr]e(?=[^r]) works fine when testing at RegexPlanet.com, but when I use the same pattern with re.match in Python I get no matches.  import re pattern = r'[aeiou][^vr]e(?=[^r])' list = ['pale.', 'taste', 'kite'] for word in list:     if re.match(pattern, word):         print(word)   Expected Result:  pale. kite.


On an android app, called Classic Solitaire Klondike from Potato Jam, I'm struggling with a deck which seems unsolvable. In this app, 100% of the decks had a solution before. I wrote a solver running every possible solution, but nothing comes out. Here's a capture done with my solver:  I represented with red color the cards I never managed to flip. So I get stuck quite fastly. In the app, the deck is identified by the following seed number: 43688966 I guess I must probably miss something, but can't see where ...


Does voluntary departure from the UK count as deportation?

If someone chose voluntary departure from UK, and is now filling a form to say have you ever been deported from another country, would they tick 'yes'  Then does a voluntary departure appear on travel records and is it considered a deportation.


What is the minimum file size of a PE file (exe) on Windows? And the minimal memory allocation?

What is the minimum file size of a PE file (exe) on Windows? And the minimum memory allocation?  I assembled (using MASM (ml.exe) and link.exe that come with VS 10) the following code: I can not leave out kernel32.lib and ExitProcess, if I do, the program crashes.   ; Assmebly options .386 .MODEL FLAT, STDCALL option casemap:none  ; Include Libs includelib kernel32.lib  ; Imported symbols ExitProcess PROTO :Dword Sleep PROTO :Dword  ; Code .CODE  start:     invoke Sleep, 10000     invoke ExitProcess, 0 END start   The Sleep command is included only to be able to read the memory usage before the program ends.  Now I measure the following: The .exe file is exactly 2.5 KB in size (if I include user32.lib and MessageBoxA, it becomes 3 KB in size --> blocks?) and the application uses 136 KB RAM when it's run (Vista 32bit).  Isn't that somewhat much memory for such a simple program? Why is the exe file so large, and the RAM requirement much larger than the exe file?  Are there some minimal memory sizes? What about the file? It looks like it's organized in blocks of 0.5 KB in size, but isn't it 0.5 KB then for this shortest possible program?  Where can I read about this (except  which I will check out)?  Thanks (my first question here)


What is the proof of $$\sum\limits_{k=1}^n(2k-1)=n^2$$ I understand that it derives from $\sum\limits_{k=1}^nk=\frac{n(n+1)}{2}$ but I miss how to relate that proof for this one.


What is the difference between "Listen my voice" to "Listen to my voice"?


Is it incorrect to use "&" instead of "and" in a professional document?

To save space, I often use "&" instead of "and". I noticed many B2B websites,brochures and reports don't use "&". Is it wrong, or considered shabby if you use the short form?


Does anyone know of an easy way to escape HTML from strings in ?  I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks).  I'm sure it's possible to extend jQuery to do this, but I don't know enough about the framework at the moment to accomplish this.


What determines the length to which hair grows?

Correct me if i am wrong, if we cut 2mm from eyebrow hair, it will grow 2mm and then stop growing, or if we cut 5mm, then it will grow only 5mm. My question is, does hair know how long to grow ?


How to deal with very long lines that do not contain spaces?

I have a problem with a lstlisting environment. I want to use it for displaying several very long lines that can not be reformatted. Independently of the option breakatwhitespace=true or false my lines are not broken down so that the end is far outside of the printable area.  How to specify that line breaks are allowed at any character? Or is it possible to specify the characters (besides whitespace) that can be used for a line break?  Alternative: inserting a special (not-printed) character that indicates "break line here" - doe something like this exists?  \begin{lstlisting}[] Test1: 33b7a2f7c4cc93c46dd4ee2ed81aa1eb-9409135542c79d1ed50c9fde07fa600a_cce5a2fe76bfbd0c48d79fb43a7106f0_263e9a8711c1400fb2a716a1b820ac9a Test2: 33b7a2f7c4cc93c46dd2423423423423-9409135542c79d1ed50c9fde07fa600a_cce5a2fe76bfbd0c48d79fb43a7106f0_263e9a8711c1400fb2a716a1b820ac9a \end{lstlisting}   Update:  The  works fine. Additionally I found a different approach which works directly with a lstlisting environment:  \begin{lstlisting}[breakatwhitespace=true, literate={\-}{}{0\discretionary{-}{\\}{}}]   ... \end{lstlisting}   It allows to break the lines also at hyphenations. It has some drawbacks especially that the line breaks are looking different from the others in the environment. But may be for others this code may be helpful...  Found here:


I have 2 activities.  In first activity there are some text fields and two buttons. In text fields I'm entering some data, and by clicking the first button I'm calling second activity that displays a ListView with checkboxes.   And from second activity after clicking a button over there I'm calling the first activity again. But by the time I move to that page, all data that have been entered earlier have disappeared.  I would need that data to reside even if I move back and forward between two activities.


Can the make the font even smaller than 10pt?

I'm using "\documentclass[10pt]{article}" while preparing a document. Can the make the font even smaller? Does decreasing the font size from 12pt to 10pt reduce the size (in kB) of output pdf file?


Is it true that the relation |A| < |B| is a sufficient condition for claiming that $f$ is a bijection?

This is an exercise of an assignment I have:     Suppose $A$ and $B$ are finite sets and $f\colon A\to B$ is surjective. Is it   true that the relation “$|A| < |B|$” is a sufficient condition for   claiming that $f$ is a bijection? Justify your answer.   And this is my answer:     No. In fact, if $|A| < |B|$, then there should exist at least $1$ element   of $A$ that points to more than $1$ element of $B$, since all elements of $B$   must be pointed (surjective), but this is not a function,   because the same element of $A$ point to different elements of $B$.   Is my answer correct? I don't know if the question actually is asking for a proof or what, and if my answer is a proof, if correct.


Can bash do floating-point arithmetic without using an external command?

I have read that bash can do integer arithmetic without using an external command, for example:  echo "$((3 * (2 + 1)))"   Can bash also do floating-point arithmetic without using an external command?


How to find unknown device driver Manufacturer

How to find the model number (serial number) or any other useful information about such device that all information deleted on it (on the device).   I had USB  Wireless and no information exist on the device, when I plug in to my PC, Windows can't find proper driver even enabling searching for driver from Windows Update.   I don't want the answer for my device, I need to know if OS can provide any information when the device plugged in? then using this information for finding the driver.


Adware issue on Microsoft Windows 8.1 Pro

I have written about this issue on msdn forum and I was asked to use some adware cleaner tools to deal with this problem.  Well I scanned my PC with multiple adware cleaners and that lead to some Wifi issues which I resolved afterwards. I also had to uninstall many of my softwares.  umm right now, the ads are still there and they appear more frequently on my browser "Chrome".   Yeah, there is a small written thing at the bottom of every ad 'powered by cloudget'. I am not allowed to post  snapshot.  I'd appreciate any sort of help in this regard.


If $\gcd (a,n) = 1$, how can we prove that $\gcd(a + kn, n) = 1$?

If $\gcd (a,n) = 1$, then how can we prove that $\gcd(a + kn, n) = 1$, where $k$ is any integer? I feel like I should start with linear combinations theorem, but I'm quite lost. Any help would be greatly appreciated!


First of all, I am well aware of this question: .  Unfortunately none of the answers worked. I can find deb files from . There, I am surprised to see that the last version of Ghostscript for Ubuntu 14.04 is version 9.10. When I download version 9.15 for Ubuntu 15.04, and I run it (as root), I get the error:     Error: dependency is not satisfiable libgs9   I checked (apt-get install libgs9) and I have the latest libgs9 installed. Also,  seems to confirm that last is version 9.10 for 14.04.  Does this mean it is not possible to upgrade Ghostscript?


Testing a regression coefficient against 1 rather than 0

Brief caveat- I haven't dusted off my stats knowledge since some university courses a few years ago, and I'm struggling with cobwebs.  I have a model where a linear 1 to 1 relationship has been assumed in the past. The model assumes that revenue from Product A will translate to Product B- it's not perfect, but it's what we've been using for now. I was given the task of doing some exploratory work on this relationship.   I modelled the relationship between revenue B and revenue A, and was able to work out a rough coeffecient. This coeffecient seems to be significant (t test within bounds), but I know the t test is testing whether the slope of this regression line is significantly different than zero. I would like to know if this slope is significantly different than 1, the previous relationship we assumed. How can I adjust a hypothesis test for this? I know I'm going to see the answer and hate myself for asking, thanks for helping me shake this out of my brain.


Which is preferred usage:  The performance features Twain giving an overview of his life up till 1896, ...  -or:  The performance features Twain giving an overview of his life up until 1896, ...  I thought it was "until" but I recently saw "till" in print, so am not sure which is preferred.


As a summary: I wanted to install the latest SCilab, which is not available in the Software centre. I downloaded the tar.gz file from the website. I then followed the instructions from response 7 here . This didn't work for me.  So I removed the file (I think), and extracted the file a different way and ran the program from there.  Okay, so I downloaded Scilab from their website as a tar.gz file.  I then copied the file to /opt:   sudo cp [download name].tar.gz /opt/   I then extraced the file and deleted the tar.gz file:   sudo tar -xvf [download name].tar.gz sudo rm -rf [download name].tar.gz   I found the folder. It was called Scilab-5.4.1. I think the next step changes the "access" settings, and so I changed it as follows:   sudo chmod 770 Scilab-5.4.1/   So this is owner and group permission to read, write and execute.  I then tried the symbolic link thing:   sudo ln -s /opt/Scilab-5.4.1/ /usr/bin/scilab   After this, I tried different ways to run the programme from the terminal, but to no avail. I then looked for the Scilab folder, which I found in opt. I tried to delete the folder "Windows-style" (send to recycling bin) but it wouldn't let me. I also tried purge from the terminal but it couldn't find the programme. I then used:   sudo rm -r /opt/Scilab-5.4.1   The folder disappeared. After this, I downloaded the file again, and transferred it to opt in the process:   sudo tar xzvf [download name].tar.gz -C /opt/   I then went to the folder (in terminal):   cd /opt/scilab-5.4.1   And opened Scilab:   ./bin/scilab   This seems to work. However, there is a Scilab programme logo in the launcher (Unity), but it disappears on closing the programme and there is no logo in the recently used programmes section in the dash.   I want to know that was there an error in my installing process done in the previous unsuccessful install, since I can't find the Scilab logo anywhere ?   Why first method didn't work but the second, simpler method, seemed to work okay (I can at least open the programme) ?   (The final peculiar thing is my "history" in the terminal: using the up-arrow to navigate to previous commands, the history suggests I didn't use rm -r, even though I am almost certain I did.)


Can we carry three new smart phones in hand luggage to India?

I bought two smart phones for my father and sister in Europe. Will the customs officer in India (Chennai) give any trouble if I carry two new unopened smart phones with the box in my hand luggage? Also, i'm a student, does this give me any advantage over it?


How to move all files inside present subfolders up here

I have 50 folders with some subfolders too, with more than 1000 audio files total. I need to remove all subfolders and put all files in present level. Tried mv */* ./ but it complaints: argument list too long


Any useful strategies for finding a Nether Fortress?

Anyone have useful strategies for finding a Nether Fortress in Minecraft's Nether?  I got into the nether and wandered around for quite a while, but didn't find anything.  I'm not sure if there are giveaways (I was looking for large building-like things in the distance).  I've got a map, and have explored a small, but not unreasonable part of it.  Any idea how many fortresses a single map might contain?


Opinions about Oversampling in general, and the SMOTE algorithm in particular

What is your opinion about oversampling in classification in general, and the SMOTE algorithm in particular? Why would we not just apply a cost/penalty to adjust for imbalance in class data and any unbalanced cost of errors? For my purposes, accuracy of prediction to a future set of experimental units is the ultimate measure.  For reference, the SMOTE paper:


I get the following error message when trying to restore the database from backup using RMAN.    rman target /  RMAN> set dbid=130474031 RMAN> configure device type 'sbt_tape' clear; RMAN> startup nomount; RMAN> restore controlfile from autobackup; RMAN> sql 'alter database mount'; RMAN> restore database;  Starting restore at 22-DEC-15 using channel ORA_DISK_1  creating datafile fno=1 name=/opt/oracle/oradata/prod/system01.dbf RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 12/22/2015 12:47:01 ORA-01180: can not create datafile 1 ORA-01110: data file 1: '/opt/oracle/oradata/prod/system01.dbf' RMAN>


How can I add *my own* desktop picture to 19.04?

When I go to change background I can select system pictures.    How do I add to those pictures, e.g. pick from my computer? I see that pictures are in /usr/share/backgrounds But I don't have privs to paste an image in their (i am an admin btw)


How to cope with the change from easy undergrad. to difficult masters?

I'm doing a masters course at a different university than I did my undergrad (both in maths). I did well in my undergrad but now I'm finding it very difficult. The shock of the change is hard to cope with.  I'm not just finding it very difficult, but I get zero feedback: we don't have any tests and I was not able to make friends so I don't know how others are finding it. I'm starting to think that I might be an idiot.   How can I build some confidence in my abilities at the same time as I rush and struggle to keep up with the massive rate of new material I need to learn? How might I get myself some reassurance that I can actually pass, or stop worrying about this so much? (I feel terribly guilty using so much money from my family to be here) It's possible that I don't really have a chance at all but knowing that would be fine.


I need to generate a "package" (string) that consists in 3 velocities: xvel, yvel and wvel. The most convenient way to do so, is to multiply them by 100 and the convert them to hex. The problem is that I need a constant length in each velocity (in order to easily decode them after). I designed the following code,  but I have no success when trying to concatenate every vector in a single "buffer". Any suggestions?  string buffer [50];  int x = 1.23*100; int y = 0*100; int w = 7.89*100;  string xPadle = ""; string yPadle = ""; string wPadle = "";  if(x <= 15) string xPadle = "00"; else if(x <= 255) string xPadle = "0"; else string xPadle = "";  if(y <= 15) string yPadle = "00"; else if(y <= 255) string yPadle = "0";  if(w <= 15) string wPadle = "00"; else if(w <= 255) string wPadle = "0";   sprintf (buffer, "%s%x%s%x%s%x", xPadle, x, yPadle, y, wPadle, w); //printf("%s", buffer); return 0;


Detect when there is only one player left on a team

I want to detect when there is only one player left on a team.   I am making "Hunger Games" style PvP arena/event. When you die you go to the "Dead" team, and if you are still alive you stay on the "InGame" team.  I need to make it so if there is only one player left on the "InGame" team that it announces the winner and everybody returns to the lobby.


How is the notation $X\sim N(\mu,\sigma^2)$ read? Is it $X$ follows a normal distribution? Or $X$ is a normal distribution? Or perhaps $X$ is approximately normal..  What if there are several variables that follow (or whatever the words is) the same distribution? How is it written?


Find all functions $f:\mathbb R\to\mathbb R$ such that $f\left(x^2+f(y)\right)=y+f(x)^2$.

Find all functions of defined on the set of all real numbers with real values, such that $$ f\left(x^2+f(y)\right) = y + f(x)^2 $$  My attempt: Putting $x = 0$, $f\big(f(y)\big) = y + f^2(0)$ and putting $y = 0$, $f\left(x^2 + f(0)\right) = f(x)^2$. But I can't go any further.


How can I get history of a single line from TortoiseSVN?

I have a line in my code:  force=sizeGoalForceKappa*tanh((origRadius-v->radius)/origRadius)*(oldDist+minSpacing-v->radius)/minSpacing;   The code is at revision 881. Is there a way to see history of only this line, while ignoring other changes? Showing log for a single file ignores other files. Can I get a log for a single line, or something similar? I would like to see how definition of "force" has evolved over time, and when "force" was introduced. SVN Blame only gives me the revision in which a line was last changed.


My code is :

My product title

My product small description and text
         Read more »
   Is my code correct and good for seo ?


Local request to port 80 via domain name

I'm running a Windows 2012 IIS 8.5 listening on port 80 to requests coming to domain www.mydomain.com, which I have set in my DNS to the server IP.  Everything works fine outside, but for whatever reason, when I request that domain from a browser inside the server, it does not respond.  I have tried telnet www.mydomain.com 80 from inside the server and it returns Connection Error. If I try telnet localhost 80 it works.  As I said, from outside the server, everything works fine, telnet connects, and the web is served without any problem.  Also, if


Regular expression to avoid a given set of substrings

I was looking for a single regular expression that could match everything that does NOT contain a given set of substrings.  For example, a regular expression that will match everything that does not contain the substrings "abc", "def", ghi"  In this example, the regex would match against "student", "apple" and "maria", but would not match against "definition", "ghint" or "abc123"  Thanks in advance


How to apply multiple styles to a div by using $(element).css(styles)?

I have to apply multiple styles to a div my code is as under:  $(".myDiv").css("background","none"); $(".myDiv").css("background-position","left top"); $(".myDiv").css("background-repeat","repeat-x");   I want to write them once rather than repeating .css() function...


What's the blank space on my About Me page meant for?

When I look at my profile, I see this area with a highlighted background color in most browsers (Internet Explorer, Firefox, and Chrome). Does this convey any specific information?


How to prove, by induction, that an infinitely nested radical is increasing

How do I prove using induction that an infinitely nested radical, like sqrt(1+sqrt(1+sqrt(1+... is increasing. I have seen there are many examples on here like this but haven't seen one that proves the sequence is increasing. Could someone give me some tips or link to one which shows the proof that it is increasing? Thanks.


What's pratical use of Derivate function calculus?

I would like to know whats the pratical use of derivate calculus? Or what it means?  If you can give some pratical example I'll be grateful.  Eg.:  I can use an definite integral to know area of a function knowing the expression of the function and the limits.  Know how to solve exercises make no sense if i cant imagine the real purpose and the objective meaning.  Thanks in advance.


So I already have a degree in math and am working on a masters, but I’ve taken no physics since grade 12, and I think it would be really interesting. I’m not trying to get an official degree, I’m just wondering if math people might have suggestions about what I can read that won’t be too boring because I have an advanced math knowledge, but won’t be too complicated because I have a low level understanding of physics. Anybody have suggestions? Specifically I’m looking for the best path to get into quantum theory I think. Thanks in advance! Note: I realize this is the math stack exchange, not physics, but as a mathematician I wanted a mathematicians perspective


post selection and instantaneous communication

Does post selection lead to instantaneous communication between two points in space? Below is the scenario:  Take two entangled qubits A and B. Seperate them out in space. Post select on qubit A to be 1. Immediately qubit B will collapse to 1 irrepective of far apart they are.


I have a HP Compaq nx6310 notebook wth 4gb memory & a new 250gb hdd. After installing Ubuntu 12.04, i got an "out of disk" error & was unable to boot. I rebooted in live, instaled & ran Boot Repair then rebooted. Grub menu loaded fine, followed by "out of disk.....press any key to continue". I pressed a key & Ubuntu booted, a bit slow but still booted. So here are my questions: 1- Since Ubuntu DOES boot, should I just leave it alone? 2- If I need to fix this, HOW do I do it? 3- What causes this error?  $wolf@lpc-1:~$ df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda1       230G  9.1G  209G   5% / udev            1.6G   12K  1.6G   1% /dev tmpfs           655M  868K  654M   1% /run none            5.0M     0  5.0M   0% /run/lock none            1.6G  260K  1.6G   1% /run/shm wolf@lpc-1:~$


Time dilation - why the observers see each other the slow one but then one of them is older or younger?

I'm in trouble with time dilation: Suppose that there's two people on the Earth (A,B), they are twins and each other has a clock. (So they are at the same reference frame). B travels in a spaceship and is orbiting around the Earth, as B's speed has increased there's some time dilation. So it's supposed that if A "looks" to B, B's clock will run slower than A's, and viceversa. And if one day B decides come back to the Earth, he will be younger than his twin and the hour of his clock would be different (earlier than A's clock) because of time dilation.  My first question is, why each person see the other's clock as the slow one? (In fact, I found some information that may solved it but I'm not sure if it's the right answer, and if it is, I don't understand it. -> It's because everyone thinks about himself as the reference frame. In other words, that for B, he is the stationary and who moves is A, so he sees A's clock run slower as B is "stopped" and the same for A. B is who is moving and A the stationary.)  The other question I have is that if it's true that each one sees the other as the slow one there's something that i missed out. We all agree that B (after going to the space and came back to the Earth) he is younger than his brother. So, why B don't see A moving and aging very fast if A see his brother and his things going very slow? Let's imagine they were looking to each other all the time, if both of them see the other going slowly once they meet and "discover" B is the young one... how is that possible?  [I think that in one episode of Cosmos of Carl Sagan (though may be I'm mistaken) he said that a neutrino "borned" in the Big Bang could have seen the creation of the Universe until today in few seconds due to its high speed, here starts my doubts: or i misunderstood something or there's contradictory information]  (I don't know anything about physics, only what is taught at high school as I'm a teenager so it'd be better to answer with no kind of calculation as I'd not understand it.)


Can I Recover Files, After accidentally Formatting External Hard Drive?

I was trying to install a hard drive by following the , but I accidentally formatted my 2 TB external hard drive instead of my 1 TB internal hard drive.  I'm running Ubuntu 14.04 and I have 3 hard drives:   80gb Intel SSDSC2BW080A4 (DC22) master boot record ST1000DM003-1ER162 (CC43) GUID Partition Table (the one i wanted to install and mount) My 2 TB Segate external Hard Drive that now is inaccessible and formatted.   When i go to my disks tool and choose this hard drive it tells me that its 1.6% full, which sounds like good news to me.  I read a couple of different post look into some programs but I'm not really sure how to proceed.  results of the deep analysis with testdisk  Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63  The harddisk (2000 GB / 1863 GiB) seems too small! (< 17833196 TB / 16219197 TiB Check the harddisk size: HD jumpers settings, BIOS detection...  The following partitions can't be recovered:  Partition               Start        End    Size in sectors     VMFS                 38417 201 39 3789016855  14 45 3924794316768135   SysV 4               49694 147  2 7723719 218 31 123283216128 [^\%^DK]  VMFS                 138906 191 51 3432453218  29 16 34830459532972999  XFS 4                179830 196 24 1053386502  20 50 17956568663837018 [~[JR4  NTFS                 243201   0 63 486402   0 62 3907024065  i probably should have mentioned that im very new to this. so cant really make sense of any of that.


When should I use graduated ND filters and when should I use HDR processing?

I'd really like to stop blowing out the sky and/or underexposing the ground in my pictures. The traditional solution would be to use graduated ND filters, but taking multiple exposures and applying HDR postprocessing would also work (and some point-and-shoot cameras can even do that in-camera).  When should I use graduated ND filters, and when would HDR be a better bet? Or is it just a matter of personal preference?


How do I exactly project a vector onto a subspace?

I am trying to understand how - exactly - I go about projecting a vector onto a subspace.  Now, I know enough about linear algebra to know about projections, dot products, spans, etc etc, so I am not sure if I am reading too much into this, or if this is something that I have missed.  For a class I am taking, the proff is saying that we take a vector, and 'simply project it onto a subspace', (where that subspace is formed from a set of orthogonal basis vectors).  Now, I know that a subspace is really, at the end of the day, just a set of vectors. (That satisfy properties ). I get that part - that its this set of vectors. So, how do I "project a vector on this subspace"?  Am I projecting my one vector, (lets call it a[n]) onto ALL the vectors in this subspace? (What if there is an infinite number of them?)  For further context, the proff was saying that lets say we found a set of basis vectors for a signal, (lets call them b[n] and c[n]) then we would project a[n] onto its . We project a[n] onto the signal-subspace formed by b[n] and c[n]. Well, how is this done exactly?..  Thanks in advance, let me know if I can clarify anything!  P.S. I appreciate your help, and I would really like for the clarification to this problem to be somewhat 'concrete' - for example, something that I can show for myself over MATLAB. Analogues using 2-D or 3-D space so that I can visualize what is going on would be very much appreciated as well.   Thanks again.


Is there a way to grant permissions to a sharepoint folder via REST APIs?

Currently I created a folder in sharepoint and break its inheritance from the parent library through a REST endpoint. Then I created permission groups and assign permission roles to them. But now I need to assign this permission groups to newly recent folder. I wonder if there is a way to accomplish that via some sharepoint REST API?


how to insert file contents on match using sed - first occurrence only

file contents:  # cat file.txt  ----- MATCH ----- MATCH ----- MATCH -----  # cat text.txt  add this text file before first match   sed commands:  # sed '0,/MATCH/r text.txt' file.txt ----- add this text file before first match MATCH add this text file before first match ----- MATCH ----- MATCH -----  # sed '0,/MATCH/i prependme once' file.txt prependme once ----- prependme once MATCH ----- MATCH ----- MATCH -----   I'm trying to merge these commands somehow to get the following output:  ----- add this text file before first match MATCH ----- MATCH ----- MATCH -----


What is causing my Undefined control sequence?

Automata1.tex 8 Undefined control sequence. <recently read> \c@lor@to@ps   l.8 \begin{VCPicture}{(0,0)(12,10)}   My Code:  \documentclass[11pt]{article} \usepackage{vaucanson-g} \begin{document}   \ShowGrid \ShowFrame \begin{VCPicture}{(0,0)(12,10)} %4 states \FinalStateVar[a]{(1.15,6.125)}{Q2} \FinalState[b]{(3.5,6.1)}{Q3} \FinalStateVar[c]{(5.55,6.025)}{Q4} \State[d]{(7.725,6)}{Q5} %0 initial-final %7 transitions \LoopN{Q2}{1} \LArcL{Q3}{Q2}{1} \ArcL{Q2}{Q3}{0} \VArcL{}{Q3}{Q4}{0} \VArcL{arcangle=55,ncurv=1.2}{Q4}{Q2}{1} \ArcL{Q4}{Q5}{0} \CLoopNE{Q5}{0,1}   \end{VCPicture} \end{document}


Suppose we are told that the linear size of everything in the universe has been doubled overnight. If we are told to measure the sizes, what will we do. I don't think we are going to measure  everything by scale. What should we do to check the truth of statement then? In my view i think that speed of light is not changed,so if we use it to measurement, it's gonna helpful. The problem arises when i thought what will happen if time start running at half the speed? I m stuck here now


Searching for filenames containing specific word

How do i search for filenames containing a word (or multiple words), starting from some directory (not case sensitive) ?


Find characteristic and minimal polynomials

find the characteristic and minimal polynomial of the matrix  $$B=\begin{pmatrix} a & 1 & 0 & 0 \\ b & 0 & 1 & 0 \\ c & 0 & 0 & 1 \\ d & 0 & 0 & 0 \end{pmatrix}$$  where $a,b,c,d$ are real numbers   I calculated the characteristic polynomial: $x^4 - ax^3 - bx^2 - cx - d$. I don't know how to go about finding the minimal polynomial   thanks for help


Send stderr to stdout for purposes of grep

This won't work, because all the stdio will go to stderr:  webpack -w --ignore=*.js | grep ignore   so I try this:  webpack -w --ignore=*.js > grep ignore 2>&1   but that will write a file called "grep" to the filesystem lol  how I can I send stderr to stdout so that I can grep it in this scenario?


Need help understanding phrases of the form "x if y"

I regularly find myself confused by phrases of the form "x if y". For example, in the  of his newsletter, Paul Thurrott writes:     Well, if you're Wall Street Journal technology maven and Apple lover Walter Mossberg, you simply write an unfair review that ignores the product's best features and harps on obvious if little-needed functional miscues such as the lack of copy and paste.   Here's another example, from a :     Best known in the U.S. for formulaic, if handsome, genre films like Mimic (1997) and Blade II (2002), del Toro   The usage of 'if' in these examples confuses me. What is the intended meaning of these sentences? Can I just substitute "if" with "though"?


What is the working directory of my C++ program?

I am trying to get my program to read a file and use the file as input information. I put the file in the same directory as my program, but still nothing.  Here is my code:  int main() {     ifstream inFile;     inFile.open("inData.txt");     if (inFile.fail())                 {         cout << "file did not open please check it\n";         system("pause");         system("exit");     }     studentType sList[20];     getData(inFile, sList, 20);     calculateGrade(sList, 20);     printResult(sList, 20);     inFile.close();     system("pause");     return 0; }


After starting up my laptop - which runs Ubuntu 14.04, I got   error: attempt to read or write outside of disk hd0   when I manage to boot using command line I got   grub>    when I write   grub> ls    I get  error: attempt to read or write outside of disk hd0   does this mean that my hdd has gone bad?  Updates: when I log in using bios, it seems that hdd is recognizable and does not seem to have an issue. My question is different than other posted question such as , in such way that grub ls does not output anything!


Does punching (renegade) the Quarian admiral or participating in the smalltalk on Normandy affect Quarian/Geth peace?

I remember reading somewhere that if you support a general but then Tali during the on-board bantz, you can get a +1 to the ability to have Geth and Quarians join forces. Is this so?


Print a message from the left-hand side of a pipe

I want to use a variable from the main shell in a sub shell. I did:  export mysql_root_password="test" (     echo $mysql_root_password ) | dialog --gauge "Working hard..." 6 50   There is no output. Of course there is not since I send the output to dialog. Is there a way to output specific variables still the normal way without removing the dialog part?


Let $a_{1}=3$ and $a_{n+1}=\frac{a_{n}}{2}+\frac{5}{2 a_{n}}$ for all $n \geq 1$ So we need to check whether it is converging sequence or not SO what I think is if I am able to show this sequence is decreasing then it is already bounded by 0 so it becomes convergent. But not sure how to show it is decreasing. I am thinking of mathematical induction though.


Lately, I have scored 165 in Quantitative Reasoning part of the GRE. The schools I consider applying requires scores that fall above the 90th percentile. with 165 Quant score, I am just at the 90th percentile. (just for a background, very good GPA (almost in %1 of my cohort), good academic references, a related job experience etc.)  There is no time to retake it, as the funding deadlines for graduate schools are approaching and I need to use this score to be evaluated for scholarships.  If I have another GRE test immediately, the results will only be helpful for being assessed without scholarships as the funding deadline will be already passed at that time.  However, I wonder what is the difference between a 165 Quant score or 167-68 band? The graduate schools need it from different nationalities than they are, especially to compare candidates. However, do you think higher GPA, good recommendation letters are as crucial as GRE?  I would be quite sad if I am not admitted to the schools I want just because of this low Quant score. Is it really to low?  Btw: department: Economics.


Packaging Python script for end user to run

I have a Python script that I have made to some basic data management tasks.  I want to package up a Python script in a nice user friendly way for an end user to run, they do not know how to run Python scripts and I need them to input some parameters in an easy way i.e. say a filename.  What is the best way to do this?


Creating separate shapefiles for each attribute record using loop in ArcPy?

Line 24 fixed, final code now updated. Line 22 since fixed , now I get the error  Traceback (most recent call last):   File "C:\Users\shehn\Documents\ArcGIS\PyScripts\lab6X.py", line 24, in      arcpy.Select_analysis (inputFile, outSHP, "\"FID\" = '" + each_attribute + "'") TypeError: cannot concatenate 'str' and 'int' objects    Here is what I tried to do when I looked at the existing way , I got the error : Traceback (most recent call last):    File "C:\Users\shehn\Documents\ArcGIS\PyScripts\lab6X.py", line 22, in      outSHP = outDir + each_attribute + u".shp" TypeError: coercing to Unicode: need string or buffer, int found                            import arcpy  #Set OverWrite if files already exist arcpy.env.overwriteOutput = True  #Set Input Output variables inputFile = u"C:\\Users\shehn\\Documents\\2018\\LD ARCH 221\\lab 5\\burn2.shp" outDir = u"C:\\Users\\shehn\\Documents\\2018\\LD ARCH 221\\lab 5"   # Reads My_shapefile for different values in the attribute rows = arcpy.SearchCursor(inputFile) row = rows.next() attribute_types = set([])  while row:     attribute_types.add(row.FID)     row = rows.next()  # Output a Shapefile for each different attribute for each_attribute in attribute_types:     outSHP = outDir + each_attribute + u".shp"     print outSHP     arcpy.Select_analysis (inputFile, outSHP, "FID = {0}".format(each_attribute))   del rows, row, attribute_types   I have to do this in ArcPy, otherwise I would have made a model in Model Builder. I am very new to Python. I think most of my code works, it seems to have an error at the CopyFeatures section. I am trying to get all 20 record in the FID column to become separate shapefiles so I have multiple polygons instead of one. I have tried the solution here "Exporting feature class into multiple feature classes based on field values using ArcGIS Desktop?" but it keeps giving me the expected string but got int error, so I tried doing it this way.  Here is my code:  # import system modules import arcpy  # set workspace environment env = arcpy.env.workspace = u"C:\\Users\shehn\\Documents\\2018\\LD ARCH 221\\lab 5\\burn2.shp"  #Set OverWrite if files already exist arcpy.env.overwriteOutput = True  # Make a layer from the feature class FC = arcpy.MakeFeatureLayer_management("burn2.shp", "FC")  #Create a list of years to iterate through to enable selection of each year FIDlist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] print FIDlist  #Initiate Search Cursor to use in loop of attribute values rows = arcpy.SearchCursor(FC)  for row in rows:      fieldName = "FID"     value = row.getValue(fieldName)     for field in FIDlist:         Year_layer = str(field) + "_"            arcpy.MakeFeatureLayer_management(FC, Year_layer)            arcpy.SelectLayerByAttribute_management (Year_layer, "NEW_SELECTION", "\"FID\" = %s" % (field))            arcpy.CopyFeatures_management(Year_layer, "fc_" + str(field))


QGIS 3: How to count the mean of shapefile attributes that lie in a specific area

so I have a shapefile with buildings and the shapefile has the height of the buildings in the attribute table. I have a second shapefile with the districts the buildings are located in. Now I would like to count the mean height of the buildings in each district and add it to the attribute table of the districts. For raster data it would be easy using zonal statistics to get the mean for a specific area, but I cant figure out the solution for 'shapes within shapes'.


multiline command chunks in bash history into multiple lines

In Bash (as well as Bash in WSL), multiline written commands can call-back with up/down arrows correctly also built-in history command report them correctly (until I'm still logged-in in bash). But after exiting from bash and press up/down arrows, multiline commands appears each as separate entries and that's because cat ~/.bash_history has chucked the command on multiple separate entries and writing problem here; the history command result messed too. I have set these options in ~/.bashrc shopt -s cmdhist lithist HISTTIMEFORMAT='%F %T '  and now writing problem fixed but history command still report in multiple line and separate entries (reading problem now). Bash version is 4.3, same issue on v4.4 there is  since a long years but no solution yet. Update: it's also to mention that below multiline command as an example is correctly displaying even after exit Bash: for i in {1..10} do echo $i done  but this is failing: awk ' { print $1}' <<<'first last'  Update 2: the issue mentioned above is fixed in Bash v5.0.0+ that changed to recognize entries between "timestamp as delimiter" as single entry of command (HISTTIMEFORMAT, cmdhist and lithist must be set).


I need help updating Ubuntu 11.04... so many problems

This computer was originally Windows Vista, but Boot manager went missing and couldn't boot up.  A friend of mine gave me a compact disk with Linux 11.04, and replaced Vista. However, I am unable to login in any way other than in Safe Mode, or Classic: No Effects. I realize you can go into Update Manager and update it from there, but I need to download it from the Ubuntu software Center, which freezes upon launch. There was one time where I was able to search something in the software center, and turns out I have no sources to download anything. 700 some packages are broken, that may be a good connection, but I'll do the repair process and it'll say it fixed everything, when it did virtually nothing.  I downloaded the .iso for the newer Ubuntu, and made a bootable flashdrive, and using F12 to boot from the memory stick, it would start to work. Whatever option I chose from there (run Ubuntu from usb, install Ubuntu on a hard disk, etc) it would blast through some terminal stuff, then stop at when it says:  ,locks=none   or under that it stops at  [   0.288973] PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x9afd, dseg 0x400   So, uh, are there any other methods of installing Ubuntu on a broken Ubuntu? Should I just buy a new computer? I'm stuck and lost and don't know what to do.


Adjust UILabel height depending on the text

Consider I have the following text in a UILabel (a long line of dynamic text):     Since the alien army vastly outnumbers the team, players must use the post-apocalyptic world to their advantage, such as seeking cover behind dumpsters, pillars, cars, rubble, and other objects.    I want to resize the UILabel's height so that the text can fit in. I'm using following properties of UILabel to make the text within to wrap.  myUILabel.lineBreakMode = UILineBreakModeWordWrap; myUILabel.numberOfLines = 0;   Please let me know if I'm not heading in the right direction. Thanks.


Why is "his" used instead of "him" in this U. Sinclair quote?

It is difficult to get a man to understand something, when his salary depends upon his not understanding it -- Upton Sinclair  Why "... his not understanding it", and not "... him not understanding it"? I thought that the meaning was "... when his salary depends about (the man) not understanding (something)"


I have a monitor that is running on all guests, Windows and Linux. I'd like to send back the Parent host of the guest with this monitor, How can I found out the VM host from within a ESXi VM?  Ideally I'm looking for a universal way to do this from both Windows and Linux, but if they are separate paths that okay. Using something from VMWare tools would be fine, but I'm not currently using anything running the vSphere API.


Changing function variables through local function

I want to change a variable in function through its helper function. I tried the following:  def f():     e = 70     print(e) # prints 70     def helper(e):         print(e) # prints 70         e = 100         print(e) # prints 100     helper(e) #function called to change e     print(e)  # Still prints 70 :( Why?  f() #prints 70, 70, 100, 70   Why does it not change the value of e (I passed it as parameter and python doesn't copy values too, so value of e in f should be changed)? Also how can I get the required result?


Parallel straight Lines on Residuals vs. Predicted Values Plot

In a data set I have, all of the results of the residual vs. predicted values  appear as parallel lines as pictured below. I interpret this according to my training as a violation of homoscedasticity which makes running a multiple regression untenable.      Here is some context about the data sets, type of analysis used, the design of the study, etc.   The type of analysis I conducted was multiple regression. In SPSS - Analyze > Regression > Linear. The independent (predictor) and dependent (outcome) variables are all ordinal data (though I'm treating them as "scale" in the analysis). Both the independent and dependent variables represent satisfaction scores on a 7-point scale. These satisfaction scores were collected from the same participants at the same point in time (one survey). There are 4 independent variables that represent participants' satisfaction with several more granular dimensions or aspects of a service (e.g., easy to use, effective in meeting needs, etc.) The dependent variable is satisfaction overall with the service.  More about the other results from testing the multiple regression assumptions: (1) The data set passed the "independence of observations" test as measured by a Durbin-Watson statistics which was approximately 2; (2) the independent and dependent variables are approximately linearly related which was based on an inspection of the partial plots produced by the regression analysis.  There are around 20 highly influential data points out of approximately 450 participants as measured by studentized deleted residuals of over +/- 3.    I've tried transforming the data using a log transformation and this did not at all help the apparent heteroscedasticity problem. Plotting the log transformed residuals vs. predicted values yielded the same general pattern in the chart.  The other technique I tried was outlined in this paper  which described providing a regression model with heteroscedasticity-corrected error residuals. The beta coefficients for each predictor variable were essentially the same as the non-heteroscedasticity corrected model, as well as the overall R^2 value for the model.   Some of the predictor variables are highly correlated with one another, but around .6 - .8 - so there may be a slight multicollinearity problem - however, the tolerance and VIF values are fine.  More intuitively, a lot of the participants provided similar satisfaction ratings for all of the predictor variables and the dependent variable. Quite a few on the 7-point scale answered things like " 7 7 7" for the predictors and "7" for the outcome or "1 1 1" and "1". However, this was not always the case.    Looking for some guidance around potential reasons for this, alternative ways to analyze the model, etc. Thanks in advance.


Why aren't viruses considered to be non-cellular life?

I have always thought of viruses as being non-cellular lifeforms. And no, it isn't just because of Wikipedia. I have heard that there are viruses that are so complex, that they are very close to being considered cellular. And some viruses infect other viruses. Wow, I never thought parasitism would scale all the way down to viruses as the host until I found out about viruses that infect other viruses. So, here are the criteria scientists have used for defining living vs non-living for centuries:   Made of at least 1 cell -> Some viruses have membranes and some cells have cell walls. Sure, cell walls are normally made up of complex sugars, but what is to say that there couldn't be lifeforms with proteins as the most prevalent component of a cell wall? And some very large viruses get close to being actual cells. Metabolism -> This is one thing that even the most complex of viruses fail. Responding to stimulus -> I think viruses do respond to a stimulus, just not in the way we normally think of responding to a stimulus. I mean, they clearly respond to temperature(cold temperature, won't reproduce or at least will reproduce very slowly, moderate temperature, will definitely reproduce, but not at peak reproduction rate, hot temperature, peak reproduction rate reached) and temperature is a stimulus. Grow, Develop, Die -> The virus does develop, sort of, when viruses get built in the host cell(which is kind of analogous to an egg cell becoming a baby, only on a much much smaller scale). And viruses do die as well. The only thing they fail at here is growth. The virus doesn't get bigger or more complex than the parent virus unless it mutates and the mutated virus has size and/or complexity promoting genes that the original virus didn't have. Highly organized -> Small viruses like the flu virus fail at this. Some bigger viruses though don't fail this criterion Maintain Homeostasis -> All viruses fail at this, even the complex viruses The ability to reproduce -> Viruses don't reproduce independently from a host but they do reproduce. If viruses were to be considered non-living because of the inability to reproduce independently of a host, than wouldn't your average parasite also be considered non-living for the same reason? Clearly parasites aren't considered non-living just because they can't independently reproduce. Viruses are just parasites of the cell, so I would say that they do meet this criterion, because viruses and their relationship to cells is parasitic. Viruses infecting other viruses also makes me think that viruses meet this criterion DNA changes and thus the organism evolves -> This is definitely true for viruses. Viruses evolve super fast, even just 1 cell getting infected by 2 viruses simultaneously is enough for completely different viruses to form as the genetic material and capsid proteins are exchanged between viruses as they are built(I have seen this illustrated before with 2 different flu viruses infecting one cell and 4 different viruses coming out of the cell, both the original flu viruses and 2 completely different flu viruses). So the evolution rate of viruses can be as fast as a single generation compared to the thousands of years minimum it takes for the same amount of evolution relatively speaking to occur in a multicellular organism.   Clearly, viruses do meet a lot of the criteria for a living organism. So with this and all the new discoveries of things like viruses getting ever closer to the cell in complexity and viruses that infect other viruses, why aren't viruses considered to be non-cellular lifeforms?


Find limit of a sequence $Y_n$ when $Y_n = X_{2n}$ and limit $X_n=l$

I'm stumped by the following question. Can anyone help me out. Clearly the answer is l but I can't work out how to prove this  Suppose that $\{x_n\}$ is a sequence converging to a limit $l$. Define a new sequence $\{y_n\}$ by setting $y_n := x_{2n}$ for all $n \geq 1$. Determine the limit of $y_n$, giving a rigorous proof.  Thanks


Time travel novel with a robotic horse named N.E.S.T.O.R

I remember reading a book in the late '80's early '90's  (it might even be a series) about a time traveler that travels back to medieval times.   The only character name I can remember is his robotic horse named N.E.S.T.O.R. or N.E.S.T.R.


I am using the suggestion from  to change the background color of a page using the MWE example from frabjous. This works in Texlive 2016, but it gives an error in Texlive 2017:  ! Undefined control sequence. \set@color ...e@color \current@color \ifundefined                                               {GPT@outputbox}{\csname ne... l.7 \pagecolor{yellow}                   \afterpage{\nopagecolor}   Does anyone else get this error and is there a fix?  Thank you.


Dynamically find the class that represents a primitive Java type

I need to make some reflective method calls in Java. Those calls will include methods that have arguments that are primitive types (int, double, etc.). The way to specify such types when looking up the method reflectively is int.class, double.class, etc.  The challenge is that I am accepting input from an outside source that will specify the types dynamically. Therefore, I need to come up with these Class references dynamically as well. Imagine a delimited file a list of method names with lists of parameter types:  doSomething int double doSomethingElse java.lang.String boolean   If the input was something like java.lang.String, I know I could use Class.forName("java.lang.String") to that Class instance back. Is there any way to use that method, or another, to get the primitive type Classes back?  Edit: Thanks to all the respondents. It seems clear that there is no built-in way to cleanly do what I want, so I will settle for reusing the ClassUtils class from the Spring framework. It seems to contain a replacement for Class.forName() that will work with my requirements.


Shouldn't string.Format be more efficcient than x + "" + y?

So I was thinking about what's more efficient, making a number by directly adding them as a string to each other, or string.Formatting them.  So I made a little code piece:      private static void measuringStuff()     {         Stopwatch stw = new Stopwatch();         Random random = new Random();         string a;          stw.Start();         for (int i = 0; i < 10000000; i++)         {             a = random.Next(10) + "" + random.Next(10);         }         stw.Stop();         Console.WriteLine("#+\"\"+#: " + stw.ElapsedMilliseconds);          stw.Reset();         stw.Start();         for (int i = 0; i < 10000000; i++)         {             a = string.Format("{0}{1}", random.Next(10), random.Next(10));         }         stw.Stop();         Console.WriteLine("string.Format: " + stw.ElapsedMilliseconds);     }   And it turns out:  # + "" + #: 1928 string.Format: 2667   Why?


Substring and IndexOf and LastIndexOf in c#

I have this string :     464-138234-AVENANCE   And I need this output on three items :   464  138234  AVENANCE   For first item I have try with success :  strMyString.SelectedItem.Value.Substring(0, strMyString.SelectedItem.Value.IndexOf('-'))   Output : 464  I can't to extract the two and three items :  strMyString.SelectedItem.Value.Substring(1, strMyString.SelectedItem.Value.IndexOf('-'))   The output is :  64-   Can you help me?  Thank you in advance for any help, really appreciated.


Problems installing Ubuntu 64 bit dual boot with windows 8.1

I have a brand new system using Gigabyte B85M-D3H motherboard, 8 Gigs 1600Mhz Memory, Intel i3-4330 3.5 GHz processor, ADATA 128 GiG SSD, WD15EARS Hard Drive. I partioned the SSD into 90 Gig and 30 Gig partitions, hoping to create a dual-boot Windows 8.1 Pro and Ubuntu 14.04 64 bit systems. When I first downloaded an Ubuntu .iso, I was looking for a 64 bit Intel version and chose i386 instead of AMD.  The 1st install went seamlessly but I realized that Ubuntu was only 32 bit. I followed online discussions to remove Ubuntu, Create a Bootable CD for Ubuntu 64 bit and followed the same steps as I did the 1st time. This time however, Ubuntu 64 did not recognize the Windows 8.1 install and wanted to overwrite the 90Gig partition. I directed it to install to the WD15EARS which was previously partitioned into 2 750Gig volumes. When I was finished, the system booted into Ubuntu, ignoring Windows 8.1. I essentially ended up with 2 independent OS systems changeable through the bios. When I went into Window 8.1 and looked at the drives, a 350Mb chunk of Ubuntu thinks its a part of the SSD ADATA drive. In addition it says the WD15EARS drive is locked and inaccessible. There was some grub message error saying drive locked but I am new to linix and do not know command line instructions


Probability brain teaser with infinite loop

I found this problem and I've been stuck on how to solve it.     A miner is trapped in a mine containing 3 doors. The first door leads to a tunnel that will take him to safety after 3 hours of travel. The second door leads to a tunnel that will return him to the mine after 5 hours of travel. The third door leads to a tunnel that will return him to the mine after 7 hours. If we assume that the miner is at all times equally likely to choose any one of doors, what is the expected length of time until he reaches safety?   The fact that the miner could be stuck in an infinite loop has confused me. Any help is greatly appreciated.


What are adjectives that begin with 'a' called in grammar?

I mean adjectives like: ablaze, afloat, alive, ashore, ...   I did a quick Google search and found that they are called a adjectives. But I do remember that I came across a different denomination in a grammar book some time ago, but I have since forgotten that word.   Could anyone help?


This will be a very dumb question to the gurus I'm guessing but here goes. I am trying to keep track of the number of threads on my system and I need to add timestamp somewhere with each output. Here is my current command to check number of threads : watch -n1 'ps -eLo pid,cmd,nlwp | wc -l >> test.txt'  I would like the timestamp to be added on each line in test.txt as the number of threads gets written How do I get the output to look like 2020-12-14 07:08:10 5431 (where 5431 is the number of threads) ?


I am new to tex.SE!  I know how to use the most basic LaTeX features, like compiling a pdf document from a single source file. But I feel I can only use 1% of the full potential of LaTeX.  One thing that bothers me most is that I can't use \tag feature. For example, \label {eq:firstexp} and then (\ref {eq:firstexp}) gives me (?) instead of (1.1). What am I doing wrong?


I am trying to use the \filename@parse like this:  \filename@parse{\lstname}   but I get this error:  ! Undefined control sequence. l.22 \filename               @parse{\lstname} ?    Am I missing some package?


zip a directory that name start with `-`

How can I zip a directory like -foo? $ zip "-foo" "-foo" shows only help page.  I think -foo is recognized as a options, but I don't know how to solve it.


The relationship between the eigenvalues of matrices $XY$ and $YX$

If $X \in \mathbb{C}^{m \times n}$ and $Y \in \mathbb{C}^{n \times m}$ ($m \geq n$), how to prove the following?  $$\sigma (XY) = \sigma(YX) \cup \underbrace{\left \{ 0, ..., 0 \right \}}_{m-n}$$  Here, $\sigma$ denotes the set of eigenvalues/spectrum.


Google's cache is not updated for months and doesn't match "fetch as Google"

I used webmaster's Fetch as Google tool to see how my website looks on Google. The snapshot of rendered page returned by Google is exactly same as my website so I submitted it for indexing.  Logically Google's cached copy of this URL should have been updated by Google but it didn't change and now it's been almost 6 months since the last change. Here is URL for cached copy of this above Page: http://webcache.googleusercontent.com/search?q=cache:http://paintcollar.com  It is not happening with all pages. A few pages are being cached properly. Just to give you an idea, this URL is cached properly: http://webcache.googleusercontent.com/search?q=cache:paintcollar.com/aneel  What is the cause of the problem and how to solve it?


Installing a light table(editor) in debian

I want to install lighttable programming editor in kali Linux(debian).I have downloaded the tar.gz version from .  But I am unable to install the light table .Please help in regarding this.


Grep lines but let the first line through

Consider the following output from df.  Filesystem      Size  Used Avail Use% Mounted on /dev/sda1        23G  6.1G   16G  29% / udev             10M     0   10M   0% /dev tmpfs           397M  420K  397M   1% /run tmpfs           5.0M     0  5.0M   0% /run/lock tmpfs           1.8G  904K  1.8G   1% /run/shm /dev/sda6       890G  324G  521G  39% /home /dev/sdb1       459G  267G  169G  62% /home/user/mnt none            4.0K     0  4.0K   0% /sys/fs/cgroup   How can I only show lines that begin with "/dev" and keep the heading, but  filter out everything else. I'd also like to not have to resort to using using temporary files or variables?  Note: the heading is locale dependent, therefore you can't catch it with a regexp.


Problem  How many trailing zeroes are there in $52!$ ?  My thoughts  I believe I correctly solved it, but I'm not happy with the scalability of my method.  I figure the number of trailing zeroes is equal to the number of times $52!$ is divisible by 10. I wrote out every integer from 1-52 that is divisible by 2 or 5. The idea being that the number of 2 AND 5-factors equals the number of 10-factors.  I quickly noted that the number of 2-factors is greater than the number of 5-factors, so I figured finding the number of 5-factors will do. There were 12.  I'm not very happy with this, because if they now ask me to do the same for $152!$, I'll have to tell them to shove it. I'm not doing this again.  Question  Is there a better way to do this? Perhaps a method that scales better?


What are the tax etc. implications of giving a friend's company an interest free loan?

I want to extend a loan of $50,000.00 ,interest free, to a friend to start a business. Can he deposit this check into his account and not incur any tax difficulties? Are there any tax implications for me? What are the benefits of funding the firm in a different way?


how to work with php equalto operator(relational operator)

I have a big confusion over equal to operators(==.===), below I mentioned php code where checking condition that string "all" equal to numeric 0. But it returns true at double equal to ("all"==0), but not with others:  <?php         var_dump("all"==0);     var_dump("all"=="0");     var_dump("all"==="0");     var_dump("all"===0);     ?>   Output:  bool(true)  bool(false) bool(false)  bool(false)    for all the condition the answer should be false. but why "all"==0 is true. can anyone explain?


C#: How can I use a string to specify the Type (T) for a generic method?

I have some ugly code that looks something like this:      switch (f.TypeName)     {         case "TypeOne":             ThreadPool.QueueUserWorkItem(new WaitCallback(MyMethod<TypeOne>), args);             break;         case "TypeTwo":             ThreadPool.QueueUserWorkItem(new WaitCallback(MyMethod<TypeTwo>), args);             break;          ...          case "TypeTwenty":             ThreadPool.QueueUserWorkItem(new WaitCallback(MyMethod<TypeTwenty>), args);             break;     }   I would really like to get rid of the switch statement and do something along these lines:      var myTypeDescriptor = Type.GetType(f.TypeName); //<== clearly not this, but similar     ThreadPool.QueueUserWorkItem(new WaitCallback(MyMethod<myTypeDescriptor>), args);   where MyMethod looks like this:      protected void MyMethod<T>(object args)     {         ...     }   I've poked around some and have found a number of examples where the generic is a generic class, but no examples where it is a generic method.  And definitely not any examples where it is being passed to a delegate.  While this appears, at first glance, to be a duplicate of , I am not simply trying to call the method.  It is being passed to the WaitCallback delegate.  Perhaps this is a two part question:  1) how do I retrieve the generic method via reflection and 2) having obtained a handle to the method, how do I pass it as an argument to the WaitCallback delegate?  Anyone have any ideas?  Is this even possible?


Could you please tell me the meaning of 'would' in the following sentences:     1 He would seem to be getting better.   (Does it mean you the speaker lack of knowledge about his health?)      2 The answer would seem to be correct.   (Does it mean the speaker is hesitating?)      3 That's what I would call annoying.   (Why is would used here? Is it hypothetical situation or what?)   I found it quite difficult to know the meaning of 'would' in these sentences. I hope someone will help me with it.


I'm looking for some delicious Italian dishes,but have to avoid tomatoes.  What can be used as an alternate to tomatoes?  Using Google, I found Red Pepper Pasta Sauce, and Cream Sauce.  I have also heard that yogurt is a good substitute for tomato.  Can yogurt be a replacement in Italian dishes?


Can I trigger an Opportunity Attack by forcing an opponent to move out of my reach?

If I cause an opponent to leave my reach with an ability, spell, or effect can I use my reaction to take an Opportunity Attack against them?


How do I get adequate depth of field in macro photography?

I have been messing around with some Macro Photography using the techniques (and a reversal ring) described in a  by @ My main issue is that I am having a hard time getting the subject into focus. There are times when the center is blurred and the outside is in focus or the center in focus and the outside out of focus. What are ways to get as much of the subject in focus?   I am using a Nikon D5100, I have a 18-55mm kit lens but I find the 55-200mm lens easier to use for shooting.


When your 10-year old boy says “It’s meta,” what does it mean? In what situation and of what sort of object they use this phrase?

I asked about  a few days ago, quoting Maureen Dowd’s review of the movie, “J. Edgar” in New York Times.   I received six answers. But I still don’t get a clear idea of what “It’s meta” means because I don't understand (or have a total inability to comprehend) the concept of “self-referential.”   An answerer : “Meta in this fairly recent, casual context is supposed to mean self-referential, or recursive in some way. This is the sense in which my teenagers would use this term.”  So let me resubmit the question on “meta” in simpler format. When your teenager boy says “It’s (or this is) meta,” what does it mean? In what situation and of what sort of object they use this phrase?  I’m sorry for many users who lent me kind answers to my previous question. But I would like to get it fully on the meaning and usage of “it’s meta,” as a colloquial expression, not the meaning of meta as a prefix.


How can haired mammals synthesize vitamin D?

The human body can synthesize vitamin D in the skin from cholesterol, when sun exposure is adequate. But how can haired mammals do it? Do not they need it?


Skype update error when running apt update

When I run sudo apt-get update to update the system I get this error on the bottom of the console:  W: GPG error: https://repo.skype.com/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3 W: The repository 'https://repo.skype.com/deb stable InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details.   What's going wrong with Skype? Is there any risk since the error says that the Skype repo is dangerous to use?   I use Ubuntu 16.04.