Touchscreen not working on Toughbook CF-C2

I have a Panasonic Toughbook CF-C2CQAZXCM with the touchpad (NOT the touchpad+digitizer) and I cannot get the touchscreen to work. I followed  and was able to build the modules but no joy. I followed several other threads:        Here is some info from my system:  # xinput  ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)] ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]     ↳ Power Button                              id=6    [slave  keyboard (3)]     ↳ Video Bus                                 id=7    [slave  keyboard (3)]     ↳ Power Button                              id=8    [slave  keyboard (3)]     ↳ USB HD Webcam                             id=9    [slave  keyboard (3)]     ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]     ↳ Panasonic Laptop Support                  id=12   [slave  keyboard (3)]   # lsusb  Bus 001 Device 002: ID 8087:8000 Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 004 Device 002: ID 5986:0529 Acer, Inc  Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 006: ID 8087:07dc Intel Corp.  Bus 002 Device 005: ID 04b5:0680 ROHM LSI Systems USA, LLC  Bus 002 Device 004: ID 056a:5005 Wacom Co., Ltd  Bus 002 Device 002: ID 0bc2:5021 Seagate RSS LLC FreeAgent GoFlex USB 2.0 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   ...and in dmesg: [    1.824466] usb 2-4: new full-speed USB device number 3 using xhci_hcd [    1.824571] usb 2-4: Device not responding to set address. [    1.988164] psmouse serio2: synaptics: Touchpad model: 1, fw: 7.5, id: 0x1c0b1, caps: 0xf00033/0x244000/0xa2400, board id: 372, fw id: 1107777 [    2.025355] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio2/input/input9 [    2.028723] usb 2-4: Device not responding to set address. [    2.232873] usb 2-4: device not accepting address 3, error -71 [    2.345062] usb 2-4: new full-speed USB device number 4 using xhci_hcd [    2.361709] usb 2-4: No LPM exit latency info found.  Power management will be impacted. [    2.362951] usb 2-4: New USB device found, idVendor=056a, idProduct=5005 [    2.362955] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=5 [    2.362957] usb 2-4: Product: MultiTouch Sensor   [    2.362959] usb 2-4: Manufacturer: Wacom Co.,Ltd.       [    2.362960] usb 2-4: SerialNumber:            Don't know where to go from here. The touchscreen works on boot when I enter the Panasonic Admin password but not after it loads Ubuntu. I did a fresh install of 14.04 LTS in case that made a difference.  Comments??


How can I change the style of the section number?

The section appears like  "1 XXXXXXX", and I want something like "1. XXXX". I've been looking for some way to change it using \renewcommand, but nothing happens. Can you help me? P.D. I am using the "Article" format.


'Algebraic' way to prove the boolean identity $a + \overline{a}*b = a + b$

For me, it is pretty clear that $a + \overline{a}*b = a + b$, because the first $a$ in the or will make sure that if the second term must be 'evaluated', $a$ will always be false, and therefore won't matter in the and - probably because I'm a programmer and it is very common to see this unnecessary cluttering in long if-else structures.  I can easily prove it with the truth table as well, just make both expressions', and turns out they are identical.  But I was looking for a 'algebraic' way to prove it. That is, something using the basic operations properties like the fact that they are transitive, commutative, associative, etc. For example, if I was to prove this other simple identity $a + a*b = a$ I would simply do something like:  $a + a*b = a*(1 + b) = a*1 = a$.  Is there a way to also prove the former using this algebraic operations, without resorting to the truth table?


I need to prove that the Lindenbaum-Tarski algebra is dense in the sense that: if     $ [\phi] \leqslant [\psi] $ then there is an $\chi $ such that  $ [\phi] \leqslant [\chi] $ and $[\chi] \leqslant [\psi]  $ I know this is only true if there are infinite  sentential letters. I started by writting that If $ \psi= p_0p_1..p_n \space \space  \psi=q_0q_1...q_m$   then $ \chi= \psi \land q $  for some propositional variable q  that does not appear  $ \psi $ satisfies that $ [\chi ] \leqslant [\psi]  $ that is, by definition,  $  \chi \models \psi $. But i still have to proof that  $  [\phi] \leqslant [\chi] $ I guess it has something to do with the initial  hypotesis   $ [\phi] \leqslant [\psi] $  but i can not find out how.


Triple Display: Left and Right Switch after Reconnecting Macbook

I have 2019 MacBook Pro for work. When in the office, I connect it to an OWC Thunderbolt dock which is connected to two monitors, giving me a Triple Display setup. Since the laptop itself is off to the side, I usually only leave our office chat open in full screen on that, and I use the two monitors for regular work. At the end of the day, I unplug the laptop and bring it home with me. When I return the next day and plug it in, though, the laptop switches the open windows on the far monitor and the laptop screen. The chat window which should be on the laptop is on the far monitor, and every window that was open on the far monitor (Firefox, Outlook, various Finder windows, etc.) is on the laptop. The monitor in the middle is unaffected. When I go into the Displays system preferences, the arrangement and designation of which is considered the primary display is unaffected. I am not sure what is happening here. It is very annoying to have to switch windows back and forth all the time. Is there a way to fix this?


