rule generalization-NCA algebra
Parallel evaluation produces wrong result
I need to set the text within a DIV element dynamically. What is the best, browser safe approach? I have prototypejs and scriptaculous available.  &lt;div id="panel"&gt;   &lt;div id="field_name"&gt;TEXT GOES HERE&lt;/div&gt; &lt;/div&gt;   Here's what the function will look like:  function showPanel(fieldName) {   var fieldNameElement = document.getElementById('field_name');   //Make replacement here } python list in sql query as parameter I have a python list, say l  l = [1,5,8]   I want to write a sql query to get the data for all the elements of the list, say  select name from students where id = |IN THE LIST l|   How do I accomplish this? Pipelined Sed does not work on found filename inside Bash command substitution when invoked from Find "-exec" It looks like 'find', 'bash' and 'sed' in some cases does not work as one expects.  The following example should first create file 'sample.txt', then find the file and finally process it by '-exec' command. The executed command prints found filename, test specimens, and modified filename. The 'sed' command itself is used to replace 'txt' to 'TXT'.  touch sample.txt find ./ -maxdepth 1 -name "*.txt" -exec echo {} $(echo Specimen_before.txt {} Specimen_after.txt |sed -e "s/txt/TXT/g") \;   The expected output is:     ./sample.txt Specimen_before.TXT ./sample.TXT Specimen_after.TXT   Instead it produces:     ./sample.txt Specimen_before.TXT ./sample.txt Specimen_after.TXT   (the example has been tested also with old-school command substitution through backquotes '`' with the same result)  What am I doing wrong? Is it ever bad to use \left and \right? For mathematics, is it ever disadvantageous to use \left(  and \right)  in equations?  I can't see any way that doing this would hinder the typesetting, so why isn't () just converted into \left( \right) automatically? This would save a lot of typing.  Cheers! lists Ubuntu 4.10 (Warty Warthog) as the first Ubuntu released by Canonical Ltd.  But I wanted to know whether there ever was an Ubuntu 1.x, as in Windows or Mac OS. If yes, is it available somewhere? Let f : A → B and g : B → C be bijections. Prove that g◦f : A → C is a bijection  Can someone show me the steps I should take to solve this problem? For the ring $\Bbb{Z}[\sqrt{d}]=\{a+b\sqrt{d}\mid a,b \in \Bbb{Z}\}$ where $d$ is not divisible by the square of a prime, prove that the norm $N(a+b\sqrt{d})= |a^2-db^2|$ satisfies the assertions: $N(x)=0$ if and only if $x=0$; $N(xy)=N(x)N(y)$ for all $x$ and $y$; $x$ is a unit if and only if $N(x)=1$; and if $N(x)$ is prime, then $x$ is irreducible in $\Bbb{Z}[\sqrt{d}]$. Is there any way to actually impose disadvantage (not just cancel advantage) on saving throws against spells for a creature with Magic Resistance? Many creatures in D&amp;D 5e have a feature called Magic Resistance. One such is the :  Magic Resistance. The archmage has advantage on saving throws against spells and other magical effects.  So the Archmage has advantage on saving throws against magical effects. Suppose I wanted to weaken the Archmage's resistance to magic - I use some effect that gives disadvantage on the saving throw for my spell. Normally, this would balance out to a straight roll, as the  say:  If circumstances cause a roll to have both advantage and disadvantage, you are considered to have neither of them, and you roll one d20. This is true even if multiple circumstances impose disadvantage and only one grants advantage or vice versa. In such a situation, you have neither advantage nor disadvantage.  This seems to set a baseline for a straight roll on saves against magical effects, that the Archmage can never roll at disadvantage against magical effects. But is there a way to get around this? Keep in mind, such an ability must respect the  rule:  That said, many racial traits, class features, spells, magic items, monster abilities, and other game elements break the general rules in some way, creating an exception to how the rest of the game works. Remember this: If a specific rule contradicts a general rule, the specific rule wins.  The general rule here is that advantage and disadvantage balance out to a single die roll, so getting around Magic Resistance must either specifically override the rule for advantage and disadvantage, or eliminate Magic Resistance entirely. Is there any way (e.g. magic item, class feature, spell, etc.) to force a creature with Magic Resistance to make a save against a magical effect with disadvantage?  While writing this up I did find  which asks generally how to combat creatures with Magical Resistance, I intend this to be a (hopefully) more focused version of that question. Sanity check question about correlation between log-normal random variables Recently I came across the following result in a paper, which I can't seem to find right.  Anyway the authors had cited  by Johnson &amp; Kotz, page 20 as the source. Since I do not have access to this book I am unable to check on the derivation of this result. I was hoping someone could shed some light on how to prove this.  Let $X$ and $Y$ denote a pair of bivariate log normal random variables with their means and variances given by the ordered pairs $(\zeta_{X}, \eta_{X})$ and $(\zeta_{Y}, \eta_{Y})$ and with correlation coefficient $\rho_{(X, Y)}$, derived from the bivariate normal with marginal distributions having parameters $(\xi_{X}, \nu_{X}^2)$ and $(\xi_{Y}, \nu_{Y}^2)$ and correlation coefficient $\rho_{N}$.  The expression for $\rho_{(X, Y)}$ is given as \begin{equation} \rho_{(X, Y)} = \dfrac{\mathrm e^{(\rho_{N} \nu_{X} \nu_{Y})} - 1}{\sqrt {(\mathrm e^{\nu_{X}^2} - 1)(\mathrm e^{\nu_{Y}^2} - 1)}} \end{equation}  The below is a manipulation I came up with, any error in that would be completely mine.  Upon rearranging we get \begin{equation}\begin{aligned} \rho_N &amp;= \dfrac{\ln (1 + \rho_{(X, Y)} \sqrt {(\mathrm e^{\nu_{X}^2} - 1)(\mathrm e^{\nu_{Y}^2} - 1)})}{\nu_{X}\nu_{Y}}\\ &amp;= \dfrac{\ln (1 + \rho_{(X, Y)} \frac{\eta_{X}\eta_{Y}}{\zeta{X}\zeta{Y}})}{\sqrt {\ln ((\frac{\eta_{X}}{\zeta_{X}})^2 + 1)\ln ((\frac{\eta_{Y}}{\zeta_{Y}})^2 + 1)}}. \end{aligned} \end{equation}  I am very interested in learning if this result would hold true between $X$ and $Y$'s correlations if we had a quad-variate situation as in there were 2 more random variables which are also correlated with $X$ and $Y$ would this result still be true ? I suspect it should be, but I am newbie and due to lack of a credible source I was wondering if some one would be kind to confirm it. Taking a skyline photo with a person closer to the camera during night time How can I take a photo which shows the skyline and the person who is standing around six feet away from the camera with proper lighting at night?   For taking just the skyline I've used long shutter speed and it turned out great, but when including a person on it, the person becomes  blurry because it's impossible for a person to remain static for that long.   Ps.  I do have two flashes, 35mm prime lens as well as 18-300mm zoom lenses as well. The camera I use is Nikon D7200. I've upgraded from 12.04 to 14.04 via command-line when my system froze, had to do REISUB and dpkg --configure -a to recover from crash after rebooting.  Now everything seems to work except automatically mounting external thumb drives and external hard disk drives. After plugging in said drives, they fail to show up on the left pane and remains unmounted. I can see the device if I run lsusb and fdisk though, so it's possibly to manually mount it but I'd rather resolve why it's not automatically mounting. We write all postive whole integers after the comma, how do we prove that this is an irrational number? ($0.1234567891011121314...$) Should OK button be on left of Cancel button or vice versa?   Are there any studies suggesting either of the solutions? How is The Wall bypassed? In the first series of the TV show several things apparently bypass  to reach Winterfell:   The Night's Watch member  captured near Winterfell and executed by Ned. The Direwolf &amp; her pups found immediately after the execution  and the other Wildlings travelling with her   If The Wall is approximately the same along its length it would presumably be impassible. Is the only option for them to go around the western end (since it stops at the Shadow Tower)? Is this clarified in the book? Are other methods mentioned in subsequent books? Sole survivor of attack on mining vessel, abandoned by his employer, has ability to teleport There's a story my grandpa use to tell me when I was younger, about the sole survivor of of an attack on a mining vessel in space. The man lives in space for months/years, ignored by the company he worked for and never rescued. Then when he thinks he is being rescued, it's actually another set of raiders who attack him and kidnap him.  He then wakes up in captivity in some sort of prison inside of an asteroid, and has a word tattooed on his forehead. My grandpa called him Ronin (that's what the tattoo on his forehead said) but I don't know what the character's real name is. Anyways, he learns that he has the ability to teleport after having a brush with death and decides to make his way back to Earth so that he can exact revenge on the mining company who abandoned him and left him floating to die.  Does anyone know what this story or book may be? My grandpa told it to me when I was little, he said that he got it from a book he use to love reading when he was younger. I'm assuming the book is very old (possibly pre 1940's as he was born in the 20s). I can't ask him as he is no longer alive. I'm also unsure as to whether or not all the details in the story he told me, are the same as in the original. Question mark or bold citation key instead of citation number Is it possible to grant rename permissions, but not delete, in NTFS? We have a folder for employees to scan contracts to. After scanning, they're supposed to rename them according to our conventions so they can be processed further. In response to a recent incident, these folders have had their security locked down (they're granted write, but not modify, permission) and now they are unable to rename the files.  Is there a technical way to accomplish what I'm trying to do? From what I've read, I don't think this is possible.  If not, can you suggest any workarounds? One possibility is to set the name of the file as it's being scanned in. Another is to have a trusted person in management be given sufficient permissions to rename. In the calculus of variations, particularly Lagrangian mechanics, people often say we vary the position and the velocity independently. But velocity is the derivative of position, so how can you treat them as independent variables? Why is setTimeout(fn, 0) sometimes useful? Is it possible to have 2 git repositories in one directory?  I'd think not, but thought I'd ask.  Basically, I'd like to check in my home directory config files (e.g. .emacs) which should be common across all of the machines I work on, but have a second repository for local files (e.g. .emacs.local), which contains machine-specific configurations.  The only way I can think of to do that is to have the local config in a subdirectory and ignore that subdirectory from the main git repository.  Any other ideas?