Random color for custom view that cannot be reused
Getting a random object from NSArray without duplication
I was trying to fix my audio problems using suggestions from . One of the comments suggested I execute this and only this:     killall pulseaudio   So I did, and I restarted my computer just in case, but all it did was remove my soundcard and I still couldn't hear anything. Now I don't know how to get my soundcard back.  Please note that I am extremely inexperienced when it comes to Ubuntu. Creating an index of quality from multiple variables to enable rank ordering Alternating sum of binomial coefficients: given $n \in \mathbb N$, prove $\sum^n_{k=0}(-1)^k {n \choose k} = 0$ Let $n$ be a positive integer. Prove that   \begin{align} \sum_{k=0}^n \left(-1\right)^k \binom{n}{k} = 0 . \end{align}   I tried to solve it using induction, but that got me nowhere. I think the easiest way to prove it is to think of a finite set of $n$ elements, but I can't find the solution. Why is the Lagrangian a function of the position and velocity (possibly also of time) and why are dependences on higher order derivatives (acceleration, jerk,...) excluded?  Is there a good reason for this or is it simply "because it works". When $\operatorname{Hom}_{R}(M,N)$ is finitely generated as $\mathbb Z$-module or $R$-module? Assume that $M$ and $N$ are two finitely generated $R$-modules. Then $\operatorname{Hom}_{R}(M,N)$ is a finitely generated $\mathbb Z$-module and/or $R$-module (in this case, assume that $R$ is commutative)?   Note that $R$ is not Noetherian ring. Is there any counterexample (for any cases)? Which equals operator (== vs ===) should be used in JavaScript comparisons? How do I display a decimal value to 2 decimal places? When displaying the value of a decimal currently with .ToString(), it's accurate to like 15 decimal places, and since I'm using it to represent dollars and cents, I only want the output to be 2 decimal places.   Do I use a variation of .ToString() for this? How find this $x^3-5x+10=2^y$ let $x,y$ is positive integer,and such $$x^3-5x+10=2^y$$ find all $x,y$.  since $$x=1\Longrightarrow 1^3-5+10=6$$ can't $$x=2,2^3-5\cdot 2+10=8=2^3$$ so $x=2,y=3$  $$x=3,LHS=27-15+10=22$$ $$x=4,LHS=64-20+10=54$$ $$x=5,LHS=125-25+10=110$$ $$x=6,LHS=216-30+10=236$$ $$\cdots$$  I find $$(x,y)=(2,3)$$  I only find $x\le 7$ this solution.  maybe this have other solution.and This problem is from Mathematical olympiad problems Thank you Is it possible to get the sheetname? LaTeX packages: automatic versus manual installation, and related issues I often run into problems in LaTeX with packages. I did a reinstall (MiKTeX) and it seemed to fix some issues with knowing where packages coming from or going. In general, I am not sure what should or does happen when using \usepackage command.  Is it standard that these packages are automatically pulled from the internet? Where do they go (by default)? Is there a better place to put them?  If I am troubleshooting, and if we can say packages are usually installed automatically, when, and should I ever, install packages manually? If so, where would I put them?  For instance, I believe the package easylist is installed on my computer. I was able, with some difficulty, to get into the roaming folder, looked around, and really the only package I saw, was several easylist files, such as .sty, and an associated readme file. I did a windows search for easylist, and only found one, with suffix .tpm and in the Program Files (x86)\MiKTeX 2.9\tpm folder.  My problem currently, is that I am trying to use the todonotes package. It seems to require the xcolor package. But this "can not be found". It asks to choose a place to get it. I think default was "choose random", but I just switched it to internet, and some random mirror site in country (USA). That didn't work, and I'm afraid I've now fiddled with the default settings for getting packages, which will create problems later.  Here are some other threads I have been fishing through:             In lieu of picture, I have this:    miktex-pdftex.exe: No connection could be made because the target machine actively refused it.  miktex-pdftex.exe: Data: connect failed in tcp_connect() {}======================================================================  ! LaTeX Error: File `xcolor.sty' not found.  Type X to quit or &lt;RETURN&gt; to proceed, or enter new name. (Default extension: sty)  Enter file name:    and from clipboard:    MiKTeX Problem Report Message: No connection could be made because the target machine actively refused it.  Data: connect failed in tcp_connect() Source: Libraries\MiKTeX\PackageManager\PackageManager.cpp Line: 2461 MiKTeX: 2.9 OS: Microsoft Windows 7 Home Premium Edition, 64-bit Service Pack 1 (build 7601) Invokers: explorer SystemAdmin: no PowerUser: no Root0: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 Root1: C:\Users\aUserName\AppData\Local\MiKTeX\2.9 Root2: C:\ProgramData\MiKTeX\2.9 Root3: C:\Program Files (x86)\MiKTeX 2.9 UserInstall: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 UserConfig: C:\Users\aUserName\AppData\Roaming\MiKTeX\2.9 UserData: C:\Users\aUserName\AppData\Local\MiKTeX\2.9 CommonInstall: C:\Program Files (x86)\MiKTeX 2.9 CommonConfig: C:\ProgramData\MiKTeX\2.9 CommonData: C:\ProgramData\MiKTeX\2.9    (from "Package Installation" window below)   The required file        tex\latex\xcolor\xcolor.sty  is missing. It is part of the following package:        xcolor  The package will be installed from:  ftp://... [Change...] The package will be installed for... Linear mixed effect model vs. Ordered Probit vs. Ordered Logit with ordinal response I have a set of data with an ordinal response ranging from 1-5 (worst to best) and a categorical predictor with five unordered levels. The experiment is a language experiment whereby subjects are asked to rate different sentence types. In the literature it seems that people fit lmer() most of the time by scaling the ordinal response per subject (i.e. taking the mean response and standard deviation of that subject and dividing the every single response by it.). On the other hand, it seems a reasonable approach to use ordered linear mixed effects probit models or ordered linear mixed effects logit models as implemented in e.g. MCMCglmm() or clmm().  (1) I find myself asking what the best method would be. When is one method to be prefered over the other in an experiment as I have sketched above?  (2) Why do people prefer fitting an lmer() model with a scaled response? What is the advantage?  (3) If it is advisable to use an ordered probit or logit model, how do I decide between an ordered probit or ordered logit model?  Thanks for any help! What do wizard children do before attending Hogwarts? Most of the wand-carriers that come from a non-Muggle family seem fairly uneducated when it comes to interacting with Muggles.  This implies that they don't go to any type of Muggle school before entering into their education at Hogwarts (or whichever Wizarding school they go to), or else they would at least understand some Muggle culture.  What do children from magical families do before going to Hogwarts if they don't go to a traditional school?  Is there any evidence that they're homeschooled? Kolmogorov's sufficient and necessary condition for SLLN - What about pairwise uncorrelated RV? Kolmogorov proved, that, as one considers independent (not necessary equally distributed) Random Variables: $\{X_n\}_{n\ge0}\subseteq \mathcal L^2$   With $\mathrm{Var} (X_n)=\sigma^2_n$ and without loss of generality $E[X_n]=0$.  If $\sum_{n=0}^\infty \frac{\sigma^2_n}{n^2} \lt \infty$ then SLLN holds, that is:  $$\frac1n\sum_{k=0}^n X_k \rightarrow 0 \,\,\,\,\,\,\,\,\,\,\,\,\,\text{a.s.}$$  Something different:  Also it is known, that if $\sup_{n\ge0}\sigma^2_n =: v \lt \infty$ pairwise uncorrelated $(X_n)_{n\ge0}$ will suffice for SLLN to hold.  My question in view of this situation: Is it possible to weaken the condition of $(X_n)_{n\ge0}$ beeing independent and instead merely consider pairwise uncorrelated $(X_n)_{n\ge0}$? lognormal distribution, standard-deviation and (physical) units I have a distribution of microparticles that follows a lognormal distribution. The cumulative distribution function thus is given by:  $$ F_X(x;\mu,\sigma) = \frac12 \operatorname{erfc}\!\left(-\frac{\ln x - \mu}{\sigma\sqrt{2}}\right) $$ $$ \mu = ln(M) + \sigma^2 $$  Now, the plot of the distribution function should be exactly the same no matter if the particle diameter $x$ is given in micrometers or meters (as long as I adapt the x-axis accordingly of course). However, this only works if I only convert $x$ and $M$, while not touching the numerical value of $\sigma$, and I don't understand why. $F_X$ has to be unitless, so $x$, $\mu$ and $\sigma$ should all have the same unit, right? Don't heavier objects actually fall faster because they exert their own gravity? The common understanding is that, setting air resistance aside, all objects dropped to Earth fall at the same rate. This is often demonstrated through the thought experiment of cutting a large object in half. The halves clearly can't then fall more slowly just by being sliced in two.  However, I believe the answer is that when two objects fall together, attached or not, they do "fall" faster than an object of less mass alone does. This is because not only does the Earth accelerate the objects toward itself but the objects also accelerate the Earth toward themselves. Considering the formula: $$ F_{\text{g}} = \frac{G m_1 m_2}{d^2} $$  Given $F = ma$ thus $a = F/m$, we note that the mass of the small object doesn't seem to matter as when calculating acceleration the force is divided by the $m$ term, its mass. However, this overlooks that the force is actually applied to both objects, not just to the smaller one. The acceleration on the second, larger object is found by dividing $F$, in turn, by the larger object's mass. The two objects' acceleration vectors are exactly opposite, so closing acceleration is the sum of the two:  $$ a_{\text{closing}} = \frac{F}{m_1} + \frac{F}{m_2} $$  Since the Earth is extremely massive compared to everyday objects, the acceleration imparted on the object by the Earth will radically dominate the equation. As the Earth is $\sim 5.972 \times {10}^{24} \, \mathrm{kg} ,$ a falling object of $5.972 \, \mathrm{kg}$ (just over 13 pounds) would accelerate the Earth about $\frac{1}{{10}^{24}}$ as much, which is one part in a trillion trillion.  Of course in everyday situations, we can for all practical purposes treat objects as falling at the same rate because of this negligible difference—which our instruments probably couldn't even detect. But I'm hoping not for a discussion of practicality or what's measurable or observable, but what we think is actually happening.  Am I right or wrong?  What really clinched this for me was considering dropping a small Moon-massed object close to the Earth and a small Earth-massed object close to the Moon. This made me realize that falling isn't one object moving toward some fixed frame of reference, but that the Earth is just another object, and thus "falling" consists of multiple objects mutually attracting in space. Graphical interface for generating presentation slides Is there a good graphical interface, similar to PowerPoint or LibreOffice Impress, for generating presentation slides?  When writing documents I prefer to write my text and LaTeX-markups using a text-editor and not using a graphical tool like LyX. However, in the case of presentation slides I want to see the layout and to have the ability to immediately see what you get e.g. by moving a picture with arrow keys.  ADDITION: The background to my question is as follows. I have used PowerPoint for more than a decade and like to use a WYSIWYG tool when making presentation slides. However, I can not use PowerPoint on my current computer and I think the output from LibreOffice Impress is inferior. As a long-time user of LaTeX, I have considered using SliTeX or Beamer but unfortunately I do not like the way of working. The end result is of course superior, but I found it very time-consuming and tiresome to e.g. adjust the position and size of pictures. How do I add the kernel PPA? I need to render a model on a transparent background. The models have a light source so they should be casting a shadow on a surface (the XY plane). The purpose for this is to overlay the rendered images (out of blender) on an image of the actual surface, so I want to generate the render including a semi-transparent shadow.  I don´t have any problem rendering the models on transparent background, but I can not make a shadow appear. I tried adding a surface below the model so the shadow can fall on it, but now there's the problem of keeping the surface from rendering.  How can I render the shadow on a transparent background? Is this asbestos? (South korea) School in South Korea removed asbestos over the past few weeks. Now I am all paranoid.   Is this asbestos? Found these dime-sized chunks by my desk.          Higher resolution images are available here:    There should be 4 pics. If not clear enough let me know. My wife was just issued a multiple entry visa by France, which is good for one year.  Our first trip will be to France, the issuing country.  My question is: after we leave the EU and return, must future trips also start in France? Or may we go directly to (say) Greece from the US on a later visit?