For the bar chart proposed, I would like to use different color for each single bar. How can I  do this?  \documentclass{article} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}   \begin{axis}[     title=Title,         xbar,         xmajorgrids = true,         bar width=6mm,          width=12cm, height=5.5cm,          enlarge y limits=0.2,         xlabel={\#number},         symbolic y coords={A,B,C,D},         ytick=data,         nodes near coords, nodes near coords align={horizontal},   ]    \addplot coordinates {(1,A) (7,B) (5,C)(2,D)}; \end{axis} \end{tikzpicture}  \end{document}


Can't Right Click on Windows 10 Taskbar Icons

On my Windows 7 computer, I was able to right click on icons on my taskbar to unpin them.    I just upgraded to Windows 10, and I could have sworn the right click menu was working when I first installed it, but now when I right click on taskbar icons (or click and drag upward, which used to work on windows 7) no menu appears.  Everything remains perfectly responsive, I can open and close applications lightning fast, and I can right click on the taskbar itself to change the properties for example, but just not on the icons themselves.  Did I break something? How can I get it back?


How to determine length of char-stream with FilterReader?

Simply - is there an easy way of determine the length of the character-stream that is coming from a textfile?  The program opens a certain text-file and then reads the characters from an object that extends FilterReader. The callback function that reads characters is the following  class: MyFilterReader  @Override public int read(char cbuf[], int off, int len) throws IOException {      int i = in.read(cbuf, off, len);      return i; }   And the other class that uses this object  class: Gui  InputStreamReader iSR = new InputStreamReader(System.in); FileReader fr = new FileReader(file); MyFilterReader mFR = new MyFilterReader(fr); BufferedReader input = new BufferedReader(mFR);  char[] ch = new char[15000]; input.read(ch); input.close();  for (int i = 0; i < ch.length; i++) {     if (ch[i] != 0) {          System.out.print(ch[i]);     } }   In summary: I have no problems to read the characterstream, but I dont know how I in advance can determine its length so I can allocate that space to ch-vector (ch). As you see here I have temporarily set the size to an ad-hoc value of 15000:


java.util.ConcurrentModificationException while removing row from Excel in java

for(Row row:sheet) {   for(int rowNo=0;rowNo<sheet.getLastRowNum();rowNo++) {     row=sheet.getRow(rowNo);     sheet.removeRow(row);   } }   I am trying to remove the rows from Excel file through java but it is giving me error      java.util.ConcurrentModificationException       at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1207)       at java.util.TreeMap$ValueIterator.next(TreeMap.java:1252)


How to show that there exists a tournament of size n with a certain number of Hamiltonian paths?

Assuming a tournament of size $n$ is a choice of orientation for each edge of $K_n$, show that there exists a tournament of size $n$ with at least $\dfrac{n!}{2^{n-1}}$ Hamiltonian paths.  This question was on my graph theory final and I wasn't quite sure how to prove this. I think it might have something to do with the out-degrees of a particular node, but I'm not quite sure. Any help is greatly appreciated!


This formula works fine when adding a new list item:  =[Class Date]>=TODAY()+3  Basically ensuring the user selects a date greater than two days away from current date.  I don't want the formula to be in effect if the record is an UPDATE to an existing record.  So if someone comes back to this record after completing it correctly and saving it, but now wants to update a different field I don't want this field to be editable nor do I want the validation formula to be applied to the updating of the record.  Is this possible?


Is there a way to request an user to explain his/her vote?

I just would like to know the reason why a question I formulated was down voted.


How does electricity propagate in a conductor?

On a systems level, I understand that as electrons are pushed into a wire, there is a net field and a net electron velocity.  And I've read that the net electron drift is slow.  But electricity travels through the wire, essentially at c, and I want to understand that mechanism.  My apologies if my question is poorly stated, I know bare bones undergraduate quantum theory circa 1990s but it doesn't explain the motion of electricity in detail.  Here's my conception, I'm hoping someone will fill in the holes, ha ha.  An electron moves into the wire.  It's got a kinetic energy.  After travelling a short distance, it spontaneously emits a photon, which hits another electron in a valence shell.  That electron then presumably does the same.  If this conception is simply wrong, please enlighten me.  The questions that arise:   Presumably at this level, electrons are acting more like waves and less like particles, but is there any classical component in the picture, ie are electrons coming in imparting other electrons with kinetic energy through repulsion, or does it not work that way? If electrons momentarily have energy, then pass it on by a photon, what determines when that photon is emitted, and what frequency it will be?  I assume that electrons in this cloud are not limited by any kind of exclusion principal, and that any frequencies are possible? Why should a photon emitted by an electron be in the direction of travel?  Conservation of momentum tells me that if an electron is moving, the photon should be emitted in that direction, slowing the electron, but could an electron emit a photon in the opposite direction?  If it did, I assume it would somehow have had to absorb energy from elsewhere? That sounds possible by analogy with quantum tunneling. What is the mechanism by which electrons propagating increase the temperature of the material?  Are they transmitting energy to the electrons in the valence shell, which tug at the nucleus, do some photons hit the nuclei directly, or is there some other way?  Presumably, electricity travels slower than light, because there is some time in each exchange, and some time when electrons are moving at sublight speeds before emitting a photon.  By how much is this slower than light, and what is the speed of each interaction?


How to get the length of a map in angularjs ng-show?

how can I get the length / size of a map in "ng-show"?  var map = {    "key1": "value1,    "key2": "value2,    "key3": "value2 }   UPDATE 01  <button ng-show="Object.keys(map).length>0"></button>   or   <button ng-show="_.size(angular.copy(map)>0"></button>   UPDATE 02    where and how to set the $scope.Object = Object; ??  when I set that I got the following error:     Error: [$parse:isecobj] Referencing Object in Angular expressions is   disallowed! Expression: Object.keys(selectedIdeas).length>0


Does there exist a magical shell piping which would allow easily to grep through bunch of .gz log files without needing to extract them somewhere?  .gz files are Apache logs, result of log rotation. I'd like to quickly check how often certain URIs are accessed in the past.


Transferring file via thumb drive fom Ubutu 14.04 LTS to Windows 7

I want to export my Bookmarks from chrome and firefox and my documents folder from 14.04 LTS to Windows 7


Finding the remainder of a large number without the use of a calculator.

How would I calculate the following without using a calculator: $152615278636986567767^{12345678}$ % $5$  I have gotten only the last digit by doing: $152615278636986567767$ % $10 = 7$  Therefore having $7^{12345678}$ % $5$.  I am unsure of how I should do the rest to find the final remainder.  I had a look at similar formats like , but I haven't learned any of the following rules/theorems.


Question about unexpected hanging paradox

My intuitive solution to the paradox would simply be that although the prisoner can "deduce" that he won't be hanged on Friday, he can only make that statement if it gets past Thursday. In other words, the paradox relies on the statement (statement A), "If I am not hanged by Thursday, then I can conclude that I will be hanged on Friday".  We can decompose this statement to two statements 1) and 2):  1) I am not hanged on Thursday, and 2) I am hanged on Friday  Then statement A is of the form 1 $\rightarrow$ 2. From elementary logic, this statement is true if 1 & 2 are both true, 1 is false + 2 is true, and 1 is false + 2 is false. However as of the time the prisoner makes the statement, 1 hasn't happened yet, so the prisoner doesn't know if 1 is true or false. Therefore, 2 can also be true or false, and so the prisoner can't make conclusions at all. The prisoner can deduce that he will be hanged on Friday only if the hangman doesn't knock on his door by Thursday noon, but right until Thursday 11:59:59am, he can't make conclusions.  The problem with my solution is, of course, if it were correct I'd have expected someone else to have thought of it and resolved the paradox (since the solution is so elementary). But that hasn't happened, and the logicians working on the paradox focus on the word 'surprise' instead. What's the error in my solution?


The number of possible factorizations of a positive integer.

Given a positive integer $n>1$ with prime factorization      $$n=\prod_{p_i \text{ prime}}p_i^{k_i}, \space i\ge1, \space k_i \in \mathbb N^*$$   how can I compute the number of factorizations of $n$, $\text F(n)$ (multiplications by $1$ are excluded) ?   $5\times 24$ and $4\times 5\times 6$ are two different factorizations of $120$. The prime factorization of a number is of course one of its factorizations. $\text F(p) = 0$ for any prime number $p$.      If there is a no formula, an algorithm will be appreciated.


Why doesn't xpath work when processing an XHTML document with lxml (in python)?

I am testing against the following test document:  <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">    <head>         <title>hi there</title>     </head>     <body>         <img class="foo" src="bar.png"/>     </body> </html>   If I parse the document using lxml.html, I can get the IMG with an xpath just fine:  >>> root = lxml.html.fromstring(doc) >>> root.xpath("//img") [<Element img at 1879e30>]   However, if I parse the document as XML and try to get the IMG tag, I get an empty result:  >>> tree = etree.parse(StringIO(doc)) >>> tree.getroot().xpath("//img") []   I can navigate to the element directly:  >>> tree.getroot().getchildren()[1].getchildren()[0] <Element {http://www.w3.org/1999/xhtml}img at f56810>   But of course that doesn't help me process arbitrary documents.  I would also expect to be able to query etree to get an xpath expression that will directly identify this element, which, technically I can do:  >>> tree.getpath(tree.getroot().getchildren()[1].getchildren()[0]) '/*/*[2]/*' >>> tree.getroot().xpath('/*/*[2]/*') [<Element {http://www.w3.org/1999/xhtml}img at fa1750>]   But that xpath is, again, obviously not useful for parsing arbitrary documents.  Obviously I am missing some key issue here, but I don't know what it is.  My best guess is that it has something to do with namespaces but the only namespace defined is the default and I don't know what else I might need to consider in regards to namespaces.  So, what am I missing?


I'm looking for a precise word to describe someone who is hypocritical on moral issues, for example:   a cult guru who claims to be holy while doing something evil. or a company which partakes in some kind of sordid business practice while pretending to be holier-than-thou.


What is the best way to partition a collection into smaller collections

I have a collection of car objects and i am looking through them like this:   var slide = CreateSlide();  foreach (var car in carCollection) {       displayonSlide(car, slide)  }   I now realize that i can only fit 5 cars on a slide so i need to take the carCollection and break it up into collections of 5 and then do the loop through each of those 5 (so i create a new slide for each 5 cars that exist in the collection.  What is the best way to break up a single collection into a number of smaller collection based on bucketing by a certain number of items (5 in this case)  obviously the last collection might have the remainder if not divisible.


Getting last modification date of a schema

Is there a way to discover the date a schema was last modified? I'm trying to decide if a schema's still being updated and is therefore "active" in my system.  I use PostgreSQL 9.2 under Linux CentOS release 6.4


JQuery not working on divs created by javascript

I am working on this assignment from the Odin Project:      I cannot get jQuery .hover to work on the divs I have created.    The project specifies that divs should be created using javascript or jquery.  I have done that but can't get any jquery to work on the divs created by the javascript.    JS code below:   function createGrid(resolution) {     var wr = document.createElement("div");     wr.setAttribute("id", "wrapper");     document.body.appendChild(wr);     for (x = 0; x<resolution; x++)         {         for (i = 0; i<resolution; i++)         {             var pix = document.createElement("div");             pix.setAttribute("class", "pixel");              wr.appendChild(pix);         };     var clr = document.createElement("div");     clr.setAttribute("class", "clearLeft");      wr.appendChild(clr);     }; };  function getRes(){     var resolution = prompt("Enter your desired grid resolution.  Number must be between 3 and 64"); if (resolution > 64  || resolution < 3)     {         alert("This number is beyond the acceptable range.  Pick a number between 3 and 64")         getRes();     }    createGrid(resolution); };  //Console is not showing any errors but hover is not working //after I added the script below $(document).ready(function(){    $(".pixel").hover(function(){        $(this).css("background-color","black");     }, function(){     $(this).css("background-color", "black");     }); });


I click the "register" on area51.stackexchange.com It's said "Unable to log in: No user found"   How can I login ?  please


I am using a linear regression model to determine the effect of diet score at baseline as predictor of weight at follow up where:  lm(weight_followup ~ Diet_Score*weight_base)  When I center my predictor variables I get the following:     However, the main effect changes when I do the same un centered:   From clinical knowledge, the second set of results (uncentered) makes more sense, as Diet Score (aka quality) weight at follow up goes down.   Not sure what to use, as some posts suggest that if using continous predictors where 0 is not in the data range than predictors should centered.  All suggestions welcome. Its a large dataframe of N = 3000.


In the sentences:   He tries going to the city He tries to go to the city   Are there differences in meaning? If no, why not?


I know there are a lot of questions like this but I've tried pretty much to understand what to do and failed.  By df -h I know that my /dev/sda1 /boot is with 100% use.  I'm not understanding what I should remove, at all. I'm running nginx and wanted to install nodejs but I was alerted of unmet dependencies when trying sudo apt-get install nodejs and sudo apt-get -f install failed for lack of space. Can I get some specific guidance on this one please? I'm feeling totally lost.  dpkg --list | grep linux-image:  ii  linux-image-3.8.0-29-generic      3.8.0-29.42~precise1                 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii  linux-image-3.8.0-34-generic      3.8.0-34.49~precise1                 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii  linux-image-3.8.0-35-generic      3.8.0-35.52~precise1                 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii  linux-image-3.8.0-36-generic      3.8.0-36.52~precise1                 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii  linux-image-3.8.0-37-generic      3.8.0-37.53~precise1                 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii  linux-image-3.8.0-38-generic      3.8.0-38.56~precise1                 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii  linux-image-3.8.0-39-generic      3.8.0-39.58~precise1                 Linux kernel image for version 3.8.0 on 32 bit x86 SMP ii  linux-image-3.8.0-42-generic      3.8.0-42.62~precise1                 Linux kernel image for version 3.8.0 on 32 bit x86 SMP iU  linux-image-generic-lts-raring    3.8.0.44.44                          Generic Linux kernel image         uname -r: 3.8.0-42-generic         sudo apt-get purge linux-image-x.x.x.x-generic  You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies.  linux-image-generic-lts-raring : Depends: linux-image-3.8.0-44-generic but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).         sudo apt-get -f install  dpkg: error processing /var/cache/apt/archives/linux-image-3.8.0-44-generic_3.8.0-44.66~precise1_i386.deb (--unpack):  failed in write on buffer copy for backend dpkg-deb during ./boot/vmlinuz-3.8.0-44-generic': No space left on device No apport report written because the error message indicates a disk full error                                                                               dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.8.0-44-generic /boot/vmlinuz-3.8.0-44-generic Errors were encountered while processing:  /var/cache/apt/archives/linux-image-3.8.0-44-generic_3.8.0-44.66~precise1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)


What is an intuitive explanation using forces for the equatorial bulge?

The earth is not a sphere, because it bulges at the equator.   I tried fiddling with centripetal force equations and gravity, but I couldn't derive why this bulge occurs.    Is there   (a) a mathematical explanation using forces (not energies) and   (b) a simple intuitive explanation to explain to others why the bulge occurs?


How can I either encrypt or render my shell script unreadable?

How can I  encrypt or scramble my shell script so that it's unreadable to the naked eye? Either method would be acceptable, please provide specific steps.


How can I AirDrop my photos and videos from my iPhone5 to my MacBook Pro Retina?

iPhone 5 is running iOS7. Macbook Pro is the 15" MacBook Pro Retina on Mavericks.  I have AirDrop enabled on both but the phone and Macbook don't see each other. Both keep searching, searching, searching ...  FYI, I have enabled Bluetooth and WiFi on both devices are also on the same WiFi network. There is also no firewall between them and they are within 2 feet of each other.  Apple tech is supposed to "just work" and it almost always does so intuitively but this one has me scratching my head. What is going on here?


What is wrong with the argument $1 = \lim_{n\to \infty} n/n = \lim_{n\to\infty} (1/n+1/n+\dotsb+1/n) = 0 $?

Let we have \begin{equation*} n\times\frac{1}{n}=\frac{1}{n}+\frac{1}{n}+\cdots+\frac{1}{n}\mbox{ ($n$ times)}. \end{equation*} Taking $\lim_{n\to\infty}$ to both sides, we get \begin{eqnarray*} \lim_{n\to\infty}1 &=& \lim_{n\to\infty}\left(\frac{1}{n}+\frac{1}{n}+\cdots+\frac{1}{n}\right)\\ \Longrightarrow1&=&0+0+\cdots+0\mbox{ ($n$ times)}\\ &=&0. \end{eqnarray*} I am not an expert of math, and confused that where the confusion is.


Why do statisticians say a non-significant result means "you can't reject the null" as opposed to accepting the null hypothesis?

Traditional statistical tests, like the two sample t-test, focus on trying to eliminate the hypothesis that there is no difference between a function of two independent samples. Then, we choose a confidence level and say that if the difference of means is beyond the 95% level, we can reject the null hypothesis. If not, we "can't reject the null hypothesis". This seems to imply that we can't accept it either. Does it mean we're not sure if the null hypothesis is true?   Now, I want to design a test where my hypothesis is that a function of two samples is the same (which is the opposite of traditional statistics tests where the hypothesis is that the two samples are different). So, my null hypothesis becomes that the two samples are different. How should I design such a test? Will it be as simple as saying that if the p-value is lesser than 5% we can accept the hypothesis that there is no significant difference?


Why can't I call a local variable that has been assigned a global variable? - Python

I am learning Python with Automate the Boring Stuff with Python. In chapter 3 it talks about functions and scopes etc. It states that a local scope can use global scopes. However, with the example code below, it is not true? Example Code: def spam():     print(eggs) #Error!     eggs = 'spam local'  eggs = 'global' spam()  I understand logically that because eggs has not been assigned a value before we are executing print and it is exactly what the book says. But my question is since, eggs has been assigned a value in the global scope. Why does Python not revert to the global scope to pull variable. Since again, local can call/pull global but not other local, but global can't pull local. Cheers.


A question about tensor product of algebras of compact operators.

Let $\cal{H}$ be a separable Hilbert space and $\cal{K(\cal{H})}$ the algebra of compact operators acting on $\cal{H}$. Then $$\cal{K(\cal{H})}\otimes\cal{K}(\cal{H})\cong\cal{K}(\cal{H}\otimes H).$$  How to prove it? I can find a mapping $\phi$ from  $\cal{K(\cal{H})}\otimes\cal{K}(\cal{H})$ to $\cal{B}(H\otimes\cal{H})$, but there is some difficult to prove the range of $\phi$ is justly $\cal{K}(\cal{H}\otimes H)$.  P.S.: Is $\mathbb{M}_n(\mathbb{C})\otimes\mathbb{M}_n(\mathbb{C})\cong\mathbb{M}_{n^2}(\mathbb{C})$?  Thanks a lot!


I want my iptables rules to automatically be loaded on startup. According to the wiki on Debian this can be done by placing a script with the name iptables in /etc/network/if-pre-up.d/ So I did, this is what it looks like:  cat /etc/network/if-pre-up.d/iptables  #!/bin/sh /sbin/iptables-restore < /etc/firewall/iptables.rules /sbin/ip6tables-restore < /etc/firewall/ip6tables.rules   This script works: if I run it as root my firewall rules get applied. But on reboot there are no firewall rules. What am I doing wrong?  On request: the /etc/network/interfaces (I did not touch this file)  user@DebianVPS:~$ cat /etc/network/interfaces  # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).  # The loopback network interface auto lo iface lo inet loopback  # The primary network interface allow-hotplug eth0 iface eth0 inet dhcp


Do "it is time for someone to do something" and "it is time someone did something" mean the same thing?

I know that  It is time (understood: for the speaker or for a group of people including the speaker) to do something.  and  It is time I or we did something.  do not mean the same thing: the first is a simple statement of fact, whereas the second means there is some kind of emergency.  How about these same structures when the action is to be performed by a second or third person?  Does the nuance stated above cease to exist between  It is time for you/him/her/them to do something.  and  It is time you/he/she/they did something.  ?


Integral of $\sec x$ using certain identity

Use the identity $\sec x=\frac{\cos x}{1-\sin^2x}$ to prove that the integral of $\sec x$ equals $\frac12\ln\frac{1+\sin x}{1-\sin x}$. I tried to manipulate it but nothing seems to work. Help.


how to run a compiled CPP file with geany

I have recently compiled a .CPP file with Geany. The result file is a .o file. How can I run this .o program?


Able to disable Intel turbo boost by configuring /etc/rc.local on 14.04, but not on 16.04

I want to disable Intel "turbo boost" on startup of my system. For reason of this, as well as my laptop details, please refer to my Stack Overflow thread:   In an answer I made myself, I used the following line inside /etc/rc.local:  echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo   This solution is partly motivated by this thread: , and was working just as expected, before I upgrade my Ubuntu system from 14.04 to 16.04 in February. But after that it no longer works: the no_turbo value is still 0 and that line has no effect at all.  Of course, I could manually do the following later:  sudo su echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo exit   However, I can't remember doing this every time, and it is very discouraging when I realized that I had forgotten to do so and have to rerun a long benchmarking (like what I am doing now).  Is there an explanation why the same solution fails in 16.04? Or how can I achieve this automatically on startup?    Note I have other lines in rc.local, like for turning off Intel hyperthreading and setting backlight, they all work. It is just this particular line for "turbo boost" that fails. So the problem is not that rc.local is not run.  My machine has UEFI boot loader. Though there is an entry for the so-called legacy BIOS, there are few options there to set. Neither hyperthreading nor "turbo boost" can be configured.    In case someone wonders: the   systemctl enable rc-local.service   does not solve the issue.


Is this series convergent or divergent ? $\sum\limits_{n=1}^\infty \frac{(-1)^n \ln(n)}{n} $

$$\sum_{n=1}^\infty \frac{(-1)^n \ln(n)}{n} $$  How do I determine if this converges or diverges?     I should be able to show this with just the basic library of Calc II tests (Geometric, p-series, Divergence (nth term) test, Integral test, Direct Comparison test, Alternating Series Test, or Ratio test) None of these involved derivatives, either


extending junit testcase from another maven module

In my maven project, I have module A that is dependent on module B. In my module A test case, I am trying to extend one of module B's test case, however I encountered the following trouble whereby Caused by: java.lang.ClassNotFoundException: module-B.TestCase.  Is the reason because the tests themselves are not packaged into the jar? Any idea how to solve this?


Show that infinite Cartesian product is uncountable

let $A_i=\{0,1\} \forall i \in \mathbb Z^+$ and $A^{\omega}= \prod _\limits{i \in \mathbb Z^+}A_i$ thus $A^\omega=\{(a_i)|a_i=1,2 \forall i\in \mathbb Z^+\}$ now here is my problem  let $(\underline x_n)_{n \in \mathbb Z^+}$ where $\underline x_n=(x_{nk})_{k \in \mathbb Z^+}$ be a sequence in $A^\omega$. Define $\underline y=(y_n)_{n \in \mathbb Z^+}$ by $y_n=1-x_{nn}$ for all $n \in \mathbb Z^+$ a) Show that $\underline y \in A^\omega $ and $\underline y \neq \underline x_n$ for all $n\in \mathbb Z^+$ b) $\mathbf{using}$ $\mathbf{a)}$ show that $A^\omega$ is not countable  I did the a) part. And I can prove the part b) $A^\omega$ is uncountable by using diagonal argument. but here i should use the part a). my attempt was first, I suppose $ A^\omega$ is countable. then there exists a bijection from $f:\mathbb Z^+\to A^\omega$. then I can list out all elements in  $A^\omega$. then since I should use a) I have to find a connection between this list and $\underline x_n$s. I am stuck here.


