Random number using nextInt inclusive 5-15 [Java]
How do I generate random integers within a specific range in Java?
I have two custom taxonomies applied to two custom post types. the terms list on the sidebar just fine and will list all posts associated with it. However, if you search one of the terms in specific, it doesn't bring up a post with that term.  Example:  Search for term "PQRI"  I get nothing. Any ideas? I've tried using various search plugins but they either break my custom search parameters or just don't work. Beamer, Babel and Tikz conflict Prove that $\binom{m+n}{m}=\sum\limits_{i=0}^m \binom{m}{i}\binom{n}{i}$ I need to proof this following equality :  $$\binom{m+n}{m}=\sum_{i=0}^m \left(\binom{m}{i}\binom{n}{i}\right)$$  This is what I did combinatoric proof:  Left : subset with $m$ members from $m+n$  Right : $\binom{m}{i} \rightarrow$ The number of subsets in set $m$ could also be written as $2^m$ AND $\binom{n}{i} \rightarrow$ the number of subsets with $m$ members from set $n$  In case $ n \leq m \implies \binom{n}{i}=2^n$  So this is what I came up with I still can't see why those expression are equal.  Any ideas? Thanks. Which one should be used?      To me, it makes no difference, but I'm not really sure why.   vs     For me, it makes no difference, but I'm not really sure why. How do you handle multiple instances of setTimeout()? What is the most recommended/best way to stop multiple instances of a setTimeout function from being created (in javascript)?  An example (psuedo code):  function mouseClick() {    moveDiv("div_0001", mouseX, mouseY); }  function moveDiv(objID, destX, destY) {    //some code that moves the div closer to destination    ...    ...    ...     setTimeout("moveDiv(objID, destX, destY)", 1000);    ...    ...    ... }   My issue is that if the user clicks the mouse multiple times, I have multiple instances of moveDiv() getting called.  The option I have seen is to create a flag, that only allows the timeout to be called if no other instance is available...is that the best way to go?  I hope that makes it clear.... Let $\{E_n\}_{n\in\mathbb{N}}$ be a sequence of countable sets and let $S=E_1\times\cdots\times E_n\times\cdots $. Show $S$ is uncountable. Prove that the same statement holds if each $E_n=\{0,1\}$.  By the definition of Cartesian product of sets,   $$\displaystyle S=\Pi_{n\in\mathbb{N}} \{f\colon\mathbb{N}\rightarrow\cup_{n\in\mathbb{N}}E_n\mid\forall n, f(n)\in E_n\}$$  If $E_n=\{ 0,1\}$, then  $$\displaystyle S_{01}=\Pi_{n\in\mathbb{N}}\{0,1\}=E^{\mathbb{N}}$$, where $E=\{0,1\}$.  By a theorem, $\cup_{n\in\mathbb{N}} E_n$ is countable since the sequence is countable.  I'm not sure how to go on from here to show $S$ is uncountable. Can we say anything about the function $f$ that maps a countable $\mathbb{N}$ to another countable union of sequence of countable sets? From Berkeley Problems in Mathematics, Spring 1999, .  Let $f(x)\in \mathbb{Q}[x]$ be an irreducible polynomial of degree $n\ge 3$. Let $L$ be the splitting field of $f$, and let $\alpha\in L$ be a zero of $f$. Give that $[L:\mathbb{Q}]=n!$, prove that $\mathbb{Q}(\alpha^{4})=\mathbb{Q}(\alpha)$.   (BELOW IS NONSENSE, SHOULD BE IGNORED)  Following Gerry Myerson's advice, since $L$ is the splitting field of $f$, $L$ must be Galois over $\mathbb{Q}$. Thus the Galois group for $[L:\mathbb{Q}]=S_{n}$. Gerry now asserts that either $\mathbb{Q}(\alpha^{4})$ is of degree 2 over rationals or it must be $\mathbb{Q}$. But assuming this one can rule out the case $\mathbb{Q}$, since this would imply $\alpha$ is the root of a 4th or 2nd degree polynomial over $\mathbb{Q}$. But we know $n\ge 3$. So $\alpha$ must be the root of a 4th degree polynomial. We know $S_{n}$ has normal subgroups $A_{n}$ when $n\not=4$ and $V,A_{4}$ when $n=4$. I do not know how to proceed any further.   Now assuming $\mathbb{Q}(\alpha^{4})$ is a degree 2 abelian extension over $\mathbb{Q}$. We should have a chain of normal extensions $\mathbb{Q}(\alpha)\supset \mathbb{Q}(\alpha^{2})\supset \mathbb{Q}$. This would imply $S_{n}$ has a normal subgroup which has a normal subgroup. But we know $A_{n}$ for $n\ge 5$ are simple. So the only possibility is $\mathbb{Q}(\alpha)$ has a Galois group isomorphic to $V$. In this case $n=4$ as well. I can only proceed to here. Difference between $\Delta$, $d$ and $\delta$ I have read the thread regarding , but it does not answer my question.  I am confused about the notation for change in Physics. In Mathematics, $\delta$ and $\Delta$ essentially refer to the same thing, i.e., change. This means that $\Delta x = x_1 - x_2 = \delta x$. The difference between $\delta$ and $d$ is also clear and distinct in differential calculus. We know that $\frac{dy}{dx}$ is always an operator and not a fraction, whereas $\frac{\delta y}{\delta x}$ is an infinitesimal change.   In Physics, however, the distinction is not as clear. Can anyone offer a clearer picture? Can you forgo your readied action to take an opportunity attack instead? Example:   Player 1 uses the ready action to do something when something happens (unimportant) Goblin, decides to charge across the battlefield and attack Player 2, but happens to cross paths with Player 1 possibly provoking an opportunity attack (here lies my question)   Could Player 1 decide to ignore their readied action and use their reaction to attack the goblin? This would of course take up their reaction so they could no longer take their readied action when it triggers.  If so; let's say it is a fireball that was readied (or any spell), would Player 1 be required to drop the fireball spell? They technically cast it as part of their ready action, but I would understand if this would be a downside to using a reaction before their readied action triggered (maybe this should be another question, but please answer it anyway and tell me if I need to create a separate one so you can answer it there too :P). So, I thought I had a good understanding of this, but just ran a test (in response to a conversation where I disagreed with someone) and found that my understanding is flawed...  In as much detail as possible what exactly happens when I execute a file in my shell? What I mean is, if I type: ./somefile some arguments into my shell and press return (and somefile exists in the cwd, and I have read+execute permissions on somefile) then what happens under the hood?  I thought the answer was:   The shell make a syscall to exec, passing the path to somefile The kernel examines somefile and looks at  of the file to determine if it is a format the processor can handle If the magic number indicates that the file is in a format the processor can execute, then   a new process is created (with an entry in the process table) somefile is read/mapped to memory. A stack is created and execution jumps to the entry point of the code of somefile, with ARGV initialized to an array of the parameters (a char**, ["some","arguments"])  If the magic number is a  then exec() spawns a new process as above, but the executable used is the interpreter referenced by the shebang (e.g. /bin/bash or /bin/perl) and somefile is passed to STDIN If the file doesn't have a valid magic number, then an error like "invalid file (bad magic number): Exec format error" occurs   However someone told me that if the file is plain text, then the shell tries to execute the commands (as if I had typed bash somefile). I didn't believe this, but I just tried it, and it was correct. So I clearly have some misconceptions about what actually happens here, and would like to understand the mechanics.  What exactly happens when I execute a file in my shell? (in as much detail is reasonable...) A simple regex search and replacement in php for minifying/compressing javascript? Find the maximum value of the expression ${\frac {x}{1+x^2}} + {\frac {y}{1+y^2}}+{\frac {z}{1+z^2}}$. Find the maximum value of the expression :   $${\frac {x}{1+x^2}} + {\frac {y}{1+y^2}}+{\frac {z}{1+z^2}}$$   where $x,y,z$ are real numbers satisfying the condition that $x+y+z=1$.   Taking $x=y=z=\frac {1}{3}$, I get the expression as $\frac {3x}{1+x^2}$, which is equal to $\frac {1}{1+{\frac{1}{9}}}$ or $\frac {9}{10}$.  How can I actually solve the problem without making unnecessary assumptions ? How to find out if my system is i386 or x86_64 before installing Ubuntu? My current desktop reso is 1366x768    In cs 1.6 I have selected display option as Normal and Resolution as 1024x768.     In this settings I don't get those vertical black side bars which make the playing screen square.     Atm it is rectangular but I wanted square.    How do I get the vertical black bars while playing cs 1.6? Both options affect colors in a similar way, but I can't figure out the difference. This is probably pretty basic, but to save me an hour or so of grief can anyone tell me how you can work out the number of bits required to represent a given positive integer in Java?  e.g. I get a decimal 11, (1011). I need to get the answer, 4.  I figured if I could work out how to set all the bits other than the most significant bit to 0, and then >>> it, I'd get my answer. But... I can't. I'm going to accessing my ubuntu machine remotely from my windows machine through putty. Are there any suggestions for possible ways to get an X server running on my windows machine?  Thanks. How would gravity change on a planet rotating around itself very fast? Let's take a planet identical to Earth, but with rotation speed multiplied by ten thousand. What would happen with the gravity if it was spinning madly around itself? Would the centrifugal force make objects seem lighter than on normal Earth? Would the people on that planet be able to jump higher? White background with filmic blender Extra space between lines (gb4e) I am using gb4e.sty to provide inter-linear language glossing. This works well, but I want to get wider spacing between lines when sentences have 2 or more lines like this;   Here is my source code:  \documentclass{article} \usepackage{times} \usepackage{gb4e} \noautomath \let\eachwordone\it \setlength{\glossglue}{10pt plus 2pt minus 1pt}  \begin{document} \begin{exe} \ex \gll mukasi monosugoka jii atama=no an wanrjoku=no an samurai=ga utan=bee=cjo\\ old.days very good head=NOM exist strength=NOM exist samurai=NOM existed=HSY=ASS\\ \trans `Once upon a time, there was a samurai with a smart brain and strength.' \end{exe} \end{document}   Does anyone have a solution to this problem?