JQuery - Changing element id isn't working
Event binding on dynamically created elements?
'sudo su -' vs 'sudo -i' vs 'sudo /bin/bash' - when does it matter which is used, or does it matter at all? Is is possible to skip the confirmation step while adding a repository? When I add a repository by running  sudo add-apt-repository ppa:ubuntu-x-swat/x-updates   It outputs this dialog:  Updated versions of X.org drivers, libraries, etc. for Ubuntu.  This PPA is for stable upstream releases of X.org components.  If you're looking for something even more bleeding-edge, please see the xorg-edgers PPA.  While Ubuntu does not "officially/formally" support these packages, if you discover problems when installing these debs please feel free to report bugs to launchpad.  However, please make sure to clearly state that you are running packages from this PPA so we know the fixes need to come here.  If you are upgrading from one release to another with this PPA activated, please install the ppa-purge package and use it to downgrade everything in here beforehand. sudo ppa-purge ppa:ubuntu-x-swat/x-updates will do it.  [Directions for packaging drivers can be seen at https://wiki.ubuntu.com/X/DriverBuilding]  More info: https://launchpad.net/~ubuntu-x-swat/+archive/x-updates Press [ENTER] to continue or ctrl-c to cancel adding it   I want to skip the confirmation step  Press [ENTER] to continue or ctrl-c to cancel adding it   How can I automatically confirm the addition of a PPA? I stumbled upon an example, which needed to be compiled with the additional option --shell-escape. Using this option it worked just fine, but I'm curious:     Why or when is this option needed and what does it actually do? Get in vs. get on Possible Duplicate:          I'm an EFL (English as a foreign language) teacher and I haven't been able to come up with a good principle for which preposition to use after get when referring to transportation.  Some examples:   Get in:   a car/taxi/van/truck, etc.  Get on:   a bus/plane/bike/truck, etc.    How can one choose whether to use in or on? Note that in some cases, such as the example with truck, either preposition is possible but the choice affects the meaning.  I've been telling my students that there is no rule, so they just have to memorize which preposition to use, but I'm really hoping I'm wrong.  This question would be better suited for the upcoming  Stack Exchange, but it hasn't entered beta yet. More . Why Oracle discontinued Oracle Java (JDK) Installer PPA? What is the name of this theorem, and are there any caveats? For random variable $X$ that follows some distribution, $f(x)$ is the probability density function of that distribution if and only if $$\mathbb{E}[\phi(X)] = \int_{-\infty}^\infty \phi(x) f(x)dx$$ for all functions $\phi$.  Context: My professor used this in lecture to demonstrate a way to find the distribution of $cX$ given random variable $X$ that follows a specific distribution.   What is the name of this theorem? Have I missed any qualifications/caveats? I am in particular curious about whether "for all functions" is correct. My professor mentioned "positive, bounded, deterministic functions," but I am not sure what he meant by that. Where can I find a proof of this theorem? How to read and write into file using JavaScript? Can anybody give some sample code to read and write a file using JavaScript? Can I connect a PC to a PoE switch? How to call shell script from php that requires SUDO? How to make a file executable? How can I make my file so that I can double click on it, and it runs. It is a .sh script, but I also have files that say:  executable (application/x-executable)  in the description of what they are.  I can't run any of these from terminal, or by double clicking.  If possible, I would like a way using either the GUI or a Terminal, but not a combination of the two.  Here is a screenshot of what I see when I right click then go on properties. The file first:    And the shell script here:    NB: I accept that this is a duplicate (I was looking for it, and couldn't find it, so asked + answered it, hoping that I would find it) however, I don't think the question about .desktop files is a duplicate. I am a girl in my early twenties traveling to USA from India and in my visa application I have provided the contact address for a relative in San Francisco, and their invitation letter. I would like to visit LA first. Will I face problems during immigration if I land in LA (with an immediate on wards ticket to SF)? I dont plan to get on the flight from LA to SFO.  Initially I was planning to fly to SFO from India and then fly to LA immediately after completing immigration at SFO airport. This is my last homework problem and I've been looking at it for a while. I cannot nail down what is wrong with this proof even though its obvious it is wrong based on its conclusion. Here it is:     Find the flaw in the following bogus proof by strong induction that   for all $n \in \Bbb N$, $7n = 0$.      Let $P(n)$ denote the statement that $7n = 0$.      Base case: Show $P(0)$ holds.      Since $7 \cdot 0 = 0$, $P(0)$ holds.      Inductive step: Assume $7·j = 0$ for all natural numbers $j$ where $0 \le j \le k$ (induction hypothesis). Show $P(k + 1)$: $7(k + 1) = 0$.      Write $k + 1 = i + j$, where $i$ and $j$ are natural numbers less than $k + 1$.  Then, using the induction hypothesis, we get $7(k + 1) = 7(i + j) = 7i + 7j = 0 + 0 = 0$. So $P(k + 1)$ holds.      Therefore by strong induction, $P(n)$ holds for all $n \in \Bbb N$.   So the base case is true and I would be surprised if that's where the issue is.  The inductive step is likely where the flaw is. I don't see anything wrong with the strong induction declaration and hypothesis though and the math adds up! I feel like its so obvious that I'm just jumping over it in my head. Variables in batch file not being set when inside IF? I have two examples of very simple batch files:  Assigning a value to a variable:  @echo off set FOO=1 echo FOO: %FOO% pause echo on   Which, as expected, results in:  FOO: 1  Press any key to continue . . .   However, if I place the same two lines inside an IF NOT DEFINED block:  @echo off IF NOT DEFINED BAR (     set FOO=1     echo FOO: %FOO% ) pause echo on   This unexpectedly results in:  FOO:  Press any key to continue . . .   This shouldn't have anything to do with the IF, clearly the block is being executed.  If I define BAR above the if, only the text from the PAUSE command is displayed, as expected.    What gives?    Follow up question: Is there any way to enable delayed expansion without setlocal?   If I were to call this simple example batch file from inside another, the example sets FOO, but only LOCALLY.   For example:   testcaller.bat   @call test.bat  @echo FOO: %FOO%  @pause    test.bat   @setlocal EnableDelayedExpansion  @IF NOT DEFINED BAR (      @set FOO=1      @echo FOO: !FOO!  )    This displays:   FOO: 1  FOO:  Press any key to continue . . .    In this case, it appears that I have to enable delayed expansion in the CALLER, which may be a hassle. Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.  Like any console, after a while the visible backlog of past commands and prints gets to be cluttered, and sometimes confusing when re-running the same command several times.  I'm wondering if, and how, to clear the Python interpreter console.  I've heard about doing a system call and either calling cls on Windows or clear on Linux, but I was hoping there was something I could command the interpreter itself to do.  Note: I'm running on Windows, so Ctrl+L doesn't work. How can I model the mechanics of an army battlefield scene? TL;DR;  I want to model a strategic battlefield fight for my players to command and participate. I'm seeking advice on how to model it mechanically so that it is exciting for the players.  Background  The final scene of Act II of my campaign is envisioned to be a big battle between the army of the Big Bad and the allied forces gathered by my players. The full set of Act II runs with the players gaining the allegiance of the different factions to support them on the fight.  Now, in terms of that final scene, I'm struggling to decide how to DM the fight. In games and movies the action is made epic by having cinematic scenes of the fight happening with cuts to our heroes doing their amazing things, be it just plowing through dozens of enemies in quick succession or fighting the big ugly overpowered monster that is otherwise cause havoc among the army. I want that feeling  The set up will involve an army of several thousand enemies agains the different forces gathered by my players. Depending on what they've done during the second act, they'll have more or less support with a minimum number of regiments belonging to several faction (i.e. the silver guard of Wizardwight).  Intended way of DMing the scenario.  What I've come up with is to have the players be military leaders. Draw the map of the battlefield and have them manage the battlefield strategically and tactically, distributing the units and, somehow, enabling a dice based mechanism to evaluate how well each unit is doing. This will transform the tabletop into something similar to Warhammer Fantasy. They can choose to join a particular place of the battlefield to help either together or separately.  I have absolutely no idea on how to model this mechanically (as far as I know D&amp;D 5e does not cover this kind of fights).  Question:  What are good ways to mechanically model this kind of strategic army combat? Should I switch to a different system just for this scene or can I model this with D&amp;D 5e?  Notes on level: At this point I expect my players to range between level 9-12 and for the party to be between 3 and 4 players (this is not a limitation of the campaign, more like the players I'm running the campaign with). Is there an option to output a manual page in a different language? I don't want to change the computer language completely, but only specific manual pages. For example  $ man -English man Man is a manual program … $ man -Russian man Инструцтия для Unix, BSD и Linux. … How can I prove that if $n$ is even then $n^2$ is even and if $n$ is odd then $n^2$ is odd? Highlighted source code inline with Latex/Minted? When is the Killing form null? Any way to control light halos in the compositor based on emission level? I am wanting to animate a row of LED lights. I have separated the LED lights from the rest of my object with the pass index/ID mask functions; currently all of my LED lights are on pass index #1.  What I want is to have a minor halo effect around the lights, but only when they are active. Currently, when I add a halo effect to my pass index #1, all of the LED lights have a halo effect regardless if the LEDs are emitting light. All LEDs are diffuse and emission shaders, so I can animate by controlling the mix amount between diffuse and emission.   Is there any simple way to have the halo effect created through recognizing light emission values, or will I have to just animate each LED as its own layer of compositing?