PDO prepared statement with dynamic variables

I want to create a function that can insert data into database using PDO prepared statement  public function test() {   $this->insert([     'first_name' => $_POST['first_name'],     'last_name' => $_POST['last_name'],     'email' => $_POST['email']   ]); }   public function insert(array $data) {    $fields = '';   $bindValues = '';   $values = [];    foreach($data as $k => $v) {     $fields .= $k . ', ';     $bindValues .= ':' . $k . ', ';     $values[$k] = $v;    }    $fields = rtrim($fields, ', ');   $bindValues = rtrim($bindValues, ', ');    $insert = $this->db->prepare("     INSERT INTO       :table     (:fields)     VALUES        (:values)   ");    $insert->execute([     'table' => $this->table,     $values   ]);   }     dumped variables:  1. $fields 2. $bindValues  3. $values   'first_name, last_name, email' (length=28) ':first_name, :last_name, :email' (length=31) array (size=3)   'first_name' => string 'Nikola' (length=6)   'last_name' => string 'Misic' (length=5)   'email' => string 'mail@mail.com' (length=13)   And I'm getting an error      Call to a member function execute() on boolean   There's something wrong with the SQL, and I don't know what or how to debug it.


Using Newton's binomial theorem to prove that a sum evaluates to $36^n-26^n$

Using Newton's binomial theorem to argue that: $n \ge 1$ $$36^n - 26^n = \sum_{k=1}^{n}\binom{n}{k}10^k \cdot 26^{n-k}$$                               my argument $$(26+10)^n = \sum_{k=1}^{n}\binom{n}{k}10^k \cdot 26^{n-k} +26^n $$ $$(26+10)^n = \sum_{k=0}^{n}\binom{n}{k}10^k \cdot 26^{n-k} +26^n $$  I'm stuck at the part on what to do with the $26^n$ After I moved it over a made the sum $\sum_{k=1}^{n}$ to $\sum_{k=1}^{n}$


The main screen of the app looks pretty sorry on my Galaxy Tab 8.4 tablet (screen: 2560x1600):   The case is the same in portrait mode.   App Version: 1.0.85 Device Manufacturer: samsung Device Model: SM-T700   OS Version: 5.0.2 (T700XXU1BOL1)


Let $\psi: C([0,1]; \mathbb{R}) \mapsto C([0,1]; \mathbb{R})  $, be such that if $x \in [0,1]$ then $$\psi(f)(x) = \int\limits_{0}^{x} f(t) dt $$  I am asked to show that $\psi$ is not a contraction but $\psi^{2}$ is. And then conclude that $\psi$ has a unique fixed point.   I´ve managed to prove a statment that helps me conclude the last part but I´m having trouble proving that the function is not a contraction. This is what I've got.   If $f,g \in  C([0,1]; \mathbb{R})$  then $$ |\psi (f) - \psi(g)| \leq \int\limits_{0}^{x} |f(t)-g(t)| dt \leq \sup\limits_{x\in [0,1]} |f(x)-g(x)| \int\limits_{0}^{x} 1 dt = d(f,g) x  $$ Then $|\psi (f) - \psi(g)| \leq d(f,g) x $,  and taking supremum on the left hand side allows me to conclude that $d(\psi (f),\psi (g)) \leq d(f,g) x$  Is there any problem with this procedure? Does anybody has an insight on how to procede with the $\psi^{2}$ part?   Many Thanks!


How do I ground a new overhead light fixture?  I'm replacing a 2 wire fixture with no grounding wire with a new 3 wire fixture which includes a ground wire.  The new fixture is suspended not flush mounted, per the instructions.


i'm trying to format USB drive (some noname 32GB) to EXT4. It always hangs on step writing superblocks ... and always stops writing numbers after it reach to 125/256. I'm use command mkfs.ext4 /dev/sdd1 . Command eventualy finishes, but drive is unmountable.  Do you think it is hardware broken or is there a way to fix it? I would like to use it with openELEC on rapberryPi.  I tried gparted live and gparted in ubuntu with same result. I'm going to try some USB drive check on windows, because it works as NTFS.  I have also tried gparted on different computers.  EDIT: i have now tried another flash drive (8GB kingston) and it worked without issue.  Is there some proven way to test flash drives?  EDIT: ok, so i tried some test i found ...  guess that's it.


Balancing Attack to Defense in a text based RPG

I understand that there is no correct or incorrect way of doing this, and its all down to a matter of trial and error in terms of perfecting the system.  What I am after is some advice or even get thoughts on how others have tackled a situation like this.  Right now I have a very basic attack formula  $attackPower = $baseAttack * 4;  $percent = $attackPower / 100; $percent1 = $percent * 10; // Gets 10% of the users attack power   Using the above code I then use rand to work out a users attack power, so it varies rather than a single number  $power = rand($attackPower - $percent1, $attackPower + $percent1)   So that's the users attack power calculated.  However if I used the same formula to calculate the opponents defense, and then calculated the Attack minus Defense equals the damage  $totalDamage = $power - $defense;   This may sometimes result in a negative value (especially if the opponent has a considerably higher defense stat to the users attack)  Above I have used   $attackPower = $baseAttack * 4;    For calculating the defense would this be efficient?  $defensePower = $baseDefense * 2; // Could have this set to rand? 1 - 3??   Is there anything that could be changed to balance the stats out a bit more?  Could there be a much simpler formula?


I am going to move a directory and a file  to /dev/null.   What will happen if i move a file to /dev/null and what will happen if i move a directory to /dev/null?


I have some code that I am using to grab the page name, and I want to compare the variable to a string - but the statement always returns "true".  <%     String uri = request.getRequestURI();     String pageName = uri.substring(uri.lastIndexOf("/")+1); %>  <c:if test="${pageName != 'home.html'}" > <script src="<%= designPath %>/javascripts/constants.js" type="text/javascript"></script> <script src="<%= designPath %>/javascripts/application.js" type="text/javascript"></script> <script src="<%= designPath %>/javascripts/cart.js" type="text/javascript"></script> </c:if>


Firewall to block all internet activity except specific packages/programs

is anyone aware of a firewall which can block all internet activity in an ubuntu installation but allow specific packages and programs to use internet with a checkbox list provided by a GUI ?   thank you


Show "M" for million-rep users on chat.stackexchange.com

Over at the  page on Chat SE, the users in the "2 comma club" still have their reputation shown in four-digit kays, instead of a nice round M, contrary to  answer:  (Gilles is ahead of Skeet!!)  As there are currently 6 users up there and another two hard on their well-heeled rep marks, should we apply the 1M format to the chat lists as well?


can I access ssh server by using another ssh server as intermediary

I have two servers  Server1 -> Static IP1  Server2 -> Static IP2   Server2's firewall allows access only from Static IP1  I can connect to Server1 via ssh from anywhere.   How can I connect to Server2 from my PC which is behind a dynamic IP via ssh in one step instead of connecting via ssh to Server1 and then doing another ssh to Server2 from within Server1s shell.


MS-Word strikes again: In the following test, it has green underlined the phrase "number who have" and suggested either:   numbers who have number who has   Here is what I've written (slightly paraphrased for you non-statistics experts     So if you want to find Probability that "a subject tests positive" or   "subject uses" by adding the column and row totals, you have counted   the 44 people in the top left twice. So, to get the correct number who   have tested positive or used drugs, you have to subtract the ones you   counted twice. The total number of subjects who use or have tested   positive is 50+134-44=140 (same number as before).   See, there's only one number: the number of people who test positive or used drugs. So clearly the first choice above is wrong.  The second choice just sounds plain wrong (but I can't put my finger on it).  Who's right? Me or MS-Word's fine grammarian?


I want to understand intuitively why it is that the gradient gives the direction of steepest ascent. (I will consider the case of $f:\mathbb{R}^2\to\mathbb{R}$)  The standard proof is to note that the directional derivative is $$D_vf=v\cdot \nabla f=|\nabla f|\,\cos\theta$$ which is maximized at $\theta=0$. This is a good verification, but it doesn't really help me understand the result.


I'm dealing with the powerful tabularx environment. I was able to obtain a nice table, except for the last column. I need seven columns in total, but at the end I got another half column. I can't understand why!  Here the code I used for building the table:  \begin{table}[h!]  \begin{tabularx}{\textwidth}{|l|*{20}{>{\arraybackslash}X|}}  \multicolumn{1}{c}{}& \multicolthead{3}{\color{RoyalBlue}\textbf{I}}& \multicolthead{3}{\color{RoyalBlue}\textbf{II}} & \multicolthead{3}{\color{RoyalBlue}\textbf{III}} & \multicolthead{3}{\color{RoyalBlue}\textbf{IV}} & \multicolthead{3}{\color{RoyalBlue}\textbf{V}} & \multicolthead{3}{\color{RoyalBlue}\textbf{VI}} \\  \hline  \thead{\color{RoyalBlue}One\\\color{RoyalBlue} Time} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} \\  \hline  \thead{\color{RoyalBlue}Two\\\color{RoyalBlue} Times} & & & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & & & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & \\  \hline  \thead{\color{RoyalBlue}Three\\\color{RoyalBlue}Times} & \multicolumn{3}{l|}{} & & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & & & \multicolumn{3}{l|}{} \\   \hline  \thead{\color{RoyalBlue}Four\\\color{RoyalBlue} \& Times} & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & \multicolumn{3}{l|}{} & & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & \cellcolor[HTML]{D3D3D3} & & \\  \hline  \end{tabularx} \caption{{Caption}} \end{table}   Which produces the following output:    Does anyone have an idea?


Why does JavaScript parseInt() and parseFloat() ignore the last digits?

I need to parse concatenated numbers. These are strings so I tried to use parseInt(). But the result is not what I expected...  These are some of my tests:  parseInt("201504071926270001"); results in 201504071926270000 parseInt("201504071946350002"); results in 201504071946350000   In these two cases parseInt() ignores the last digit of those numbers.   parseInt("201504071726450005"); results in 201504071726450020 parseInt("201504071746130006"); results in 201504071746130020   In these two other cases parseInt() turns the last digit of those numbers into "20".   I tried to use parseFloat() but this results the same. Also I set the radix to 10 but nothing happened. I tested this with Firefox and Safari. Both browsers did the same.  Is there something wrong with my expectations or is there a bug in JavaScript or is there anything I overlooked?


Is Stack Overflow built with domain-driven design?

I'm just curious. Is Stack Overflow built with  (or , , etc.)?  Can you guys say something more about code infrastructure?


What exactly happened to Gandalf's spirit after he "died" fighting the Balrog?

