If I do this, I get the result as expected.  for i in {125..129}; do echo $i; done 125 126 127 128 129   But when I do this? I get something weired.  for i in {$((1+(25-1)*500))..$((25*500))}; do echo $i; done  {12001..12500}   I wish to pass a variable inside the loop variables like $((1+($j-1)*500))
How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5}
Prove that : $a_n>0$, Then, $\sum_{n=1}^\infty a_n$ converges iff $\sum_{n=1}^\infty \sin(a_n)$ converges. I am given the problem: Let $a_n&gt;0$, prove $\sum_{n=1}^\infty a_n$ converges if and only if $\sum_{n=1}^\infty \sin(a_n)$ converges.  We have this problem in a homework, and I don't believe it can be true. The statement being biconditional implies that when $\sum_{n=1}^{\infty} \sin(a_n)$ converges, so too does $\sum_{n=1}^\infty a_n$, but if we take $a_n=\pi n$ or even $a_n=\pi$, then $\sum_{n=1}^\infty \sin(a_n)$ converges while $\sum_{n=1}^\infty a_n$ diverges. Is my thinking incorrect? Removing duplicate rows from table in Oracle I'm testing something in Oracle and populated a table with some sample data, but in the process I accidentally loaded duplicate records, so now I can't create a primary key using some of the columns.  How can I delete all duplicate rows and leave only one of them? When is a clause not essential? I am having trouble figuring out when to use commas to set off &quot;nonessential&quot; information.  Sometimes it's obvious:  Bob, who is thirty years old, is an alcoholic.  But other times I'm not sure:  The day he quits drinking * he will start a llama farm He has his heart set on owning El Duderino ranch * in New Mexico.  In the first case, my ear says that there should be a comma at *, even though information before it seems essential to me.  In the second case, the stuff after * is not essential, and yet it seems a little much to use a comma. Even that last sentence I wrote confuses me.  &quot;In the second case&quot; seems essential but I used a comma.  Is this correct? Does it depend on personal style and the length of the clause?  Or perhaps I'm misinterpreting the meaning of &quot;essential&quot; in this context? How to read and write into file using JavaScript? Proving $\gcd((a+b)^m,(a-b)^m)\le2^m$ for coprime $a,b$ and $m \in \Bbb N$ I know many master's students who get an opportunity to talk to their potential PhD advisors well before applying. In most cases this opportunity is available by the professors with whom they worked for their master's. Moreover, there are many others who establish a contact with professors by mailing them and enquiring about PhD vacancies.   My questions are:   How important is knowing an advisor prior to applying for PhD?  Does an email interaction play a vital role when the department makes its admit decisions? If email contact is important, can a student send out mails to 2-3 professors (working in the same area) in case one of them does not bother to reply? To sum up, is applying of any use (especially in top universities) when you have no contacts and only your credentials to bank on? Why do the big nuts always remain at top? The Brazil-nut Effect Most of the time when I mixed different nuts in a bowl, I observed that the big Brazil nuts were always on top while the small peanuts settled near the base. No matter how you take it, if the big nuts are put at the bottom and then the small nuts are poured, then also after some time the big ones will come to the top. Will not the gravity attract those big nuts more and eventually will they not remain at the base? But it doesn't happen!   I googled it and found the term Brazil-nut Effect but couldn't find any proper explanation. What is the physical explanation for this effect? error in running bash script as root I have a simple shutdown script which i want to run as root  shutdown -h +30; echo "succesfull";   I have followed these answer, to make my script root.  first I run this command  sudo chown root.root $HOME/test/test.sh sudo chmod 4755 $HOME/test/test.sh   and then made changes in sudoers  sudo visudo   added this command after this line %sudo   ALL=(ALL:ALL) ALL  eka ALL=(ALL) NOPASSWD: $HOME/test/test.sh   But when i executed my script its showing this error  shutdown: Need to be root succesfull What is the proper way to write the plural of a single letter? Or a word used as a word ('mention' usage)? (another apostrophe question) When writing (a blog post, script, etc..) what is the proper way to indicate two or more instances of a single letter? For instance, in Monty Python's Bookshop Sketch:     C: I wonder if you might have a copy of "Rarnaby Budge"?      P: No, as I say, we're right out of Edmund Wells!      C: No, not Edmund Wells - Charles Dikkens.      P: (pause - eagerly) Charles Dickens??      C: Yes.      P: (excitedly) You mean "Barnaby Rudge"!      C: No, "Rarnaby Budge" by Charles Dikkens.  That's Dikkens with two Ks, the      well-known Dutch author.      P: (slight pause) No, well we don't have "Rarnaby Budge" by Charles Dikkens      with two Ks, the well-known Dutch author, and perhaps to save time I      should add that we don't have "Karnaby Fudge" by Darles Chickens, or      "Farmer of Sludge" by Marles Pickens, or even "Stickwick Stapers" by Farles      Wickens with four M's and a silent Q!!!!!  Why don't you try W. H. Smith's?      C: Ah did, They sent me here.   I had always believed that plural never uses an apostrophe before the 's' (it's only used for possession), but I have rarely seen in written material the format "four Ms". (On a side note, whoever wrote  also used "two Ks".)  On a side note, and perhaps this should be a separate question, if a Compact Disc is a CD, then two Compact Discs would be two CDs right? (I see "CD's" written everywhere) $\Delta U$, $C_p$, $C_v$ for an ideal gas process It is often stated that the Lagrangian formalism and the Hamiltonian formalism are equivalent.   We often hear people talk about eigenvalues of Hamiltonians but I have never ever heard a word about eigenvalues of Lagrangians.   Why is this so? Is it not useful? is it not possible to do it? Unicode char {U+200B} When I try to cite more than two authors, I got this: ! Package inputenc Error: Unicode char ​ (U+200B) (inputenc)                not set up for use with LaTeX.   \documentclass[a4paper,oneside,BCOR=10mm,12pt,titlepage]{scrreprt}  \usepackage[polutonikogreek,ngerman,english]{babel} \usepackage[maxlevel=4,autostyle,german=guillemets]{csquotes} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[style=mla]{biblatex} \DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\multicitedelim‌​}  \begin{document}  \parencites[cf.][]{key1}{key2}{key3}  \end{document} Does SOQL join not respect OWD /sharing settings? A->B are two objects connected using lookup relationships. If somehow, I get read only access to child record but do not have access on parent record then still i am able to see data from parent record through formula fields. Similarly will SOQL in Apex also allow me to fetch fields from parent record regardless of using 'WITH Sharing ' keyword at class level? The cow in the field problem (intersecting circular areas) What length of rope should be used to tie a cow to an exterior fence post of a circular field so that the cow can only graze half of the grass within that field?  updated: To be clear: the cow should be tied to a post on the exterior of the field, not a post at the center of the field. C programming: How to program for Unicode? What prerequisites are needed to do strict Unicode programming?  Does this imply that my code should not use char types anywhere and that functions need to be used that can deal with wint_t and wchar_t?  And what is the role played by multibyte character sequences in this scenario? Comma after introductory words, phrases, clauses: unacceptable, obligatory or optional? I am no native speaker and always confused about the comma in introductory phrases, in particular in prepositional phrases. Is there any hard rule when a comma must be set? If I make a google search for certain phrases, I often find both variants. Typical examples where I am not sure whether a comma must be set are:        First[ly][,] I must phone mother   In this case[,] we must...   For simple problems[,] the algorithm...   From Lemma 1.2[,] we obtain...   For a typical user[,] the algorithm...   In our theory[,] we...   A dark line on the horizon[,] the mountain range we were headed for seemed somehow not as threatening as when we had started out on the trip.   Avidly reading her novel[,] Jane did not notice that her stop was approaching.   To be sure[,] it is not easy to see a solution.   When you get to Rome[,] give me a ring. What's a word for lack of confidence? I've just purchased a new brand laptop with 17 inch size of the screen. I've installed Texmaker and it is messy. The icons are very small and the GUI is not zoomed out automatically to fit the contents of the window. These are pictures         I've already set the size of the icons to medium and the size of apps to 250 (i.e. the recommended size) for  the display.  I'm using Windows 10. Some fonts are blurry and a lot of people are complaining about this problem with no solution from Microsoft. Any suggestions? Get Age of a person in MySQL Where is this picture from? How do I use Reverse Image Search to find the source of an anime/manga image? So I see an image that I believe is from either an anime or a manga. What are some ways that I can go about finding what series it's from? Try these options:   (browser built-in support and plugins)        Note: Please note that as of May 9, 2016, ALL  questions are now . Therefore, you can't ask an identification request question on this site. However, such questions are still welcome  for users with at least  (globally on StackExchange).    Protip: If you are using Google Image Search in a non-English language,  or just use  for better, more accurate results.