The Duals of $l^\infty$ and $L^{\infty}$

Can we identify the dual space of $l^\infty$ with another "natural space"?  If the answer is yes, what can we say about $L^\infty$? By the dual space I mean the space of all continuous linear functionals.


What happens if a character gains natural weapons they already have?

My character has a bite attack from his race.  What happens if he gains another bite attack from class abilities or spells?  Does the damage increase?  Can he make more than one attack?  Or is it simply that only the better version applies?  I would prefer answers from a Pathfinder context but 3.5e is also acceptable.


My solve error is only .6 yet stil the 3d markers are all over the place in the reprojection

I have picked some quality trackers that stay in point for all of the shot. When I solved the camera motion it said the solve error was as low as 0.6. The reprojected markers are all over the place regardless. As far as I know the value 0.6 is supposed to mean that the solve is really good(less than a pixel of average error) To clarify: I do know how to lower the solve error but 0.6 means that it is already good, still the solve doesn't line up at all. Can someone please help me?


Delete range of lines above pattern with sed (or awk)

I have the following code that will remove lines with the pattern banana and 2 lines after it:  sed '/banana/I,+2 d' file   So far, so good! But I need it to remove 2 lines before banana, but I can't get it with a “minus sign” or whatever (similar to what grep -v -B2 banana file should do but doesn't):  teresaejunior@localhost ~ > LC_ALL=C sed '-2,/banana/I d' file sed: invalid option -- '2' teresaejunior@localhost ~ > LC_ALL=C sed '/banana/I,-2 d' file sed: -e expression #1, char 16: unexpected `,' teresaejunior@localhost ~ > LC_ALL=C sed '/banana/I,2- d' file sed: -e expression #1, char 17: unknown command: `-'


Evaluating the double limit $\lim_{m \to \infty} \lim_{n \to \infty} \cos^{2m}(n! \pi x)$

I have to find out the following limit $$\lim_{m\to\infty}\lim_{n\to\infty}[\cos(n!πx)^{2m}]$$ for $x$ rational and irrational. for $x$ rational $x$ can be written as $\frac{p}{q}$ and as $n!$ will have $q$ as its factor the limit should be equal to 1. the second part of irrational is giving me problems. I first thought that limit should be zero as absolute value of cosine term is less than 1 and power it to infinity you should get $0$. But then I realised that it was wrong. I brought the limit down to this form. $$e^{-\sin^2(n!πx)m}$$ after this I find the question quite ambiguous as they have just said $x$ is irrational. If I take $x$ as $\frac{1}{n!π\sqrt{m}}$ I get the limit as $\frac{1}{e}$ but if I take  $x$ as $\frac{2}{n!π\sqrt{m}}$ I get the limit as $\frac{1}{e^4}$. please help me and tell me where have I gone wrong?


Consider:     If only it could snow in the town, my city would look amazing!   First, I would like to know is it "If only" or "only if"? which is more idiomatic? What about:     only it could snow in the town, my city ...   As another example:     only if I had that car, I would be in Hawaii now       if only I had that car, ....   Second I would like to know do I need "the" before "town"? because I've seen there is no "the" in phrases like "in town", is it a universal rule for any case?


