I attempted to install dropbox on my Ubuntu system, but now I am unable to install or uninstall any software. I get this error:  E: Unable to lock the administration directory /var/lib/dpkg/lock?   I have already tried killing dpkg and restarting it sudo kill -TERM PID but it immediately tries to finish the installation again and gets stuck.  How do I resolve this?
I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?
How can I get to Iceland on a cargo ship? Planning a low budget and environment friendly trip to Iceland from Helsinki, Finland next summer for me and my friend. Haven't been able to find relevant information on possibility for cargo travel (from where - eg. Norway, Denmark? - timetables, prices etc). Expected departure from Helsinki around June 18th, return at latest on July 7th 2015. I'm very thankful for any related advice (and first time on stackexchange, so apologies if I didn't formulate my question in a best possible way) This thing came up in a combinatorics course I am taking.  Choose a fixed set of primes $p_1,p_2,\dots,p_k$ and let $A_n$ be number of integers in $\{1,2,\dots,n\}$ which are not divisible by any of the $p_i$'s. $A_n$ is given by $ n - \sum_{1\leq i_1 \leq k} \lfloor \frac{n}{p_{i_1}} \rfloor + \sum_{1\leq i_1 &lt; i_2 &lt; k} \lfloor \frac{n}{p_{i_1}p_{i_2}}\rfloor - \dots $. Now, if $n$ is divisible by each of the $p_i$'s then we have the simpler expression : $A_n = n \prod_{i=1}^{k}(1-\frac{1}{p_i})$(added later : note I am not assuming $n = \prod_{i=1}^{k}p_i$ here, this holds true whenever $n = c \prod_{i=1}^{k} p_i $ for some integer c, since each $\lfloor \frac{n}{p_{i_1} \dots p_{i_j}} \rfloor = \frac{n}{p_{i_1} \dots p_{i_j}}\ )$.  Another student pointed out that even if $n$ does not have $\prod_{i=1}^{k} p_i$ as a factor, the approximation $B_n = n \prod_{i=1}^{k}(1-\frac{1}{p_i})$ to $A_n$ is quite close in some specific cases. It is easy to see that $\lim_{n\to\infty}\frac{A_n - B_n}{n}=0$ as $\lim_{n\to\infty}\frac{1}{n}\lfloor \frac{n}{p_{i_1}p_{i_2}\dots p_{i_j}} \rfloor \to \frac{1}{p_{i_1}p_{i_2} \dots p_{i_j}},$ however that is not strong enough to imply that $A_n - B_n$ will be always close. Is there any way to analyze how well this approximation will perform in general? I am interested in the worst case for small to moderately sized $n$.  Just to give a feel of how close $A_n$ and $B_n$ can get, assuming the set of primes is $\{2,3,7\}$ we have (assuming my program is correct):  n     A(n)     B(n) 17    5    4.86   27    8    7.71   37    11      10.57   107   31      30.57   1111  318     317.43   3001  858     857.43   4007  1145    1144.86   5000  1429    1428.57 . How can I upgrade Mac OS without the administrator password? I recently received an old iMac secondhand.  I have no way to reach the original owner. I am trying to upgrade the OS software, but the prompts demand the administrator's name (which is auto-filled) and password (which I do not have).  I understand why these security features are in place, but is there any way in the world for me to access Admin. privileges without the password? Field between the plates of a parallel plate capacitor using Gauss's Law Confusion with floating point numbers Q1: Does a DNS rule for *.domain.com match multi-level domain names? In other words, if I just set *.domain.com in my DNS records, will it match all of:  a.domain.com b.a.domain.com c.b.a.domain.com   as many levels deep as needed, with just that one wildcard DNS specifier?  We have a use case for multi-level DNS and I would like to confirm that we are doing the right thing in setting one wildcard DNS setting for the root domain.  Q2: will this work with round-robin DNS? I am flying from Los Angeles to Bangalore. I have a flight option from LAX to Minneapolis and from there to Paris. I have only 45 minutes at Minneapolis before my next flight. Is this too risky a schedule? I am not an American, so I guess I would need to cross emigration too? Any data for average number of papers per year at different career stages? When can I make opportunity attacks? I have a weird port forwarding problem. I tried to open my port 22 to the outside network. I was able to access it as long as I am not inside the LAN. I can access it from my office for example. But from within the LAN, I can access the port using the local ip, but I can't access the port using the external IP. It's as if the router is blocking the loopback. I've check all my router settings, turned off anything firewall/filtering related. Any ideas? How can I use a variable in the replacement side of the Perl substitution operator? I would like to do the following: $find = &quot;start (.*) end&quot;; $replace = &quot;foo \1 bar&quot;;  $var = &quot;start middle end&quot;; $var =~ s/$find/$replace/;  I would expect $var to contain &quot;foo middle bar&quot;, but it does not work. Neither does: $replace = 'foo \1 bar';  Somehow I am missing something regarding the escaping. End of File in C++ What can I do if a repository/PPA does not have a Release file? There are a number of services that will scan a website for vulnerabilities and allow the display of a trustmark image if the site passes their tests.  This allegedly increases the level of trust a potential client feel toward the website and therefore makes them more likely to complete a purchase.    McAfee claims it has studies which show significant increases in sales. Should I take their word for it?  What sort of increase should I really expect, if any?  Are these types of services worth the prices they charge? Bind application to a specific network interface UMVUE of $e^{-\lambda}$ from poisson distribution Let $X_1,\ldots,X_n \sim$ Poisson$(\lambda)$. I wish to find UMVUE of $e^{-\lambda}$. Here $\overline{X}_n$ is complete and sufficient for $\lambda$ (hence for $e^{-\lambda}$??). Define $Y_i=1$ if $X_i=0,$ $Y_i=0$ otherwise. Clearly (I checked!) each $Y_i$ and hence $\overline{Y}_n$ is unbiased for $e^{-\lambda}$. Then I should be able to use the Lehmann Scheffe theorem to deduce the UMVUE. The estimator I get looks like $$\frac{1}{n} E\left\{\#X_i:X_i=0 \mid \sum_{i=1}^n X_i\right\}$$ whereas the correct answer is $$\left(\frac{n-1}{n}\right)^{\sum_{i=1}^n X_i}$$ I'd appreciate if anyone lets me know where I'm going wrong and guides me into the right path. Thank you. Given three variables, y and x, which are positive continuous, and z, which is categorical, I have two candidate models given by:  fit.me &lt;- lmer( y ~ 1 + x + ( 1 + x | factor(z) ) )   and  fit.fe &lt;- lm( y ~ 1 + x )   I hope to compare these models to determine which model is more appropriate. It seems to me that in some sense fit.fe is nested within fit.me. Typically, when this general scenario holds, a chi-squared test can be performed. In R, we can perform this test with the following command,  anova(fit.fe,fit.me)   When both models contain random-effects (generated by lmer from the lme4 package), the anova() command works fine. Owing to boundary parameters, it is normally advisable to test the resulting Chi-Square statistic via simulation, nonetheless, we can still use the statistic in the simulation procedure.  When both models contain only fixed-effects, this approach---and, the associated anova() command---work fine.  However, when one model contains random effects and the reduced model contains only fixed-effects, as in the above scenario, the anova() command doesn't work.  More specifically, I get the following error:   &gt; anova(fit.fe, fit.me)  Error: $ operator not defined for this S4 class   Is there anything wrong with using the Chi-Square approach from above (with simulation)? Or is this simply a problem of anova() not knowing how to deal with linear models generated by different functions?  In other words, would it be appropriate to manually generate the Chi-Square statistic derived from the models? If so, what are the appropriate degrees of freedom for comparing these models? By my reckoning:  $$ F = \frac{\left((SSE_{reduced}-SSE_{full})/(p-k)\right)}{\left((SSE_{full})/(n-p-1)\right)} \sim F_{p-k,n-p-1} $$  We are estimating two parameters in the fixed effects model (slope and intercept) and two more parameters (variance parameters for the random slope and random intercept) in the mixed-effects model. Typically, the intercept parameter isn't counted in the degrees of freedom computation, so that implies that $k=1$ and $p=k+2=3$; having said that I'm not sure if the variance parameters for the random-effects parameters should be included in the degrees of freedom computation; the variance estimates for fixed-effect parameters are not considered, but I believe that to be because the parameter estimates for fixed effects are assumed to be unknown constants whilst they are considered to be unknowable random variables for mixed effects. I would appreciate some assistance on this issue.  Finally, does anybody have a more appropriate (R-based) solution to comparing these models? Finding an expression for $\tan (a+ b + y)$ which involves only $\tan a, \tan b,$ and $\tan y$. It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$? Favorite Tag Buttons partly sticking off page I appear to have found a bug, when adding Favorite tags, I find that the buttons are half off the page (this is of the  site):    Although on other sites it looks more like this:    I am running Ubuntu GNOME 15.04 with Firefox 41.0.1+build2-0ubuntu0.15.04.2.