Flagging Questions as spam versus editing out advertising links
Should spam posts be edited?
How do I find a recursion formula to solve the following question:  In how many sequences of length $n$, with elements from $\{{0,1,2,3,4}\}$, the difference between every 2 adjacent elements is $1$ or $-1$?  I've been trying to solve the problem for the last 5 hours maybe, I'm sure that I'm missing something..   This is a problem in combinatorics, and the solution must be by finding a recursion formula for the problem.   best solution I've come so far is that if we say that $a_n$ is the solution to the question, so let's count how many sequences of size $n-1$ there are that meet the requirement, and we complete the first element to make it a sequence of $n$ elements. so for $n-1$ there $a_{n-1}$ sequences, and for each sequence we have $2$ options to choose the first element (one option is to take a plus $1$ number from the number that start the $n-1$ sequence, and the other option to to take a minus $1$ number from the number that start the $n-1$ sequence), only problem as you figured out is that if the $n-1$ sequnce starts with $0$ or $4$ there is only $1$ option left for the first element in the sequnce.. so $a_n=2a_{n-1}$ won't work.  I think that the solution may involve using $2$ or maybe $3$ recursion formulas.  Hope I was clear enough. Is there an idiom for people who boast too much? For example, if I wanted to write the equivalent of  There are many automated teller machines in this city.  Would it be  There are many ATMs in this city.  or  There are many ATM's in this city. (could get confused with possessive form or contraction).  or just  There are many ATM in this city. (assuming the final s is included in Machines represented by M).  Maybe something else? A Google search spewed forth millions of hits on how to find tables without clustered indexed, the PK normally being the clustered index of a table. However, a table could easily have a natural key as a clustered index, and a non-clustered surrogate index, like an identity column.  How do I find all tables in a DB without a primary key defined? I have 245 tables in this DB: manual inspection is grossly inefficient. Batch Rename (remove specific character) Files Difference between files written in binary and text mode What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C.  unsigned char buffer[256]; for (int i = 0; i &lt; 256; i++) buffer[i]=i; int size  = 1; int count = 256;   Binary mode:  FILE *fp_binary = fopen(filename, "wb"); fwrite(buffer, size, count, fp_binary);   Versus text mode:  FILE *fp_text = fopen(filename, "wt"); fwrite(buffer, size, count, fp_text); Unfortunately hard disk of my system is damaged, now I recovered my database. But it cannot be attached again to SQL management studio 2005. The error is:  myfile.mdf is not a primary database file. (SQL server , error 5171) Help me identify this insect from Bangladesh I have seen this insect flying literally everywhere in Dhaka city (Bangladesh) over the last two months. It's small -- around 1-1.5 inches long. It's not an agile flyer and can be easily grabbed by hand during flight. I've been to South Korea a few times already and always enjoy it but I've always had an onward ticket before.  Now I need to fly home from a trip that's lasted over a year, but I still want to take my time and keep my options open.  There's a good choice of cheap flights from Istanbul to Seoul and from Seoul I can't decide yet whether to fly straight home or take a ferry to China, hitchhike to Guangzhou, and get a cheap flight home from there.  I can't really just buy the China-Australia flight now because I'm not sure yet whether I'll be able to get the Chinese visa easily enough or how long my remaining money will last.  I know Korea, like most countries, has rules saying you need an onward ticket, but in my experience many countries never try to verify that you have this ticket unless you fit some profile. So in this instance I would find first-hand knowlegde much more informative that pointers to a government website.  In practice does South Korea admit tourists with one-way tickets? So I wanted to make some minecoins and I also heard that anyone become a marketplace creator could but I don't know where to apply. I'm in Minecraft Pocket Edition 1.14.30. Can you tell me where I can apply? How to rename the User folder in Windows 10? Word or phrase for mere coincidence that brings happiness How do I change the extension of multiple files? I would like to change a file extension from *.txt to *.text. I tried using the basename command, but I'm having trouble on changing more than one file.  Here's my code:  files=`ls -1 *.txt`  for x in $files do     mv $x "`basename $files .txt`.text" done   I'm getting this error:  basename: too many arguments Try basename --help' for more information Returning a const reference to an object instead of a copy The following is an excerpt from a New York Times article of April 6.     “Tonight, I ordered a targeted military strike on the air base in Syria from where the chemical attack was launched,” Mr. Trump said in remarks at his Mar-a-Lago estate in Florida. “It is in this vital national security interest of the United States to prevent and deter the spread and use of deadly chemical weapons.”    Shouldn't that "from where" be either "from which" or else just "where" without "from?" Currently, the only way to ask for something to be migrated to a site that isn't part of the standard migration path is through a custom mod note.  I currently have two active custom mod notes on Stack Overflow that ask for migration that are not standard targets for SO.  I believe the questions could be better answered on another site.  Fortunately, or unfortunately, the questions have been answered, and answers have been up voted and accepted. At this point, a week and a half later, migrating either of the questions would be disruptive to both communities and not necessarily produce a better answer (they've got accepted answers).  The unfortunate part is I really do believe that both questions could have gotten better answers and more attention on another site.  What I would like to see is a more streamlined way to flag for moderator attention for migrations.  The UI would look something like this:    This would allow people to find the proper site easily.  No more "Migrate this to Mathamatica.SE" because, well, that doesn't exist.  Something that I didn't do on this mock up is add a link to the corresponding help/on-topic page for the target site.  Something people could check and click before hitting the submit button.  I don't have this quite right again, because while that shows a "closing for off topic", this is a flag and not a vote to close.    The "flag for migration" is only one part of this though.  The other part would be to make another flag queue style thingy for moderators in which they could look at just migration flags created through the above interface.  By providing the mods with a "just migration" view into the flags, questions that should be migrated can be quickly identified from the multitude of existing flags and handled promptly before the migration would be disruptive. Tile Edge Challenge I've been having a problem with these problems for a week now so I thought I'd post it on MSE. Read the text below. . I've also typed it up:  Annabel made a shape by placing identical square tiles in a frame as shown in the diagram above. The tiles are arranged in columns. Each column touches the base but no columns touch the side or top. There are no empty gaps between columns. The frame can be enlarged as needed.  These are the questions. I've also typed them up.    A. Show that it is possible to arrange $7$ tiles so that the ant walks $8,9,10,11,12,13,14,15$ tile edges.   B. Show 6 ways of arranging 7 tiles so that the ant walks a total of 9 tile edges.  C. Show it is possible to arrange 49 tiles so that the ant walks a total of less than 21 tile edges.  D. Show four arrangements of 137 tiles, each arrangement with a different maximum height, so that the ant walks a total of 34 tile edges.  For question $a$, is there a formula relating the number of tile edges exposed to the number of tiles. These are my answers for $a$    For the above picture, it's the left hand side which has the $a$ answers.  However, I'm having a bit of trouble with $b$. I've already got four answers down but where are the other two. My four current answers are in the right hand side of the last image. Also, I'll also appreciate a formula to show the relationship.  I'm also having trouble with $c$. I found out that you get 21 tile edges exposes when you make a $7*7$ square but the answer is asking for less than 21. Can anyone help me. Also, as in the previous questions, a formula to show the relationships would be great.  And for $d$, I am totally lost. I have no idea where to start, and I certainly can't find out four arrangements. So can anyone help me? And as always, a formula is nice  P.S. Please explain this in an understandable formula, as I'm only a Year 7 with the ability to understand linear algebra and parts of quadratics and trigonometry. Also, sorry about the poor imaging. Interpreting the residuals vs. fitted values plot for verifying the assumptions of a linear model Consider the following figure from Faraway's Linear Models with R (2005, p. 59).    The first plot seems to indicate that the residuals and the fitted values are uncorrelated, as they should be in a homoscedastic linear model with normally distributed errors. Therefore, the second and third plots, which seem to indicate dependency between the residuals and the fitted values, suggest a different model.  But why does the second plot suggest, as Faraway notes, a heteroscedastic linear model, while the third plot suggest a non-linear model?  The second plot seems to indicate that the absolute value of the residuals is strongly positively correlated with the fitted values, whereas no such trend is evident in the third plot. So if it were the case that, theoretically speaking, in a heteroscedastic linear model with normally distributed errors  $$ \mbox{Cor}\left(\mathbf{e},\hat{\mathbf{y}}\right) = \left[\begin{array}{ccc}1 &amp; \cdots &amp; 1 \\ \vdots &amp; \ddots &amp; \vdots \\ 1 &amp; \cdots &amp; 1\end{array}\right] $$  (where the expression on the left is the variance-covariance matrix between the residuals and the fitted values) this would explain why the second and third plots agree with Faraway's interpretations.  But is this the case? If not, how else can Faraway's interpretations of the second and third plots be justified? Also, why does the third plot necessarily indicate non-linearity? Isn't it possible that it is linear, but that the errors are either not normally distributed, or else that they are normally distributed, but do not center around zero? Can the Force be used to fly? In The Empire Strikes Back Yoda uses the Force to lift Luke's X-Wing out of the water and put it on land.  In Attack of the Clones and in many instances in the second series of The Clone Wars, Anakin (and others) use the Force to jump higher than they could otherwise, or to jump from very high locations, but I don't think I've ever seen the Force used for outright self-levitation.  But if Yoda could lift the X-Wing, shouldn't a strong Jedi be able to lift himself and, essentially, fly with the help of the Force? How to add new item in existing string array in C#.net?  I need to preserve the existing data.