Add attribute/element to existing javascript array
How to append something to an array?
In a ring homomorphism we always have $f(1)=1$? Why are p-values uniformly distributed under the null hypothesis? Let $R$ be a commutative ring and $I_1, \dots, I_n$ pairwise comaximal ideals in $R$, i.e., $I_i + I_j = R$ for $i \neq j$. Why are the ideals $I_1^{n_1}, ... , I_r^{n_r}$ (for any $n_1,...,n_r \in\mathbb N$) also comaximal? The product of a normal and Rademacher variables, independent from each other Let $X\sim N(0,1)$ and let $Z$ be a random variable independent of $X$ such that:  \begin{equation} \Pr(Z=z) = \begin{cases} \frac{1}{2} &amp; \mbox{if $z = -1$ or $z=1$}, \\ \\ 0 &amp; \mbox{otherwise}. \end{cases} \end{equation}   Define $Y = ZX$. Show that $Y \sim N(0,1)$. Determine $\operatorname{Cor}(X,Y)$. Are $X$ and $Y$ independent?   Progress:  I'm basically stuck at the beginning. I got as far as $P(ZX &lt; y) = P(Z &lt; y/X)$, which I'm not even sure is correct. I'm also not clear on what it means by defining $Y = ZX$ - does it mean I need to state the probability density function or something? And how do I show that $Y \sim N(0,1)$? Computational complexity of Fibonacci Sequence I have an enum construct like this:  public enum EnumDisplayStatus {     None    = 1,     Visible = 2,     Hidden  = 3,     MarkedForDeletion = 4 }   In my database, the enumerations are referenced by value. My question is, how can I turn the number representation of the enum back to the string name.   For example, given 2 the result should be Visible. Surface tension: the paper clip experiment In the paper clip experiment, the surface tension of water prevents the clip from falling, thus we can assume it exerts a force of $mg$ (weight of clip) upwards.   However, if you try to pull the clip out of water, surface tension opposes this motion also. If for simplicity we assume that the clip is a rectangle of length $l$ and breadth $b$, and the surface tension is $T$, then the liquid exerts a downward force of: $$T×2(l+b)$$  What is going on here? Why is there an inconsistency in the direction along which the force acts? Coefficient growth in the power series $\sum u_n z^n = e^{1/(1-z)}$? How to wait in a bash script for several subprocesses spawned from that script to finish and return exit code !=0 when any of the subprocesses ends with code !=0 ?  Simple script:  #!/bin/bash for i in `seq 0 9`; do   doCalculations $i &amp; done wait   The above script will wait for all 10 spawned subprocesses, but it will always give exit status 0 (see help wait). How can I modify this script so it will discover exit statuses of spawned subprocesses and return exit code 1 when any of subprocesses ends with code !=0?  Is there any better solution for that than collecting PIDs of the subprocesses, wait for them in order and sum exit statuses? The category Set has the property that any morphism f can be decomposed into an epimorphism $e$ and a monomorphism $m$ with $f$ = $m\circ e$. (The intermediary set object is the image of $f$.)  Is there a name for this construction?  Is there a name for this property of categories?  In Set, the intermediary object is unique up to isomorphism. Is this the case for all categories with the property? How to pick and differentiate a flat color? When I am using Color Picker in Photoshop or Illustrator I am unable to get a Flat color. What are the things or basic points that I should keep in mind so that I am able to judge a color whether it is flat or not. Although flat color can be picked form websites such as       e.t.c.    Picking a flat color is not my problem. I want to learn the skill needed to judge and differentiate a flat color from other. Do all flat  colors values follow a pattern ?(like specific hue and saturation). This movie came out around 2000 and was created for one of the cable networks (and never in the theaters).  I think it was on the original Sci-Fi Channel or maybe the USA Network, but really not sure.    It's about a 1950's American-style utopian world.  The main character, if I remember correctly, worked at a car dealership.  I recall him looking like Jon Hamm, Adrian Pasdar, or Scott Bakula, but I may be way off there (and I didn't see the movie in their filmographies).  He drives his nice car home, and the whole town is beautiful, as are its people and white picket fence style homes.     He suddenly starts seeing weird things.  For example, instead of people driving cars, they're actually riding rickety bicycles.  The manicured, paved streets are actually dirt roads.  Houses are, in reality, tiny shacks.  Instead of people's clothes being immaculately maintained, everyone's really wearing filthy rags.  And instead of delicious food, they're eating something that looks like rotten garbage.  Something is making everyone believe they live in a beautiful, perfect society, but it's mind manipulation that's almost on the scale of the movie "The Matrix."    He befriends a pretty lady, and together they travel outside their town and try to find answers.  They even meet an outside militarized government, whose officials are interested in understanding and helping him.  This other city's infrastructure appears to be state-of-the-art and well funded.  The officials all have nice uniforms.  However, their environment is also under the same influence that's making everyone see things differently than what they really are.  The main character somehow sees through this illusion too, and realizes this fake prosperity is affecting others outside his home town--maybe the entire world!    The movie ends with       the man and woman eventually running into some elderly maintenance man in a forested area.  The maintenance man's job is to service a machine that alters everyone's perception of reality.     I posted about this a couple of years ago on another site, and somebody took a guess that it was "The Prisoner" but unfortunately that's not it.  I didn't really explain it well the first time, so hopefully this is clearer. Uncountable $\sigma$-algebra I'm stuck on the following problem (Source: Real Analysis for Graduate Students; Exercise 2.6; ):     Suppose $\mathcal A$ is a $\sigma$-algebra with the property that whenever $A \in \mathcal A$, there exists $B, C \in \mathcal A$ with $B \cap C = \emptyset$, $B \cup C = A$, and neither $B$ nor $C$ is empty. Prove that $\mathcal A$ is uncountable.   I think there is the added assumption that this is only true for $A \in \mathcal A$ having at least two elements, so it doesn't hold for singletons and the emptyset?  I tried to show this by way of contradiction and say that $\mathcal A = \{A_k\}$ is countable, but I didn't see how this could get me to a contradiction.  The other approach I tried was to look at $X = B_1 \cup C_1$ where $B_1 \cap C_1 = \emptyset$, then look at $B_1 = B_2 \cup C_2$ where $B_2 \cap C_2 = \emptyset$ and so on. If I look at the $C_k$'s they are pairwise disjoint and I either have a finite number of them or an infinite number of them in which case I've created a countable sequence of pairwise disjoint nonempty elements of $\mathcal A$. This path looked promising, but I couldn't see what to do next. Any ideas?  As a secondary question: I think this result is supposed to be used to show that if $\mathcal A$ is a $\sigma$-algebra with infinitely many elements, then it's uncountable, but I wasn't able to show that the property mentioned above (the one I'm trying to show) was satisfied in this case. My understanding is that when using a Bayesian approach to estimate parameter values:   The posterior distribution is the combination of the prior distribution and the likelihood distribution. We simulate this by generating a sample from the posterior distribution (e.g., using a Metropolis-Hasting algorithm to generate values, and accept them if they are above a certain threshold of probability to belong to the posterior distribution). Once we have generated this sample, we use it to approximate the posterior distribution, and things like its mean.   But, I feel like I must be misunderstanding something. It sounds like we have a posterior distribution and then sample from it, and then use that sample as an approximation of the posterior distribution. But if we have the posterior distribution to begin with why do we need to sample from it to approximate it? Connection pooling in PHP Is it possible to cache database connections when using PHP like you would in a J2EE container?  If so, how? Hi I'm solving some exercise problems in my text : "A Course in Mathematical Statistics".  I'm in the chapter "Point estimation" now, and I want to find a UMVUE of $\theta$ where $X_1 ,...,X_n$ are i.i.d random variables with the p.d.f $f(x; \theta)=\theta e^{-\theta x}, x\gt0$.   I know that $E(X_i)=1/\theta,$ for each $i$, and also have that $\bar{X}$ (or equivalently $\sum_1^n X_i$) is a complete sufficient statistic for $\theta$. But I cannot go any further here. Somebody can help me? Renting a car in Ireland & Great Britain: 1 rental or 2? My wife, two kids and I will be traveling in Ireland and the UK Nov. 1st through 21st. We're flying into and out of Dublin. Our plan is to do a clockwise tour: Fly into Dublin -> Belfast -> Scotland -> England/London -> Back to Dublin to fly home.  We've been planning to rent a car when we land in Dublin (doing just things outside Dublin at the start of the trip) and have a car all the way until London, then turn in the car and take a train/ferry to get back to Dublin before flying home.  However, reading through the car rental section of Rick Steve's 2012 Ireland book is causing us to question if this is the right plan.  He says (p. 480):     If your trip covers both Ireland and Great Britain, you're better off   with two separate car rentals, rather than paying for your car to ride   the ferry between the two islands. On an all-Ireland trip, you can   drive your rental car from the Republic of Ireland into Northern   Ireland, but be aware of drop-off charges ($75-150) if you return it   in the North.   So it seems like he recommends against doing one car rental for both islands, but he also recommends against renting in the Republic of Ireland and returning it in Northern Ireland (our other option for our current itinerary).  So we're not sure which is best here.  A few questions about this:   If we do one car rental all the way from Dublin to London, will there be a similar $75-$150 fee? Is there an easy place to return a car on the Northern Ireland side of one of the Northern Ireland -> Scotland ferries, and an easy place on the Scotland side to rent a car?  We'd like to minimize the number of buses/whatever we need to take between car rentals since we'll be lugging around car seats for both of our children (on top of carrying them and our luggage). Will one way be significantly cheaper than the other?  Besides the basic cost of taking the car on the ferry and the drop-off charges, our credit card will cover insurance in Scotland/England but not in Ireland, so we could potentially get a better rental rate by renting a second vehicle once we're on Great Britain. Although, I know you often get a better rate when keeping a car rental for longer, so that may negate any benefit from the credit card covering the insurance. Eclipse Shortcut to Split Long Strings I swear I've seen someone do this, but I can't find it in the various lists of shortcuts.  Given:  String s = "A very long ............................ String";   Is there an Eclipse shortcut to turn it into:  String s = "A very long ............................ "      + "String"; UMP of product functor How can I read a file even when getting an "in use by another process" exception?