I am trying to divide a DTM model in subbasins but I have set specific outlet points for the subbasins, and not to use a thershold.  Is there a tool similar to r.water.outlet but with multiple outlet points that allows to do that on QGIS?
I followed @Micha's instruction and successfully used the modules in GRASS. I use r.watershed to get the basin raster and the drainage line：  and I use r.water.outlet to get the watershed of one outlet：  I got the whole basin area of the green outlet point, but all I want is the little part of the original basin area, like this：part B is what I want  This schematic photo shows the idea of what I want：  Can I achieve this goal using r.water.outlet or other modules in GRASS？ Or all I can do is using the intersect tool in Geoprocessing tools in QGIS？  I want to find the watershed area, but using QGIS. I have following files to work with：  stream network shapefile(polyline) point shapefile clipped from the polyline shapefile a whole island(the stream is inside the island) DEM(I got 2 types:.lan &amp; .tiff)  I want to find the total watershed area located upstream of every point in the network, here's the schematic diagram：  the green, red, and yellow line enclose the watershed of each point(here I only take 3 points as the example), and I want to calculate their area. I already got the DEM file, and I must cut the region that contains the stream off, should I polygonize it first？ Can I directly use this form(.lan or .tiff) to work with GRASS？
How to withdraw your paper from an open access journal where it has been accepted? My paper got accepted in a mediocre open access journal. However later I found out that its publishing fees was too high.   What would be the correct way of asking a withdrawal of your article from the journal? Can an electron be in two places at the same time? So I've been reading a bit and watching some videos about the double slit experiment, and therefore the wave particle duality; I've also read this "implies" that a particle can be in two places at the same time. Can you clarify this, and how could that be possible? I am currently in the process of trying to repair a power supply that has had one of its DC rails fail. A resistor in the PSU has exploded and I am trying to find what value it is.    Band 1: White Band 2: Brown Band 3: Silver (Possibly Grey?) Band 4: Gold Band 5: Green    The weird thing is that the middle band appears to be silver, which should be invalid as far as I can tell. If you assume the silver is grey (although this is unlikely, as there still needs to be a grey colour as well and the band is metallic), it produces a value of resistor which is incredibly uncommon to the point it does not exist (91.8 Ohms 0.5%).  Apologies for the noobie question, I'm just stumped after hours of trying to understand why this is and coming up short :). "Scaled $L^p$ norm" and geometric mean The $L^p$ norm in $\mathbb{R}^n$ is \begin{align} \|x\|_p = \left(\sum_{j=1}^{n} |x_j|^p\right)^{1/p}. \end{align} Playing around with WolframAlpha, I noticed that, if we define the "scaled" $L^p$ norm in $\mathbb{R}^n$ to be  \begin{align} \| x \|_p = \left(\frac{1}{n}\sum_{j=1}^{n} |x_j|^p\right)^{1/p} \end{align} then \begin{align} \lim_{p \to 0} \|x\|_p &amp;= \left( \prod_{j=1}^{n} |x_j| \right)^{1/n}, \end{align} which is the geometric mean of the coordinates' absolute values. This is interesting maybe because the $L^p$ norm doesn't have a nice limit at zero.  My questions:   How do I prove this? Is this definition of "scaled $L^p$ norm" interesting, or known by another name, or used anywhere? Is there any interesting reason to define the $L^0$ norm as the geometric mean, as above? Further reading?   Thanks! Uniform convergence of $f_n(z)=nz^n$ in the set $|z|<\frac{1}{2}$ This is a spin-off question from .   says this on the subject of storage order (clustered index) and the output order     A lot of people believe that a clustered index guarantees a sort order on output. But that's not what it does; it guarantees a storage order on disk.   See, for example, .   I've read the blog post by Hugo Kornelis and understands that an index doesn't guarantee that the sql server reads the records in a specific order. Yet I have a hard time accepting that I can't assume this for my scenario?  CREATE TABLE [dbo].[SensorValues](   [DeviceId] [int] NOT NULL,   [SensorId] [int] NOT NULL,   [SensorValue] [int] NOT NULL,   [Date] [int] NOT NULL, CONSTRAINT [PK_SensorValues] PRIMARY KEY CLUSTERED  (   [DeviceId] ASC,   [SensorId] ASC,   [Date] DESC ) WITH (     FILLFACTOR=75,     DATA_COMPRESSION = PAGE,     PAD_INDEX = OFF,     STATISTICS_NORECOMPUTE = OFF,     SORT_IN_TEMPDB = OFF,     IGNORE_DUP_KEY = OFF,     ONLINE = OFF,     ALLOW_ROW_LOCKS = ON,     ALLOW_PAGE_LOCKS = ON)   ON [MyPartitioningScheme]([Date])   My original query was this:  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   ORDER BY Date DESC   But I suggest that I could as well use this one (read below for my explanation):  SELECT TOP 1 SensorValue   FROM SensorValues   WHERE SensorId = 53     AND DeviceId = 3819     AND Date &lt; 1339225010   As you can see, my table rows are small (16bytes) and I've got only one index, a clustered. In my scenario, the table consists of 100.000.000 records at this moment (and this will most likely increase tenfold).  When the database server queries this table it has two ways of finding my rows, either it seeks the primary key and thereby reading and returning my values in desc. order of Date, or it has to do a full table scan. My conclusion is that a full table scan on all those records will be way too slow and the database server will therefore always seek the table via its primary key and thereby returning the values sorted by Date DESC Defining font color inside highlight fails Since I wanted a better readability of highlights of a would be black &amp; white-printed document, I needed to change both the highlighting color (gray) AND the font color (white).  Depending which command you implement inside the other will compile or not: \hl{\textcolor{white}{Fail}} does not work, compiling returns Package xcolor Error: Undefined color '{white}'.  Here's the mwe:  \documentclass{article} \usepackage{xcolor} \usepackage{color} \usepackage{soul} % Enables highlighting \sethlcolor{gray}  \begin{document}      \textcolor{white}{\hl{Success}}     %% Error:     %% Package xcolor Error: Undefined color `{white}'.     \hl{\textcolor{white}{Fail}}  \end{document}   So, in the end, the problem is sorta solved but I thought you might have an answer as to what happens. CakePHP View including other views I have a CakePHP application that in some moment will show a view with product media (pictures or videos) I want to know if, there is someway to include another view that threats the video or threats the pictures, depending on a flag. I want to use those "small views" to several other purposes, so It should be "like" a cake component, for reutilization.  What you guys suggest to use to be in Cake conventions (and not using a raw include('') command) Shapefile: "table1.shp"   Field name: "Name" Field name: "Result"   Flat file: "referenceTable"   Field name: "STREET" Field name: "AKA"   I need to compare the value "Name" in "table1.shp" to the value "STREET" in "referenceTable"  If the values are the same then put the "AKA" value into the "Result" in "table1.shp"     Here is my code.  I got stuck on accessing the elements from the array  import arcpy, os, sys, string from array import *   table1 = "G:\\xStreetNew\\table1.shp" table1_column = ['Name', 'Result'] referenceTable = "G:\\xStreetNew\\Test.gdb\\referenceTable" referenceTable_column = ['STREET', 'AKA']  referenceTable_List = [] with arcpy.da.SearchCursor(referenceTable, referenceTable_column) as rCur: for r_row in rCur:     reference_row = r_row[0].split(",")     referenceTable_List.insert(0,reference_row) ##print sorted(referenceTable_List)  Table1_Update_Cursor = arcpy.da.UpdateCursor(table1, "Name") for row in Table1_Update_Cursor:   if row[0] == None:   row[0] = row[0] else:   row[0] = row[0].replace(";",",")   Table1_Update_Cursor.updateRow(row)  table1_List = [] with arcpy.da.SearchCursor(table1, table1_column) as tCur: for t_row in tCur:     row = t_row[0].split(",")     table1_List.insert(0,row) ##print sorted(table1_List)  Table1_row = len(table1_List) Table1_column = len([table1_List]) ref_row = len(referenceTable_List) for i in range(0,Table1_row):  #Table Row   for ii in range(0,Table1_column):   #Table Column     print table1_List[i][ii]   Below was my old post.  Sorry for the confusion.  I have a shapefile named "table1.shp".     I would like to get all values from fielname "Name" from this table and put them into a list. Able to output each element from the list     So far, I'm able to create a list but not too sure how to get to value "AVENUE 33" or "CHAPMAN ST"  This is my code:  import arcpy, os, sys, string from array import *   table1 = "G:\\xStreetNew\\table1.shp" referenceTable = "G:\\xStreetNew\\Test.gdb\\referenceTable" cursor = arcpy.da.UpdateCursor(table1, "Name") for row in cursor: if row[0] == None:     row[0] = row[0] else:     row[0] = row[0].replace(";",",") cursor.updateRow(row) table1_column = ['Name'] table1_curObj = arcpy.da.SearchCursor(table1, table1_column) table1_List = [] for row in table1_curObj:    table1_row = row[0].split(",")    table1_List.insert(0,table1_row)    print table1_List[0] Log of mounted/unmounted devices in Unix why is the set of all binary sequences not countable? How to convert mediawiki syntax to latex? Good reasons to prohibit inheritance in Java? Impossible to hide navigation bars in Safari iOS 7 for iPhone/iPod touch How are Clash of Clans multiplayer battles determined Are battles determined by level or trophies? Just curious. Janrain has , one of the many OpenID providers. MyOpenID will not be available starting February 1, 2014. (An   hinted at the same but did not set a date for end of service.)   This decision was made by Janrain, and Stack Exchange did not have any part in it. You can still use myOpenID to log in to Stack Exchange, but be aware that any outages in the myOpenID service will mean that you are unable to log in to Stack Exchange until Janrain fixes it – which may take several days, or weeks, or never. After February 1, you will no longer be able to use myOpenID to log in to Stack Exchange. Stack Exchange will not be able to answer any questions about why myOpenID is down or when it will be working again. If you do not have any other login credentials on your account by February 1, you will be locked out, and Stack Exchange will be unlikely to help you recover your account.  To avoid getting locked out of your Stack Exchange account, we strongly suggest that anyone using myOpenID as their primary (or even backup) login add a new login method to their Stack Exchange account.  We're also going to remove the "myOpenID" button from the sign-up/login page soon, in order to discourage new users from signing up using myOpenID.  Here's how to add a new login to your account. You must be logged into your account when you begin. (This information is also available .)  Open up your user profile page (by clicking on your login name at the top of the screen) and click the "my logins" link above the bio box on the right hand side.   You should see a list of all of your logins.  To add a new login, click "add more logins..." at the bottom of the box. Choose the new login from the list and follow the steps to confirm.    If you choose, you can remove your myOpenID login by clicking the same "my logins" link, then clicking "remove" next to myOpenID.  If you are adding a Stack Exchange OpenID, you will receive a confirmation email. You must click the link in the email to confirm your email address before the Stack Exchange OpenID will show up under "my logins". Please make sure that you are already logged into your account when you click the confirmation link; otherwise, you will create a new account that needs to be merged with your old one.    If you encounter any trouble adding logins, or accidentally create a separate account that you would like merged, please fill out our . I want to copy any file to my external hard drive. But always when I tried to do this I have next output:  cp: cannot create regular file /media/NameOfCard/[file]' : Read only file system  I also tried:  sudo chmod -R 775 /media/NameOfCard sudo chmod -R 777 /media/NameOfCard   But the same effect - ... Read only file system  Update:   After mount I have next output:  nazar_art@nazar-desctop:~$ mount /dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) /dev/sdb1 on /media/sdb1 type vfat (rw) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) gvfs-fuse-daemon on /home/nazar_art/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=nazar_art)   Any suggestions?   How to solve this trouble and let permission to copy and delete files to hard drive? There is a 2d rotation matrix around point $(0, 0)$ with angle $\theta$.  $$ \left[ \begin{array}{ccc} \cos(\theta) &amp; -\sin(\theta) \\ \sin(\theta) &amp; \cos(\theta) \end{array} \right] $$  Next, there is a 3d rotation matrix around point $(0, 0, 0)$ and unit axis $(u_x, u_y, u_z)$ with angle $\theta$ ().  \begin{bmatrix} \cos \theta +u_x^2 \left(1-\cos \theta\right) &amp; u_x u_y \left(1-\cos \theta\right) - u_z \sin \theta &amp; u_x u_z \left(1-\cos \theta\right) + u_y \sin \theta \\ u_y u_x \left(1-\cos \theta\right) + u_z \sin \theta &amp; \cos \theta + u_y^2\left(1-\cos \theta\right) &amp; u_y u_z \left(1-\cos \theta\right) - u_x \sin \theta \\ u_z u_x \left(1-\cos \theta\right) - u_y \sin \theta &amp; u_z u_y \left(1-\cos \theta\right) + u_x \sin \theta &amp; \cos \theta + u_z^2\left(1-\cos \theta\right)  \end{bmatrix}  How it is possible to generalize rotation matrix on $N$ dimension around zero point and $N-2$ dimensional unit axis with angle $\theta$? I am trying to copy specific attribute table rows from one shapefile to a new shapefile that will contain only the specified rows in its attribute table, that is, if a field GDP_TOP10 = 1.   I am using this at the moment:  #Grab rows using Search Cursor with WHERE clause rows = arcpy.SearchCursor("C:/CGDP.shp", "GDP_TOP10 = 1") for row in rows:     arcpy.CopyFeatures_management("CGDP.shp", "New.shp") del row del rows   However, this just copies the entire shapefile, not the rows I want to select with the cursor. If I execute a print statement under my for loop instead, it works and prints only the relevant fields, but the copy to new shapefile command does not seem to copy specifically.   Is there a different ArcPy command to only copy rows that match a query? pgAdmin to display multiple result sets