I have a script that counts down from 5 to 0:  for a in {5..0}; do echo $a | tr -d \\n; sleep 1; echo -e \\b | tr -d \\n; done  and tacking on tr -d just looks redundant and not very elegant to me. Is there a way to echo on one line without having to delete the newline?
I'd like to do it in Python. What I'd like to do in this example in C: #include &lt;stdio.h&gt;  int main() {     int i;     for (i=0; i&lt;10; i++) printf(&quot;.&quot;);     return 0; }  Output: ..........  In Python: &gt;&gt;&gt; for i in range(10): print('.') . . . . . . . . . . &gt;&gt;&gt; print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to &quot;append&quot; strings to stdout.
What is a lambda (function)? Are partitions to the inner/outer edge significantly faster Some linux dual/multi-boot tutorials / general partitioning tutorials say that the inner side of a hard disk is faster than the outer side so partitions towards the outside tend to be slower while some say that the exact opposite is true.  Which side is actually faster?  Is the difference noticeable?  How are the partitions physically placed on the disk as compared to the partition listing order-for example gparted shows a logical ribbon layout of the partitions. Are the partitions shown to the left side of this ribbon near the outer or inner edge of the disk physically?  Are there software benchmarks like testing some disk intensive stuff for the first time on identical vanilla installs of the same OS but on different partitions, inner and outer?  EDIT: Links   ctrl + f for "slower" on this page   Says outer side is faster   Says inner side is faster   Says outer side is faster(not about dual-booting) Can PostGIS and QGIS provide dependable multi-user editing? After considering a few options, I'm trying to give my 15-20 QGIS 2.2 users the ability to concurrently view/edit one or two basic point PostGIS layers, largest one has just 16,000 records. I've installed PostgreSQL 9.1 / PostGIS 2.0 and basic testing seems to work ok but haven't unleashed it to the masses yet.  We'll typically only have 2-3 editors at a time, but possibly 15 viewers. Edits will all be in QGIS, viewers will be QGIS and ArcGIS (but we don't have SDE).  As I said, these are just basic point files, and  edits will just be adding/deleting points and some table edits. I am not worried about editing the same features at the same time.  Can the combination provide dependable multi-user editing for two basic point files? Which preposition is correct in the phrase "proficient in/at/with English"? How exactly does curved space-time describe the force of gravity? I understand that people explain (in layman's terms at least) that the presence of mass "warps" space-time geometry, and this causes gravity. I have also of course heard the analogy of a blanket or trampoline bending under an object, which causes other objects to come together, but I always thought this was a hopelessly circular explanation because the blanket only bends because of "real" gravity pulling the object down and then pulling the other objects down the sloped blanket. In other words, to me, it seems that curved space wouldn't have any actual effect on objects unless there's already another force present.   So how is curved space-time itself actually capable of exerting a force (without some source of a fourth-dimensional force)?  I apologize for my ignorance in advance, and a purely mathematical explanation will probably go over my head, but if it's required I'll do my best to understand. Which badges do not cause a notification for experienced users? I've been working with ArcGis for a while now and was wondering if there was a way to change positions of parameters inside the toolbox for the user. The only time I have seen this done in arc toolbox is with the Raster clip tool with the Rectangle parameter where the 4 parameters are aligned in a circle in the toolbox.     I don't know if what I want is possible since I haven't seen anyone else do it. What forces affect the value of my ETF? I've googled and also searched the answers here but couldn't find my problem so here goes:  I know how to bevel a curve using another object and when I try it with a normal circle it's fine. But I'm trying to use this flat oval shape to bevel a larger curve of the same shape and it's not following the curve at the correct rotation. I've tried everything, rotating the bevel object, clicking random options in the object data menu.. I can't seem to budge it from looking how it is in the screenshot. In the screenshot you can see the curve I've failed to bevel correctly and also the bevel object in the bottom right.  Basically, I want the flat part of the oval to be above and below the curve, not on the sides as it is. I hope that makes sense. Anyone know what I need to do? Can a magnetic field be induced without an electric field? Because, as far as I know, a time varying electric field induces a magnetic field an vice versa.  But in the case of conductors carrying currennt, it doesn't seem that electric field varies with time, then how is a magnetic field induced? I have georeferenced some images (ArcGIS -> Update Georeferencing) which creates a *.tfwx file with the new parameters for georeferencing.   I renamed it to *.tfw but QGIS is not able to read the georeferencing information.   Does anybody has any useful tips how to fix this? Can't Prove formula from Sakurai's Modern QM @ Perturbation Theory I am studying Perturbation Theory from J.J. Sakurai's textbook Modern Quantum Mechanics. I am having trouble proving formulas on page 299 (5.2.5) and (5.2.6) from the previous ones [mainly (5.2.4)]. Can anyone help?  This is a problem of working with perturbation theory when the non-perturbed state has degeneracy. To elaborate I do not get why $(E-H_0-\lambda P_1VP_1)$ is not singular.  More importantly is the equation below correct and if so why:  $$(E-\lambda P_1VP_1)|l \rangle = E_D^{(0)}|l \rangle $$  That is the core of my problem. If the above equation - in the framework of Sakurai's statement of the problem - is correct I can work out all the rest on my own. However I do not get why this equation would hold true. Can I use Wi-Fi and cable (Ethernet) networking at same time? I am on an intranet that is not connected to the Internet and a Wi-Fi router with connection to the Internet. When I am connected to the wireless network, I can browse the Internet, but I cannot browse my LAN with my Ethernet cable connected.  How can I browse the Internet via my Wi-Fi router and at the same time browse my local LAN web application via my connected Ethernet cable? How to bypass "Verify your account" (Factory Reset Protection) I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock? How do I avoid the "S to Skip" message on boot? What are the downsides of removing ubuntu-desktop metapackage? I once advised someone to remove a package that depends on ubuntu-desktop meta-package, if she didn't need it (EG: if one uses a different editor than gedit). Someone else said that doing so (removing gedit which will in turn remove ubuntu-desktop) could break things. Is this true? Are there any other potential problems? Are the groups $\mathbb{C}$ and $\mathbb{R}$ isomorphic? How do I run an executable using Lua? Keyboard Glyphs How are people showing keyboard &quot;glyphs&quot; on Super User? I looked at the Markdown help page and it didn't show anything regarding this. Here is  (question has been deleted since this was asked, so an archive link is provided instead): This question is a result of having too much free time years ago during military service. One of the many pastimes was playing tic-tac-toe in varying grid sizes and dimensions, and it lead me to a conjecture. Now, after several years of mathematical training at a university, I am still unable to settle the conjecture, so I present it to you.  The classical tic-tac-toe game is played on a $3\times3$ grid and two players take turns to put their mark somewhere in the grid. The first one to get three collinear marks wins. Collinear includes horizontal, vertical and diagonal lines. Experience shows that the game always ends in a draw if both players play wisely.  Let us write the grid size $3\times3$ as $3^2$. We can change the edge length by playing on any $a^2$ grid (where each player tries to get $a$ marks in a row on the $a\times a$ grid). We can also change dimension by playing on any $a^d$ grid, for example $3^3=3\times3\times3$. I want to understand something about this game for general $a$ and $d$. Let me repeat: The goal is to make $a$ collinear marks.  I assume both players play in an optimal way. It is quite easy to see that the first player wins on a $2^d$ grid for any $d\geq2$ but the game is a tie on $2^1$. The game is a tie also on $3^1$ and $3^2$, but my experience suggests that the first player wins on $3^3$ but the game ties on $4^d$ for $d\leq3$. It seems quite credible that if there is a winning strategy on $a^d$, there is one also on $a^{d'}$ for any $d'\geq d$, since more dimensions to move in gives more room for winning rows.  to a related question tells that for any $a$ there is $d$ so that there is a winning strategy on $a^d$.  This brings me to the conjecture:     There is a winning strategy for tic-tac-toe on an $a^d$ grid if and only if $d\geq a$. (Refuted by TonyK's answer below.)   Is there a characterization of the cases where a winning strategy exists? It turns out not to be as simple as I thought.  To fix notation, let $$ \delta(a)=\min\{d;\text{first player wins on }a^d\} $$ and $$ \alpha(d)=\max\{a;\text{first player wins on }a^d\}. $$ The main question is:     Is there an explicit expression for either of these functions?   Or decent bounds?   Partial answers are also welcome.   Note that the second player never wins, as was discussed in .    A remark for the algebraically-minded: We can also allow the lines of marks to continue at the opposite face when they exit the grid; this amounts to giving the grid a torus-like structure. Now there are no special points, unlike in the usual case with boundaries. Collinear points on a toric grid of size $a^d$ corresponds to a line (maximal collinear set) in the module $(\mathbb Z/a\mathbb Z)^d$. (If $a$ is odd, then $a$ collinear points in the mentioned module add up to zero, but the converse does not always hold: the nine points in $(\mathbb Z/9\mathbb Z)^3$ with multiples of three as all coordinates add up to zero but are not collinear.) This approach might be more useful when $a$ is a prime and the module becomes a vector space. Anyway, if this version of the game seems more manageable, I'm happy with answers about it as well (although the conjecture as stated is not true in this setting; the first player wins on $3^2$).