In the Two Towers movie, when Aragorn and company meet the newly reincarnated Gandalf the White, he has the following conversation with them     GANDALF VOICEOVER: From the lowest dungeon to the highest peak...... I   fought with the Balrog of Morgoth. Until at last I threw down my   enemy......and smote his ruin upon the mountainside. Darkness took   me......and I strayed out of thought and time.Stars wheeled   overhead......and every day was as long as a life age of the Earth.   But it was not the end. I felt life in me again. I've been sent   back...... until my task is done.   Why is Gandalf speaking like he is one of the mortal men? As a Maia, Gandalf's spirit or  is his primary form and therefore, after the destruction of his physical body, the ëala should have survived on and returned to Aman from where he originally came. We see it described this way in the cases of both Sauron and Saruman except that they don't return to Aman. That is, when their bodies die, their spirits rise out of the mortal remains and are "blown" away.     To the dismay of those that stood by, about the body of Saruman a grey   mist gathered, and rising slowly to a great height like smoke from a   fire, as a pale shrouded figure it loomed over the Hill. For a moment   it wavered, looking to the West; but out of the West came a cold wind,   and it bent away, and with a sigh dissolved into nothing.   -Scouring of the Shire, RoTK   But Gandalf here doesn't remember the details of what happened after he died because he has just been reincarnated again. But that goes against much of what Tolkien thought about the Maiar. For a Maia, their spirit or ëala exists independently within the world and the physical forms they assume are just like clothes put on and cast off at will. But here, why is Gandalf talking like he was expecting his physical death to be the permanent end - "It was not the end. I felt life in me again"?