Correct way to update wp_script() url/src?

I tried to update the url/src of the queued $wp_scripts correctly... my aim is to use just relative paths. Therefore I:   loaded the $wp_scripts replace the domain and saved the output.   But it seems that is not the correct way to updated this variable. Pls explain me way.  /*  * Correct all script urls for multiple (alias) domain issue  */ function update_scripts_urls() {     global $wp_scripts;      foreach( $wp_scripts->queue as $handle ) {         $src = $wp_scripts->registered[$handle]->src;         $link = parse_url(home_url());         $domain = $link['scheme'].'://'.$link['host'];         $src = str_replace($domain, '', $src); // replace domain         $wp_scripts->registered[$handle]->src = $src;     } } add_action('wp_enqueue_scripts', 'update_scripts_urls', 101);   EDIT  It seems like $wp_scrips gets updated but the in the header output it shows still the full script url (eg. <script type='text/javascript' src='http://domain.local/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>)? Does the update happens in the to late?


How to shoot a light trail photo where an object is still in focus?

I have come across this picture of a car where the background has a light trail effect but the object (which is the car) is still in focus.  I know how to create the light trail effect but I'm not sure how to keep the foreground in focus. I'm a beginner.  Does anyone know the name of this technique? Was this achieved with just photography or would Photoshop be required?  See example below:


python.sty on TeX Live 2013 - Forbidden to open for writing error

I have a fresh install of TeX Live 2013 and am attempting to compile a file using the python package. Here is the relevant portion of the file  \begin{python} print 'hi' \end{python}   I've compiled successfully on my linux machine with TeX Live 2013, but cannot get my windows 7 machine to compile successfully. When I run latex --shell-escape pytest.tex I get an error which begins with   pytest.py: Forbidden to open for writing ! I can't write on file `pytest.py'. \@python ...mediate \openout \@out =\@outname .py                                                    \newlinechar ='15 \begingr...   Can anyone help me fix this so I can compile latex documents using python.sty on my windows machine?  Update  So I'm pretty certain the issue has to do with permissions. If that is the case it would be really great if there were a few easy tests I could run to determine why \write18 cannot open files for writing / what it is trying to do. I've seen some problems from searching that were related to the TEXMFOUTPUT environment variable, but I don't know (1) what to set as the value of TEXMFOUTPUT in order to make sure that these temporary python files are created in the current working directory and (2) if setting TEXMFOUTPUT would have anything to do with these \write18 permission problems.  Ok, one new piece of information: So, I've created a minimal example:  \documentclass[letterpaper,10pt]{article} \usepackage{python} \begin{document}  \begin{python} print 'hi' \end{python}  \end{document}    When compiled after the `! I can't write on file pytest1.py' It says (Press Enter to retry, or Control-Z to exit; default file extension is '.tex' Is this error because write18 can only write to a .tex file?  At the beginning of the compile on the second line it just says ` \write18 enabled'. So it is not running with restricted \write18. I feel like I am really close to fixing this.  Solved  The comment  was exactly right. I had .py listed in my PATHEXT environment variable. Removing it allowed the file to compile without error.  Just read meta.tex.SE and will credit JosephWright once answer is up.


Can I add a unique constraint that ignores existing violations?

I have a table which currently has duplicate values in a column.  I cannot remove these erroneous duplicates but I would like to prevent additional non-unique values from being added.  Can I create a UNIQUE that doesn't check for existing compliance?  I have tried using NOCHECK but was unsuccessful.  In this case I have a table which ties licensing information to "CompanyName"  EDIT: Having multiple rows with the same "CompanyName" is bad data, but we can't remove or update those duplicates at this time. One approach is to have the INSERTs use a stored procedure which will fail for duplicates... If it was possible to have SQL check the uniqueness on its own, that would be preferable.  This data is queried by company name. For the few existing duplicates this will mean that multiple rows are returned and displayed... While this is wrong, it's acceptable in our use case. The goal is to prevent it in the future. It seems to me from the comments that I have to do this logic in the stored procedures.


What happens to a particle in a well if the well is made bigger?

Let's say we have a particle in an infinite well, and let's also say it is in the ground state. Now we make the well bigger by very quickly moving one of the boundaries of the well.   How do we compute the probability of the particle being in the ground state of the new well? Also, what is the prob of the particle being in the first excited state of the new well?  Assume for concreteness that the inital (1D)well is from x=0 to x=L and the new well is from x=0 to x=2L. We simply pull the right wall of the well to x=2L.


Norm of the multiplication operator $f\mapsto (x\mapsto xf(x))$ on $L^2[a,b]$

We have a linear operator $T : L^2[a,b] \rightarrow L^2[a,b]$ (with $|a| \le |b|$), $f \mapsto (x \mapsto xf(x))$  Now I shall determine what $\Vert T\Vert$ is.   We clearly have $\Vert x \mapsto xf(x)\Vert \le   |b|\,\Vert f\Vert$, so $\Vert T\Vert \le |b|$. But do we also have $||T||=|b|$?


Calculating expected value of gamma-distributed random variable

I am just looking for a quick check whether my reasoning is correct when calculating $E(X)$, given that $X \sim \Gamma(\alpha, \beta)$. My calculations are as follows:    \begin{align*} \text{E}(X) &= \int_0^{\infty} x \frac{1}{\Gamma(\alpha) \beta^{\alpha}} x^{\alpha - 1} e^{-\frac{x}{\beta}} dx\\ &= \alpha \beta  \int_0^{\infty} \frac{1}{\alpha\Gamma(\alpha) \beta \beta^{\alpha}} x^{\alpha} e^{-\frac{x}{\beta}} dx\\ &= \alpha \beta  \int_0^{\infty} \frac{1}{\Gamma(\alpha + 1) \beta^{\alpha + 1}} x^{(\alpha + 1) - 1} e^{-\frac{x}{\beta}} dx \text{ (property of gamma function)}\\ &= \alpha \beta, \end{align*}  since the integrand is the density of a $\Gamma(\alpha + 1, \beta)$-distributed random variable.    I know my answer is correct. However, the answer key in the textbook I have at hand (Introduction to Probability, by Roussas) is different, and is actually very similar to Michael Hardy's answer here ().  In essence it appears that my approach is to turn the integrand into a pdf, whereas the alternate approach is to turn the integral into a value of the gamma function. My method seems very slightly simpler, but the fact that I haven't found anyone else using my approach leads me to ask: is there a flaw in my reasoning?  Thanks.


Differentiablility over closed intervals

In calculus of one variable I read:  A function $f$ is differentiable on an open interval if it is differentiable at every number of the interval.  I wonder why in the definition we suppose that the interval is open. This is the case in Rolle theorem, Mean value theorem,etc.     Do we have a notion of a function being differentiable on a closed interval $[a,b]$?


$a_{n+1}=|a_n|-a_{n-1} \implies a_n \; \text{is periodic}$

Prove that any sequence of real numbers satisfying $a_{n+1}=|a_n|-a_{n-1}$ is periodic.   Although it looks simple, I can't prove this statement...  I tried rewriting the first few terms of the sequence, but nothing interesting showed up...  I'd be mostly interested in hints for this one.


How much of a deterrent is deep and wide water to the Terminators depicted in the Terminator Universe?

Is there any canon information regarding how much of a deterrent deep and wide water would be to the infiltration units depicted in the Terminator Universe?


How do I get a green tag in clash of clans in the newest update of 2015

In clash of clans I'm in a clan that does lots of wars. But the leader tried putting me in the war but can't because I have a red shield (it shows on the far left on a name tag).   How would I get a green shield?


The quotient space $S^3/S^1$ is homeomorphic to $S^2$

Write $S^3=\{(z_1,z_2)\in\mathbb{C}^2:|z_1|^2+|z_2|^2=1\}$. Let $S^1$ act on $S^3$ by $z\cdot(z_1,z_2)=(zz_1,zz_2)$.   (a) Show that $f:S^3\rightarrow \mathbb{C}\times\mathbb{R}$ given by $f(z_1,z_2)=(z_1\bar{z_2},|z_1|^2)$ induces a homeomorphism $\bar f:S^3/S^1\rightarrow K$, where $K$ a compact subset of $\mathbb{C}\times\mathbb{R}$.  (b) Show that $\bar f(S^3/S^1)\cap(\mathbb{C}\times\{t\})$ is homeomorphic to a circle for all $t\in(0,1)$.  (c) Show that $S^3/S^1$ is homeomorphic to $S^2$.  For (a), the equivalence classes of $S^3/S^1$ are $[x]=\{y:\exists t\in[0,1)\;\; \mathrm{with}\;\; e^{2\pi it}y=x\}$. But I'm not sure how to show it is a homeomorphism. $K$ should be closed and bounded so that it is compact by Heine-Borel.  For the rest, I'm pretty stumped.


Regex look for multiples on different lines

So I am trying to put some regex together that looks for 2 instances of a national insurance number. But it needs to find the NIN regardless of its placement so it doesn't matter if there are other words in between or on new lines.    ((\W|^)([a-zA-Z]{2}(|\s|\W))([0-9]{2}(|\s|\W)){3}([a-zA-Z]{1})(.*)){2,}     This is as close as i've got however this only works when on the same line it doesn't work if the NIN is on a different line


How do I set static variables in C++ classes?

I have a class like this:  class example { public:     static void setStaticVar() { example::var = 1; }; private:     static int var; };   But it gives me linker errors and I have no idea why. I want to store some data in the variable that is the same for every instance. That's why I want to use a static variable instead of an instance variable (with an instance variable I would store the same data in every single instance of the class which is a waste of memory).  How do I do this?


STM32 & ST-LINK - Cannot connect to MCU after successful programming

I have built my own board with STM32F7-45VGT6. I have successfully programmed it with ST-LINK v2 (not the original one though) and now I cannot even connect with MCU.  I use ST-Link Utility from ST and SWD interface. It can be the case that I use SWD pins as output and in my code I set them as GPIO output. Can it be the case?  Nevertheless, I connect my reset pin to GND and set "Connect under reset" option in ST-Link Utility but it doesn't work... What can I do?  On the Internet, I have found something about using BOOT0 Pin, but I don't know exactly...


Is there some sort of PDF to text -converter?

I need PDF files to text so I can search over them in bulk from commandline. Is there some converter for Ubuntu, OBSD or similar distro?  Perhaps related post, OCR with ubuntu .


Code for checkbox changed not working on all pages

I am using dataTable.jquery and I have a table that has several pages. Each row has a checkbox, and there is a checkbox for Select All. Now, I have some code that executes on checkbox.change, but it works on first page only. If I go to any other pages, it just checks the checkbox and does nothing. When I return to a page, all the checkboxes I've checked previously are unchecked.  Here is the code:   $('.bulk-checkbox').change(function(){   alert("checkbox changed");   if(this.checked) {     alert("checkbox checked");   }   else {     alert("checkbox NOT checked");      }  });


Formula field is too big to execute (5,480 characters)

I got an error when i am trying to add fomrula in formula field.  Error: Compiled formula is too big to execute (5,480 characters). Maximum size is 5,000 characters  My formula is   (ED__c+Service_Tax__c+Total_Site_Work_Price1__c+Total_Selling_Price_Based_on1__c )*WCTper__c   In this formula ED__c, Total_Site_Work_Price1__c, Total_Selling_Price_Based_on1__c are also Formula fields. And these formulas are also contain fomrula fields.  How can i calculate the formula..?


How to get correct indentation after entering a nested list? I am writing a code review and I could not figure this out by googling. Here is an example of the three formatting styles I tried to use (but none of them works as I would like):  Case 1  The task is to align the last line (see below) "In the first line you use camelCase..." with the last line above the numbered list. In my first attempt, I added a new line (empty line) after the second numbered list item, and then indented by 4 spaces:     Variable name casing: See  on "Snake Case". In Perl, we use "snake_case" instead of "camelCase", and be consistent. Example:   Line 14: my $testType  Line 18: my $right_frame   In the first line you use camelCase, whereas in the second you use     snake_case.     As you can see, this gives the correct indentation but it introduces a blank line above the first numbered item.  Case 2  In this case I do not add the blank line after the second numbered list item ( but still indent by 4 spaces ):     Variable name casing: See  on "Snake Case". In Perl, we use "snake_case" instead of "camelCase", and be consistent. Example:   Line 14: my $testType  Line 18: my $right_frame In the first line you use camelCase, whereas in the second you use     snake_case.      In this case the line is considered as part of the last list item  Case 3  In this case, I try to add two blank spaces (invisible) at the end of the second list item:     Variable name casing: See  on "Snake Case". In Perl, we use "snake_case" instead of "camelCase", and be consistent. Example:   Line 14: my $testType  Line 18: my $right_frame In the first line you use camelCase, whereas in the second you use     snake_case.      In this case the line is considered part of the second item, and hence not correctly indented.  How to achieve the correct indentation?


Let $A$ be an $n \times n$ matrix with real entries, where $n\geq2$.   Let $AA^T = [b_{ij}] $, where $A^T $ is the transpose of $A$. If   $b_{11} + b_{22 }+\cdots+ b_{nn} = 0$, show that $A = 0$.   From what I've gleaned so far, $AA^T$ is a symmetric matrix, and the diagonals are zero. I can't figure out how to solve this question. Is there some property that exists that I'm missing for handling this question?


I'd like some suggestions for good reading materials on the Keldysh formalism in the condensed matter physics community. I'm familiar with the imaginary time, coherent state, and path integral formalisms, but lately, I've been seeing Keldysh more and more in papers. My understanding is that it is superior to the imaginary time formalism at least in that one can evaluate non-equilibrium expectations.


guys when does the deathclaws start attacking my Vault? Does it depends on gametime, Dwellers count or rooms count? Maybe something else? Thanks for answer!


I would like to force the justification (after a \raggedright command) of a paragraph while also having it indented.  I tried the following commands but this doesn't seem to work (only the first line of the paragraph is indented, and not even at the right distance) :  \usepackage{ragged2e} \usepackage{lipsum} ... \raggedright \lipsum[1]  \setlength{\leftskip}{22pt} {\justifying \lipsum[2] \par}  \setlength{\leftskip}{0pt} \lipsum[3]   Would anyone know how to do this ?


Sci-fi novel from the 70’s or earlier about a space rebellion and a small craft

Read it as a child in the mid 80’s in Hebrew.  A young man, the child of a planet’s ruler escapes in a small craft, possibly with his traitorous uncle and love interest.  Escape has something to do with conquest, rebellion and empire?  In the end discovers the rebel base on his home planet.  Spaceship guns and hand weapons were probably a translation to Hebrew of blasters.  The ruler’s title was an odd one: probably plutocrat.   Craft was detailed to have a bridge and one other room to show it’s small.   There was also a discussion of rations available in it.  Unlikely to be an obscure text, as it was translated.


Why is the voltage drop across an ideal wire zero?

I'm having trouble conceptualizing why the voltage drop between two points of an ideal wire (i.e. no resistance) is $0~V$. Using Ohm's Law, the equation is such:  $$ V = IR \\ V = I(0~\Omega) \\ V = 0$$  However, conceptually I can't see how there is no change in energy between these two points.  It is my understanding that the electrical field of this circuit produces a force running counterclockwise and parallel to the wire which acts continuously on the electrons as they move through the wire. As such, I expect there to be a change in energy equal to the work.  Voltage drop is the difference in electric potential energy per coulomb, so it should be greater than $0~V$:  $$ \Delta V = \frac{\Delta J}C \\ \Delta J > 0 \\ \therefore \Delta V > 0 $$  For example, suppose I have a simple circuit consisting of a $9~V$ battery in series with a $3~k\Omega$ resistor:    If the length from point 4 to point 3 is $5~m$, I would expect the following:  $$ W = F \cdot d \\ W = \Delta E \\ F > 0 \\ d = 5 > 0 \\ \therefore W > 0 \\ \therefore \Delta E > 0$$  Since work is positive for any given charge, the change in energy for any given charge is positive -- therefore the voltage drop must be positive. Yet, according to Ohm's Law it is $0~V$ since the wire has negligible resistance.  Where is the fault in my logic?


I want to write a survey on one emerging research topic in wireless communications (It can be applied to any field!). There are almost 500 papers on this topic as published or in early access. And the publishing rate in this topic is increasing day by day. So, I want to write a survey on this topic keeping in mind that it will get high citation and it will help new scholar who are in struggle with this topic. I found only one survey written by some reputed authors, however it lacks in many ways, like detailed information related to particular direction, it just assembles the papers in a good manner. I want to pick some directions and discuss  important approaches with good connection between them. However, I find it very difficult to proceed with large number of papers. Is there any good way to handle the survey process in a good efficient and quick way? PS. According to me, many people have already started to write this.


How can I force SQL Server Management Studio to update the IntelliSense cache?

IntelliSense in SSMS isn't updating unless I shut it down and restart. I've tried disconnecting from the server and reconnecting while the SSMS session is active, but that isn't working.  Steps to recreate:    Create a table  Select something from that table SSMS displays squiggly red lines under it with the tip "invalid object name" Execute the query   How can I force IntelliSense to update without restarting SSMS?


On an server running multiple ASP.NET sites, is it better to use one application pool per site or for sites to share a single application pool?  What are the advantages or disadvantages inherent to each setup?  Or is there a hard and fast rule here?


Why does the `reset` command include a delay?

The reset command includes a delay, between clearing the screen and returning.  This is even on the latest terminal type xterm-256color.  Why?  man reset does not mention a delay, only the printing of special strings.  (It doesn't mention clearing the screen either.  I assume this is included under the terminal initialization string).  I notice the follow output in strace -f reset:  nanosleep({tv_sec=1, tv_nsec=0}, 0x7ffe1964f100) = 0 ioctl(2, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0


How can I execute default route commands at startup (two NICs)?

So I've got one server box that has two network cards. One connects to the Internet via ISP router (and serves a website) and one connects to a LAN. The thing is that in order for everything to work right, I need after each reboot to run these commands:  sudo route del default gw 192.168.10.1   #the gateway of the LAN card sudo route add default gw 10.10.10.1     #the gateway of the ISP router card   My question is, how can I make these commands run automatically at system reboot (and not at any user logon, as nobody logs into the box)?


How can a singularity in a black hole rotate if it's just a point?

I guess nobody really knows the true nature of black holes, however, based on everything I know about black holes, there is a "singularity" at their center, which has finite mass but is infinitely small and thus infinitely dense.  So a black hole is really just a point mass that dramatically warps the space-time around it so that an event horizon is achieved.  What doesn't make sense to me is how a true mathematical "point" can rotate, or at least how it is even possible to determine if a point is rotating (or if it should even make a difference about whether or not it is rotating, for the same reason it would be impossible to tell if a perfect, featureless sphere were rotating (I know it would have higher rotational energy but lets assume you can't measure that because a true "point" can't attain rotational energy since it has no radius)).  The only conceptual solution I have to describe a rotating black hole would be to compare it to a rotating whirlpool, where the surface of the water is the fabric of space-time... but this is different because there is no "singularity" in a whirlpool that causes the water around it to rotate, whirlpools form from flow of water around a point (put into motion perhaps by some kid swirling water in a 2-liter bottle... it's due to an external cause), but the only thing that could cause rotation around a black hole would be the singularity itself, which doesn't make sense because, once again, how can we know if a true point is actually rotating?  Aside from everything I've said, here is what I am actually asking:  Why/how do some black holes rotate... what is the mechanism of their rotation (is analogous to a spinning point or a 3-d whirlpool, or something different)?


Are Hogwarts portraits able to learn/respond to novel stimuli?

Much in the way that Dumbledore told Harry that it was unhealthy to stare at the reflection of his parents in "The Socerer's/Philosopher's Stone," I get the feeling that it would be easy to want to form a relationship with a portrait of a dead loved one.  For example, were I Harry, I might want to go back and speak with the Dumbledore portrait on a regular basis, to tell him about my kids and my career, and hear what "he would have said" on subjects he otherwise will never have the opportunity to comment on.  But are Hogwarts portraits - which have been described in other answers here to mainly repeat "catchphrases" and mimic general behavior - able to respond to novel stimuli and learn new information?  The case of Phineas Nigellus seems to indicate that they can, to some degree.  My impression (based upon previous answers to questions relating to the portraits) is that it would be like talking to an advanced A.I. bot, in that it might respond in appropriate, if occasionally bland or repetitive ways.  Although the examples we have in the actual books make their responses seem reasonably sophisticated and sentient.    So what kind of response would Harry would get if he returned to Dumbldore's portrait to tell him, "I married Ginny Weasely!" or "I named one of my sons after you!" or "Do you think I should be an Auror?"


Prove by induction that $\sum_{i=1}^{n} i \cdot 2^i = (n-1) \cdot 2^{n+1} +2$. Help finding my mistake

Prove by induction:   $$\sum_{i=1}^{n} i \cdot 2^i = (n-1) \cdot 2^{n+1} +2$$   Basis: let $p(n)$ be the predicate.  Let $n=1$ this gives $(1-1) \cdot 2^1+1+2 = 2$ and $1 \cdot 2^1 = 2$ so its true for $p(1)$  Induction: assume $n=k$ thus $$\sum_{i=1}^{k} i \cdot 2^i = (k-1) \cdot 2^{k+1} +2$$  when $n=k+1$:  $$\sum_{i=1}^{k+1} i \cdot 2^i = \sum_{i=1}^{k} i \cdot 2^i + ((k+1)-1) \cdot 2^{(k+1)+1} +2$$  $$ =(k-1) \cdot 2^{k+1} +2 + ((k+1)-1) \cdot 2^{k+2} +2$$  $$= 2^{k+1}k - 2^{k+1} +2 +2^{k+2}(k+1) - 2^{k+2}+2$$  $$=\frac{2^{k+1}k-2^{k+1}+2 \cdot 2^{k+1}(k+1)-2 \cdot 2^{k+1} +4}{2}$$  $$=2^{k+1}k-2^{k+1}+2^{k+1}(k+1)-2^{k+1}+2$$  $$= (k-1) \cdot 2^{k+1}+((k+1)-1) \cdot 2^{k+1} +2$$  I've been messing around with the arithmetic part of this for a while now and it's getting frustrating, I'm thinking that I've possibly made a mistake at the beginning of the induction step and that's why I cant get this to work, or maybe I'm just missing something in the algebra, either way can someone please help.


Length of time from Rogue One to Battle of Yavin

It seems to me that a surprisingly short time passes between       Jyn Erso's rescue    and the destruction of the Death Star.   I'm not sure, but       (disregarding the opening scene) Rogue One seems to take place in less than a week's time,    and A New Hope in maybe even less time, with       a couple hours in between the films for the jump to Tattooine.    Can anyone point me to a specific timeline for       Jyn's Rescue   during Rogue One until the Battle of Yavin?


Sorry if this sounds like a dumb question but it's something that has bugged me for a while. I need some explanation on    function custom_function () {     global $post; }   I understand from PHP that a global variable is available is used to access global variables from anywhere in the script. I know global $post usually set when a new query is being set. What would happens if global variable is not declared in case of WordPress query posts? I know how to use it in WordPress but have not fully understand why. Thank you.


Want a list of prime numbers returned from my function but only getting the first value?

I have the following function:  def prime(number):     for num in range(1,number):         if num > 1:             for i in range (2, num):                 if (num%i == 0):                     return("not a prime")             else:                 return(num)  print(prime(9))      Output: 2   Please explain where I am doing a mistake or how can I get a list of all prime numbers in any input range ex:-9 or 100 or 300.


How can I add the applications icon to the Ubuntu launcher? I have tried in the search engine but I can't find a way to do it. For example, in mac, you can add the complete apps folder to the bottom bar, and once you click in the folder you will see all the apps. Can you please help me?


If a cyclic group has an element of infinite order, how many elements of finite order does it have?  I know that the order of the entire group must be infinite, for an element of the group must have an order less than the group order. My first thought was that there are no elements with finite order in this group, however now I'm believing that there are infinitely many elements of finite order, since the group should have infinitely many elements. Can someone explain the solution?


Obviously, it depends on the question/answer you're posting. But on average, is there some magic number of characters that will get you the best reputation bump?  My original hypothesis was that we'd get a unimodal shaped graph, increasing towards some optimal value as more information was added to posts, and then decreasing as the posts became overly verbose. Of course, I wasn't expecting an exact integer number that was the magic length e.g. 1047. Rather, I would have expected a sort of window in which the posts performed best.  I set out to investigate this, just for our biggest site, , and composed a query that gives us a map from post length to average score:    The results: there seems to be some truth to my original hypothesis, but much noise. I ran the above query and then ran it again three more times, each time restricting the post score by some upper limit to try to remove outliers. Below are the results. Can someone with a statistical background improve on these results and provide a solid interpretation of them?  In the following graphs we have number of characters on the x axis and average score on the y axis. I should really have labelled the graphs (will do next time).   No Limit on Score  It seems to be an ever so gentle slope upwards and then downwards, but it's fairly flat for the most part, other than the outliers.    Score <= 100  Again, there are what look like outliers. But there's a pretty smooth looking shape up to around 16K and then outliers start to dominate. The sweet spot seems to be between 16K and 30K.    Score <= 20  It seems to be a sweet spot between around 24K and 33K, roughly.    Smoothing  Perhaps what's needed to make these results more sensible is some sort of sliding-window smoothing. For the <= 20 case, we see the graph jump between positive and negative values. This demonstrates that we probably don't have enough data to plot the "true" relationship between exact number of characters and average score, i.e. the relationship that would emerge as we approached an infinite number of posts.  A commenter below points out that binning is probably what we want here.   Update  All of the above graphs were quickly mocked up in Excel; an astute commenter points out that this is probably the reason for the rounding to integer values causing the very weird choppy looking final graph. The related question gives more statistically sound results, and should be consulted instead of this one. Also, the related question talks exclusively about question length rather than merely post length. From a data analysis point of view this probably makes more sense. Questions and answers are different things so mixing up their analysis as above probably doesn't make sense.   Another problem with the above is that we are missing the sample size per data point. Sample size is crucial when attempting to draw any statistical conclusions from data.


how to forward variable number of arguments to another function?

In my application I have a lot of logs. I do accumulate all errors from all logs in one place called errorsLogger. I've implemented it this way:  static Logger errorsLogger;  ....  void Logger::Error(std::string format, ...) {     va_list arglist;     va_start(arglist, format);      if (this != &errorsLogger) {         errorsLogger.Error(format, arglist);      // how to forward parameters?     }      vfprintf(logFile, , format.c_str(), arglist);     fprintf(logFile, "\n");      fflush(logFile);     va_end( arglist ); }   However this code doesn't work as expected errorsLogger contains a little bit strange strings - it seems variable arguments was not passed. How to fix my code to be valid?


Why volume preservation is important for Metropolis update?

I think my question is naive but I would like to ask why why volume preservation is important for MCMC and specifically Metropolis update.I'm reading the following paper  where it says      The significance of volume preservation for MCMC is that we needn’t   account for any change in volume in the acceptance probability for   Metropolis updates. If we proposed new states using some arbitrary,   non-Hamiltonian, dynamics, we would need to compute the determinant of   the Jacobian matrix for the mapping the dynamics defines, which might   well be infeasible.   where the Metropolis update for HMC is defined by   $\alpha=min\left \{1,exp\big(-H(q^{*},p^{*})+H(q,p)\big)  \right \}$  where $q$ denotes the position and $p$ denotes the momenta and $(q^{*},p^{*})$ is the proposed state.  What would be the problem for $\alpha$ if we had different volume for the proposed $(q^{*},p^{*})$.


How can I add a fixed point to a line of best fit?

I am using y = {create col/linear regression={y=data}} with addplot to generate a line of best fit from data I'm pulling in from a file. How can I force the line to include the origin as a point it must pass through?  MWE:  \documentclass{article}  \usepackage{pgfplots}  \begin{document}     \begin{figure}[H]         \begin{tikzpicture}             \begin{axis}                 \addplot table [                     x = data1,                     y = {create col/linear regression = {y = data2}}                 ] {data_file.txt};             \end{axis}         \end{tikzpicture}     \end{figure} \end{document}


Does it cost more to run a refrigerator on an extension cord?

My new mini refrigerator is plugged into a 50 ft extension cord that is plugged into my house. Does it cost more to run because of the cord?


Does a circle become bigger or smaller when rotating?

Say a circle is rotating about its centre at a relativistic speed.  If it were not rotating in your reference frame, its circumference divided by its diameter would be $\pi$.    Now, because it is rotating, let us say we have been using little sticks all along to measure circumference and diameter.  We would need a ratio of $\pi:1$ sticks to build the static circle.  However, these sticks change when the circle is spinning because of length contraction.   So, the sticks along the diameter become thicker, but not shorter.  The sticks along the circumference, however, become smaller, and not thicker.  Therefore, if a circle is rotating in a reference frame, $\frac{circumference}{diameter}$ is not $\pi$.  This is an example of relativistic geometry.  My question is: how does area change?  I believe the area becomes larger.  Here is my reasoning:  The rotating circle has a larger circumference than before, therefore the 'new $\pi$' is greater than the 'old $\pi$'.  And, because this circle is spinning around its centre, it is still a circle to you even when its spinning.  Therefore, area is still $\pi r^2$; but this time, $\pi$ is larger, therefore the new area is larger.  I can also think of a counterexample:  Imagine using a bunch of smaller circles within the larger circle to estimate its area.  When the circle begins spinning, these circles shrink because of length contraction.  Therefore, these circles become smaller, and the overall area is smaller.  However, this may also be interpreted as changing the metric of the space by requiring more sticks to create the diameter of the circles, contradicting the argument that the circle gets smaller and actually agreeing that it gets larger.  Which is correct?  Why?  EDIT: I chose to distinguish my question from others because the reasoning I offer is not something explored in-depth in other questions/answers and is a part of the question that I believe enhances it.


What are the total number of ways to arrange $N$ objects such that first $K$ are deranged? That is, how many permutations of $N$ objects do not fix the first $K$?  I know the general formula for the derangement of $N$ objects. Is there any way the above problem be reduced to this one?


subfigure vertical alignment although different large subcaptions (subfigure environment; subcaption package)

I am using the subfigure environment provided by the subcaption package by Axel Sommerfeldt. Although reading the manual, I do not find a solution.  I would like to vertical align subfigures although they have different sized subcaptions  \documentclass[a4paper,oneside,10pt]{scrartcl}  \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption}  \begin{document}  \begin{figure} \centering \begin{subfigure}[b]{0.3\textwidth}         \centering         {\rule{3cm}{2cm}}         \caption{Small subcaption.} \end{subfigure}% \begin{subfigure}[b]{0.3\textwidth}         \centering         {\rule{3cm}{2cm}}         \caption{Super super super super super super super super super super super super super super super super super super super large subcaption.} \end{subfigure} \caption{Cool (left) and uncool (right) pictures.} \end{figure}  \end{document}   not desired output    desired output    thx Benjamin


I have several constants that I use, and my plan was to put them in a const array of doubles, however the compiler won't let me.  I have tried declaring it this way:  const double[] arr = {1, 2, 3, 4, 5, 6, 73, 8, 9 };   Then I settled on declaring it as static readonly:  static readonly double[] arr = { 1, 2, 3, 4, 5, 6, 7, 8, 9};   However the question remains. Why won't compiler let me declare an array of const values? Or will it, and I just don't know how?


Is there any way I can join my friends world when they are offline?

Me and my friend have a world that we have been playing on for awhile. If I want to play on the world he has to be online because he made the world. Is there any way to allow me into the world when he is offline?


Multiple citations: citation order different to bibliography order

I wish to cite several sources at once and sort my in-text citations in a different manner to how they appear in my bibliography. I want my citations to be sorted by year and my bibliography to be sorted by author. I am using BibLaTeX with Biber. I used  to achieve this with TeX Live 2015 but since upgrading to 2016 (as well as upgrading all my packages) this does not work.  Below is a minimal working example (with a second bibliography for illustrative purposes). I wish for the citations to be sorted ascending by year (2001, 2002, 2003) and the bibliographies to be sorted alphabetically (a, b, c) and descending by year (2003, 2002, 2001) respectively, but below is an image of the result; the bibliographies stay true to the desired sorting but the citations in-text are sorted descending by year.  If I remove the last \newrefcontext then everything (citations and bibliographies) is sorted alphabetically, and if I remove both \newrefcontexts then everything is sorted ascending by year (which was the option specified when originally calling BibLaTeX). It seems that the citations follow the last sorting referenced; ynt as per BibLaTeX options when both \newrefcontexts are removed or else whatever sorting is specified in the last \newrefcontext.  I am compiling in order pdflatex, biber, pdflatex, pdflatex and am on MacTeX.  It seems this would have worked as desired in TeX Live 2015 so is this a bug or has something changed which requires the citation sorting to be set in some other way?  \documentclass{article}  \usepackage[            backend=biber,            style=authoryear,            sorting=ynt,            sortcites,            ]{biblatex}  \usepackage{filecontents} \begin{filecontents}{lib.bib} @article{test1,   author = {b},   title = {b},   year=2003, } @article{test2,   author = {c},   title = {c},   year=2001, } @article{test3,   author = {a},   title = {a},   year=2002, } \end{filecontents}  \addbibresource{lib.bib}  \begin{document}      Hello World! \parencite{test1,test2,test3}      \newrefcontext[sorting=nyt]     \printbibliography      \newrefcontext[sorting=ydnt]     \printbibliography  \end{document}     Edit  I have a workaround but it's super crap: Typeset the document with global sorting=ynt, copy the pdf to another file, then typeset the document with global sorting=nyt; using a PDF editing tool (Apple's Preview suffices) cut the pages containing the bibliography with the desired sorting from one PDF and paste into the other. As I said super crap. I'm not sure if I'd even do this as I'd feel dirty, but it's a workaround nonetheless.  If a solution does not exist or this is a bug without a patch, then what would be similar but much better would be some kind of package (which probably doesn't exist) which only changes certain pages at a time within the PDF (while still actually 'compiling' the whole document so that all the citations are done). It might look something like:  % document preamble % ...  \usepackage{onlychange} \onlychangerange{10,12}  % Bibliography found on pages 10--12 % On next compilation will typeset all pages except 10--12  % ...   It's a long shot but maybe someone knows of such a package or this rambling has inspired an actual solution.


How can I calculate what the effect of an extension tube will be?

There must be a mathematical description of the difference that an extension tube makes to a lens -- is it something that can be easily described?  (For example, with teleconverters you can say things like "a 2x teleconverter will turn a Y-mm lens into a 2Y-mm lens, and will lose you 2 stops." Is there something similar for extension tubes?)  If there's nothing much you can say about magnification, in general, what about the change in closest focal distance? Is that also lens-dependent?  What about if we factor out the lens: is there any general way to compare the effects of (say) a 12mm and a 24mm extension tube on the same lens?


Arabic and Hindi Data not Showing Correctly PHP

I uploaded csv file using phpmyadmin, and it is correctly uploaded and data is displayed correctly as showing in the following image. Table Structure  Data in the Database  But on browser it is showing like this, means unreadable just ????? Showing on the page.  Here is how i am getting data using php function get_quran_surat(){         $query ="select suraid,suraname from quran group by suraid,suraname";         $result=$this->query($query);         $this->setcharset();         $rows=array();         while($row=$this->fetch_array($result)){             $rows[]=$row;         }         return $rows;    }  Also add the utf-8 in head section of the page.  Edited Table Structre  Question How can i show readable data in the browsers ?


SSH brute-force from my network / domain

Twice a week I receive an email to abuse@mydomain.tld that says:  An attempt to brute-force account passwords over SSH/FTP by a machine in your domain or in your network has been detected. Attached are the host who attacks and time / date of activity. Please take the necessary action(s) to stop this activity immediately. If you have any questions please reply to this email.  Host of attacker: <MYIP> => server.mydomain.tld => mydomain.tld Responsible email contacts: abuse@mydomain.tld, abuse@ovh.net Attacked hosts in our Network: 37.228.155.101, 185.39.222.116, 77.75.254.116, 185.39.221.179, 37.228.154.167, 37.228.154.61, 85.158.181.17, 185.39.222.20  Logfile entries (time is MET / GMT+1): Sat Jun 22 06:51:55 2019: user: vnc service: ssh target: 185.39.221.179 source: <MYIP> Sat Jun 22 06:48:29 2019: user: mysqldump service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:46:59 2019: user: testftp service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:45:59 2019: user: www-data service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:44:29 2019: user: ubuntu service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:43:29 2019: user: postgres service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:41:59 2019: user: ubuntu service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:40:59 2019: user: dong service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:39:29 2019: user: root service: ssh target: 185.39.222.116 source: <MYIP> [ ... other 4 IPs ... ]   They are always the same 4 IPs. For SSH authentication I use Google 2 factor, I have root user disabled and only an user allowed. I have also changed che port. This is a VPS by OVH where I have a mail server so I'm a little worried.


find a specific word and wrap with a span tag

i am not sure the best way to go about this. here is the problem. i have a menu (list items) that has an irregular pattern of display. i cant alter the html directly as it is being spit out of a cms. i would like it so that if a word in an array matches a word in the link then that word has a span wrapped around it. this is that code simplified:
About My Store

Find Locations
   result i want is this:
About My Store

Find Locations
   i can find the first word(s) doing this:        $(function() {     $.fn.wrapStart = function (numWords) {     var node = this.contents().filter(function () { return this.nodeType == 3 }).first(),         text = node.text(),         first = text.split(" ", numWords).join(" ");      if (!node.length)         return;      node[0].nodeValue = text.slice(first.length);     node.before('' + first + ''); };   $("li.item1 a").wrapStart(1);   however, what i would like to do is look through an array list and wrap those specific words that i want  in whatever position they occur.  the array would be like about, store, faq...  the script would look for those words and wrap them...  not really sure how to go about this. if its easier. since the big words only occur either at the beginning or the end but not in middle... i could have another function that looks for the last word(s).  there are only 5 menu  items (wont change) and the words will never change, which is why i thought of just using an array...  here is the output i get of the plugin use:

   About   my store


how to write test class for delete batch?

Here is the code  global class DeleteRjectedQuote implements Database.Batchable{     global Database.QueryLocator start(Database.BatchableContext BC){         return Database.getQueryLocator([select id,Status from Case where Status='Escalated']);     }     global void execute(Database.BatchableContext BC,list lstcase){          if(!lstcase.isEmpty()){             delete lstcase;         }      }     global void finish(Database.BatchableContext BC){ }  }   test class:: i have gone through trailhead but I am getting 0 codecoverage. How can we increase code coverage::                                                                                @isTest public class TestDeleteRjectedQuote {     @isTest static void testDeleteRjectedQuotemethod(){         Test.startTest();         Case qt = new Case();         qt.status = 'escalated';         insert qt;            DeleteRjectedQuote drq = new DeleteRjectedQuote();         database.executeBatch(drq);         Test.stopTest();     } }


How can I scale my mindmap down in beamer?

I am trying to scale my mindmap tikzpicture down in beamer, but I am unable to reduce the size of the circle in the middle.  \documentclass{beamer}  \usepackage{tikz} \usetikzlibrary{mindmap}  \tikzset{level 1 concept/.append style={font=\sf, sibling angle=72,level distance = 25mm}} \tikzset{level 2 concept/.append style={font=\sf, sibling angle=45,level distance = 15mm}} \tikzset{level 3 concept/.append style={font=\sf, sibling angle=45,level distance = 15mm}} \tikzset{every node/.append style={scale=0.6}}  \begin{document}  \begin{frame} \begin{tikzpicture}[mindmap, grow cyclic, every node/.style=concept, concept color=blue!40, align=flush center]     \node{Water}     child { node {River pollution}}     child { node {Water supply}}     child { node {Water reuse}}     child { node {Water conservation / demand}}     child { node {Changing thoughts around water use}} ; \end{tikzpicture} \end{frame}  \end{document}


Is it possible to have plain text and a link in the same cell?

I've got a document that's convenient to keep in a spreadsheet because of calculations, but I also have a significant amount of text that I'd like to keep in the same place. Some of that text involves hyperlinks, preferably in line with plain text, but my attempts at figuring out how to write a formula that prints the output from HYPERLINK() next to plain text have all resulted in parsing errors.  The result I'm looking for is      plain text   So far I've tried  =HYPERLINK("http://google.com", "Google") + plain text =CONCATENATE(HYPERLINK("http://google.com", "Google"), plain text)   Google's documentation isn't leading me anywhere.


Phrase for targeting surface level problems?

I'm looking for a phrase that describes trying to fix problems caused by underlying issues, with the result of compounding the issue. I usually call this "targeting surface problems rather than root problems", but my terminology is verbose.  Example 1: A government bans buying and selling bananas in the state. Later, it passes a clause allowing citizens to purchase imported bananas.  Example 2: A divided highway is erected with two lanes going in each direction but, since it gets lots of traffic, the shoulders are widened into new lanes. This leaves no shoulder room.  What would be a more concise phrase?


Favicon on blog.stackoverflow.com needs to be updated (again)

The  was , back in 2009, to have proper alpha transparency so that it looks good on dark backgrounds too.  Apparently, it needs fixing again:  Please replace the ugly blog favicon with the .


I have a .bib document called References.bib saved in the following directory: C:\Users\dvale\Documents\3_References\References.bib  This file contains this entry: @Article{Ballot2014,   author    = {Ballot, Andreas},   title     = {Diversity of cyanobacteria and cyanotoxins in {Hartbeespoort Dam, South Africa}},   journal   = {Marine and Freshwater Research},   year      = {2014},   volume    = {65},   number    = {2},   pages     = {175--189},   issn      = {1323-1650},   doi       = {10.1071/mf13153}, }  I created a document and cited this reference, however the citation is not appearing, apparently because the .bib file was not found. I'm using biber as bibliographic tool (if is important this information). \documentclass[12pt,a4paper]{article} \usepackage{biblatex} \addbibresource[location=remote]{C:/Users/dvale/Documentos/3_References/References.bib} \begin{document} Example \cite{Ballot2014} \printbibliography \end{document}  When I compile the bibliography (F8 in TeXstudio) the following error appears ERROR - Cannot find 'C:/Users/dvale/Documentos/3_References/References.bib'!  EDIT 1: I use JabRef to create my .bib files with UTF-8 encoding The .blg file has the following information in the notepad [0] Config.pm:312> INFO - This is Biber 2.15 (beta) [0] Config.pm:315> INFO - Logfile is 'MWE.blg' [105] biber-MSWIN64:330> INFO - ===  [127] Biber.pm:415> INFO - Reading 'MWE.bcf' [234] Biber.pm:952> INFO - Found 1 citekeys in bib section 0 [251] Biber.pm:4334> INFO - Processing section 0 [267] Biber.pm:4523> INFO - Looking for bibtex format file 'C:/Users/dvale/Documentos/3_References/References.bib' for section 0 [502] Utils.pm:411> ERROR - Cannot find 'C:/Users/dvale/Documentos/3_References/References.bib'! [502] Biber.pm:132> INFO - ERRORS: 1


What does '>/dev/null 2>&1' mean in this article of crontab basics?

I am reading an article about   There is something about disabling automatically sending emails.        Disable Email By default cron jobs sends an email to the user account executing the cronjob. If this is not needed put the following   command At the end of the cron job line.  >/dev/null 2>&1       What is the detailed meaning for 2 > & and 1? Why putting this to the end of a crontab file would turn off the email-sending thing?


Prove the convergence of the sequence $a_{1} = 4$, $a_{n + 1} = \frac{a_{n}}{2} + \frac{2}{a_{n}}$, $n = 1, 2, \ldots$  I'm pretty sure the way to do it is to show $a_{n} > 2$ for $n = 2, \ldots$ and then maybe use the Monotone Convergence Theorem to show it converges to $2$, but I think this also might be wrong. Can someone please help me with this problem? I don't know how to prove a bound for it.


Sending a JavaScript variable to a PHP function

I am trying to send a value in JavaScript variable to Drupal. I am calling an external js file in hook_nodeapi(). I want to send a value from this external js file to Drupal, and want to use this value in Drupal in hook_block. For example  hook_nodeapi() {   // call(external.js) } external.js var sendData =10;  hook_block {   case view:   // need to access sendData value }   I tried this using cookies, but I think that is not the best way. How can this be done?


Institute Name in @masterthesis Citations

I need to cite master thesis and the lecture notes into a document. But the problem with @masterthesis and @unpublished citations is they don't print an institution name in the pdflatex output of bibliography.   `\documentclass{article}   \usepackage{filecontents}  \usepackage[ backend=biber, style=numeric, sortlocale=de_DE, natbib=true, url=true,  doi=true, eprint=false ]{biblatex} \addbibresource{bibliography.bib}  \begin{filecontents}{bibliography.bib} @masterthesis{bhgt, title={Bike Model}, author={Fris}, year={2016}, school={University A}, address={XXX} } @unpublished{Map, title = {Electrical Engineering Book}, author={Koch}, howpublished = {Lecture Notes}, Institution= {University B}, year = {2015} } } \end{filecontents}  \begin{document}  Citation Test:  \cite{bhgt} and \cite{Map} \printbibliography  \end{document}`   I get this bibliography output:         [1] Fris. Bike Model. XXX, 2016.   [2] Koch. “Electrical Engineering Book”. Lecture Notes. 2015.       Any suggestions, how we can also print an institute name?


Traversing through subdirectories and create simillar directory structure & then process each file in sub directories

I want to create a batch script to process the directory and files in  that directory, Basically I am using one tool to convert files in  directory to some format and it can take each file separately also can  handle complete directory.Now i want to convert all the files in  directory/sub directory with same directory structure, e.g., suppose I have 3 directories:  ║ ║═════ Folder 1 ║         ║ ║         ║══════ Folder A ║                     ║ ║                     ║═════ File1.adt ║ ║═════ Folder 5           ║           ║═════ File5.adt   Now i want the conversion of above files in same directure structure but can be at different location.  ║ ║═════ Folder 1 ║         ║ ║         ║══════ Folder A ║                     ║ ║                     ║═════ File1.txt ║ ║═════ Folder 5           ║           ║═════ File5.txt


Problem with "If"/"else" statement in python

I am just getting started learning, and I've been trying for awhile to get this done but I don't know what I am doing wrong  name = input("Enter name :") if name is "Uber":     print("Hello there, General "+ name ,",you are a bold one!") else:     print("Begone, " + name , ", you do not belong here.")   I want it to say "Hello there, General Uber, you are a bold one!" if the input is Uber, otherwise it must say "Begone (name),you do not belong here."


pgfplots: shade area between two table-generated curves

I have three statistical quantiles generated via \addplot table.  I would like to shade the area between the highest and lowest quantiles (the mid one is the median). If I use \closedcycle, I shade all the area until the x axis. The quick solution would probably be the fillbetween library, but I got a compilation error (even after having updated the PGFPplots pakckage). Is there an alternative efficient solution to shade between two curves in PGFPlots?


How can I verify whether my name is blacklisted by Indian immigration?

How can I check whether my name is blacklisted by Indian immigration?


Actually, I've already seen the solution, but I still don't understand. The solution used partitioned matrices. Plus, somebody teach me how to put mathematical symbols by mobile.. How do I prove $\operatorname{rank}(ABC)\geq \operatorname{rank}(AB)+\operatorname{rank}(BC)-\operatorname{rank}(B)$


How to show that for all k, $k! \ge (k/2)^{k/2}$

I'm working on a homework problem that has me showing a "$\Omega(n\log k)$ lower bound on the number of comparisons needed to sort a sequence of $n$ elements, when the input sequence consists of $\frac{n}{k}$ subsequences each containing $k$ elements. Each element in a subsequence will be larger than its preceding subsequence and smaller than its succeeding subsequence."  Essentially, I just need to sort $k$ elements in each of the $\dfrac{n}{k}$ subsequences.  I realize that to do this I need to show that the maximum possible height of a binary tree $2^h \geq (k!)^{n/k}$. I did this to try and solve it (assuming we are using $\log_2x)$:  $\log(2^h) \geq \log((k!)^{n/k})$  $h \geq \dfrac{n}{k}\log(k!)$  This is as far as I got. However, my professor told me that in order to solve the problem I would need to prove that for all $k$, $k! \geq \left(\dfrac{k}{2}\right)^{k/2}$  I can obviously see why this would be true, but I don't really know how to prove it. Looking it up online I found an answer that someone posted stating:     (1)$\qquad$ $k! = k(k-1)(k-2)\ldots(2)(1)$      (2)$\qquad$ $k! \geq k(k-1)(k-2)\dots\left(\dfrac{k}{2}\right)$      (3)$\qquad$ $k! \geq k(k-1)(k-2)\ldots\left(\dfrac{k}{2}\right) \geq \left(\dfrac{k}{2}\right)\left(\dfrac{k}{2}\right)\ldots\left(\dfrac{k}{2}\right)$      (4)$\qquad \geq \left(\dfrac{k}{2}\right)\left(\dfrac{k}{2}\right)\ldots\left(\dfrac{k}{2}\right) = \left(\dfrac{k}{2}\right)^{k/2}$      For (2), half of terms are greater than $\frac{k}{2}$ and half are   smaller drop all terms less than $k$      Since $\dfrac{k}{2} \geq k$ we can write (3)   From this answer I know that by plugging in $\dfrac{k}{2}$ for $k!$ in the original equation will give me the answer $\dfrac{n}{2}\log\left(\dfrac{k}{2}\right)$. But I don't understand why we dropped half of $k!$ and how we could know that $\dfrac{k}{2} \geq k$. I understand part (4) but I don't really understand the transformations taking place in between (1) and (2), and (2) and (3).


How can I translate a Magic card printed in a language that I don't know?

I bought a bulk pack of magic cards today and one of them was in a foreign language. I don’t know which language it is. Google translate is not recognizing it, even when I take a picture of it. How can I determine what the card says?


GLM and categorical variable R - remove one category

I am currently running quasipoisson models with a continuous response variable and 13 covariates. I am using glm() and summary(). Most of my covariates are continuous but I also have the YEAR and SEASON as categorical variables.   When I run the model it appears that the year 2008 is not significant while all the other years are. How can I remove only this year from my model? Do I have to remove the entire covariate?


Changing a Dictionary in a List of a List in Python


How to draw a bar chart from multiple measurements with mean and variance

I have a few hundred measurements in a simple CSV file. I want a bar chart which indicates mean and variance pretty much like this:    I've browsed various archives, such as the , but I couldn't find an example that matched the desired outcome.  Imagine my data points to be:   Drive 1   A: 180, 190, 220, 210 B: 190, 220, 210, 200 C: 290, 320, 310, 300 D: 250, 260, 270, 260 E: 1250, 1060, 870, 1160  Drive 2   A: 170, 190, 200, 210 B: 190, 230, 220, 200 C: 280, 330, 320, 290 D: 280, 260, 290, 290 E: 1350, 1360, 970, 1260  Drive 3   A: 190, 180, 210, 200 B: 180, 230, 210, 210 C: 480, 430, 420, 490 D: 290, 290, 270, 280 E: 1550, 1560, 1270, 1560    How would I create a diagram that remotely looks like the one above? Solutions allowing me to provide data in a .csv file are preferred.


Speed of light versus pull of gravity - Is $c$ really the limit?

The understanding I have is that the speed of light is considered to be the highest attainable speed in physics. Of course there are theories of tachyons but since those haven't been proven we'll dismiss them for this statement. So, thinking mathematically, the speed of everything else is relative to the maximum value (using this logic I've always had an issue with believing there IS a max value instead of just infinity).  Using this line of thinking, how is it possible for some force to be able to overcome this universal constant? For example, the gravity of a black hole. Shouldn't that at most be able to equal the amount of force carrying a photon (or other body traveling at the speed of light) in the opposite direction? By this logic the only place that gravity could possibly even match the speed of light is at the center of the singularity, so it wouldn't trap any photons at all that weren't generated at that exact point.  I guess my point is that mathematically speaking, the largest "number" is infinity, and you can't have "infinity minus one" so why should the absolute largest possible speed be able to be influenced at all, let alone in a way that it can be completely negated and then some? Doesn't that completely invalidate $c$ as being the fastest possible speed? Perhaps it's just the fastest speed we've observed?  People far smarter than me have developed these theories and built whole areas of physics off of them, so I don't expect to be right. But can someone please explain to me why that's wrong?


How to make sure, that grub always starts the default entry after a timeout?

When booting the Ubuntu system went wrong and the user is forced to cut off power, there is a feature, that disables automatic selection of grub menu upon next boot.  Normally this is a nice feature to have, but sometimes it gets triggered when I power on the system remotely via WOL.   Is there any way to disable it?