Regex ending on first not last
My regex is matching too much. How do I make it stop?
Resizing Mac OS partition - macOS High Sierra stl::multimap - how do i get groups of data? Multimap essentially has groups of data sorted by the key. I want a method by which I could access these individual groups and get their aggregate values. For example, in a std::multimap&lt; string, int &gt; I store   {"Group1", 1},  {"Group1", 2},  {"Group1", 3},   {"Group2", 10},  {"Group2", 11},  {"Group2", 12}   Having stored these values, I should be able to iterate this multimap and get the aggregate values of each "group". Problem is there aren't any functions defined in STL to access MultiMaps in such a way. I could use lower_bound, upper_bound to manually iterate the multimap and total the group's contents, but I am hoping there could be better ways already defined in STL ? Can anyone propose a solution as to how I could get the aggregate values for a group in the above example. My printer does not print light magenta. (Canon MP220 - CL-38) I have a Canon MP 220, with new cartridges. Prints fine everything, but it won't print light magenta. I cleaned it and deep cleaned it many times. I have no idea what could be the problem. Cartridge models: CL-38 and PG-37.  Any ideas ?  LE: Now it won't print magenta at all! From the Windows NT-based (Windows XP and 7 specifically) command prompt, how can I get the serial number of a hard drive as a variable? The one I'm looking at is the serial number of the physical hard disk drive How do I recreate this color overlay layer effect in Photoshop? I would like to use the overlay effect used on the screenshot(s) below.    I've tried experimenting with several Blending modes but keep missing the mark. I'm sure this has a very easy answer but I'm having trouble recreating the effect on my own.  Here are a few more images for further context:        Thanks in advance for your help. How can I change font rendering to sub-pixel BGR ordering? Anthology for children; contains story about friendly Martian on postapocalyptic Earth I'm looking for the title of an anthology of children's science fiction stories from the 1950s. The best of the bunch involved a Martian who visited earth, and realized we'd blown ourselves up in a nuclear war and had fallen into savagery. The Martian is a vegetarian who subsists on biscuits made by a machine he brought with him, and communicates by using one of his tentacles to feed messages direction to/from the brain of the person he's talking to.  Inadvertently left behind by his expedition, he initially befriended some children, and eventually managed to rebuild civilization. Presently he dies, but when another expedition comes a generation later, they find the civilization he rebuilt.  there were other stories, but that was the best one.   If I can't find the name of the book it was in, I'd be happy to settle for the name of the author and the title of the story. Fibonacci numbers and proof by induction Consider the Fibonacci numbers $F(0) = 0; F(1)=1; F(n) = F(n-1) + F(n-2)$.  Prove by induction that for all $n&gt;0$,  $$F(n-1)\cdot F(n+1)- F(n)^2 = (-1)^n$$  I assume $P(n)$ is true and try to show $P(n+1)$ is true, but I got stuck with the algebra. How do we reach $P(n+1)$ from $P(n)$? Also, strong induction may be used instead. Weighting features prior to SVM Where can I ask an open discussion question? Technically, any odd number of backslashes, as described in .  &gt;&gt;&gt; r'\'   File "&lt;stdin&gt;", line 1     r'\'        ^ SyntaxError: EOL while scanning string literal &gt;&gt;&gt; r'\\' '\\\\' &gt;&gt;&gt; r'\\\'   File "&lt;stdin&gt;", line 1     r'\\\'          ^ SyntaxError: EOL while scanning string literal   It seems like the parser could just treat backslashes in raw strings as regular characters (isn't that what raw strings are all about?), but I'm probably missing something obvious. How can friction do no work in case of pure rolling? I have read various answers , on PSE and elsewhere , and most of them explain that the point of contact of the rolling object undergoes 0 instantaneous displacement in the direction of friction, I agree , but then there is a feeling that the friction does provide a torque , so how can it do 0 work . ( The pure rolling here is under a constant external force on the object so friction does act ). Reading a bit about recent Monica Cellio related posts, I am afraid that I may be using a language that is a lot like English, but might not be the Stack-Exchange-approved version of English. For example, my English has had a certain gender-neutral pronoun in living use for centuries. That pronoun is used throughout the literature written in this version of English. It is used in the English I was taught as a grammar school student and later as a graduate student working on a master's thesis. I believe that this English is good enough to communicate about topics relevant to the various Stack Exchange sites.  The last thing I want from Stack Exchange is to be booted out because I slip up and accidentally use the language that has served me so well for a lifetime.  The topics discussed on Stack Overflow (I almost referred to it as a "sister site;" would that have been allowed? "mother site?" Good thing I didn't?) are often centered on languages which have formal descriptions.  Where is the formal description of the language that is to be used on Stack Exchange?     Strive not with a man without cause, if he have done thee no harm.      He shall die without instruction; and in the greatness of his folly he shall go astray. How to change file encoding in NetBeans? Using the same RSA keypair to sign and encrypt The RSA signature operation is basically the same as encrypting with the private key.  In particular, both operations use the same kind of keys.  Is it safe to use the same RSA keypair both for encryption / decryption and for signing / verification? Pull-up and Pull-down Resistor Usage on Input or Output MCU Pins Are pull-up/down resistors (whether internal or external) only needed for MCU INPUT pins? In contrast, an MCU pin configured as an OUTPUT "knows what level it's at" because it does the driving - a "floating" MCU OUTPUT pin tied to some input of another circuit doesn't make sense, because the state of the MCU pin can only be high or low... do I have this right? Now, upon MCU bootup or failure, it may be beneficial to have a pull-up/down tied to this "MCU output to IC input" line to ensure that the input to some IC is never floating.  Maybe I just answered my own question here... pull-up/down resistors can be used on both input and output pins, depending on application? Regular expression to extract URL from an HTML link I’m a newbie in Python. I’m learning regexes, but I need help here.  Here comes the HTML source:  &lt;a href="http://www.ptop.se" target="_blank"&gt;http://www.ptop.se&lt;/a&gt;   I’m trying to code a tool that only prints out http://ptop.se. Can you help me please? argument about fallacy of diff(M) being a gauge group for general relativity I want to outline a solid argument (or bulletpoints) to show how weak is the idea of diff(M) being the gauge group of general relativity.  basically i have these points that in my view are very solid but i want to understand if there are misconceptions on my part that i'm simply not getting and if its so, i ask for help to make the case more solid, or understanding why it doesn't apply (to gravity):    (thanks to Raymond Streater for making that point completely clear) gauge invariance in electrodynamics is an observation that physical observables are unchanged after a gauge transformation without changing coordinate frame ( we are ask to believe that in gravity someone did the same? that is, someone made the observation that physical observables are unchanged after a diffeomorphism-gauge-transformation, only to later argue that because of this, that there are no physical observables to begin with, that doesn't make a lot of sense, to not say that its just plain stupid circular argument ) . The invariance is of course broken when the theory is quantized and $\hbar$ makes an appearance, because it assumes a preferred scale for certain energies. The key point here is: classical gravity is not special regarding having diff(M) as a symmetry group from bulletpoints 2 and 3, if i cannot infer that Diff(M) is a gauge-invariance of electrodynamics, the same should apply to gravity   For this question, i would say that a valid answer would either disprove any of the arguments as fallacies themselves (hence showing a solid argument why gravity is special and diff(M) is without a doubt its gauge group), or improve the argument for making it bullet-proof (sorry for the pun) 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? Irreducible cyclotomic polynomial