Matching CLOSEST file in given ASCII Text Files
Algorithm to match one input file with given numbers of file
How to clear the interpreter console? How to connect Android with MySQL using Mysql JDBC driver Here is a problem which i have not been able to do for quite sometime.   For $n \geq 2$, show that $n \nmid 2^{n}-1$.   I have thought of proving this in two ways: One by using induction which didn't actually work. Next by Fermat's little theorem we have $2^{p-1} \equiv 1 \ (\text{mod} \ p)$, which actually says that for $p \mid 2^{p}-2$. But i couldn't proceed more than this. Any ideas by which i can actually solve the problem? Formulae for Catalan's constant. Some years ago, someone had shown me the formula (1). I have searched for its origin and for a proof. I wasn't able to get true origin of this formula but I was able to find out an elementary proof for it.  Since then, I'm interested in different approaches to find more formulae as (1).  What other formulas similar to ($1$) are known?  Two days ago, reading the book of Lewin "Polylogarithms and Associated Functions" I was able to find out formula (2).  $\displaystyle \dfrac{1}{3}C=\int_0^1 \dfrac{1}{x}\arctan\left(\dfrac{x(1-x)}{2-x}\right)dx\tag1$   $\displaystyle \dfrac{2}{5}C=\int_0^1 \dfrac{1}{x}\arctan\left(\dfrac{\sqrt{5}x(1-x)}{1+\sqrt{5}-\sqrt{5}x}\right)dx-\int_0^1 \dfrac{1}{x}\arctan\left(\dfrac{x(1-x)}{3+\sqrt{5}-x}\right)dx\tag2$   $C$ being the Catalan's constant.  I have a proof for both of these formulae.  My approach relies on the following identity:  For all real $x&gt;1$,  $\displaystyle \int_0^1 \dfrac{1}{t} \arctan \left (\dfrac{t(1-t)}{\frac{x+1}{2}-t}\right) dt=\int_1^{\frac{\sqrt{x}+1}{\sqrt{x}-1}}\dfrac{\log(t)}{1+t^2}dt$ Preserve bash history in multiple terminal windows I consistently have more than one terminal open. Anywhere from two to ten, doing various bits and bobs. Now let's say I restart and open up another set of terminals. Some remember certain things, some forget.  I want a history that:   Remembers everything from every terminal Is instantly accessible from every terminal (eg if I ls in one, switch to another already-running terminal and then press up, ls shows up) Doesn't forget command if there are spaces at the front of the command.   Anything I can do to make bash work more like that? Custom script "invoked too many times" error Credit:   function getDirection(city1, city2, unit) {   var directions = Maps.newDirectionFinder()     .setOrigin(city1).setDestination(city2)     .setMode(Maps.DirectionFinder.Mode.DRIVING)     .getDirections();   var d = directions.routes[0].legs[0].distance.text;    var distance, value = d.split(" ")[0].replace(",", ""), text = d.split(" ")[1];   if(text == unit) {     distance = value;   } else if(text == "km" &amp;&amp; unit == "mi") {     distance = value / 1.6;   } else {     distance = value * 1.6;   }   return Math.round(distance); }   I have used this code snippet in one of my sheets. I am working on a dataset with roughly 6000 entries and I am getting some errors because of the large volume.      Script invoked too many times per second for this Google user account. (line 0).      Service invoked too many times for one day: route. (line 4).   I considered purchasing a Google Apps business account to increase my quota, but that might not even help. Do you maybe have any advice for me in this regard? I have an external USB 3 disk drive (2TB capacity) that is most likely going to be moved from machine to machine. The disk has a GUID partition table and an ext4 partition. I am unable to write to the disk unless I elevate the process (sudo).  As of now I am thinking of trying one or both of the following and would like to know the cons of each -   chmod 777 /mnt/externalDrive chown nobody:nogroup /mnt/externalDrive   If I give 777 permission and user1 (UID:1005) writes to it and I later move the disk to another computer where user7 is UID:1005, what happens? Does user7 become the owner of the file on that computer? It seems to me that I will periodically have to run chown -R nobody:nogroup /mnt/externalDrive on the disk.  Is any of what I am considering an obvious bad practice? The disk will most likely contain videos, music and pictures none of it need to be protected like some financial data. Distribution of the digits of Pi Can anything be stated about the distribution of the digits of Pi, i.e., if I were to sample n digits of Pi, can anything be said about the probability to observe certain digits, or is there any reason to assume that they would not be evenly distributed? This is purely a curiosity question. Sign of Estimate (Coefficient) of Interaction Terms I create a linear regression model with interaction term in the model say: $$y=a_0+a_1x_1+a_2x_2+a_3x_1*x_2+e$$ where $x_1$ is continuous and $x_2$ is binary. Now, I have couple of questions:   If $x_1$ and $x_2$ both are significant and have positive coefficients, that means that if $x_1$ and $x_2$ increase, then $y$ increases. What can I say if $x_1*x_2$ is statistically insignificant? Does it mean that increase in. Does it mean that for $x_2=1$, the effect of $x_1$ on $y$ is not changed, i.e. increase in $x_1$ still leads to increase in $y$? What if the interaction is statistically significant? What can I say if the interaction term is statistically insignificant and negative? Does it indicate that if $x_2=1$, increase in $x_1$ actually leads to decrease in $y$?   Thanks. So the stories of the Hunger Games are set in , a post-apocalyptic society situated in North America. Is there anything to explain what caused the Apocalypse? Whether from the main books, any extra material or interviews? (No fanfic please.)  As well as the cause, is there any indication of when the apocalypse happened? And how long after the apocalypse are the events of the Hunger Games? if $x_i$ are IID  continuous random variables, with $E[x_i]=μ$, is the following correct?   $E\left[\prod_{i=1}^n(1+⍺\space x_i)^i\right] = \prod_{i=1}^nE\left[(1+⍺\space x_i)^i\right] =  \prod_{i=1}^n(1+⍺\space E\left[x_i\right])^i = (1+⍺\space μ)^n$  thanks! Should a button become lighter or darker on hover? We're having a discussion in the office about whether a button should become lighter or darker when a user hovers over it.   Here are some examples from the field:  Apple "Buy Now" button (Second is hover, third is depressed) -     Twitter Bootstrap -    (Unselected)   (Hover)  Github homepage - github.com      The button on FogBugz homepage goes from yellow to slightly lighter yellow. The buttons on Optimizely and Visual Website Optimizer hardly change.  Amazon's "Buy Now" button doesn't do anything when you hover over it (besides change to a pointer cursor). The colored buttons in Google's new interface (see Gmail or Calendar) go slightly darker when you hover over them.  Finally here is our button:    Should your button become lighter or darker when you hover over it? What else should you consider? Does anyone have data on whether the hover effect matters for conversions? At some point, the filesystem on my digital audio player has become read-only. I cannot copy files into it or remove files on it.  Are there some possible reasons for the player's file system to change permissions in this way?  I tried using chmod:  $ sudo chmod a+rw SGTL\ MSCN/  chmod: changing permissions of `SGTL MSCN/': Read-only file system   SGTL MSCN is the mount point of the digital audio player.  What else can I try to make it writeable? Calculating square roots using the recurrence $x_{n+1} = \frac12 \left(x_n + \frac2{x_n}\right)$ Let $x_1 = 2$, and define $$x_{n+1} = \frac{1}{2} \left(x_n + \frac{2}{x_n}\right).$$ Show that $x_n^2$ is always greater than or equal to $2$, and then use this to prove that $x_n − x_{n+1} ≥ 0$. Conclude that $\lim x_n = \sqrt2$.   My question:  So I know how to do this problem but I don't know how to prove that $x_n &gt;0$ for all $n\in \mathbb{N}$. Get name of caller function in PHP? Is there a PHP function to find out the name of the caller function in a given function? Mirror modifier is not working, no mirrored object? I'm learning how to use the mirror modifier and I am having some trouble.  When I apply the modifier to my object I don't see a mirrored version of it.  What am I doing wrong? Java: Cannot find symbol? On an Android phone the wallpaper spans across all of the home screens.  So what size should pictures be to fit properly as custom wallpapers? Why does Math.Floor(Double) return a value of type Double? A question was asked in one of my friend's interview. The question was to determine the right form from the below sentences.     Q. Correct form of English:          Samuel was with Susan and I   Samuel was with Susan and me   Samuel was with I and Susan   Samuel was with me and Susan   None of these      Now I vaguely remember a rule of thumb from my school days. That is "2-3-1" i.e. where all the persons are acting in a sentence, second person comes first, then third person and it is followed by first person.  So according to this theory, 1 seems to be correct to me. Is this theory correct?