This isn't so much about how to achieve what is explained in the example, there are plenty of easy ways to do it. The question is WHY does the example not behave as expected?  1. If I have the following string  "#foo#bar"  2. And I'm trying to get [foo, bar] with the following regex in JavaScript  "#foo#bar".match(/(?:#)([a-zA-Z]*)/gi)   3. It returns  Array [ "#foo", "#bar" ]   Ignoring the non-capturing group (?:#)   It works as I first expected in here   So why is this? Do JS regexes behave somehow differently?
I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.
Category-theoretic limit related to topological limit? Is there any connection between category-theoretic term 'limit' (=universal cone) over diagram, and topological term 'limit point' of a sequence, function, net...?  To be more precise, is there a category-theoretic setting of some non-trivial topological space such that these different concepts of term 'limit' somehow relate?  This question came to me after I saw (  ) a surprising fact that generalised metric spaces can be seen as categories enriched over preorder $([0,\infty],\leq)$. What geometric object is given by this equation? What geometric object is given by this equation?  $x^2+y^2+z^2+2xy+2xz+2yz-x-y-z-6=0$  Maple says it's a hyperboloid of one sheet, but is there a way to show it without going the long way by using the principal axis theorem? Are the review queues planned for the iOS app? I enjoy reviewing on SO, is it currently possible to review on the iOS app? If not, is it planned to be implemented? Assume that given three predicates are presented below: $H(x)$: $x$ is a horse $A(x)$: $x$ is an animal $T(x,y)$: $x$ is a tail of $y$ Then, translate the following inference into an inference using predicate logic expressions and prove whether inference is valid or not (for instance, using natural deduction): Horses are animals.  Horses' tails are tails of animals. My thoughts: I am quite good at translating predicate logic expressions, but here I struggled to come up with formula for Horses' tails. My initial idea was to consider similar sentence such as &quot;w is a tail of a horse&quot; to form required inference, but it was not successful. Would be welcomed to hear your ideas about this task. How to render an animation as video in Blender? Yesterday I was working on a simple animation, an animated logo.   Here is an image of the progress:    I already have the animation working and everything is okay with the project, but I can't figure out how I can render the animation and turn it into an AVI format video.  How do I render an animation in Blender? I'm searching a way to append a group in Python.  It should behave exactly like the Append function (ShiftF1) works, all objects should be local and editable. The idea is to append a character (with rig etc.) via Python and not Link it (to be able to modify it without making everything local one by one).  Thanks Is there a single word for “one who explains his point of view very clearly”? How are Star Wars blasters properly reloaded/charged/etc.? I've been looking into the inner workings of blaster weapons primarily using Wookieepedia. While most of it I understand, I still can't figure out how many rounds a gun would fire before needing the ammunition component replaced/reloaded. Is there any solid answer?  I'm someone who likes to design and draw his own weapons and such, but likes to keep to how the technology of an era is in mind. While Star Wars weapons don't really have magazines (and you don't really see them reloading during battle), other people's work still has magazines and treat ammunition consumption as though it's pretty much the same as our modern era.  I guess that I just find it hard to believe, with the technology of the Star Wars Universe, that characters would need to carry lots of ammunition (hence why clones/storm troopers/battle droids don't visually seem to carry very much).  Example: DC-15A     "The weapon's tibanna gas cartridge carried enough gas for up to 500 shots, depending on the power settings of the weapon, while the charge pack lasted about 50 shots"   Source:   I've read in several places that this can be seen in two different ways.  1. Which ever ran out first, had to be replaced before the weapon could fire again. 2. The weapon contained two different sources of ammunition (so I guess you could switch between the two) Identify cartoon about a set of fairy/demon twins in a far future where the demon uses propaganda to take over the world I'm looking for a cartoon from the 70's (I believe) which is about a set of twins; one plump "fairy" and a skeletal "demon". The "fairy" has magic powers and ends up living a life of pleasure, while the "demon" flees and turns evil.  When the "demon" finds his new weapon in the ruins of the ancient world (roughly modern day) he plots to enslave the world; the weapon in question is a set of propaganda movies with Adolf Hitler. How would I prove there is no smallest positive rational number? what is the best method to prove this statement? Is there any way to save the order of spaces in Mission Control? I have 16GB RAM. Do I need 32GB swap? I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM? Why are only certain shutter speeds or apertures available? What is the full "for" loop syntax in C? How to enable automatic update in wordpress running on IIS7 and Windows 2008? I have a dedicated server using Windows 2008 and IIS7 running 5 blogs with Wordpress. I can't use the autoupdate feature of the wordpress neither the automatic plugin instalation.  I believe I must set writing permissions in some temporary folder, the question is which one. Do you have any idea? ‘So the boy ... the boy must die?’ asked Snape, quite calmly.   ‘And Voldemort himself must do it, Severus. That is essential.’   Deathly Hallows - page 551 - UK Hardcover - chapter 33, The Prince's Tale   Dumbledore tells Snape it is 'essential' that Voldemort be the one to kill Harry, I'm assuming in order for the piece of Voldemort's soul in Harry to be properly killed as well.  But why?   Hermione destroyed the Hufflepuff cup; Ron destroyed the Slytherin locket; Neville killed Nagini; Harry destroyed the diadem and Tom Riddle's diary. So the Horcruxes were not immune to destruction at the hand of someone other than Voldemort. And as it ended up, Harry himself wasn't even a Horcrux, but rather just an unknowing host to a parasitic bit of Voldemort's soul.   Why was it 'essential' that Voldemort be the one to kill Harry in order for the piece of Voldemort's soul to die? What EXACTLY happens when I ask to delete my account? I have meticulously read through similar questions, answers and their comments but I still do not understand how the deletion is done. From what I understand I email the customer service and then they do what exactly?     1) They disable my account so that I can no longer use it?      2) They reassign all of my questions and answers to some other   account? To which one?      3) They delete all my questions and answers so that they go away from   public view?   What is the flexibility (if it exists) of the deletion procedure? Is it possible to erase the traces of my former association with the site. Can I request any of the following be done?     4) All of my questions and answers be deleted from public view?      5) Some of my questions and answers be deleted? If yes what criteria?      6) Can I have all of my contributions be assigned to some other   account which runs as sort of a "collective account" and already has   tons of content so that it doesn't happen like my contributions just   move to some other url but still stay grouped under that location and   therefore that location can be discovered as representing my account?      7) Can I have my contributions dispersed through several "collective   accounts?      8) Can my current public name be removed from any comments to my posts   so that my posts cannot be identified later as once belonging to me?   Please be polite with me. I wouldn't have asked if I have found the answer in the other questions. The other questions are also old and it is not clear what the situation is as per 05/2012.  UPDATE (for those interested):  I asked the Stackoverflow team about the procedure. Apparently none of the points 2-8 I asked above are possible, only 1 will take place. The link to my user page from my contributions is going to be removed and replaced with non-clickable text of an anonymized user name like "user1234". Whether this number is the same as my current user_id is not clear. That's all the information I got.  I'm going now to rename myself to "Anonymous" then request the account deletion. Those interested in the procedure will witness the exact result on this page.  Farewell. Move the Add Favorite / Ignored Tags boxes to the top It seems that most people who use the ignored tags feature end up with a fairly long list of those tags.  Although , it is sometimes necessary to add new ignored tags manually (typically when adding some-tag*).  It would be a lot easier if the add box was above the long list of ignored tags rather than below. I suppose the same would apply to the favorites tags for consistency's sake. System.Exception: Too many SOQL queries: 101 I am getting a Too many SOQL queries: 101 error on a trigger when I am trying to deploy another trigger.  I am posting the trigger which is causing the error.  trigger rollupAccountShowings on Account (before insert, before update) {    if (trigger.isinsert) {       for (Account a:Trigger.new){           a.No_of_Viewings__c = 0;        }    } else {      for (account a : [select                   id,                  (select id from pb__Showings__r)                  from account                   where id in:trigger.new LIMIT 1]) {           trigger.newMap.get(a.id).No_of_Viewings__c = a.pb__Showings__r.size();      } }   Can anyone correct me where I have gone wrong and suggest me the changes.  Thanks Delete own query on data explorer