When I have a file open in vim, in this case a log file, I'd like to trigger a refresh and load any file changes into my existing vim session.  I often use tail -f on log files, but as I'm using java and tomcat, the log messages are too much for tail...  Is there a vim command to reload an open file?
As a log viewer, which of vim's features are convenient?  less -F is quite good. But I believe vim could be better if we knew its hidden features.     * or #   v//d   g//d   etc..   PS. I don't use vim as a code writing tool.
Does commutativity imply associativity? I'm asking this because I was trying to think of structures that are commutative but non-associative but couldn't come up with any. Are there any such examples?  NOTE: I wasn't sure how to tag this so feel free to retag it. Hamiltonian Cycle Problem At the moment I'm trying to prove the statement:     $K_n$ is an edge disjoint union of Hamiltonian cycles when $n$ is odd.   ($K_n$ is the complete graph with $n$ vertices)  So far, I think I've come up with a proof. We know the total number of edges in $K_n$ is $n(n-1)/2$ (or $n \choose 2$) and we can split our graph into individual Hamiltonian cycles of degree 2.   We also know that for n vertices all having degree 2, there must consequently be $n$ edges. Thus we write $n(n-1)/2 = n + n + ... n$ (here I'm just splitting $K_n$'s edges into some number of distinct Hamiltonian paths) and the deduction that $n$ must be odd follows easily.  However, the assumption I made - that we can always split $K_n$ into Hamiltonian paths of degree 2 if $K_n$ can be written as a disjoint union described above - I'm having trouble proving. I've only relied on trying different values for $n$ trials and it hasn't faltered yet. So, I'm asking:     If it is true, how do you prove that if $K_n$ can be split into distinct Hamiltonian cycles, it can be split in such a way that each Hamiltonian cycle is of degree 2? $ d = \gcd(a,b)\Rightarrow\ \gcd(a/d,b/d) = 1$ Could someone please help me with this proof?     Suppose that $a, b \in N$, and $d = \gcd(a, b)$. Since $d$ divides $a$, we have $a = de$ for some integer $e,$ and similarly $b = df$ for some integer $f$. Prove that $\gcd(e, f) = 1$.   I understand why it works. Since d is all the common factors of $a$ and $b, e$ and $f$ had no common factors, therefore the $\gcd(e,f) = 1$. But how do I prove this?  Thanks in advance. Any nice, stable ways to keep a window 'Always on top' on the Mac? I am looking for a stable way to keep any window 'always on top' on OSX.  , an app that does that requires SIMBL/easySIMBL, which it seems is not very stable.  Are there any better solutions? It's actually surprising that there is no native way to implement this. I'm searching for a really simple and beautiful proof that the sequence $(u_n)_{n \in \mathbb{N}} = \sum\nolimits_{k=1}^n \frac{1}{k} - \log(n)$ converges. At first I want to know if my answer is OK.  My try: $\lim\limits_{n\to\infty} \sum\limits_{k=1}^n \frac{1}{k} - \log (n) = \lim\limits_{n\to\infty} \sum\limits_{k=1}^n \frac{1}{k} + \sum\limits_{k=1}^{n-1} \log(k)-\log(k+1) = \lim\limits_{n\to\infty} \frac{1}{n} + \sum\limits_{k=1}^{n-1} \log(\frac{k}{k+1})+\frac{1}{k}$     $ = \sum\limits_{k=1}^{\infty} \frac{1}{k}-\log(\frac{k+1}{k})$ Now we prove that the last sum converges by the comparison test: $\frac{1}{k}-\log(\frac{k+1}{k}) &lt; \frac{1}{k^2} \Leftrightarrow k&lt;k^2\log(\frac{k+1}{k})+1$ which surely holds for $k\geqslant 1$      As $ \sum\limits_{k=1}^{\infty} \frac{1}{k^2}$ converges $ \Rightarrow \sum\limits_{k=1}^{\infty} \frac{1}{k}-\log(\frac{k+1}{k})$ converges and we name this limit $\gamma$ q.e.d What do I do if I don't have a META-INF folder or minecraft.jar? I have looked all over the Internet for solutions but I have got nothing.  I want to install the minepainter mod but I need a META-INF folder and a minecraft.jar. Automatically fit the graphics in the remaining space of a Beamer slide Turn off paragraph indention for a single line How long does it take to unlock another frame by playing one of the base frames? I'd like to get an advanced frame in Firefall. I've been told that I can use "Pilot Tokens" to unlock other frames without having to pay money.  How soon would I be able to unlock an advanced frame? Do I have to level a base frame all the way to level 40? More than once? Consider the integral equation $\phi(x)-\frac{e}{2} \int_{-1}^{1} x e^{t} \phi(t) d t=f(x) .$ Then  there exists a continuous function $f:[-1,1] \rightarrow(0, \infty)$ for which solution exists there exists a continuous function $ f:[-1,1] \rightarrow(-\infty, 0)$ for which solution exists for $f(x)=e^{-x}\left(1-3 x^{2}\right)$, a solution exists for $f(x)=e^{-x}\left(x+x^{3}+x^{5}\right),$ a solution exists  what I tried $f(x)=f(x)+\frac{e}{2} \int_{-1}^{1} x e^{t} \phi(t) d t$ $\phi(x)=f(x)+\frac{e x}{2} \int_{-1}^{1} e^{t} \phi(t) d t$ $ \begin{array}{l}L e t \quad c=\int_{-1}^{1} e^{t} \phi(t) d t \\ \Rightarrow \phi(x)=f(x)+\frac{x e}{2} c\end{array} $ $c=\int_{-1}^{1} e^{t}\left(f(t)+\frac{c e}{2} t\right) d t$ $c=\int_{-1}^{1} e^{t} f(t)+\frac{\operatorname{ce}}{2} \int_{-1}^{1} t e^{t} d t$ $c=\int_{-1}^{1} e^{t}f( t)+\frac{\operatorname{ce}}{2}\left[t e^{t}-e^{t}\right]_{-1}^1$ $c=\int_{-1}^{1} e^{t} f(t)+\frac{c e}{2}\left(2 e^{-1}\right)$ $c=\int_{-1}^{1} e^{t} f(t) d t+c$ $\int_{-1}^{1} e^{t} f(t) d t=0$ Option (3) and (4) satisfies this Relation so, (3) and (4) seems true  to me.is i am right? I am stuck  for option (1) and (2)  is there any result or theorem ? Calling a function from a string in C# My dconf/gsettings installation is broken. How can I fix it without Ubuntu reinstall? I run Ubuntu 12.04.1 LTS x64 in VirtualBox. After one very unfortunate misclick (reset saved state instead of load saved state) I got a very annoying problem.  Almost all applications (unity, synaptic, gedit, etc.) print on start:  Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.   And all GUI settings reset after reboot.   Another symptom:  $ GSETTINGS_BACKEND=dconf dconf-editor (dconf-editor:2353): GLib-GIO-WARNING **: Can't find module 'dconf' specified in GSETTINGS_BACKEND GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications   But /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so is present.     What I tried (and it didn't help):   sudo apt-get install -f --reinstall  dconf-tools libdconf0 libdconf-dbus-1-0 dconf-service Build dconf-0.5 from sources and make install it Create empty user profile and start programs there   I have to keep current Ubuntu installation so a complete reinstall is not an option for me.   How can I fix it? Prove that $1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$ for $n \in \mathbb{N}$. Problem: Prove that $1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$ for $n \in \mathbb{N}$.  My work: So I think I have to do a proof by induction and I just wanted some help editing my proof.  My attempt:  Let $P(n)=1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$ for $n \in \mathbb{N}$.  Then $$P(1)=1^2=\frac{1(1+1)(2+1)}{6}$$ $$1=\frac{6}{6}.$$ So $P(1)$ is true.  Next suppose that $P(k)=1^2+2^2+\cdots+k^2=\frac{k(k+1)(2k+1)}{6}$ for $k \in \mathbb{N}$. Then adding $(k+1)^2$ to both sides of $P(k)$ we obtain the following: $$1^2+2^2+\cdots+k^2+(k+1)^2=\frac{k(k+1)(2k+1)}{6}+(k+1)^2$$ $$=\frac{2k^3+3k^2+k+6(k^2+2k+1)}{6}$$ $$=\frac{2k^3+9k^2+13k+6}{6}$$ $$=\frac{(k^2+3k+2)(2k+3)}{6}$$ $$=\frac{(k+1)(k+2)(2k+3)}{6}$$ $$=\frac{(k+1)((k+1)+1)(2(k+1)+1)}{6}$$ $$=P(k+1).$$ Thus $P(k)$ is true for $k \in \mathbb{N}$. Hence by mathematical induction, $1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$ is true for $n \in \mathbb{N}$. As the question states... In Windows 7 with a single screen, you can drag a window to the right and a window to the left to maximize them both at half the screen, letting you quickly and neatly see two windows simultaneously.  If I have 2 monitors, is there a way to do this with 4 windows, where each monitor gets 2 windows split across each screen? using apt-cache search I am learning how to use apt. When I do an apt-cache search git to see all packages matching git, I see a bunch of packages whose descriptions have nothing to do with git. Why is this so and how can I fix it? (Ubuntu 12.04.2 LTS).  Also, why is the search functionality found in a command that has "cache" in its name? What does search functionality have to do with caches?  Thanks. Do Legendary Pokemon Respawn After The Elite Four? What are these notices above my post? My post has been marked with an informational notice in a box above it.   What should I do about this? Who attaches notices to posts? What kinds of notices are available? What should I do if I think a notice should be added to a post? What should I do if I think a notice should be removed from a post? Find n such that $n^5 - n$ is divisible by $120$. (*Here $n$ belongs to the natural number set)  Seems a trivial problem, but the answer mentioned in the text book seemed incomplete to me so I'm here just to ensure whether approach to this problem is correct or not.  So my approach is as follows: We know that $n^5 - n$ can be written as $n^5-n = n(n-1)(n+1)(n^2 + 1)$  Now since it's product of three consecutive natural numbers so it's divisible by $3! = 6$. Now using Fermat's Little theorem we can prove that $n^5= n \mod5$ hence $n^5 - n$ is divisible by $5$ as well. So $n^5 - n$ is divisible by $30$. Now to ensure their is another factor of $4$ in the term we need to ensure that $n^5 - n$ is divisible by $8$. I found that all odd natural numbers and multiples of $8$ makes $n^5 - n$ divisible by $8$, hence $n^5 - n$ is divisible by $120$. But in the text book they have only mentioned odd natural numbers as answer, which seemed incomplete to me.  Thanking everyone in advance:P Quoted vs unquoted string expansion For a workflow tool I made a panel in which it displays each separate library that is linked in my file. For each library I want to add some buttons that does stuff to the library in question.  So in this example I have my panel which shows for example 2 libraries and for each one it creates a "reload" button.  Now my question is.. How do I make it so the reload button only reloads the library I want to reload? I would probably have to give the button an id or something so it knows for which library it was created...  my code so far:  import bpy  libs = bpy.data.libraries  class Reloadlib(bpy.types.Operator):     """Reloads the current Library"""     bl_idname = "my.reload_lib"     bl_label = "Reload"      def execute(self, context):         libs[?????].reload()         self.report({'INFO'}, 'Reloading ' + libs[?????].name)         return {'FINISHED'}  class LibPanel(bpy.types.Panel):     """Creates a Panel in the scene context of the properties editor"""     bl_label = "Scene Libraries"     bl_idname = "SCENE_PT_layout"     bl_space_type = 'PROPERTIES'     bl_region_type = 'WINDOW'     bl_context = "scene"      def draw(self, context):         layout = self.layout         scene = context.scene         layout.label(text="Libraries:")          for i in libs:             layout.label(text= i.name.replace(".blend",""))             row = layout.row()             sub = row.row()             sub.operator("my.reload_xref", icon = "FILE_REFRESH")  def register():     bpy.utils.register_class(Reloadlib)     bpy.utils.register_class(LibPanel)  def unregister():     bpy.utils.unregister_class(Reloadlib)     bpy.utils.unregister_class(LibPanel)  if __name__ == "__main__":     register()   Where the question marks are is where I should be able to make the difference between the first [0] or second [1] library in the libs[] array.  In future I would also like to ad an 'open' and an 'unlink' button for each library so I can make changes to the other file. But this works by the same principle as the reload button.