I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous watersheds so that when the summed values of a group of watersheds falls between 50 and 100, those watersheds are assigned a unique ID in a new attribute field called GROUP.   The code that I'm looking for would need to run through the entire polygon layer, essentially assigning ID's (i.e., groups) to each watershed in the layer. I'd imagine that in a polygon layer of 1950 watersheds, there would be ~300 unique groups.  Exactly the same question has been posted previously () but unfortunately they never posted their code.
I have a shapefile with 3800 polygons representing the smallest administrative areas in Ireland. Many of these, in rural areas, have tiny populations, under 100 people. In urban areas, all would have adequate populations.  For each area I have a population figure, and various other attributes, all of which can be intelligently summed to give valid results for areas produced by combining the smaller areas.  I need to merge the areas to get say, 500 or 600 areas of reasonable population. I need to leave the larger (in population) areas alone, where possible. I would greatly prefer to do this automatically. This is necessary for model fitting purposes, primarily.  I've looked at a number of the dissolve questions here:   'Batch Dissolve Polygons based on Attributes in QGIS or FWTools' I think would require me to know which areas to merge, when this is what I need to calculate. 'Practical way of managing polygons and unions of them' and 'How do dissolve polygons from shapefile using open source tools?' have the same issue.   Any suggestions?
I know that each new tab on Google Chrome have its own process, but I have 14 chrome.exe processes running actually as I can see it on the Task Manager, and only two tabs are opened on Google Chrome.    Could it be due to Chrome extensions? What other reason can open more chrome.exe process and how to avoid it? How can I scale all images in a folder to the same width? I want to scale all images in a given folder to the same width (but different appropriately scaled heights). How can I do this using  a GUI-based or command-line tool?  For bonus points, is it possible to restrict which images are scaled based on their initial width (that is, only scale images that have a width > x and/or a width &lt; y)? How does Ascending work? The next upgrade I am likely to get is "ASCENSION" for Amenhotep.  The mouseover text on the ability says it restarts the game and gives a single hero soul.  Does anything else cross over (heroes, gold, achievements, etc.)?  When would be the best time to Ascend?  Should I wait until I unlock all the heroes or buy all their abilities?  I'm on level 85 now (not yet beat the boss), should I wait until a specific level? I'm trying to solve    So far I've done the first part, evaluating the summation ;  where a is just n. I'm not sure where to go from here or what it even means deduce the second summation. I understand that the summation of simply $$\sum\limits_{k=0}^n\cos(kx)$$ is derived from looking at the real part of  $$\sum_{k=0}^n{\rm e}^{ikx} $$I'm guessing they want me to see how the second summation in the question is defined by 'playing around' with the original? If $ar + bs =1$, then $\gcd(a,s) = \gcd(r,b) = \gcd(r,s) = 1$ I found several plugins (like  and ) to get the ability to attach a picture to a WP user. But these plugins are not maintained any more.  Since there's apparently no plugin that does it today, is there an easy way to do it manually? $(\mathbb{R}^n,\|\cdot\|_{p})$ is isometrically isomorphic to $(\mathbb{R}^n,\|\cdot\|_{q})$ iff $p=q,$ How can slightly blurred photos be improved in post processing? At this time, Wubi does not work with Windows 8 default boot-loader. Thus at this point Wubi would not work on a new Windows 8 machine.      Citation fom    Question  Recently I've learned of , a way to install Ubuntu right from Windows.  Besides installing from Windows, I would like to know key differences between a regular "alongside Windows" or Dual-boot Ubuntu installation and one done with Wubi. Are there any disadvantages (for example a performance penalty) or incompatibilities I should look out for when using Wubi? How to use sed to replace only the first occurrence in a file? Is there any shorter pronunciation of W than double-U? When spelling, every letter in the Alphabet is pronounced by a single syllable, with the only exception of W being pronounced "double-U". (Fun fact, in German it's approximately pronounced like the "ve" in very, but in some strike of cosmic justice Y is pronounced "Yps-e-lon") Why is that? Is there any at least semi-officially accepted one-syllable alternative pronunciation of W?  I checked some related post, e.g. , but they are more concerned with the "Why?" instead of the "Why not different?" I'm using Ubuntu 13.04 and I have ASUS X550V laptop. This is my rfkill list:  0: asus-wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 1: asus-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 2: phy0: Wireless LAN     Soft blocked: no     Hard blocked: yes 3: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   Before you start going: Hey, just turn on your hardware switch, dummy... my hardware switch is Fn + F2 and it works perfectly fine on my Windows boot. But, on my Ubuntu boot it does nothing... All the other Fn + F_ combos work (turn off the touchpad, screen turn off, screen brightness, sound) and they give some kind of visual indicator when I press it.  My lshw log:  *-network DISABLED                 description: Wireless interface                 product: AR9485 Wireless Network Adapter                 vendor: Atheros Communications Inc.                 physical id: 0                 bus info: pci@0000:03:00.0                 logical name: wlan0                 version: 01                 serial: 24:0a:64:28:b4:25                 width: 64 bits                 clock: 33MHz                 capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless                 configuration: broadcast=yes driver=ath9k driverversion=3.8.0-19-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn                 resources: irq:17 memory:f7900000-f797ffff memory:f7980000-f798ffff When applying for post-doctoral and faculty positions you are typically asked for three (sometimes more) reference letters to support your application.    Given that it is competitive out there, it also makes sense to apply for all positions that are good matches to your qualifications and career development goals (in the case of post-docs).  Sometimes this may mean asking for several reference letters (or pre-application "can you support me if required?" requests) in a short space of time.  Also, there may only be a small pool of people (i.e. 3 or 4) who know your work sufficiently well to give an excellent reference.  I have also been told that referees want to help you out, and that there is no reason to fear asking them.  And, that in many cases once a letter is written it can typically be quickly repurposed.  But there must be a breaking point.  How do I manage this without being disrespectful?  How many requests in a given unit of time is too many, or harms my credibility?   I am asking this question in this forum, as I am interested in the norms in the academic world, which are often somewhat different than the rest of the working world. Is it possible to install an old version of Mac OS on a new Mac? Custom hard edges in Blender How Does Kylo Ren not stop Chewbacca's blaster? How does Kylo Ren stop the blaster shot in the beginning when being shot at by Poe, only to be unaware of the coming blaster shot from Chewbacca, which seems much more predictable.   I am sure he knew Chewbacca, Rey and Finn where there as Chewbacca turns with the opening of the doors when Rey and Finn come in.  EDIT in regards to Richards Answer: I just want to expand a little more on question. What I don't understand is that Kylo Ren uses the force, so it is just not a matter him not hearing. When Poe shoots him from behind, he makes no sound, but yet he turns and stops the blaster and Poe. That has to be due to the power he commands in the Force.  And this is from Obi-Wan Kenobi:     "Well, the Force is what gives a Jedi his power. It's an energy field   created by all living things. It surrounds us and penetrates us; it   binds the galaxy together."―Obi-Wan Kenobi —   So it seems to me that it would be very hard for him even in a weakened state to not even notice that he was being shot at by virtue of the force being a part of Sith and Jedi's alike. Even if he was too weak to actually stop the blaster, the Force should have been able to warn him. Is it worth getting a suspension seat post as a cheap alternative to full suspension bike? I'm planning a ride from Birmingham to London on the Grand Union Canal (UK), which will be quite bumpy for most of the 145 mile distance.  I have a front suspension bike and can't afford a new full suspension bike.  Do suspension seat posts actually work?  If so, I'll get one of them.  Can anyone recommend a good model? Shapefile Naming conventions in ArcPy? I have shapefile named `band-tailed_pigeon.shp which is fine and no problem on displaying or geoprocessing on Desktop but in ArcPy when I try to merge some layes to it I am getting this error   ExecuteError: ERROR 000354: The name contains invalid characters Failed to execute (Merge).  I tried to do the proccess with a simple name like sample.shp which it works but I HAVE TO keep the same name as we are using them in several projects. Here is the code which I have FinaloutLocation = &quot;E:\\GIS\\Data\\Final\\band-tailed_pigeon.shp&quot; inFeaturesToMerge = [dissolve_1, dissolve_2, dissolve_3, dissolve_4, dissolve_5] arcpy.Merge_management(inFeaturesToMerge, FinaloutLocation) operators as strings I need to evaluate a mathmatical expression that is presented to me as a string in C#.  Example noddy but gets the point across that the string as the expression.  I need the evaluate to then populate an int.  There is no Eval() in C# like in others langugaes...  String myString = "3*4";   Edit:  I am on VS2008   Tried the Microsoft.JScript. = Its deprecated method (but still complies - warning)  However the Microsoft.JScript dll that I have doens work on      public object InvokeMember(string   name, BindingFlags invokeAttr, Binder   binder, object target, object[] args);   Complains that there is a missing ";"  go figure...  EDIT 2  Solution - was the codeDom one - it worked for as there are no security issue - only me ever going to be running the code.  Many thanks for the replies ...  And the link to the new Dragon Book  awesome   EDIT 3  Matt dataTable.Compute() also works - even better for the security conscious.  (parameter checking noted) How to unprotect GeneratingFunction