I'm using FileZilla and have found the default LibreOffice Writer not the best for on-the-go code editing.  I have the option to use custom program for text editing, so why not give nano a go. So I'm wondering, where is the nano (shell script?) file located?  I had a quick Google for this question and only found an ArchLinux forum posing the question on .  From the thread, I checked /usr/bin/nano and it's not existant there.
Where are executables for programs stored in Ubuntu?  An application (Komodo Edit) is asking me to identify an application to be used as a web browser. I've become used to just entering the application name as a command for situations such as these, but this scenario got me thinking.   I know in Windows it would just be the relevant application folder in the 'program files' folder, but I'm assuming things are a bit different on Linux?  I thought somewhere like bin would be logical but this appears to standard Linux/Unix applications. Where would I find the binary executable for applications stored on my system?
Java: Date from unix timestamp Custom text color in C# console application? Converting bike from rim brakes to disc brakes I just bought a used  and it comes with regular rim brakes. I'm perfectly happy with them so far, but have been wondering if disc brakes would come handy when it rains.  What is involved in converting a bike from rim brakes to disc brakes (mechanical or hydraulic)?   Is this something that is feasible, or am I better off buying another bike that already has disc brakes? Why is the Earth so fat? I made a naive calculation of the height of Earth's equatorial bulge and found that it should be about 10km.  The true height is about 20km.  My question is: why is there this discrepancy?  The calculation I did was to imagine placing a ball down on the spinning Earth.  Wherever I place it, it shouldn't move.  The gravitational potential per unit mass of the ball is $hg$, with $h$ the height above the pole-to-center distance of the Earth (call that $R$) and $g$ gravitational acceleration.  Gravity wants to pull the ball towards the poles, away from the bulge.  It is balanced by the centrifugal force, which has a potential $-\omega^2R^2\sin^2\theta/2$ per unit mass, with $\omega$ Earth's angular velocity and $\theta$ the angle from the north pole.  This comes taking what in an inertial frame would be the ball's kinetic energy and making it a potential in the accelerating frame.  If the ball doesn't move, this potential must be constant, so  $$U = hg - \frac{(\omega R \sin\theta)^2}{2} = \textrm{const}$$  we might as well let the constant be zero and write  $$h = \frac{(\omega R \sin\theta)^2}{2g}$$  For the Earth,   $$R = 6.4*10^6m$$  $$\omega = \frac{2\pi}{24\ \textrm{hours}}$$  $$g = 9.8\ m/s^2$$  This gives 10.8 km when $\theta = \pi/2$, so the equatorial bulge should be roughly that large.    , the Earth is 42.72 km wider in diameter at the equator than pole-to-pole, meaning the bulge is about twice as large as I expected.  (Wikipedia cites diameter; I estimated radius.)  Where is the extra bulge coming from?  My simple calculation uses $g$ and $R$ as constants, but neither varies more than a percent or so.  It's true the Earth does not have uniform density, but it's not clear to me how this should affect the calculation, so long as the density distribution is still spherically-symmetric (or nearly so).  (Wikipedia also includes , without derivation, that agrees with mine.) Evaluating $\int_0^{2 \pi} e^{\cos x} \cos (nx - \sin x) \,dx$ using complex analysis I'm taking a complex analysis course and doing some practice computing residues &amp; evaluating integrals. I pulled out an old book called     On page 196-197, there are some interesting integrals to evaluate. I'm at 5.4.3.10.: I was able to do question 1, but was stumped at how to even begin with question 2:     Evaluate the integral   $$\int_0^{2 \pi} e^{\cos x} \cos (nx - \sin x) \,dx ,$$   where $n$ is an natural number.   The answer is simply $\frac{2 \pi}{n}$. Any hints? The qtree package seems to facilitate the drawing of simple trees only. Is there a way to incorporate:   Multiple roots &amp; Nodes with multiple parents   in a tree in LaTeX? Given two sets$$A=\{1,3,5\}\quad,\quad B=\{1,3,8\}.$$ Then I compute the $A\setminus B=\{5\}.$   But my book$^\dagger$said: ... . Also, observe that $x\notin A\setminus B$ does not mean that $x\notin A\lor x\in B$. Why?  I don't know how to explain the Why, please give me some example.    $^\dagger$, second edition, page $4$.  EDIT: My intuition tells me that it does mean that. I guess there is some special case about null-set or about the restriction of the universal set. Are all limits solvable without L'Hôpital Rule or Series Expansion Centrifugal force acting on ring Take for example the case of a rod rotating about an axis passing through its centre of mass and perpendicular to it. It has a ring hung from one of its sides. The rotation of the rod causes the ring to move out wards and ultimately fall off the rod.   I asked my teacher what causes the ring to move out wards and he said the centrifugal force acting in the frame of reference of the ring causes motion. What exactly is the ring reference frame? Is it a rotating frame? How would u visualize motion in this frame of reference? Consider the infinite line, $L$ in $2D$ consisting of all points $p$ such that $p.[0.3511 0.9263]= 6$. Find the point on the line closest to $(10, 20)$. Find the point on the line closest to $(4, 3)$. Find the distance from the line to both of these points.  Hi, I was reading the book $3D$ Maths Primer for Graphics and Game Development. The book mention about $2$ formulas but I don't know how to apply them.   $\text{Signed distance} = d-q.n$  $q' = q + (d-q.n)n$  for any point $q$, the point $q'$ that is the closest point on $L$ to $q$.  This is what I have tried,   Since the lines are parallel then the normal are the same so   $q' = q + (6 - q(0.3511 0.9263))(0.3511 0.9263)$   I'm stuck here. At this moment there are 4 meta-site questions on the HNQ list:    (World Building Meta)  (Meta StackOverflow)  (Workplace Meta)  (Mathematica Meta)   When I first saw it, I only saw the SO Moderator question, so I assumed that this was a one-off special thing for the election; but now we've got four questions crept in. Was this an intentional change, or a bug? Replacing non-English characters in attribute tables using ArcPy and Python? I have a few shapefiles where some of the attributes contain the non-English characters ÅÄÖ. Since some queries doesn't work with these characters (specifically ), I tried to change them in advance with a simple script and add the new strings to another field.  However, change in characters works fine but not updating the field with arcpy.UpdateCursor.   What is an appropriate way of solving this?  I have also tried to do this via the Field Calculator while posting "code" to the codeblock, with the same error.  Error message: Runtime error  Traceback (most recent call last):   File "", line 1, in    File "c:/gis/python/teststring.py", line 28, in      val = code(str(prow.Typkod)) UnicodeEncodeError: 'ascii' codec can't encode character u'\xc4' in position 3: ordinal not in range(128)  Code:  # -*- coding: cp1252 -*- def code(infield):     data = ''     for i in infield: ##        print i         if i == 'Ä':             data = data + 'AE'         elif i == 'ä':             data = data + 'ae'         elif i == 'Å':             data = data + 'AA'         elif i == 'å':             data = data + 'aa'         elif i == 'Ö':             data = data + 'OE'         elif i == 'ö':             data = data + 'oe'         else:             data = data + i     return data   shp = r'O:\XXX\250000\DB\ArcView\shape.shp'  prows = arcpy.UpdateCursor(shp)  for prow in prows:     val = code(unicode(str(prow.Typkod), "utf-8"))     prow.Typkod_U = val     print val     prows.updateRow(prow)   The values of Typkod are of the type: [D, D, S, DDRÄ, TRÄ] etc.  I use ArcMap Basic (10.1) on Windows 7.    New Error message:  Runtime error  Traceback (most recent call last):   File "", line 1, in    File "c:/gis/python/teststring.py", line 29, in      val = code(unicode(str(row.Typkod), "utf-8")) UnicodeEncodeError: 'ascii' codec can't encode character u'\xc4' in position 3: ordinal not in range(128)  &gt;&gt;&gt; val 'DDRÄ' &gt;&gt;&gt; type(val) type 'str'      It appears as if the output from the function is wrong somehow. When there's ÅÄÖ involved it returns data = u'DDR\xc4' and not (as was my intention) data = 'DDRAE'. Any suggestions on what might cause this? C#: How to create an attribute on a method triggering an event when it is invoked? Logistic regression vs. LDA as two-class classifiers How to print only last column? echo -e 'one two three\nfour five six\nseven eight nine' one two three four five six seven eight nine   how can I do some "MAGIC" do get this output?:  three six nine   UPDATE: I don't need it in this specific way, I need a general solution so that no matter how many columns are in a row, e.g.: awk always displays the last column. Saving memoization to disk Partitions for Ubuntu and Windows 7 dual boot on SSD + HDD setup I've asked this question towards a developer for Minecraft and I thought I'd ask here too since they might not see the question.  How do I select all but two types of entities in Minecraft?  For example, something like: /say @e[type=![Player,Item],r=50] (to clarify I also tried type=Item,Player, type=Item,type=Player etc)  Should select any entity that does not match players or items, so things like Creepers, Ghasts, XPOrbs, PrimedTNT and so on within a radius of 50 blocks and print them to the chat.  Instead it ignores one of the flags, and works with the other instead. Limit of $\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} }$ Direct way leads to nowhere.  $$\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} } = \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{n \sqrt {1 +\frac{i}{n^2}} } = $$  $$ = \lim_{n\rightarrow \infty} \frac{1}{n} \cdot \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {1 +\frac{i}{n^2}} } = 0 \cdot \sum^{n}_{i=1} 1 = 0 \cdot n $$  So, I tried to apply squeeze theorem:  $$\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} } \leq \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{n}  = 1$$  Could you help me to figure out the lower bound? Limit of $(\cos1/n)^{n^2}$ when $n\to\infty$ I've been trying to solve this limit: $$\lim_{n\to \infty} \left(\cos\left(\frac{1}{n}\right)\right)^{n^2}$$ I solved it using l'hopital but I have to try in another way. I tried to make the expression:  $$ \lim_{n \to \infty}\exp\left(n^2\ln\left(\cos\left(\frac{1}{n}\right)\right)\right)$$  but it didn't work out for me...