How to "define" a global var (uniqueness guaranteed)
DEFINE vs Variable in PHP
I've got a Canon EOS camera that takes a BP-511 battery.  The specs on the battery are 7.4V and 1100mAh.  The battery is dead and I want to buy a replacement, but I'm looking at a third party battery, because it's much cheaper than the Canon branded one.  I've found one with very high reviews online, and it seems identical except that it's rated at 1500mAh instead of 1100mAh.  So the question is: is this difference important to the camera or not? Footnotes in tables? I would like to have footnotes in tables, but the \footnote command does not work inside a table environment.  Googling one finds that this is , at least in the UK.  That link contains a list of solutions to the problem, but since the author of the FAQ does not believe that this is good style, no comparison is made between the different methods.  I am sure that there are good typographical reasons why in most situations it is undesirable to have footnotes in tables (although I have never come across them), however I have recently felt the need to do just this in a paper I am currently writing.  Therefore I'd like to ask two questions:   What are the arguments against footnotes in tables? If one really must go against the advice in 1., which method (whether considered in the  or not) would you recommend?   Thanks in advance.  Added  In response to ShreevatsaR's comment: I do not much care for where the text of the footnote appears.  I do however insist on the footnote marks being attached to the relevant entries in the table, so that I can avoid having to reference "the second entry in the eighth line of the table", etc... There is a classic problem:  Suppose that $X_1,\ldots,X_n$ form an i.i.d. sample from a uniform distribution on the interval $(0,\theta)$, where $\theta&gt;0$ is unknown. I would like to find the MLE of $\theta$.  The pdf of each observation will have the form: $$ f(x\mid\theta) =  \begin{cases} 1/\theta\quad&amp;\text{for }\, 0\leq x\leq \theta\\ 0 &amp;\text{otherwise}. \end{cases} $$ The likelihood function therefore has the form: $$ L(\theta) = \begin{cases} 1/\theta^n \quad&amp;\text{for }\; 0\leq x_i \leq \theta\;\; \text{for all }i,\\ 0 &amp;\text{otherwise}. \end{cases} $$ The general solution is usually that the MLE of theta must be a value of $\theta$ for which $\theta \geq x_i$ and which maximizes $1/\theta^n$ among all such values.   The reasoning is that since $1/\theta^n$ is a decreasing function of $\theta$, the estimate will be the smallest possible value of $\theta$ such that $\theta\geq x_i$.  Therefore, the mle of $\theta$, $\hat{\theta}$, is $\max(X_1,\ldots,X_n)$.  Here, I do not understand why we cannot just differentiate the likelihood function with respect to theta and then set it equal to $0$?  Thanks! View only the new entries in a growing log file "as much as you and I" vs. "as much as you and me" How is evolution possible in contemporary humans? I would like to know if evolution is continuing to happen in modern humans, assuming things like existence of the nuclear family structure, fidelity to one partner, etc. It seems to me the answer would be NO because evolution depends on differential reproductive rates, but in the modern world, all male humans have roughly 2.5 (or whatever the number) kids. Add in the process of culturally modified selection pressure, and it seems to me that even an "unfit" male would end up having a couple of offspring. The fittest male (or female) is no better off than his or her contemporaries because of this "leveling" effect.   However, the impression I get from the popular science media is that scientists think evolution is continuing to happen. I would like to know what the actual scientific consensus is, and why. Thanks. How to reconcile the cashless human/Federation society with human traders and merchants From a variety of sources, including , we know that the Federation (or at least the humans) don't use money. This raises the problem that humans frequently visit worlds where there is currency, and, in the case of DS9, operate a station that has currency frequently in use (for example, Federation personnel frequently attend Quark's bar). Additionally, we see human traders.   My question is, how do humans get "money" (credits, latinum, etc.)? How would a human even get the resources to purchase their own merchant ship or the resources to fill its cargo holds with merchandise? If Federation personnel can simply be given money for the asking, why haven't they poured so much money down Quark's throat that he chokes on it? Joining Excel table to shapefile in ArcMap? I have a shapefile of lower layer super output areas (LSOA) for England and Wales and I have a spreadsheet of the indices of deprivation for each of the LSOA's in England. I want to join the deprivation data to the shapefile so it can be mapped in ArcMap. I tried joining the table through the Join and Relates > Join option and put in the fields for the LSOA data for both shapefile and spreadsheet (the data that matches). the attribute table added the datafields to the attribute table from the excel spreadsheet but all of the data is blank!!   I have tried looking at the field "type" as ive read that it has been an issue before but it seems to be OK.  Is there anything anyone can suggest? What happens to the human inside the titan when the titan dies? Just to be clear I'm NOT talking about those who where swallowed.       We know that titans used to be humans and then somehow they transformed into titans.   When they kill a titan it completely Vaporizes and nothing is left. So what happens to the human inside them?     Could it be like when Eren was testing his limits and each time he fused more with the titan body? If so, why could Ymir live in titan form for over 60 years and still transform back into human? I install virtualBox on Ubuntu 16.04, but after install and create new virtual Host shows this error:     Kernel driver not installed (rc=-1908)      The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please install virtualbox-dkms package and load the kernel module by executing  modprobe vboxdrv       as root. If it is available in your distribution, you should install the     DKMS package first. This package keeps track of Linux kernel changes and   recompiles the vboxdrv kernel module if necessary.  where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.     How to address this modprobe vboxdrv error? What Thunderbolt to USB 3.0 cables/adapters exist for OS X and Mac hardware? I have the Late 2013 Macbook Pro, which has two USB 3.0 ports and two Thunderbolt 2 ports. I currently use both USB 3.0 ports and one TB2 port. I want to connect a third USB 3.0 device to the machine, but I don't want to use a USB splitter on one USB port as I'm concerned the devices would draw too much power from the bus. I have no current use for the second TB2 port and I would love to be able to use it for this purpose.   Browsing extensively online, I've found numerous docks, such as , that connect via a Thunderbolt cable. This would work, but it's an expensive, 'bulkier' solution (and not the one I'm looking for).   I'm aware that a USB 3.0 device wouldn't be able to take advantage of Thunderbolt's I/O speeds, but it's certainly compatible, which is all I'd need. After all, Apple even sells a . I also know that Thunderbolt is not only used for digital video purposes (along with the TB > Firewire option, there exists ).   There are almost no Thunderbolt to USB 3.0 cables/adapters on the market. I'd think this hardware would be more prevalent given the prominence of USB devices out there. What adapters are available for OS X? There are some kind of door devices which push the door back after we open the door and come out.  My problem is that the door area is not constructed in a way that such a device can be installed.  There is no space adjacent to the door anywhere.  Automatic closure of door is extremely important to me.   Please see following pictures and tell what choices do I have. Are there integer solutions to $9^x - 8^y = 1$? This came up in proving non-regularity of a certain language (powers of 2 over the ternary alphabet). Any clue to the above equation could help me move forward.  Edit: Of course, $x = 1, y = 1$ is a solution. I am looking for non-trivial solutions. I'm currently studying from "Introduction to Electromagnetics" by D.J. Griffiths. In the book the significance of the displacement current term is explained by looking a non-steady capacitor circuit (shown below).  Using the integral equation and balloon-shaped surface, it is said that $I_{enc}=0$ but $\int \partial\vec{E}/\partial t \cdot d\vec{a}=I/\epsilon_0$. This statement makes sense to me - there is no physical current flowing between the plates but there is a changing electric flux through the balloon surface.  My misunderstanding is with the flat Amperian loop surface where it is mentioned that $\vec{E}=0$ and $I_{enc}=I$ in this case. Obviously there is a current flow $I_{enc}$ in the Amperian loop, but why is $\vec{E}=0$? Just looking at the equations directly, I would have thought there would be a combination of both current terms (including displacement current due to changing electric field in the wire) in a capacitor charging/discharging situation.  I've attempted to seek other explanations on this from other texts,  and elsewhere in this stackexchange site, but this has made me more confused. Clarification on this would be appreciated.     Differential form of Ampere's-Maxwell's equation: $$\nabla \times \vec{B}=\mu_0\vec{J}+\mu_0\epsilon_0\frac{\partial \vec{E}}{\partial t}$$  Integral form of Ampere's-Maxwell's equation: $$ \oint\vec{B}\cdot d\vec{l} = \mu_0I_{enc}+\mu_0\epsilon_0 \int \frac{\partial \vec{E}}{\partial t} \cdot d\vec{a} $$ Where are packages stored installed with APT in Ubuntu 16.04? I am using the algorithmic package to typeset an algorithm. I would like to have connecting lines between the beginning and end of a loop or conditional like in the algorithm2e package. Is there an easy way to accomplish this, or am I better off switching to algorithm2e? Python Argument Binders How can I bind arguments to a Python method to store a nullary functor for later invocation?  Similar to C++'s boost::bind.  For example:  def add(x, y):     return x + y  add_5 = magic_function(add, 5) assert add_5(3) == 8 How to stop the find command after second match? How to make find command, that will show only first two matches and then end, something similiar to  just version for two records. Can bug reports and feature requests requiring SE Dev attention be reported on per-site metas, or do they need to all go here? So, if we have a large pipe which is constricted in the middle, the fluid in the middle section  will move faster. Why is it so? What dictates that liquid that an X amount of it must pass on the other side regardless of the size of the encasement?  The only reason I could think about is because that the initial pressure which causes the movement somehow is being transferred to a smaller area, but that makes no sense.