The number of integral points on the hyperbola $x^2 - y^2 = (2000)^2$ is ____? (An integral point is a point both of whose coordinates are integers.  My attempt: The equation can be rewritten as: $$(x-y)(x+y) = 2000^2 = 2^8 \cdot 5^6$$ Now, both of $x+y$ and $x-y$ need to be odd or even. It is impossible for both of them to be odd, hence both of them must be even. The number of even pairs of factors of $2^8 \cdot 5^6$ is $7 \times 7 = 49$. Hence, the total number of integral points is $\boxed{49}$ The answer: The textbook claims the answer to be $\boxed{98}$ and counts the number of even pairs of factors as $7 \times 7 \times 2 = 98$. Could someone point out where I am going wrong? (or if the textbook has made an error) EDIT: This question has been answered but I wanted to add that the 2000 seemed conspicuous, so I went to Approach0. This problem is taken from . the referenced AoPS link also does a great job explaining the solution.


In my daily life I'm always typing <kbd>Keyboard Character</kbd> and I'd like to set up a macro in Ubuntu to automatically enter <kbd> </kbd>.  I'd like to assign it to say Shift+Control+K or whatever keyboard control character combination isn't assigned and already used by Ubuntu.  Back in the day of TSR (Terminate and Stay Resident) MS-DOS programs this was possible. Certainly it must be in Ubuntu too?  Do I have to write a daemon to accomplish this?    I found other questions with no answers: ,   I found a similar question with an answer: . However that question stipulated the answer could not be AutoKey.


What if in AES-128 CBC, IV is very related to KEY?

while digging into some secured communication protocol, I noticed a  usage of AES-128 CBC that raised my attention. In it, the IV is tightly coupled to the Key, being a xor of its values with the byte index:  for(i=0; i<16; i++) {   IV[i] = Key[i] ^ i; }    Could it be an issue if an attacker knows the first blocks of a plaintext? Does it weaken the implementation of the encryption?   Thank you in advance


How do you disable/enable Guest Sessions in GUI?

I am wondering if there is a User Friendly (GUI) way to enable/disable the Guest Session.  If not, is there a way to allow logged in users to create Guest Sessions, but not from the login screen.  I am aware of :     If you're using the default LightDM in Ubuntu 11.10, edit   /etc/lightdm/lightdm.conf so that it looks like this:      [SeatDefaults]   greeter-session=unity-greeter   user-session=ubuntu   allow-guest=false     Will this suit my fallback?


Independent trials that result in a success with probability p and a failure with probability 1-p are called Bernoulli trials. Let $P_n$ denote the probability that n Bernoulli trials result in an even number of success (0 being considered an even number). Show that $P_n=p(1-P_{n-1})+(1-p)P_{n-1}$ $n \ge 1$ and use this to prove (by induction) that $P_n=\frac{1+(1-2p)^n}{2}$  So $P_n$ denotes the probability that n Bernoulli trials result in an even number of successes p = probability of success p-1 = probability of failure  $P_n=p(1-P_{n-1})+(1-p)P_{n-1}$ $n \ge 1$  I can see that the first part of the equation is the probability of success multiplied by the probability that n-1 trials result in failure, plus the probability of failure multiplied by probability that n-1 trials result in success.  But I don;t know how to show this mathematically..  So I think for the second part, for induction I need to start with the base case, n=1: $$P_n=p(1-P_{n-1})+(1-p)P_{n-1}$$ $$P_1=p(1-P_{1-1})+(1-p)P_{1-1}$$ $$P_0=p(1-P_{0})+(1-p)P_{0}$$  Then I get kind of stuck, well..$P_0$ is probability of n=0 trials, so would that be 0? $$P_0=p(1)=0$$  Then for induction, I need to show that n+1 is true right?


html markup:  <input id="fileSelect" type="file" id="file" name="files[]" multiple="multiple" accept="image/*" />   I am uploading multiples files with php. I want to make an array of upload files and send to server with ajax. how to make an array of the multiple selected files?  JavaScript:  jQuery.ajax({     url: 'insertfiles.php',     type: "POST",     data: {       file: // array of selected files.     },     success: function(data){     },     error: function(data){       alert( 'Sorry.' );     } });


Does "has been employed" imply they still are employed?

Mr. Smith has been employed by our company as engineer since 1st March 2015.    Does this mean Mr. Smith is still being employed by the company?


Let $f(z)$ be analytic in the disk $|z|<R \ \ \ (R>1)$ except for a simple pole at a point $z_0$, $|z_0|=1$. Consider the expansion $f(z)=a_0+a_1 z+ \cdots$, and show that $$\lim_{n \to \infty} \frac {a_n} {a_{n+1}}=z_0$$   All my attempts failed. I wanted to use the Laurent series at $z_0$ but the problem needs expansion at $0$.


How can I update BASH? I noticed that there are version 4.2.45  env x='() { :;}; echo vulnerable' bash -c "echo this is a test" this is a test  cat /etc/redhat-release CentOS release 5.11 (Final)  rpm -q bash bash-3.2-33.el5_11.4  yum update bash Setting up Update Process No Packages marked for Update


My bike wheel was recently stolen and I found this old Bontrager AT-550 wheel in my shed. It's a 29er from my research and I'm wondering what size tyre would fit that would be decently smaller than the current tyre. My bike is a hybrid with a 700cx42c back tyre and the front tyre is 29x2.2 and it would look ridiculous to have a big tyre in the front and small one in the back. I'm sorry for mixing the units the measurement but I'm new to this and would appreciate some help. Thanks!


When an arbitrary point belongs to a given pyramid?

Suppose that we fix points $a,b,c,d \in \mathbb{R}^3$ which do not belong to the same plane.  How can we check algebraically whether $x \in \mathbb{R}^3$ to their convex hull?


Intending to use latex-vim's autocompletion environment feature, I hit f5, typed in "definition" and was greeted with  \begin{definition}   \end{definition}<++>   What does <++> mean?


A random question came to me, which looks something like this :  Is there such a thing as a "finality" of mathematics ? What I mean is can we imagine a time where there would be no more mathematics to discover-invent  ?? (can we invent without any limit?)  Thank you!


How can an NFC battery's NFC functionality be used on Android devices?

My Samsung Galaxy SIII comes with a battery with an Near Field Communications (NFC) label on it. Several earlier Android modles don't come with such a label on the battery. I would like to know what the NFC functionality on the battery enables Android devices and their OS to do with the battery.


Does the Replace Windows X with Ubuntu option in the installation setup replace a single partition or the whole drive

In the Ubuntu installation, when the user gets to the part about selecting which method to use to install Ubuntu, the user will find several options like the ones shown below:    If the user already has Windows on the computer, will selecting "Replace Windows X with Ubuntu" modify the partition where Windows is installed or will it format the whole drive.  There are several doubts regarding this, from other letters (As in Windows D:, E:...) deleted because they were in the same physical drive to not reading the other partitions because of the same reason.


Not able to hear voice but can hear music in YouTube

I was trying to watch some video in YouTube today. I am not able to listen to what they are speaking. But whenever some music come up I am able to hear it. Why is this?  (I am using Firefox if it’s relevant.)


Trying to delete .cap, .csv files but i get an error

I need help on my kali linux.  I tried to delete these files  1186047 -rw-r--r-- 1 root root 19717377 Sep  5 17:54  -01.cap 1186032 -rw-r--r-- 1 root root      576 Sep  5 17:54  -01.csv 1186040 -rw-r--r-- 1 root root      598 Sep  5 17:54  -01.kismet.csv 1186044 -rw-r--r-- 1 root root     3863 Sep  5 17:54  -01.kismet.netxml   from my desktop using the rm command but it refused. I also tried to change the permission using chmod and other command but refused.


Let $T : V \rightarrow U$ be a bounded map between two normed spaces.  Let $T^* : U^* \rightarrow V^*$ be defined by $T^*(f) = f\circ T$ for all $f\in U^*$ (the adjoint map).   My Question: If we identify $V$ and $U$ with their canonical images in $V^{**}$ and $U^{**}$ prove that the restriction of $T^{**}$ to $V$ coincides with $T$.   I think I want to try and use the canonical mappings $V \rightarrow V^{**}$ and $U \rightarrow U^{**}$ but I am not entirely sure what the canonical images would be. The restriction would be $T^{**}\cap V$ and I am not sure where that comes into play...  I would really appreciate some help on this proof. hank you.


Why my DCIM folder is empty seen in the computer but not empty in the phone

I am using HuaWeiNova device, and I tried to access it with aft-mtp-cli. $ aft-mtp-cli $ ls DCIM/  I got folders listed here: |-photos |-Camera ....  When I tried to list or download my photos in the Camera/ folder, I got nothing. Only the empty folders are listed and the folders that contains files are not shown at all. I am quite sure my photos are stored in the Camera folder in my cell phone. How come I could not access my photos with my computer ?


How to tar a file from the specific directory in linux?

pwd:  /home/xxx    File present in:  /home/a/b/c/d/e/   Here I want to tar a directory "e" in pwd (i.e xxx folder).  I tried like this  tar -vcf tarfile.tar /home/a/b/c/d/e/   But the problem is it compressing all the directories like (/home/a/b/c/d/e). But I need directory "e" should be compressed.


Why does a=0; let a++ return exit code 1?

Try it:  $ a=0 $ let a++ $ echo $? 1 # Did the world just go mad? $ echo $a 1 # Yes, it did. $ let a++ $ echo $? 0 # We have normality. $ echo $a 2   Contrast with this:  $ b=0 $ let b+=1 $ echo $? 0   And this (from ):  $ c=0 $ let ++c $ echo $? 0   What is going on here?  $ bash --version GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)


Ok, so this is code:  \begin{table}[t] \caption{random123} \label{name} \begin{tabular}{|r|l|} \hline  test1 & test2\\ \hline test3 & test4 \\ \hline \end{tabular} \end{table}   And this is how it looks like and what I want to achieve:    Any ideas how can I achieve similar result?  Thanks in advance for help!


How to insert bash variables in awk (for example i need to do in in some for loop - like this: in first iteration use awk to search string by first column, next by second column and so on with using diffent pattern from bash variables in awk)   or   find the simple way to make pattern at all (as string) and recieve it to awk as argument.     Trying to insert bash variables in awk -  I have some log -  $ cat > log test1 test2 ahaha hahah   i do  $ cat log | awk '$1~/test1|test2/ {print }' test1 test2   all ok  i need to paste bash variables in awk  $ a=test1 $ b=test2   then i try to insert  $ cat log | awk 'BEGIN{a;b} $1~/a|b/ {print }' ahaha hahah  $ cat log |  awk -v a=test1 -v b=test2 '$1~/a|b/ {print }' ahaha hahah     How to make all patern as string and recieve it to awk as argument -  $ p='$1~/test1|test2/ {print }'  $ cat log | awk p # get test1 # get test2


Sci-Fi novel where Earth is taken over by a race called the Cateni(?)

Does anyone know the name of a novel (part of a series, I think) about Earth being taken over by a race of aliens called the Cateni or Cat-something.  Some human people and a renegade from the alien race are exiled on another planet.


Does voltage drop occur with zero load and zero resistance

Imagine a circuit consisting of just a battery and conducting wires which have zero dissipativity so that there is no loss of energy( Zero resistance). If the wires are connected to both terminals the current will flow in the direction of lower potential. Can we say that there has been a voltage drop in the current in going from positive terminal to negative terminal? I asked this question because  voltage drop happens across resistor and I don't understand why it should occur only there. Because  I think, considering a positive test charge its electric potential should decrease  as it travel from higher potential to lower potential  whether any dissipation occurs or not.Does voltage drop refers to loss in total energy of electron i.e. because in this case KE + Electric potential will be zero and the total energy of electrons remains unchanged and thus we can says that voltage drop is zero. Is voltage drop(assumed here to mean loss in electric potential) equal to work output under normal conditions. I think no - because electric potential difference gets converted into kinetic energy of electrons out of which only some gets converted into heat or is it the case that in a resistor entire kinetic energy gets converted into another energy such as heat? Is electric field inside circuit constant? If yes how? Will not the shape of circuit matter?


How to reproject data from [-180 180] to [0 360]?

I have both a GeoJSON and shapefile of volcanoes along the Pacific Ring of Fire. The area I want to render in the map is right around the antimeridian, so Leaflet cuts it in half. I initially tried to use  to wrap the data, but this was messing with the styling so I thought I would try and reproject the data itself in QGIS.   What is the best way to go about this? Duplicate the data and add 360 to each of the longitude values, or is there a more elegant solution?  I don't believe this is a repost, since most of the questions I've seen are asking how to reproject [0 360] to [-180 180].


How do I use regexes properly in the matches() function (java)?

I am trying to make a registration form in Java that accepts a string in the form of: ok@ok.ok, right now, I have -   (email.matches("[^a-zA-Z0-9]+")   which I need it to also accept @, _,-,. symbols but am unsure how to add it into the regex shown earlier.   As well as this I am aware that there is a way to separate to accept an amount of characters, and then read a specific symbol, (in my case it would be "@" and "." for the email) but am unable to implement it, something along the lines of   (email.matches("[^a-zA-Z0-9]{1-99}[1][@][^a-zA-Z0-9]{1-99}[1][.][^a-zA-Z0-9]+")   Thanks


Boolean Not Working Properly (Partial Cuts)

I'm trying to make a click pen mechanism, where a piece in the center of the cylinder in 1 spin locks in place, and in another spin it slides into one of the slots.  I need to cut out part of a cylinder with the 2 other objects. Thing is when I try to do it, only 1 object successfully cuts the cylinder, and the other object either does nothing or cuts only 1/4 of the cylinder... And what's weird is the 2nd object is just a duplicate of the first one. I removed all doubles from all objects and the cylinder, recalculated normals,  applied rotation and scale, tried flipping normals, still no progress...  This is working Boolean cut with first object   This is the part where it just doesn't work or works weird/half way (with the second object). It's the duplicate of the first object and some why it doesn't work and I don't understand why...  Edit: Forgot to mention, I also tried joining/merging both objects together and removing dupes, still doesn't solve the problem sadly:   I would be very happy for help! Thank you in advance!  Blend File:   I also checked other threads and non of them had an answer for my specific problem.  Anyways, I got to a solution but this question got closed so I couldn't answer it. Here's how I did it: I couldn't really find a specific "right" way to fix the problem. But I used lemon's suggestions. What I did is I set both booleans to "Carve" instead of "B-Mesh" which did cut most of what I needed, just left some faces and added some edges in the middle of faces and and random vertices. After I applied the booleans I just manually deleted all the edges and random vertices and the left-over faces and remade the faces that needed to be remade. I hope this answer helps anyone in the future! Thank you !


Enumerate with alpha counters like 'aa', 'ab' etc

When having a list like: \documentclass[twoside]{book}  \RequirePackage{enumitem}  \begin{document}  \begin{enumerate}[label=\alph*,start=25] \item an item \item an item \item an item \item an item \item an item \item an item \item an item \item an item \end{enumerate}  \end{document}  we get the error: ! LaTeX Error: Counter too large.  See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help.  ...  l.23 \item a             n item  due to the fact that the counter exceeds 26. When having e.g. HTML the numbering would be like: y, z, aa, ab, ac, ad or at least wrap around back to a? Does something like this exist in LaTeX as well?


I am using Ubuntu 14.04 as a virtual machine. During installation of a previously installed library in the terminal, I found I have 274 packages not upgraded.  How do I upgrade them?  Do I have to upgrade them one by one?


Unable to use Android app on MSE/MSO after split

On the Android app, when I click to add a comment, I'm prompted to join MSE. Clicking Join gives me an error message that I'm already a member. Further, MSE does not show in the list of sites when I create a new question.    Also, no tags are showing when I type them in to a new question on MSO, in the search results. Typing them manually and clicking Done results in them being removed, preventing me from asking a question.


I can access my user profile, and view all the tabs execpt for the inbox one. I get the "Oops! Something Bad Happened!", and a cute panda falling off a slide. The url bar shows this:  It isn't just the profile page link that is broken, it also the Chrome notifications - I get them but clicking on them takes me to the error page as well.


A borderline between on-topic questions and questions about library recommendation?

I have a consideration about new off-topic close reason:     Questions asking us to recommend a tool, library or favorite off-site   resource are off-topic for Stack Overflow as they tend to attract   opinionated answers and spam. Instead, describe the problem and what   has been done so far to solve it.   For example take that question:   It has a close vote with the reason above. But if it would be formed     How to zoom image in an absolute position div to the side?   The answer would be probably also a jQuery plugin or javascript library, but it would follow the patter of most questions about jQuery.  Take that question:   This is the good question about real-life problem. The answer is to use a maven plugin. It is correct, there's no need to reinvent the wheel or rediscover the America.   But  I'm afraid the off-topic text could be misleading and could be misused to close such a questions as that about maven simply because a tool, library or plugin is the answer.   Is it a new guideline that the questions such as cited above should be banned, no matter how they are formed (this would make most how-to-do-in-maven/jquery) questions illegal? Or the close reason should be changed to make more clear what the guidelines are (it's not clear to me now)?


I have a question arising from chapter 3, page 41, in Switzer. He says "Note that every homotopy equivalence (in $\mathscr{T}$ [this is the category of topological spaces]) is a weak homotopy equivalence." This statement suggests that there are topological spaces which are weakly homotopy equivalent but not homotopy equivalent. Can anyone give an example of two such spaces?   Also, you could infer from his statement that in some other category there might be homotopy equivalences which are not weak homotopy equivalences. Is this true? That is, are there categories such that H.E. $\not\Rightarrow$ W.H.E.?


Acceptable length of url to be stored as unique MySql/PHP

I want to store url's as unique in a mysql database table but with string type varchar and text the length of a 1000 is too long. Lengths of Search engine friendly url's can be typically long,whats an acceptable length?


If all derivatives of $f$ are uniformly bounded by a common constant and $f(1/n) = 0$ for all $n$, is $f$ identically zero?

$$ f: \Re \longrightarrow \Re \ \in C^{\infty} \\ \exists \ L>0: \ \forall x \in \Re, \forall n\in N \\ |f^{(n)} (x)| \le L \\ f(\frac{1}{n})=0 \ \forall n\in N \\ f(x) \equiv 0  $$  Good morning,  Can you give me an help to make this proof?  This is my thought:   $\lim_{n \rightarrow +\infty } \dfrac{1}{n}=0=\theta$ $f(\theta)=0$ $f^{(n)} (\theta) =0\\f(x)=\sum_{k=0}^n \dfrac{f^{(k)}(x-\theta)^k}{k!}$  $f$ is analytic, the rest of Taylor's expansion is 0, because the derivatives are bounded, $f$ is null.   I have thought this reasoning, but I have difficulties to demonstrate part 3. Can you help me?  Is there any mistake?  Can I use an easier way to make the proof?  Thanks.


What do you call your grand-father's brother? (grand- v great-)

Your father's father is called your grand-father, yet your father's uncle is typically called your great-uncle (or so it seems with anybody I converse with). Why the inconsistency?


Removing all punctuation marks in python

I need to remove all punctuation marks in the string, as a part of bigger program.  It is working when I write it serepatly for each mark like this:  words = [word.replace(".", "") for word in words]   But when I am trying to do it in the loop, it is not working.   line = "I was going to leave her, but in the very last moment I had changed  my mind. Interesting thing, many nice ways to use." words = line.lower().split() for punc in [".",","]:     if punc in words:         words = [word.replace(punc, "") for word in words] print words   Can you please tell me, what I am doing wrong?


How to restrict ssh client to connect with SSH certificate only and issue an error instead an interactive login prompt?

Imagine the following situation: you want to login with a SSH certificate to a remote system, but as it does not accept the certificate, you get an interactive prompt.  Like this:  ssh -o StrictHostKeyChecking no -t -i /tmp/.ssh-cert username@host whoami username@host's password:    What happens then, the interactive prompt remains there for some time until the remote host would decide to drop the connection.  Question: how to automatically recognize this situation, so that instead of idling with the prompt, local SSH client issues an error?


I am an Indian citizen living in UK on a tier 2 visa. Recently, I have received Short stay Schengen visas (multiple entry, business trips for 1 year) for travelling to France. (Applied at French embassy Edinburgh)  Unfortunately, the tickets I have provided in my visa application needs to be cancelled as my business trip got cancelled. And I will be travelling for business probably after 4 months.  So, for now, I am planning my first entry to France for tourism purpose.  Is it okay to travel with Short stay Schengen visas (business) for tourism purpose for the very first entry to France?   I am worried because my itinerary provided for visa application is changed now. And moreover it is now for a tourism purpose.


I am trying to install the MinionPro package. I followed the instructions on CTAN and tried running the test:  \documentclass{article} \usepackage{MinionPro}  \begin{document}  test  \end{document}   I don't get any output, only an error message:     name = MinionPro-Regular-Base-aa, rootname =   MinionPro-Regular-Base-aa, pointsize = mktexmf: empty or non-existent   rootfile!      Cannot find font MinionPro-Regular-Base-aa in map file(s).   I'm at wit's end. Do you know what might be behind this error? Thanks!


Prove that a function whose derivative is bounded is uniformly continuous.

Suppose that $f$ is a real-valued function on $\Bbb R$ whose derivative exists at each point and is bounded. Prove that $f$ is uniformly continuous.


I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little worried, as I was able to dd from the disk to the image in about 7 hours.   I'm running OSX 10.6.6 on a MacBook with a Core 2 Duo at 2.1ghz/core with 4gb RAM. I'm reading from a .dmg on a 7200rpm hard drive (the boot drive), and I'm writing to a 7200rpm drive connected over a SATA-to-USB connector. I left the blocksize at default, and the image is about 160gb.  EDIT: And, after 14 hours of pure stress, the dd worked perfectly after all. Next time, though, I'm going to run it through pv and track it with strace. Thanks to everyone for all your help.


Hypothetical about Voldemort's usage of owls to find people

We know that Owl magic can get around even the most powerful spells, and owls will deliver a letter to its intended recipient, even if the sender gives very little details on who they even are. Hedwig was even able to find "Snuffles" correctly despite Harry not even telling her who "Snuffles" actually was. She just delivered her letter, as a good owl should.  Given that, I was wondering about the viability of Voldemort using owls to find the order. I know it's "not his style" or whatever, but generally authors at least give some reason as to why such an obvious and simple plan wouldn't have worked.  So my question is this: Given what we know about Owl magic, would Voldemort have been able to get a parliament* of owls and say to them:  "Go and find the members of the Order of the Phoenix."  Then follow them to victory?  I don't imagine they'd even have to go very far for the first one either, because one of the owls would of course just fly about 10 feet and land in front of Snape.  Also, just to clarify, this is not a question about what Voldemort would or (probably) should have done, it's just whether or not he could.  *Yes, the collective noun for owls is called a "Parliament".


Please explain the output #define swap(a,b) temp=a; a=b; b=temp; int main( ) {      int i, j, temp;     i=5;     j=10;     temp=0;     if(i>j)     swap( i, j );     printf( "%d %d %d", i, j, temp);  }  output:10 0 0 #define swap(a,b) printf("%d %d %d\n",temp,a,b); temp=a; a=b; b=temp; int main( ) {      int i, j, temp;     i=5;     j=10;     temp=0;     if(i>j)     swap( i, j );     printf( "%d %d %d", i, j, temp);  }  output:10 5 5 //only difference between first and second code is printf statement in the directive part and second code doesn't print twice


I need to find moments of vibrating string and I think that transfer function could be useful for this, but I don't know transfer function of vibrating string. Can someone give me some idea how to find it?


What size should the HMAC key be with SHA-256?

I'm trying to generate a secret key to be used for HMAC SHA-256 signature processing. I've seen many sample of keys with variable length from 32 characters to 96 characters.  What is the ironclad rule for this key size?


How can $\hat p = - i \hbar \partial_q$ be derived starting from the definitions of $\hat q$ and $\hat p$ in terms of creation/destruction operators?

Consider the position and momentum operators $\hat q$ and $\hat p$, defined respectively in terms of creation and destruction operators in the usual way: $$ \hat q = c (\hat a + \hat a^\dagger), \qquad \hat p = \frac{i\hbar}{2c} ( \hat a^\dagger - \hat a), \tag 1 $$ for some constant $c$, where $\hat a$ and $\hat a^\dagger$ satisfy the canonical commutation relations: $$ [\hat a, \hat a^\dagger] = 1, \qquad [\hat a,\hat a] = [\hat a^\dagger, \hat a^\dagger] = 0. \tag 2$$ If follows immediately that, as expected, $[\hat q, \hat p] = i \hbar$.  My question is now: starting from these definitions of $\hat p$ and $\hat q$, how can I derive the common relation $\hat p = -i \hbar \frac{\partial}{\partial q}$, or some equivalent version of this relation? In other words, how can I compute the value of $\langle q | \hat p| \psi \rangle$, or equivalently of $\langle q| \hat p | q' \rangle$?  If I try to simply compute this using the definition of $\hat p$ given in (1) I get nonsensical results, I'm gessing because of $|q \rangle$ being not normalized eigenstates. What method should then be used in this context?


Map.containsKey is not working correctly

I have the following code:  List<Lead> lList = [select id, email, company from Lead]; Set<String> aSearchSet = new Set<String>();     for (Lead l : lList) {       aSearchSet.add(l.company);     }  Map<String,Account> companyToAccountMap = new Map<String,Account> ([select id, Name from Account where name IN :aSearchSet]);   for (Lead l : lList) {              if (companyToAccountMap.containsKey(l.company)){                  system.debug(LoggingLevel.INFO, l.company + ' exist');              } else {                 system.debug(LoggingLevel.INFO, l.company + ' does not exist');              }              }   It just tells me the Company does not exist  The companyToAccountMap has the following data:   (Account:{Name=My First Company,  Id=001Z00e000evIAG})  (Account:{Name=My Second Company, Id=001Z00e000eIAG})  (Account:{Name=My Third Company,  Id=001Z00w000ePEAG})  (Account:{Name=My First Company,  Id=001Z00s000evIAG})   When i use:  companyToAccountMap.containsKey(inquery.company)   I always get false   And im printing out the inquery.company  And it has 'My First Company', 'My Second Company', ...etc  Does anyone know why?


In the attribute table I can use this expression  left(   "CODE" ,1)='E' or left( "CODE" ,1)='W'   to select features successfully, but when I try to use the same expression in the Properties, General, Query Builder window, to display a subset of features on the map it gives an error:      SQL Expression Parsing Error: syntax error, unexpected LEFT   Is there an alternative syntax I can use in the Properties dialog to achieve the same?


I am a noob to Linux. I installed Ubuntu desktop version 18.04.is it possible to install server on the desktop?Should I remove the desktop version? any suggestions, please


regex to match pattern of file of specific record

I'm having files like given below I want to validate my file if first line is having "ZZ=" and third record is having only "XXX"  If this pattern doesnt match am rejecting file.    File example  ZZ=101 OO XXX 111111111111 222222222222  00000000000 AAAAAAAAAAAA   valid file example   ZZ=101 OO XXX 111111111111 222222222222  00000000000 AAAAAAAAAAAA   Not valid file   ZZ=101 OO XSS  (should be rejected except XXX) 111111111111 222222222222  00000000000 AAAAAAAAAAAA   Not valid file   HH=101 (should be rejected except ZZ=) OO XXX  (should be rejected except XXX) 111111111111 222222222222  00000000000 AAAAAAAAAAAA   Is there any way I could use regex to match this pattern?  Any suggestions please..  Thanks !!


How to leave deb files in cache after installing? APT::Clean-Installed "0" has no effect

I have an HDD installation that has spare space and I would like it to be a backup deb archive. But even with APT::Clean-Installed "0"; in apt.conf and verified with apt-config dump all newly-installed packages are deleted from /var/cache/apt/packages/.  APT::Periodic::AutocleanInterval "0"; so it should be disabled. And I can download installed packages with apt-get download but I want them to be kept, not removed right after installing.


Prove series $\frac{1}{x\ln x}$ diverges

Prove series $$\sum\limits_{n=2}^{\infty}\frac{1}{n\ln n}$$ doesn't converge without integral test. I really don't know any hint for $\ln n$. So I understand I have to show $$\frac{1}{n\ln n} > \frac{1}{x^b}$$ where $b<1$. But I really don't know how


Calculating acceleration offset by Center of Gravity (C.G.)

I'm trying to calculate the acceleration an accelerometer would read NOT placed in the Center of Gravity of the object. Let's look at the figure below (or in link provided). The accelerometer was placed in location $(Xa,Za)$ and not in the CG of the object. Given that the accel's output is a_x and a_z at this location (Xa,Za). What would've the accelerometers have read if placed on the C.G. of object?  [IMG]  Here is an attempt at the solution () however I don't fully understand how they got the transformation matrix.   How does q_dot come into play in the calculations and how does alpha (angle) disappear in the matrix?


Can we increase the filters of what is posted on these sites to prevent extreme NSFW?

This isn't a regular, let's stop curse words post. Please read on. This post was precipitated by a report that came to my attention from the  in  which is a bot that, I am grateful, alerts users to possible spam and abusive posts on the site. This post could easily have been filtered out on the keywords alone, let alone how they were put together. This is a link that will not be able to be observed by most people WARNING: NSFW, de-linkified to avoid accidental clicking. parenting.stackexchange.com/questions/24995 It is so offensive it really caused pain for the handful of people who read it. It is taking a while to recover. This post is at the very least a fantasy of written child pornography, at the worst a story of horrific child abuse. I had difficulty finding someone or enough people to flag it to delete it. Which leads me to the question. Can we increase the filters of what is posted on these sites to assist in preventing this kind o f thing occurring again rather than wait to be alerted to it after the fact? This post isn't about preventing curse words on the site, it's about setting a filter to prevent extreme NSFW and material that is so abhorrent it should not be too difficult to filter. As the post I am using as an example, would have been relatively simple to filter on. Or at least make the poster task of posting such matter more difficult. Within the content of that post there were multiple words and phrases that could easily be flagged and especially when put together in such number, there is no reason such content should make it on the site. At least if content needs to be re-written in such a way that it is not so graphic, it will assist in keeping the site cleaner from the outset. FYI I am forwarding a link to this post and the parenting post to SE employees for forwarding to the appropriate authorities.


Where is the correct place to place adverbs in sentences?

I am always confused about where to put adverbs in sentences. For example, consider the questions below:        Why did they target us specifically?   Why did they target specifically us?   Why did they specifically target us?      I believe all these sentences mean the same. Am I correct? I am always confused about where to put adverbs such as always and specifically, etc. Is there a particular grammar rule for this?  Funny, you see, I can even form the above sentence in different ways.         I always confuse where to put this kind of adverb   Always I confuse where to put this kind of adverb


We could imagine a simple electronic circuit composed by a power source and a resistor.   It is usual find descriptions as "The moving charged particles in an electric current are called charge carriers. In metals, one or more electrons from each atom are loosely bound to the atom, and can move freely about within the metal. These conduction electrons are the charge carriers in metal conductors." (wikipedia ). That made me imagine electrons going from power -, running by the wires, crossing the resistor and returning to power +, where they suffer a new kick to power -. All that at near the speed of light.  In this model, it is easy to define "electrical current intensity" as proportional to the number of electrons per second that cross one specific point of the circuit.  However, looking for the physics of resistivity, I can read the phrase "The actual drift velocity of electrons is very small, in the order of magnitude of a meter per hour." (wikipedia ). This is a complete different point of view, where electrons are more or less fixed around a fixed position (or moving very slowly), an electricity is a wave of "collisions" or "jumps" of electrons, like in a Newton's cradle (or "do the wave" as public in a football match). Obviously, we do not need severals hours from the switch on to the light on.  So, the question is, do electrons move around a circuit ? References to band theory are welcome.  A related question is: if electrons doesn't moves along the circuit, what is "electrical current intensity"?  Note: I known there are similar questions already posted, but answers of the ones I've read are not very detailed (could be I've not found the best ones). Please, be a few patient before "close vote".


Do satellites need to have their orbits externally maintained?

Is the speed of a satellite self maintained ? Or it needs anything to be done externally ?  Condition : The satellite is in the orbit where it is held in equilibrium by the force of gravity and its centrifugal force.


As you can see below, calendar applet does not show day in week, which I remember was not the case before. Is this a glitch or did I somehow manage to disable it somewhere in settings?


Fermat's Last Theorem with negative exponent

FLT says that the Diophantine equation $a^n+b^n=c^n$ isn't satisfied by any triplet $(a,b,c)$ where $n\in\mathbb{N}$ and $n>2$.  But what happens if $n\in\mathbb{Z}$ and thus can be negative?   $\textbf{My first thoughts:}$ If we have a negative exponent coupled with a real $a^s$ we can re-write it as $1/a^{-s}.$ So if $n\in\mathbb{Z}$ then the FLT equation takes the rubbish form $$\frac{1}{a^n}+\frac{1}{b^n}=\frac{1}{c^n}$$ which means $$\frac{a^n+b^n}{(ab)^n}=\frac1{c^n}$$ $$\frac{(ab)^n}{a^n+b^n}=\frac{c^n}1$$ $$(ab)^n=(ac)^n+(bc)^n$$ $ab$, $ac$ and $bc$ are all elements of the integer set commonly denoted as $\mathbb{N}$, we thus arrive at a Diophantine equation that is equivalent to the first one we've seen. Therefore the Diophantine equation $a^n+b^n=c^n$ isn't satisfied by any triplet $(a,b,c)$ where $n\in\mathbb{Z}$ and $\mathbf{\color{red}{|n|>2}}$ where $|x|$ is the absolute value of the number $x$.  Is my proof correct?  Furthermore, what happens when the triplet $(a,b,c)\in\mathbb{Z}^3$?


How to refer to several titled individuals, "Mr x,y,z PhD"?

How does one abbreviate "Mr Adams PhD, Mr Benson PhD, Mr Charles PhD" to use just one salutation and one title.


Finding areas of overlap using ArcGIS Desktop

I am going to have about 300 shapefiles representing the range of different species in the wild. What I want to be able to do is find areas where the most species occur to highlight areas where many of these species exist.  Is there a simple way to do that in ArcGIS Desktop 9?


Can I use weapons and old abilities when True Polymorphed into an ancient brass dragon and then using Change Shape to turn back to humanoid?

If I am permanently turned into an  with  and then use the Change Shape trait to become a humanoid again, can I buy new weapons and use them? Can I use my class abilities and my spells like before?


Java: The subclass seems to have inherited the superclass' constructor? Please explain the output

Here we have two classes, TestA and TestB.  TestB is a subclass of TestA.  The output of this program is 8, but I don't understand how it reaches this output because from my understanding it makes more sense for it to be 6.  I ran the program and found that whenever TestB is invoked, it visits the constructor of TestA before it executes its own constructor. This doesn't make sense since subclass should not inherit the superclass' constructor.  Can someone explain why this is happening? Thanks!  public class TestA{     static int x;     static TestA a;     static TestB b;      TestA(){         x++;     }      static void runTest(){         a = new TestA();         b = new TestB();     }      public static void main(String[] args){         runTest();         runTest();         System.out.println(a.x + b.x);     } }  class TestB extends TestA {     static int x;      TestB(){         x += 2;     } }


PHP days calulation between two dates including leap year day

I am trying to calculate the days between two dates but if I select dates between before 29 Feb or after 29 its coming ok but if I select date between before 29 and after 29 then its giving me wrong days. Here is my code please check how can I fix it ?  $daylen = 60*60*24; $date1 = '2016-01-01'; $date2 = '2016-03-31'; $numberDays =(strtotime($date2)-strtotime($date1))/$daylen;


On the possibility of lead acid battery recoverability

I have a 6 V 4.5 Ah lead acid battery which I did not charge for the last 6 months. Now the battery voltage fell to 3 volts and then I charged it for 24 hours at 50 mA. Now when I measure the voltage it is shown as 6.37V which is the nominal voltage which then decreased to 6.1 volts in half an hour. Another thing is that it started gassing above a charging voltage of 6.7 volts.  My question is does these symptoms mean the battery is not recoverable? Or does it take a few more charge discharge cycles to attain normal capacity?


Group subfigures with vertical and horizontal labels in Latex

How can I group a set of figures like in the image? I found some example with vertical labels (Type 1, Type 2, Type 3), but I also need to include head (horizontal) labels (Type A, ...). How do I refer to any of the sub-figures in the text?


Why do we use Gaussian distributions in Variational Autoencoder?

I still don't understand why we force the distribution of the hidden representation of a Variational Autoencoder (VAE) to follow a multivariate normal distribution. Why this specific distribution and not another one ?   This is maybe linked with another question : Why is the weights distribution in a neural network following a Gaussian Distribution ? Is it just the application of the Central Limit theorem that tells you that many independent inputs will generate many independent errors, and the observed weights are the results of these multiple back-propagated signals... ?


If there is sphere rolling on the horizontal surface without slipping. Then we know the instantaneous axis of rotation is the point which is in contact with surface. Now my doubt is, why the angular velocity taken from centre of sphere and IAOR is same ?   Please someone help me.


When is it correct to use the form "I did want to ..." versus "I wanted to..." (substitute other verb for "want"). I often find myself changing from the former to the latter when I edit early drafts, but sometimes the former seems to better emphasize my "wanting".  EDIT: Part of my curiosity was that this has the feel of a slightly different tense, but it is not. The discussions in the following, which I found rather indirectly via the ELL meta site, are more what I was looking for.


Applications are launched too far left on the screen

I have Ubuntu 18.04 LTS 64bit running on a Toshiba laptop.    About a week ago, some applications, e.g. Firefox, Aisle Riot Solitaire, KPatience, XTide tide predictor etc. when launched have the top left corner of the window too far up and left, partly hiding them under the quick launch icons on the left of the screen (i.e. under the Ubuntu Dock).    This makes them difficult to use and the window can only be closed by using the 'Quit' option from the quick launch icon on the left of the screen.  Other applications such as Libre Office, OpenCPN, GNU Image Manipulation Program etc behave normally.   What is happening here and how to fix it?


turn data off, on android Samsung note 4

what should I do,not to use up my data limit on my Samsung note 4, what steps I need to know to do that?


Allow to flag a question for closure without casting a vote if I'm out of close votes

This is not a duplicate of  because that is a support question asking if one can use moderator attention flags to indicate that questions should be closed. This is a feature request asking for the ability to use recommend closure flags (which feed questions into close review, and don't go to moderators) when one is out of close votes.  Currently, flagging for closure  for users with the . From what I can see, this is basically for users' convenience - if I think the question should be closed, there's hardly ever a reason not to cast a vote if I can.  I cannot see however why I cannot still use a flag to nominate the question for close review - since this won't include casting a vote - same as if I didn't have the privilege.  This goes for all close reasons, including .  If a vote creates a review item, why not consume both a flag and a vote? This will mitigate the cumulative effect referred to in  and is quite logical: flags are used to create review items while votes to vote on them.  It's also very strange that users with <3,000 reputation can add dozens, if not up to 100, questions to the close vote queue (provided their flagging history is excellent, and this number can increase quickly since a single close vote results in the flag being marked helpful), but when a user earns 3,000 rep, they're all of a sudden limited to adding only 24 questions to the queue.  Related discussions:    (considered flagging for moderator attention instead which is obviously a no-go)


What do you call a group of people that move a lot?

I can't think of the word to describe it. Something similar to "wanderer" or "roamer".   It's often used to describe people that don't stay in one place... not "migratory"...


Why shouldn't I care what model/make/year my bicycle is?

We often get questions on bicycles.stackexchange about identifying a bicycles manufacturer, model, make, and year.  Often these questions are downvoted or closed -- usually with a comment attached to them that it's not necessary to know the exact model/make/year of a bicycle if you want to fix, repair, or ride your bike. Why should owners not care about the model/make/year of their bicycle? Especially when it comes to less expensive bikes (aka BSOs) and BMX bicycles? This is intended as a canonical question that we can point closed questions to. Also see      (generally not helpful for identifying a brand/model)


I am looking for a measure to see if the model that I have used is predicting correctly. E.g., I created a model that uses multiple independent features to predict a dependent feature. The model that I show here is Support Vector Regressor (SVR), although I use other models. During the training, I obtained an R-Squared of 0.29 and during the test, R-squared is -0.67. SVR_model.score(X_train, y_train) -> 0.29 SVR_model.score(X_test, y_test) -> -0.67  I am looking for a measure that gives me a single value that helps me to evaluate if the model is predicting well or not.  What could be the reasons to have a positive R-Squared in the training and a negative R-squared in the testing? How can I say if this model is predicting well? What is the best measure to use? Root Mean Square, Adjusted R-Squared?


What are standard ways of writing the symbol ${\mathbb R}$ in handwriting?


Switch from path bar to location bar permanently in Nautilus

As most of you know, you can switch between the visual location entry, and the text based one in Nautilus, by hitting Ctrl+L.   When I tried to set this value permanently in gconf-editor, it doesn't exist. When I tried to do it via the terminal, this is the message that I receive:  No value to set for key: /apps/nautilus/preferences/always_use_location_entry  I can still switch between the two via the Ctrl+L, but I'm stumped about the fix.


I have found a  very similar to this, which I thought would solve my problem.   However, after changing my .htaccess file, with index.php on the end of the list, and then index.php as the only entry, I still cannot get index.php to display.  Every other page works fine, but I don't know how to fix this.  Thanks.


I understand the difference between String and StringBuilder (StringBuilder being mutable) but is there a large performance difference between the two?   The program I’m working on has a lot of case driven string appends (500+). Is using StringBuilder a better choice?


How does windows know to open a webpage when connecting to hotel wifi

So whenever I am in hotels (or other public networks) after I connect to the hotel network a browser window opens with a logon page or customer agreement.  How does Windows know to open a webpage when connecting to the network?


failed to find solution for one or more bones I cant parent armature to object in blender 2.9

I keep getting the error : "failed to find solution for one or more bones" when trying to parent rig to my character. I cant seem to find the problem, does anyone know what I can do?


Show that a given harmonic function has a specific form

Suppose $u$ is a harmonic function in $\mathbb{R}^n$ and satisfies  $$|u(x)| \leq C |x|~\forall x \in \mathbb{R}^n.$$ Show that $u(x)=q \cdot x$ where $q$ is a constant vector.  I'm struggling with this problem. I tried defining a new function, $v(x)=u(x)/{x}$ for $x \neq 0$ and using the given bound $C,$ that leads to a constant vector.  Being dividing by a vector, that couldn't be correct. My gut feeling says that this could be done using Maximum principle. Any help is much appreciated. Thank you.


Can't break blocks when I change my gamemode back to survival

I have been in survival and then I changed it to lan world so I can use cheats.  all the sudden, when I turn my gamemode back to survival I can't break blocks!!!! This has been happening for the past few months and I want to fix my world.  I do not like when this happens to me because then I can't play my own survival/hardcore game.  How do I change this random glitch in my world back to normal?


The code i am pasting is supposed to run the function exporting once on activation of plugin and then hourly. But it doesn't run on activation nor hourly. I do see it in the list of cron jobs that are scheduled.    register_activation_hook(__FILE__, 'my_activation');   register_deactivation_hook( __FILE__,'run_on_deactivate');     function run_on_deactivate() {    wp_clear_scheduled_hook('my_excel_event');       }   function my_activation() {  //exporting(); if i uncomment this line the function runs once wp_schedule_event( current_time( 'timestamp' ), 'hourly', 'my_excel_event');   }   add_action('my_excel_event', 'exporting');   I know my site is getting page visits, what can be the reason for function not running at all in wp_scheduled_event ?


Wifi unable to connect after upgrade to 17.04

I upgraded from 16.10 to 17.04 and although wifi is detected but it is unable to connect.  I tried to remove and reinstall drivers:  sudo apt-get purge bcmwl-kernel-source sudo apt-get install linux-generic bcmwl-kernel-source   But still it doesn't work. WiFi adaptor: TP-Link WDN 4200  lsusb result:  Bus 002 Device 005: ID 0458:003a KYE Systems Corp. (Mouse Systems) NetScroll+ Mini Traveler / Genius NetScroll 120 Bus 002 Device 004: ID 04f2:0736 Chicony Electronics Co., Ltd  Bus 002 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 148f:3573 Ralink Technology, Corp. RT3573 Wireless Adapter  Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


What is best release to use with old win xp pro machine?

I have a old Win XP Pro machine that I would like to install Ubuntu on and would like to know what is the best version to get as there are several releases available on Amazon, my go to store. Since this is a 2002 vintage machine I'm assuming one of the older releases is most likely to install without problems. I built this machine in 2002. It is a 32-bit, Intel P4-D845EBG2L mother board with Pentium 4, 2.2GH, Northwood 512K, Socket 478, 400MHz bus, CPU. It has 1GB of  memory, a ATI All-in-Wonder Radeon 8500DV, 64MB, DDR AGP-Retail, Video card. There are CD, DVD, Floppy and USB 2.0 drives. My goal is to learn Linux with the Ubuntu release. I have very little knowledge of Linux but have worked with Windows since the DOS days and am some what comfortable at the DOS (windows) command prompt. I admit to drinking the Windows Kool-Aid. Thanks for any assistance Greid


A word or a phrase that encompasses TV shows and movies

I want to think my friend for always providing me with quality TV shows and movies. In my native language there is a single word that describes both of those things. What is the English word or phrase?    ... for being a bottomless source of TV shows and movies? ... for being a bottomless source of quality television? ... for being a bottomless source of television entertainment? ... for being a bottomless source of visual entertainment?


Limiting the short circuit current of a power supply

I'm using a repurposed ATX power supply for my hobby projects since it's got 3.3/±5/±12 outputs, all of which are really convenient. But one thing I didn't really think about until I slipped my probes across the pins of an opamp, since I've always dealt with commercial/proper lab power supplies in my school labs, was that an ATX power supply will gladly deliver lots of current if that 12V line (or any other) is shorted to ground. The poor LM318 didn't stand a chance. My meter and supply survived, but in the interest of not killing anything in the future, myself included, I was wondering what the best option was for short/overcurrent protection?  I was thinking of sticking some high wattage resistors at the output of the supply before connecting them to the rails of my project breadboard (I use a separate breadboard with terminal blocks for power, which the ATX supply connects to). The problem is if I'm drawing a lot of current (LEDs etc) this will sag the voltage on the line. And, for example, if I use a 1W 200ohm resistor on the 12V line, it limits my current to only 60mA - if I want more, I need some really beefy wattage resistors. I can probably work around the voltage sagging by using a voltage regulator (eg at 10V), but this all doesn't seem like the best way to go about doing things.   I'd appreciate some input from someone more experienced than I am.


How to automatically reboot my pc every 3 hours?

My pc runs a program when it boots. Sometimes the program stops working after a few hours, but it will work fine when it reboots. So, I want to schedule my pc to reboot every 3 hours to prevent the program to be stopped. I'm using Ubuntu 14.04.  edit: The program doesn't stop, it just doesn't work with the maximum power of the pc but I need it to work with full power.


For basic understanding what is is constant of motion is constant of motion refers to constant motion?

I want to know the basic about  with basic examples.


Is a corrigendum necessary if a published result is discovered to duplicate an earlier one?

(cross-posted from math.stackexchange.com)  I found after publication of an article that a chunk of it was duplicated in a previous article written by someone else, and I'd like to know if I should take some action, like write a corrigendum just to add the other paper as another citation.  Perhaps some journals have a formal process to deal with this?  In my field, pure mathematics, it sometimes happens that people publish the exact same theorem, but the methods are distinct enough that the reviewer of the later paper views it as publishable because of its methods.  In my case, only one of four theorems in my paper duplicates earlier work, but the methods I use, while looking slightly different, would certainly be considered essentially the same as the earlier paper.  I suppose the best answer might simply be, "contact your journal and ask".  On the other hand, I have seen many times a result claimed as "independently" discovered in multiple papers, and I don't recall seeing a corrigendum or something in those cases.  Perhaps a notation on the research page of my website is sufficient?    As a follow-up, in mathematical publishing/culture, where is the line drawn between saying a result was "independently" discovered by multiple people and crediting all of them, as opposed to give priority to the one who was first?  Crediting all authors who gave substantially different proofs makes sense to me.  But what if two proofs use essentially the same idea?  (This question differs from     in that the both results, original and duplicate, have already published.)


Is subequations known to introduce vertical white space?

In this MWE, there is additional white space between the line of text and the following subequations environment. It disappears when I unload hyperref, when I remove the wrapping subequations environment, when I shorten the line of text, or when I append % to the line of text.  \documentclass{IEEEtran} \usepackage{amsmath,hyperref} \begin{document}     mmmmmmmmmmmmmmmi      mmmmmmmmmmmmmmmi     \begin{subequations}         \begin{equation}             X         \end{equation}     \end{subequations} \end{document}   But why does it appear in the first place, and can this be fixed?


As I was reading Charles Dickens' Oliver Twist, I noticed some irregularities in the spelling choices. Specifically, in several words beginning with a v, Dickens switched them out with a w. Here are some examples:  1. Vicious- Wicious     "this is them wicious paupers!"   2. Vulgar- Wulgar     "if I thought as any one of 'em had dared to lift his wulgar eyes to that lovely countenance--"   3. Vile- Wile     "Say it again, you wile, owdacious fellow!"   My question is the following: is this some archaic form of spelling? When did it fall out of style, and how did it originate?


Is there a word for someone who won't think critically?

Is there a word for someone who won't think through issues and instead comes to others hoping that they will think for them and solve problems for them?  A word that is more specific to a lack of critical thinking skills than "lazy"?


Why do you have to add ".0" to a SOQL where clause if the number is greater than 2^31?

Given a number field on Case, try to execute these SOQL queries:  SELECT Id FROM Case where NumberField__c = 2147483647 => works fine  SELECT Id FROM Case where NumberField__c = 2147483648 => fails with this error message:     MALFORMED_QUERY: from Case where NumberField__c = 2147483648 ^ ERROR at Row:1:Column:45 For input string: "2147483648"   It looks like SOQL interpretes numbers up to 2^31-1 (2147483647) as numbers, but numbers from 2^31 and greater as strings. To fix this, you can just include a decimal point (e. g. 2147483648.0), then they will be intepreted as a number.  Is there any documentation for this behaviour? I could not find any. Do you know why SOQL is built this way?   I consider this behaviour to be bad design. I just had an index increase over 2^31 and suddenly a query that has been working for years failed.


I applied online for a visa application to the UK. I'm from Sri Lanka. Yesterday I cancelled the appointment, I changed my mind. I will not go to the visa appointment. Now my question is how I get my refund?


Installed Ubuntu 20.04.1 LTS on USB key using Rufus. This seemed to go fine. When I boot from usb key on windows 10 machine I get a black screen and hear a 3 note chime...and then nothing- just a black screen.  Any help greatly appreciated. Machine is a bit older- came with Windows 7, but I wiped and installed Windows 10.  900 GB free disk space; 4 GB RAM


How to find a lost Ark Survival Evolved Tamed (Non Dead ) Dino?

I was on the beach with my best dino, he was set to neutral and to not follow, however I don't remember where I died. He's still alive but I can't find him. Any help?


Often times chatrooms can get overrun by oneboxes. Room owners and mods can move irrelevant oneboxes to a bin but sometimes these messages are relevant and shouldn't be binned.  It would be really great if there was a way to minimize them client-side with the ability to maximize them if needed.  This will be incredibly helpful for things like  that, quite frankly, can be huge.  Take the following screenshot for example:    Minimizing the first youtube onebox could look something like this:   Related:   inb4 duplicate: I am not suggesting we make them smaller by default, I am requesting a feature to completely minimize them onclick and not change default settings


Can't use Foursquare because it needs Google Play Services, which "is not supported by your device"

I've installed , but it does not start, instead I get the following error:     Google Play Services, which some of your applications rely on, is not supported by your device.   I don't know what does this mean and how can I solve this issue to use the application. I'm using Chinese phone AMOI N 821 android 4.1.1. I live in Russia.  What should I do?


How to install node and nodejs-legacy on remote Ubuntu server without internet access?

I have a remote Ubuntu server without any internet access. I can access it shell and fileSystem (ssh and sftp).  How can I install it? Is there any possible way to install it without root access?


Prime and Maximal Ideals of $\mathbb{Z}[x]$

Consider $R=\mathbb{Z}[x]$. Also let $p$ be a prime. Then we want to find all the prime and maximal ideals of $\mathbb{Z}[x]$. The prime ideals are $(0), (p), (x)$ and $(ap + bx)$. Then we see that the last one contains all the previous ones making it a maximal ideal for $\mathbb{Z}[x]$. Is this the correct way to think about it?  Also, since $(ap + bx)$ is a maximal ideal this means that $R/$(ap + bx)$ is a field. How can I see that this quotient is indeed a field?   Finally, how could I find the same for $\mathbb{Q}$ and then for a generic $k$?


How can I  choose which to use permutation or combination to solve a given statistical problem in maths. Eg. In how many ways can the letters of word: "ARRANGE" be arranged? How many of these arrangements are there in which a) the two R's together b)the two R's and two A's come together


Is there graphic design software made for beginners, suitable for designing websites?

I'm teaching web development to beginners, and it would be useful to show them the basics in design, meaning using a graphic design package to come up with a layout, before turning it into code.   To be clear, I want something for creating the "look and feel" of a page, not the layout. I don't mean prototyping tools. There was some confusion about this, and the meaning of my original question was changed, I just changed it back, half a day later.  The html and css itself will be hand-written.  I need something which is freely available, or really cheap. It can be a program designed for beginners, or a broader program with a "beginners mode", or a less intimidating interface for new users.  Is there software which fits this description?


How to stop Windows 10 automatically signing users in (in the background)

This is slightly different to  and other questions because 1. All my users have a password, and 2. I still get the user selection screen on boot up.   My problem is though, that the last used user is getting automatically (read: invisibly) logged in, in the background. This machine is used mostly for gaming and the automatically logged in user is hijacking Steam which is causing problems for the actual person logging in (when it’s my kids and they don’t know why their games aren’t launching).   I have tried the fixes mentioned in the linked question above, although I’ve only done the registry fix for a single user. Does it need to be done for all users?


Using user input to determine how many times a for loop iterates

I am having difficulty getting a for loop to take user input in the form of an argument to a function I created. #!/bin/bash number1="$1"    #Assume user input 5 loops="$2"      #Assume user input 5 if [[ ${number1} && ${loops} =~ ^-?[0.00-9.99]+$ ]];then    for number2 in {1..${loops}}    do        Product=$(echo "${number1} * ${number2}" | bc -l)        echo "${number1} * ${number2} = ${Product}"        if test ${number2} -eq 7;then            { echo "----------------------"; echo "${number2} is the best number."; echo "----------------------"; continue; }        elif test ${number2} -eq 11;then            { echo "------------------------------"; echo "${number2} is pretty awesome as well."; echo "------------------------------"; continue; }            fi     done else    { echo "Please try again with a valid numerical entry."; exit 1; } fi  This script does not run when the user inputs an integer for the variable "loops", and any number for "number1". number1 = 5 in this case. It returns the error:  (standard_in) 1: syntax error 5 * {1..5} = /home/$USER/For_Loop_Multiplication.sh: line 9: test: {1..5}: integer expression expected /home/$USER/For_Loop_Multiplication.sh: line 11: test: {1..5}: integer expression expected  If I instead directly input an end bound on the number of loops directly into the script like the following, and number1 = 5, it runs fine: #!/bin/bash number1="$1"     #Assume user input 5 if [[ ${number1} =~ ^-?[0.00-9.99]+$ ]];then    for number2 in {1..5}    do        Product=$(echo "${number1} * ${number2}" | bc -l)        echo "${number1} * ${number2} = ${Product}"        if test ${number2} -eq 7;then            { echo "----------------------"; echo "${number2} is the best number."; echo "----------------------"; continue; }        elif test ${number2} -eq 11;then            { echo "------------------------------"; echo "${number2} is pretty awesome as well."; echo "------------------------------"; continue; }            fi     done else    { echo "Please try again with a valid numerical entry."; exit 1; } fi  It returns the result:  5 * 1 = 5 5 * 2 = 10 5 * 3 = 15 5 * 4 = 20 5 * 5 = 25  Essentially what I think is happening is that the script seems to be placing the entire range as the value number2, which is defined as the iterator in the for loop. Since the input for the variable "loops" is an integer, there should be no difference between asking the user for a range and placing it in the loop, or simply setting it as a default when I write the script. However, there apparently is a difference... Any insight into solving this problem is appreciated. Thanks.


Is it true that The Doctor can only regenerate 12 times? Because if it is, the series won't last much longer. Matt Smith's Doctor is number 11 - that only leaves two more, right?


I think I acidentally removed Ubuntu/files by removing libc6

I seem to have unintentionally deleted almost everything from Ubuntu using   apt-get remove libc6 libc6-dev   Is there any chance I can get my files back (with Ubuntu) or will I have to reinstall Ubuntu?


Has stirring the pot reached the point of being counter productive?

There are a number of on-going and recent issues that have incensed many of us--how welcoming the atmosphere is for members of the trans community, licensing, the CoC, Monica's demodding and public treatment, SOI's treatment of communities and their experienced members and moderators, apparent change in focus from content quality to feel-good, etc.  Things exploded and chaos has raged for many weeks.  People have vented in posts and comments.  Not much has actually changed with the underlying issues, and the indications are that SOI is entrenched in how things are.  I think we're reaching the point where "keeping the pressure on" is becoming counter productive.  It isn't likely to produce change from SOI, but it will start burning out people who care about the issues.    People can maintain the negative emotions for only so long.  Eventually, they run out of emotional energy, give up on the issues, and either accept the way things are or move on.  When that happens, continuing to stir the pot becomes annoying and loses followers.  It seems like everything that can be said about these issues has been said, and repeated.  At this point, the issues are being kept alive by continually tweaking the old posts with updates and grammar fixes, and fresh posts that seem to be mostly rants or duplicates.  We need to let people emotionally recharge, or those sympathetic to the cause will start to be turned off by it.  Progress may best be served by giving things a rest, at least temporarily.  Edit: This question is not about how to solve the underlying issues.  That has been extensively discussed elsewhere, and we can certainly use new and more effective strategies.  This post is specifically about posting on Meta SE.    If there is new or constructive stuff to post, by all means do it, and try to do it as factual information with a minimum of emotional charge.  However, most of the existing threads were posted when emotions were high, and the threads and comments touch a lot of raw nerves.  Continuing to rehash and bump these old posts to keep the issues in the forefront fills the main page with posts that become emotionally draining, and continue to trigger raw nerves.  This post is to suggest that continuing to do this may start losing us people with sympathetic views because people will become emotionally burned out by continually "picking at the scab".  The specific suggestion is to minimize bumping of these old posts and posting new, nearly identical questions about the same issues for the purpose of keeping the issues in the forefront.  Give people a break from the Meta SE main page being constantly filled with emotionally triggering posts, and let people recharge so they stick around to fight another day.


I'm recently learning about differentiation and I have no idea why its important. All I know is that has something to do with rate of change and acceleration over time? I understand how but I'm really struggling to understand why we do it, it doesn't make sense! Can someone give a real life example of how and why differentiation is important


"I will see you on Monday morning" vs. "I will see you Monday morning"

I will see you on Monday morning. I will see you Monday morning.   Is the second version idiomatic and grammatically correct? Which version do native speakers prefer to use more?


I don't understand the concept of tensors. Can anyone explain the relation between polarization vectors and tensors?


print(int( 342342342342342342 / 10 ))   The output is      34234234234234236   I do not understand where the 6 comes from! I also tried "long" which gives an error.


I have a problem about some simple code in console. Precisely I created a public enum called Year which contains 4 seasons (obvious). I want the program to ask at the beginning what is the season of the year and then generate an answer to each option. The problem is I don't know how to convert my string input to each option of this enum. Maybe it will be more clear if i show you the code (it's short).               Console.WriteLine("What time of year is it?");         var input = Console.ReadLine();              //earlier it was just             //time = Year.Winter;          switch (time)         {             case Year.Autumn:                 Console.WriteLine("You're gonna have to grab the leaves");                 break;              case Year.Summer:                 Console.WriteLine("Let's go to the beach");                 break;              case Year.Winter:                 Console.WriteLine("Better to warm up at home");                 break;             case Year.Spring:                 Console.WriteLine("Best time of the year!");                 break;              default:                 Console.WriteLine("I don't know this time of year");                 break;         }   I want to make something like this but dunno what to put inside this switch statement because I can't just put there my string 'input'. Is it possible in the way I am thinking of it?


I have always used adiabatic process to be fast, so that the system doesn't get enough time to exchange energy in the form of heat. But as I was reviewing adiabatic process from the Resnick, Halliday, & Krane book, the authors claim that:     we assume the process to be carried out slowly, so that the pressure   is always well defined.   Now this is completely out of sync what I already know and most web searches also agreeing with adiabatic process being fast.    Which one is right?


Are the off-world colonies really a "golden land of opportunity"?

In Blade Runner, there seems to be quite a  for emigration to the off-world colonies, e.g.,      "A new life awaits you in the off-world colonies, a chance to begin   again in a golden land of opportunity and adventure."   Is there any evidence that people emigrating are actually better off than staying on Earth?  The job descriptions of the replicants Deckard is tasked with "retiring" don't seem consistent with the colonies being wonderful places. If the colonies offered a good life, would they have to do so much advertising?


Proving that $f$ is constant without Liouville's Theorem

Show that if $f$ is an entire function, and there is a nonempty disk such that $f$ does not attain any values in the disk, then $f$ is constant. I have seen several proofs of this with Liouville's theorem, but is it provable without Liouville's theorem?


TLDR; Is there a way to simultaneously open all iCloud tabs saved on iPhone, on a Mac?  I use my iPhone for browsing and as a means of "read it later" I just leave the open tabs there with the purpose of opening them all later on my Mac. Is there a way to open them all (much like Chrome allows in the "Tabs from other devices" in History page)?


Can you travel from Northern Ireland to Britain without a passport or driver's license? In theory there are no border checks but ferries seem to demand photo ID.


Linux bash nohup + background in a for loop hang

Good Morning! trying to start a script on multiple servers w/ nohup and keep it running in the back ground.  The command (provided by my vendor) runs as expected when inputting directly on each server (the python script scrapes the log file and sends relevant info to another server via UDP):    nohup tail -f /log/log.log | python /test/deliver.py > /dev/null 2>&1 &    However, when placing into for loop to reach many servers, I must press Ctrl-C between each server to keep the loop going.  Please assist if possible:  for i in `cat /etc/hosts`; do ssh $i nohup tail -f /log/log.log | python /test/deliver.py > /dev/null 2>&1 &; done    Solution (Thank you all for the help):  ssh -f user@host "cd /whereever; nohup ./whatever > /dev/null 2>&1 &"   Had to use the -f in combination with double quotes as described here:


what are the differences between these two variables? [0] * 3] and using range(3)

First of all, really sorry I remember there should be a term for these two but I am really bad at terms.  Anyways, I am just playing around and at first I thought both of them should be giving the same result which YES it gave the same result but when I try to assign something into one of the index, that's when I found out there are differences, but I can't figure out.  Can someone please give me a hand on explaning the differences and why the result is like this?  e = [[0 for _ in range(3)] for _ in range(3)] e[0][1] = 1 print(e, 'e')  # [[0, 1, 0], [0, 0, 0], [0, 0, 0]] e   d = [[0] * 3] * 3 d[0][1] = 1 print(d, 'd')  # [[0, 1, 0], [0, 1, 0], [0, 1, 0]] d   as seen, e is doing exact what I expected changing only index [0][1] to ` but as for d it's changing all.  Why is this happening though?  Thanks in advance for any help and explanations


Re:$ (a,b,c,d)=(pr+qs, qr-ps,pr-qs,ps+qr) $

In the diophantine equation: $ a^2+b^2=c^2+d^2 $, I know that the solutions are parametrized by $ (a,b,c,d)=(pr+qs, qr-ps,pr-qs,ps+qr) $ where $p,q,r,s \in  {Z}$ are arbitrary. I have been having a hard time solving $(p,q,r,s)$ meaning writing them as a combination of the integers $a,b,c,d$).Can you please help me find the solution?


Differences between types of Italian coffee

What is the difference between the following types of Italian coffee?   Caffè lungo (long coffee) Caffè corto (short coffee) Caffè macchiato (coffee with milk) Espresso Cappuccino


Can linear momentum be conserved before and after collision in the presence of an external force?

I'm a physics tutor for 11th and 12th grade students. I taught my students that momentum is conserved only when the net external force on the system is zero. But in the books we are following, momentum was conserved in the following cases in spite of presence of an external force:   A body (mass m1) is dropped from a tower (height h) and another body (mass m2) is projected vertically upward with initial velocity u. Find the velocities just after collision. (Gravitational force is the external force) Two bodies projected towards each other on a rough table surface, with all required parameters given asked to find the velocities after collision. (frictional force is the external force) Body explodes in mid air. Momentum is conserved before and after explosion. (Again gravitational force is the external force)   I explained to my students in all these cases though an external force is present it has negligible effect. But I'm not satisfied with my answer.  EDIT: Thank you for the comments and answer. It is clear that contribution of external force to change in momentum is negligible. Can someone do the calculation of taking change in momentum into consideration and showing that it is negligible?


When deploying the application to the device, the program will quit after a few cycles with the following error:  Program received signal: "EXC_BAD_ACCESS".   The program runs without any issue on the iPhone simulator, it will also debug and run as long as I step through the instructions one at a time. As soon as I let it run again, I will hit the EXC_BAD_ACCESS signal.  In this particular case, it happened to be an error in the accelerometer code. It would not execute within the simulator, which is why it did not throw any errors. However, it would execute once deployed to the device.  Most of the answers to this question deal with the general EXC_BAD_ACCESS error, so I will leave this open as a catch-all for the dreaded Bad Access error.  EXC_BAD_ACCESS is typically thrown as the result of an illegal memory access. You can find more information in the answers below.  Have you encountered the EXC_BAD_ACCESS signal before, and how did you deal with it?


caption package breaks centering of a floating listing's caption

I tend to use (floating) listings, as you can observe below in the MWE. To set the width of those listings, xleftmargin and xrightmargin are set to equal values to mimic centering of the listing.  I saw unexpected behaviour using the caption package, in the following condition: Depending on the resulting width of the listing, the listing's caption does not respect the justification and is not centered. Simply removing \usepackage{caption} (and \captionsetup therefore too of course) puts the caption right in the center where it is intended to appear.  So i suspect the caption package is overwriting sth. Can this be corrected in a simple way without hacking with minipage/figure/tabular-environments?      \documentclass[]{scrbook}  \usepackage{xcolor} \usepackage{listings} \usepackage{caption} %removing it centeres the listing's caption again  \captionsetup{     %... some modification     justification = centering, % does not help with the listing's caption }  \begin{document} \begin{lstlisting}[     frame=shadowbox %helper, to see listing's dim     ,captionpos=b     ,float     %center the listing         ,xleftmargin=.20\textwidth         ,xrightmargin=.20\textwidth     ,label=code     ,caption={This caption is not centered at all}     ,language=Delphi] i := 1; \end{lstlisting}  \end{document}


I'm calculating Pearson's r for a set of dichotomous values.   For one item in my data set, all values are identical. Since the variance in y will be 0, I will ultimately end up with a division by 0.  I guess I have two questions:   Is it fair to say that the correlation coefficient is 0, or is it more valid to say that it cannot be calculated for this item? Is manually checking for 0 variance and treating this as an exception the accepted best practice, or can the formula be modified to cater to this scenario?


Prove that if $p$ is prime, then an element of $\mathbb{Z} /p \mathbb{Z}$ has at most two square roots.

We say that $[a]$ is a square root of $[b]$ in $\mathbb{Z}/p\mathbb{Z}$ if $[a]^2= [b]$. Prove that if $p$ is prime, then an element of $\mathbb{Z}/p \mathbb{Z}$ has at most two square roots?


How do i prove that $(p \vee q) \wedge (\neg p \vee r) \rightarrow (q \vee r)$ is a tautology without using the truth table?

I am looking to for a way to prove that the statement $(p \vee q) \wedge (\neg p \vee r) \rightarrow (q \vee r)$ is a tautology. I am unable to use the truth table or the rules of inference for this. I can only solve this by using Laws and Theorems such as De Morgans Law and Distributive Law. Any help would be greatly appreciated. Thank you


How can I programmatically create a new cron job?

I want to be able to programatically add a new cron job, what is the best way to do this?  From , it seems I could dump the current crontab and then append a new one, piping that back into crontab:  (crontab -l ; echo "0 * * * * wget -O - -q http://www.example.com/cron.php") | crontab -   Is there a better way?


Chromium browser not loading youtube video

I am using Ubuntu and have chromium installed in it. For every video on you tube it is giving me an error that the video is not available. I had installed flash player too but it is not working. I don't know why it is happening.  On clicking to learn more link, the help is answering like the video is removed or currently unavailable which is not possible as it could not be the case for every video on you tube.


I have encountered this error  Process is terminated due to StackOverflowException.  The source of error come from this code  internal class Record {     [Name("Name")]     public string Name { get; set; }     [Name("Principal")]     public int Principal { get { return Math.Abs(Principal); } set {; } }  }  I searched the error and it state the error occur because of recursive. I think my Principal method is not recursive method.


Can 3 3.7 volt 6000 mah batteries power two 9 watt bulbs

I wanted to know if 3 3.7 volts 6000 mah hour batteries power 2 9 watt bulbs, and a 12-volt pc case fan? If so for how long?


Prove that $\frac{1}{2\pi i}\int_\mathcal{C} |1+z+z^2+\cdots+z^{2n}|^2~dz =2n$ where $\mathcal{C}$ is the unit circle

On the generalization of a , I have shown, by analytic and numerical means, that  $$\frac{1}{2\pi i}\int_\mathcal{C} |1+z+z^2+\cdots+z^{2n}|^2~dz =2n$$  where $\mathcal{C}$ is the unit circle. Thus, $z=e^{i\theta}$ and $dz=iz~d\theta$. There remains to prove it, however.  What I have done: consider the absolute value part of the integrand,  $$ \begin{align} |1+z+z^2+\cdots+z^{2n}|^2 &=(1+z+z^2+\cdots+z^{2n})(1+z+z^2+\cdots+z^{2n})^*\\ &=(1+z+z^2+\cdots+z^{2n})(1+z^{-1}+z^{-2}+\cdots+z^{-2n})\\ &=(1+z+z^2+\cdots+z^{2n})(1+z^{-1}+z^{-2}+\cdots+z^{-2n})\frac{z^{2n}}{z^{2n}}\\ &=\left(\frac{1+z+z^2+\cdots+z^{2n}}{z^n} \right)^2\\ &=\left(\frac{1}{z^n}\cdots+\frac{1}{z}+1+z+\cdots z^n \right)^2\\ &=(1+2\cos\theta+2\cos 2\theta+\cdots+2\cos n\theta)^2\\ \end{align} $$  We now return to the integral,  $$ \begin{align}\frac{1}{2\pi i}\int_C |1+z+z^2+\cdots z^n|^2dz &=\frac{1}{2\pi}\int_0^{2\pi}(1+2\cos\theta+2\cos 2\theta+\cdots+2\cos n\theta)^2 (\cos\theta+i\sin\theta)~d\theta\\ &=\frac{1}{2\pi}\int_0^{2\pi}(1+2\cos\theta+2\cos 2\theta+\cdots+2\cos n\theta)^2 \cos\theta~d\theta \end{align}$$  where we note that the sine terms integrate to zero by virtue of symmetry. This is where my trouble begins. Clearly, expanding the square becomes horrendous as $n$ increases, and even though most of the terms will integrate to zero, I haven't been able to selectively find the ones that won't.  The other thing I tried was to simplify the integrand by expressing it in terms of $\cos\theta$ only using the identity  $$\cos n\theta=2\cos (n-1)\theta\cos\theta-\cos(n-2)\theta$$  but this too unfolds as an algebraic jungle very quickly. There are various other expressions for $\cos n\theta$, but they seem equally unsuited to the task. I'll present them here insofar as you may find them more helpful than I did.  $$ \cos(nx)=\cos^n(x)\sum_{j=0,2,4}^{n\text{ or }n-1} (-1)^{n/2}\begin{pmatrix}n\\j\end{pmatrix}\cot^j(x)=\text{T}_n\{\cos(x)\}\\ \cos(nx)=2^{n-1}\prod_{j=0}^{n-1}\cos\left(x+\frac{(1-n+2j)\pi}{2n} \right)\quad n=1,2,3,\dots $$  where $\text{T}_n$ are the Chebyshev polynomials. Any suggestions will be appreciated.


I need to use two compound words in a sentence and their first component is the same. Do I start the second word with a hyphen?

I need to write the following sentence in a description of a book's binding: "Printer's wrappers, housed in a cloth-backed and cloth-edged card slipcase." This seems clunky to me, and I would rather write "cloth-backed and -edged card slipcase." Is the hyphen necessary before "edged?" I know that in the opposite situation (in which the second component is shared between two compound words) one can simply list the first components and follow each with a hyphen. An example I saw in another question was "ground- and sea-based forces." Can the same concept be applied to this situation? Thank you!


Name / title of a story about a sentient submarine battleship?

I think I read this (probably in an anthology) around 1972. As I remember it -- this sentient submarine battleship is left over from a war and awakens when challenged. Is this Van Vogt?


Is it possible to save a Diablo 3 chat session or save some in game notes

I'd like to take some in-game notes, for example significant items I sold at the AH (with links to the items), some tips or various things I want to remember, etc.  For instance by sending chat messages to myself and saving the log somehow.  Is that possible?