Substring of NSString is not found
NSString question - rangeOfString method
Why are newer generations of processors faster at the same clock speed? Why, for example, would a 2.66 GHz dual-core Core i5 be faster than a 2.66 GHz Core 2 Duo, which is also dual-core?  Is this because of newer instructions that can process information in fewer clock cycles? What other architectural changes are involved?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this question. Feel free to edit the answers to add additional details. Should I use static_cast or reinterpret_cast when casting a void* to whatever Both static_cast and reinterpret_cast seem to work fine for casting void* to another pointer type. Is there a good reason to favor one over the other? How do I get a block with data to place myself? Are you looking for how to use /setblock with blocks with data? See .  How do I get a block with data in my inventory so I can place it myself? In Java Edition, these commands work: give @s chest{BlockEntityTag:{Items:[{id:&quot;diamond&quot;,count:10b}]}} give @s sign{BlockEntityTag:{Text1:&quot;{\&quot;text\&quot;:\&quot;foo\&quot;,\&quot;bold\&quot;:true}&quot;}}  How can I do this in Bedrock Edition, where there is no access to NBT tags from commands? Closed-form expression for $\sum_{k=0}^n\binom{n}kk^p$ for integers $n,\,p$ Is there a closed-form expression for the sum $\sum_{k=0}^n\binom{n}kk^p$ given positive integers $n,\,p$? Earlier I thought of this series but failed to figure out a closed-form expression in $n,\,p$ (other than the trivial case $p=0$).  $$p=0\colon\,\sum_{k=0}^n\binom{n}kk^0=2^n$$  I know that $\sum_{k=0}^n\binom{n}k=2^n$ and $\sum_{k=0}^nk^n=\frac{k^{n+1}-1}{k-1}$ but I am unsure of whether these would be of much use now.    Additionally, what about the similar series $\sum_{k=0}^n\binom{n}kk^n$ where $p=n$? Can't update because the word prox* is blocked No surname on passport and applying for Japanese Visa No icons for automounted volumes on GNOME / Nautilius desktop on Ubuntu 19.04 Up to Ubuntu 18.04, using default GNOME/Nautilius desktop, when I inserted a (data file) USB stick it would automount and put a USB icon onto the desktop.  I find this very useful, especially for quick eject via context menu.  Now at 19.04, on USB insertion I do see a "banner" appear for a few seconds, but I no longer get any desktop icon .  I run under VirtualBox on Windows, but that has not changed and I do not think is at issue.  Ubuntu does still automount the stick at /media/&lt;username&gt;.  I found .  I checked in dconf-editor and both keys, including org.gnome.desktop.media-handling.automount-open, are set. Are There Any Mechanics for Removing Possession? So I'm thinking of a few adventure hooks for my players, and I thought about the possibility of them removing a demon that has possessed a noble. Are there currently any mechanics or rules surrounding possession and the removal of entities?  If not, does anyone have any play-tested homebrew rules? Communities list is counting my reputation wrong on some sites I have 101 rep on  and am not suspended there. But the site switcher thinks I only have 1 rep there:     I noticed this after I .   To test this, I just added Expats and Reverse Engineering to my site switcher list. On both of those sites I have 101 rep and am not suspended. Results:    Huh? What would be a good term for continuous testing post-deployment? I'm thinking of live production sites here, where there is a continuous community or much content being updated, sort of like a newspaper site or community site (the one I work at is a healthcare improvement company) and we have news articles, programs and so on.  While the underlying code is tested and released there are often production issues that come up, maybe certain pages stop working, style sheets suddenly don't appear like they did due to a service patch or some tweak done to improve production security or performance.  There is Acceptance Testing for when a deployment goes out to make sure things work right, Regression Testing to make sure nothing has been broken since previous releases.  Considering we've done these types of tests and things are working fine what would you call testing, or checking, the site to make sure things still work fine?  To be sure new pages are being crawled for search indexing?  To check that newly added pages are using plug-ins correctly?  Or so on.  My manager and I were discussing some issues that have cropped up and decided we needed to do something like this, but then to sort of note it in our status reports we didn't really have a name for it.  Anyone done this and have a term that might be good?  Or would you consider it covered by something like Continuous Acceptance Testing or some such term? When I used listings package to import C# code snippet from within my LaTeX file, I got an output as follows.    At the first line, there is an unnecessary white space because of the BOM (Byte Order Mark) that is intentionally added by Microsoft (R) Visual Studio.  I really want to remove it from the output rather than from the C# file, how to do that?   Here is my LaTeX code:  \documentclass{article} \usepackage{listings,xcolor} \lstset{% language={[Sharp]C}, backgroundcolor=\color{yellow!20}, basicstyle=\tiny, keywordstyle=\color{blue}, identifierstyle=\color{magenta}, breaklines=true}   \begin{document} \lstinputlisting{Program.cs} \end{document} What does a binomial coefficient with commas mean? I'm reading through  paper (on Dyck Paths). Near the middle of the second page, the author states the following:     Remark For the set $h_n$ there are ${k\choose t_1, t_2, ... , t_m }$ $n + k \choose{k}$ $=$ $ n + k\choose {n, t_1, t_2, ..., t_m}$ different Dyck paths.   What does ${k\choose t_1, t_2, ... , t_m }$ mean? I know what the binomial coefficient is, but I'm not sure how to interpret it when one of the parameters is a set. How much electronics and other valuables can I bring duty-free when going to India? Are nuclear weapons simply non-existent in the Star Wars universe? The resistance is attacks the Starkiller Base with what appears to be pretty small time ammunition even by modern earth missiles, which requires a long running sequence of repeated flybys.  The objective, IIRC was to destroy a critical piece of machinery on the surface which would then destabilize the entire planet/weapon (feel free to correct in edit if I remember incorrectly).  OK cool, but then why the force wouldn't they just drop a nuclear bomb on it?  Have nuclear weapons been used any other time in Star Wars (including EU), or, like smart phones, have they just not been invented in that world? NB: Nvidia has released an official fix; please see ,  and/or .  Upon waking up Ubuntu 16.04 from Suspend, the following graphical glitches appear around all windows, context menus, and similar:      This is currently known to affect the following NVIDIA cards running the proprietary drivers:  NVIDIA GeForce 610M, driver version 375.39, 340.102 NVIDIA GT 630M, driver version 375.39 NVIDIA GTX 650, driver version 375.39 NVIDIA GT 740M, driver version 378.13 NVIDIA GTX 745, unknown driver version NVIDIA GTX 850M, driver version 375.39, 378.13 NVIDIA GT 940M, driver version 375.39 NVIDIA GTX 950M, unknown driver version NVIDIA GTX 960M, driver version 378.13 NVIDIA GTX 970, driver version 375.39 NVIDIA GTX 970M, driver version 375.39 NVIDIA GTX 980 TI, unknown driver version NVIDIA GTX 1060, driver version 375.26, 375.39, 378.09 NVIDIA GTX 1070, driver version 378.09  The above above list has been sourced from reports from other users here on AU,  thread, and  thread. NB: This is be no means an exclusive list. It probably effects nearly all Nvidia cards.  Furthermore, this issue has been replicated on a clean install where the only change was a software update and the installation of the latest NVIDIA drivers.  What is going on, and how can it be resolved? Are there any performance comparisons? Are there any reliable performance comparisons between vanilla Drupal 8 versus Drupal 7?  I have searched the web but only find the post "", which is far from encouraging. What does a wizard do to cast a spell which contains a DF component? Take  for example,  Components V, S, DF    A divine focus component is an item of spiritual significance. The divine focus for a cleric or a paladin is a holy symbol appropriate to the character's faith. The divine focus for a druid or a ranger is a sprig of holly, or some other sacred plant. If the Components line includes F/DF or M/DF, the arcane version of the spell has a focus component or a material component (the abbreviation before the slash) and the divine version has a divine focus component (the abbreviation after the slash).  So do wizards have holy/unholy symbols in their spell components pouch or what? Origins of Tension First of all, I have a confusion about the definition and idea of Tension. For example, in my Physics Textbook, the idea of tension is written like this: &quot;Let's say there is a wire with a cross-section area of A and its length is $L_o$. If I hang the wire from a point and hang a weight of W on the other end of the wire, it will generate a repulsive force of T. This T is called the Tension Force.&quot; For me, this only explains to me what force will we call tension force, but it doesn't quite explain to me what is exactly this Tension force or where it originates from. Also, I have been doing pulley problems (Figuring out the acceleration of weights hanging from pulleys)  by first labeling all of the tension forces by $T_1$, $T_2$, and then doing some math with them to get my answer. But It bugs me that I am using these tension force values without even knowing where they came from or what they are. My idea was, maybe Tension force comes from the intermolecular bonds between the molecules of the rope, rubber or wire, etc. But even then, I have some different situational questions. For example:  Why you can't push a rope, copper wire against a wall?  What happens when I pull on two ends of a wire with 2 different forces?  Does the force increase proportionally to the applied force? Why does the wire break after a certain amount of force is exceeded.?  Does the idea of tension apply to everyday objects,(for example, a coffee mug, glass pane, etc). If it does, can I use something like a heat map or 3D equation to describe the tension in every point of the object? [Edit: more concisely, is there a mathematical way to show the various amounts of tension forces on a 2D (like a metal sheet) and 3D objects (like a football ) instead of a 1D object(like a string)].  If I take a metallic object like a paperclip or a thin wire. I can bend It multiple times and it eventually breaks into two pieces. I used to do this to pull of capacitors from old circuit boards. But does it happen with things like ropes or paper? If not, why it doesn't happen? ( Maybe it has something to do with intermolecular forces and the various internal stresses?)  Let's say I have an iron bar and I have thrown it out into space. Does that iron bar have equal stress distribution or still uneven or will the stress on all points become zero? (Is there even such thing as zero stress?) Why do we yawn? I've read a new study which suggests that yawning may help you keep a cool head. Also, the findings might hold some hope for sufferers of insomnia, migraines, and even epilepsy.  Is there any conclusion about what the function of yawning is and why do we yawn? British placement of punctuation relative to inverted commas