Suppose s=&quot;mrunal&quot; I want to print run for that I am doing print(s[1:4]) But in python why print(s[1:3]) is not available. Simply I want to tell that why end in slicing is not that index which we want as last character? s=&quot;mrunal&quot;  index 0 = &quot;m&quot; index 1 = &quot;r&quot; index 2 = &quot;u&quot; index 3 = &quot;n&quot; index 4 = &quot;a&quot; index 5 = &quot;l&quot; here index for &quot;n&quot; is 3. Why end index is not same as s[1:3]? Why it is not inclusive? why it uses exclusive?
I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.
Find all real numbers $x$ for which $$\frac{8^x+27^x}{12^x+18^x}=\frac76$$  I have tried to fiddle with it as follows:   $$2^{3x} \cdot 6 +3^{3x} \cdot 6=12^x \cdot 7+18^x \cdot 7$$ $$ 3 \cdot 2^{3x+1}+ 2 \cdot 3^{3x+1}=7 \cdot 6^x(2^x+3^x)$$ Dividing both sides by $6$ gives us $$2^{3x}+3^{3x}=7 \cdot 6^{x-1}(2^x+3^x)$$  Is this helpful? If so, how should I proceed form here? If not any hints would be greatly appreciated. Elementary central binomial coefficient estimates How to prove that $\quad\displaystyle\frac{4^{n}}{\sqrt{4n}}&lt;\binom{2n}{n}&lt;\frac{4^{n}}{\sqrt{3n+1}}\quad$ for all $n$ &gt; 1 ?     Does anyone know any better elementary estimates?   Attempt.  We have $$\frac1{2^n}\binom{2n}{n}=\prod_{k=0}^{n-1}\frac{2n-k}{2(n-k)}=\prod_{k=0}^{n-1}\left(1+\frac{k}{2(n-k)}\right).$$ Then we have $$\left(1+\frac{k}{2(n-k)}\right)&gt;\sqrt{1+\frac{k}{n-k}}=\frac{\sqrt{n}}{\sqrt{n-k}}.$$ So maybe, for the lower bound, we have $$\frac{n^{\frac{n}{2}}}{\sqrt{n!}}=\prod_{k=0}^{n-1}\frac{\sqrt{n}}{\sqrt{n-k}}&gt;\frac{2^n}{\sqrt{4n}}.$$ By Stirling, $n!\approx \sqrt{2\pi n}\left(\frac{n}{e}\right)^n$, so the lhs becomes $$\frac{e^{\frac{n}{2}}}{(2\pi n)^{\frac14}},$$ but this isn't $&gt;\frac{2^n}{\sqrt{4n}}$. I've got a qml file and I just want to ssh to the phone and do  qmlscene myfile.qml   Is it possible without doing all that stuff with SDK and packages? Just vim and some simple commands that can fit into person's memory. Ideal charging / discharging percentage for maximum battery life? One of my friends has a relatively new Samsung smartphone. He has this app that notifies him whenever the charging is up to 80%, and tells him to unplug the charger.  He tells me that it will increase the number of charging cycles for his battery. He says that if he lets it charge all the way up to 100%, it will mean he has to replace the battery of the phone more often.  Is this true?  Somehow, I feel this is a thing of the past. I thought the internal architecture of batteries these days was made so that it wouldn't drop too low or too high. (In other words, when the phone is at 100%, it isn't really 100%. It's what the battery can safely be charged to in order not to degenerate too much.)  Here's a  which taught me something about this. Invisible space when trying to remove file (but exclude all files in a list)? I'm trying to accomplish a simple task using the excellent post : I would like to remove all files from a folder except those listed in a .txt file contained in the folder. The syntax works fine, but for some reason all files are removed - basically the script is saying that there are no correspondences between the filenames in the folder and those in the .txt file - but I can see that there are!   I thought maybe there might be some invisible white space after my file names that I cannot see (in the folder or the .txt file). But I don't think so...Is there another solution that I am not thinking of? How to extend the text under summation symbol without making extra space When activating the evolution for a caught Pokemon, it seems to amplify the Combat Power (CP). Thus it seems most beneficial to evolve your Pokemon with the highest CP, if you have multiple of the same kind.   But what I am not sure about is whether it makes an efficiency difference if you spend candies and dust to boost CP before evolving, to gain more from the amplification? Or is it more efficient to just evolve without spending, and then using the leftover candies afterwards, since they now give a bigger CP boost per candy?   I only tested with a Rattata so far, which gained +8 CP per candy before evolving, and +15 CP afterwards. I collected no numbers on the amplification efficiency though, and now ran out of materials for further testing.  Or maybe it is a balanced calculation and makes no difference at all? I would love to have some insight on that.    Some data I collected thus far: (GPC = CP gain per candy)  79 CP Weedle (GPC 6) evolved to: 84 CP Kakuna (GPC 6), evolved at 90 CP to: 297 CP Beedrill    Note: The max-CP "half circle" in the profile stayed filled roughly at the same relative position throughout the evolutions. It is common to see things described as the &quot;gold standard&quot;. It means that something is the best and is the ideal against which other things are to be compared; it cannot be superseded. I often , where a certain diagnostic test (e.g., the nasopharyngeal swab PCR test for infection with the Coronavirus causing COVID-19) is considered the most accurate and then other tests (e.g., cheaper or faster tests) are then evaluated against this benchmark. The etymology is covered in . In short, it is derived from the . Thus gold was the thing against which the value of all other currencies was measured. I don't like this term and would like to avoid using it. First, the desired meaning is not predominant; if you  you will mostly get results for the monetary system, not the more general phrase. Second, the etymology is outdated; the original meaning of the term now has the opposite connotation. The monetary gold standard was abandoned in the 1970s. Economists consider the gold standard to be a bad monetary system. Thus, if you are interested in economics and history, the term &quot;gold standard&quot; actually is associated with being outdated and flawed -- which is close to the opposite of the intended meaning. (Of course, many people are unaware of the original meaning of the term. ) (A note in response to comments: Why I want to avoid this term is relevant, but not essential, to the question. If you don't see a problem with the term, the question can be answered regardless.) My question: Is there a better phrase to use in place of &quot;gold standard&quot;? For example, what term could be used in a medical study comparing a new diagnostic test against the gold standard test? I'm not aware of any good substitute that has essentially the same meaning. Here are two example sentences where I would like a replacement:   A nasal swab is the gold standard for diagnosing COVID-19.     The  served as the gold standard for all scales from 1889 until 2019.   The best substitute I can think of is &quot;official,&quot; as in &quot;a nasal swab is the official way to diagnose COVID-19&quot;. &quot;Official&quot; implies some form of uniqueness. But &quot;official&quot; implies the existence of some authority that gives it this designation (as opposed to scientific consensus). A  asks for a &quot;perhaps humorous&quot; alternative -- the suggestion there, &quot;mother of all&quot;, is not appropriate here. (There is also .)  In response to the answers and comments doubting the premise of this question: I personally have a negative association with the phrase &quot;gold standard&quot; because I know people who advocate for returning to the gold standard or its modern equivalent, , and have discussed the topic at length. Several  US  continue to advocate for a return to the gold standard. Thus asserting that no one will interpret the phrase in terms of monetary policy is simply not convincing. User's suspension period has expired, but they're still suspended? I came across a user with a notification that states:     This account is temporarily suspended network-wide. The suspension period ends on Dec 2 '18 at 2:35.   Screencap for posterity:    Unless this user is  (in which case the full year should be shown, or at least a tooltip), it seems like they should have been unbanned 4 months ago. I'm not sure how to go about this. Does it involve using MVT?  I got as far as saying $e = \frac{e^x - e^y}{x-y}$. Show $a^p \equiv a \mod 2p$ I've stucked at the following problem:  Let $p$ be an odd prime number. Show that for all $a\in\mathbb{Z}$  $$a^p \equiv a\ (\mathrm{mod}\ 2p)$$  How can I prove it? I know within Fermat's theorem that $a^p \equiv a\ \mathrm{mod}\ p$. Why does water pouring from a glass sometimes travel down the side of the glass? When I visit  I see this:     The "Congratulations! You've earned (badge)" section has dropped down completely beneath the tabs under it. The "You've earned a new privilege!" section has a gap at the bottom:     Shog9 says in comments how to reproduce this:     Gotta have earned a badge, not dismissed the notification, and be looking at your own profile. Is there a word to describe words that can be spelled different ways? Is there a word in English to describe words that can be spelled more than one way?  For example:   colour and color favourite and favorite   However, this shouldn't be limited to words spelled differently in different dialects, though I'm not sure what other case there would be. Let $f(x) = x^2 \sin{\frac{1}{x}}$ for $x\neq 0$ and $f(0) =0$. (a) Use the basic properties of the derivative, and the Chain Rule to show that $f$ is differentiable at each $a\neq 0$ and calculate $f'(a)$. You may use without proof that $\sin$ is differentiable and that $\sin' =\cos$.  Not even sure what this is asking.  (b) Show that $f$ is differentiable at $0$ and that $f'(0) =0$.  $\frac {f(x)-f(0)}{x-0} \to \lim_{x \to 0} x \sin(1/x)$. $x \sin(1/x) \leq |x|$ and $\lim_{x \to 0} |x|=0$. Thus $f(x)$ is differentiable at $0$; moreover $f^{'}(0)=0$.  (c) Show that $f'$ is not continuous at $0$.  $f{'}(x)=x^{2} \cos(1/x) (-x^{-2}) + 2x \sin (1/x)$. In pieces: $\lim_{x \to 0} \cos (1/x)$. $f^{'}(0-)$ nor $f{'}(0+)$ exists as $x \to 0$ $f^{'}(x)$ oscillates infinity between $-1$ and $1$ with ever increase frequency as $x \rightarrow 0$ for any $p&gt;0$ $[-p,0]$, $[-p,p]$ or $[0,p]$ $f$ is not continuous. Question: How to show more rigorously? I have a SQL Server 2005 database using the full recovery model. If I execute the following commands:  ALTER DATABASE test SET RECOVERY SIMPLE; ALTER DATABASE test SET RECOVERY FULL;   or   BACKUP LOG test WITH  truncate_only;   Then try to run a log backup:  BACKUP LOG test TO  DISK = 'backupfile.bak'   I receive the error message:     BACKUP LOG cannot be performed because there is no current database backup.   Question:     How do I check that I will not be able to take a log backup, without running a backup log command? Make a div fill the height of the remaining screen space A childish question (literally) -    My 8 year old asked me this morning: "Dad, what does 'physical' mean?" - and I found myself at loss for an ordinary language answer.   Every answer I could come up with ended up sounding like a definition of empiricism: "physical things are those things that can be observed", "physical means something that can be measured", "whatever can be verified and tested", etc....   Claiming that things that are physical are those things which are material or things that are described by physics seems circular.   Google:     phys·i·cal   ˈfizik(ə)l/   adjective   1.   relating to the body as opposed to the mind.   "a whole range of physical and mental challenges"   synonyms:   bodily, corporeal, corporal, somatic; More   2.   relating to things perceived through the senses as opposed to the mind; tangible or concrete.   "pleasant physical environments"   synonyms:   material, concrete, tangible, palpable, solid, substantial, real, actual, visible   "the physical universe"   And various dictionaries (here Merriam-Webster):      Definition of physical   1   a :  of or relating to natural science   b (1) :  of or relating to physics (2) :  characterized or produced by the forces and operations of physics   2   a :  having material existence :  perceptible especially through the senses and subject to the laws of nature   everything physical is measurable by weight, motion, and resistance — Thomas De Quincey   b :  of or relating to material things     lead to similar definitions.   How can one define "physical" in ordinary language terms? Is there a way of defining "physical" that doesn't presuppose empiricism? What is the rationalist definition of 'physical'?   Is there a definition that doesn't commit to either dualism or empiricism or to any epistemology? I just wrote an answer to , which was trying to find numeric strings with or without commas (e.g. 1,234,567.89). I wanted to be thorough because I've seen this problem a lot, both on SO and in real-world code.   When I finished, I found 7 other new answers waiting for me, mostly variations on each other. Which would be fine, except for one thing: They're garbage answers. Unless I'm severely mistaken, every answer but mine (so far) is deeply flawed, and I want to downvote all of them. Yeah, I'm a stickler on regex, but IMHO if your pattern lets stuff like  ...,.,,.,,..9 or even ... pass as "numeric input," then you've failed to meet even the bare minimum requirements.  Enough venting. The reason I'm whining to Meta about this is that I'm about to do something that'll REALLY look like tactical downvoting, and I'm mildly concerned about the consequences. If I answer a question and then rain downvotes on every competing answer, will I get flagged for abuse? That would certainly seem like suspicious behavior to me.  More of an opinion question: At what point does a semi-correct answer deserve a downvote? Obviously, if it were just a typo, I'd edit it myself. Where's the line between "close enough" and "this answer sucks?"  Basically, is it just me? You've seen the question; am I right that these answers deserve downvotes? Seven people thought that [0-9,.]+ was good enough to declare something a number, so why am I the only one who doesn't?    Note: I found some related questions, but nothing that seemed like a duplicate:    - More of an etiquette question, plus the voter hadn't posted his own answer.  - I guess this pretty much covers my second question.   Also, as some have noted, my answer ended up pretty long and thorough. I put in a lot of effort because, with all this talk about how the other answers sucked, I wanted to be extra sure mine didn't. I don't expect pages of detail in a normal SO answer. Could the missing antimatter lie outside the observable universe?