I would like to take sequential numbers up a level and only apply it to features of a certain type. Say I have two feature types, black and white features, and it's denoted by the field "Type". I want my sequential numbers code to skip all white features and pick up where it left off with the last black feature. I'm sure it's some type of If/Then statement but i can't figure it out. Here's the basic code where it returns sequential numbers by my sort field, which works just fine:   import arcpy  sortFeat = r"P:\path\Receivers.shp" #featurepath sortField = 'Ycoord' #Base Field to sort, which is  idField   = 'R_ID' #Field to populate sequential numbers rec=0  def autoIncrement():     global rec     pStart = 36 #number of features     pInterval = 1      if (rec == 0):          rec = pStart      else:          rec -= pInterval      return "R" + str(rec)  rows = arcpy.UpdateCursor(sortFeat, "", "", "", sortField)  for row in rows:     row.setValue(idField, autoIncrement())     rows.updateRow(row)  del row, rows  print "Finish"    So how can i make this only apply to certain attribute type and not all within the layer?  I am using Python 3, but this currently only works in a 2.7 environment.
I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.  I assume it would be an alteration of this:  rec=0 def autoIncrement():  global rec  pStart = 1   pInterval = 1   if (rec == 0):    rec = pStart   else:    rec = rec + pInterval   return rec
Where do the regions of Westeros appear to align as of the season 6 finale? Based on , my understanding is that there are 9 regions of Westeros subject to the rule of the Iron Throne, from Dorne joining up to Cersei killing Robert.  With whom does [insert region] align in what appears to be Daenerys vs Cersei?   Kingdom of the North -- Daenerys probably but currently busy with White Walkers Kingdom of the Mountain and the Vale -- Daenerys probably but currently busy with White Walkers (supposedly; depends on what Littlefinger has in mind) Kingdom of the Isles and Rivers (Iron Islands) -- Daenerys Kingdom of the Isles and Rivers (Riverlands) -- Cersei because the Freys are with the Lannisters? Kingdom of the Rock -- Cersei because she is a Lannister Kingdom of the Stormlands -- Cersei? Kingdom of the Reach -- Daenerys after invitation of Varys and Ellaria Principality of Dorne -- Daenerys after invitation of Varys presumably Crownlands -- Cersei since Cersei is currently occupying the Iron Throne   Am I understanding this right? Anything wrong? This picture is a part of a table i am using, the terms subcases are vertically written but i cant center them vertically also in the next columns terms like A, B, etc are also not vertically centered. I made this table using tabulary package a. My code is  \begin{table}[H]  \centering  \caption{Saturation Table}  \label{tab:5}%  \begin{tabulary}{1\linewidth}{J J J J J J J J J J J J J}  \toprule  &amp; \textbf{Method} &amp; \multicolumn{1}{c}{\textbf{Parameters}} &amp; \textbf{Step 0} &amp; \textbf{Step 1} &amp; \textbf{Step 2} &amp; \textbf{Step 3} &amp; \textbf{Step 4} &amp; \textbf{Step 5} &amp; \textbf{Step 6} &amp; \textbf{Step 7} &amp; \textbf{Step 8} &amp; \textbf{Step 9} \\  \midrule  \multirow{4}[4]{*}{\begin{sideways}\textbf{Subcase A}\end{sideways}} &amp;  \multirow{2}[2]{*}{\textbf{A}} &amp; \textbf{No} &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; \textbf{6} &amp; &amp; &amp; &amp; \\[1mm]  &amp; &amp; \textbf{Maximum Saturation {(\%)}} &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 4 &amp; \textbf{5} &amp; &amp; &amp; &amp; \\  \cmidrule{2-13} &amp; \multirow{2}[2]{*}{\textbf{B}} &amp; \textbf{No} &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; \textbf{8} &amp; &amp; \\[1mm]  &amp; &amp; \textbf{Maximum Saturation {(\%)}} &amp; 6 &amp; 6 &amp; 7 &amp; 8 &amp; 9 &amp; 9 &amp; 19 &amp; \textbf{8} &amp; &amp; \\  \bottomrule  \end{tabulary}%  \end{table}% Prove : $p$(n│even number of ODD parts)=$p$(n│distinct parts ,number of ODD parts is even ) Minecraft Survival Mode I am playing Minecraft on survival mode. I can break blocks like sand, dirt, and gravel and it will give me a block. When I try to break stone or iron or anything else, it didn't give me a block. What can I do so that I can get a block? I am on single player and my internet is fine. I tried deleting the app and then getting the app again but that didn't work. This is happening with all my worlds in survival mode. Custom text color in C# console application? How do you style an input type="file" button? Is a memory leak created if a MemoryStream in .NET is not closed? I have the following code:  MemoryStream foo(){     MemoryStream ms = new MemoryStream();     // write stuff to ms     return ms; }  void bar(){     MemoryStream ms2 = foo();     // do stuff with ms2     return; }   Is there any chance that the MemoryStream that I've allocated will somehow fail to be disposed of later?    I've got a peer review insisting that I manually close this, and I can't find the information to tell if he has a valid point or not. Can a person residing in Singapore on a 5-month Employment Pass apply for a Schengen visa? suppress page numbers in document's front matter I have a problem and I want that someone tell me how I can resolve that.  I want that the number of page in my report start in the page of introduction but in reality it starts in the didecas and liste of contents. I want that these pages have not number. This is my code  \documentclass[12pt,a4paper]{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{color} \usepackage{xcolor} %les couleurs \definecolor{myblue}{rgb}{0.2,0.4,1} \usepackage{layout} \usepackage[top=2 cm, bottom=2 cm, left=2 cm, right=2 cm]{geometry} \usepackage{setspace} \usepackage[pdftex]{graphicx} \usepackage{array} %\documentclass[landscape]{scrartcl} \usepackage{geometry} \usepackage{multirow}  \usepackage[justification=centering]{caption}  \usepackage{pgfplots}   \usepackage{fancyhdr} \fancyhf{} % clear all header and footers   \begin{document} \pagestyle{empty} \include{title-content} \color{black} \doublespacing \include{dedicaces-content} %\include{remerciement}   \tableofcontents  \listoffigures \listoftables     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \pagestyle{plain}  \pagenumbering{arabic} \chapter{Introduction générale} Show that $d_2$ defined by $d_2(x,y)=\frac{|x-y|}{1+|x-y|}$ is a metric I am pretty sure that this is such a stupid, stupid question, but how do you prove that $d_2(x,y)={|x-y|\over {1+|x-y|}}$ satisfying the third condition to be a metric, which is the triangle inequality.   I know that I should really be able to do this, but I just can't, I keep seeing a contradiction. Please help me. How to redirect and append both stdout and stderr to a file with Bash? I'm curious why PCBs have one square pad in row for 0.1" headers. What is purpose of putting one square pad? What it indicates? Can you push more amps through square pad than round? Trigonometry question finding the sin and tan If angle $\alpha$ is reflex, and $\cos \alpha = -\frac{9}{41}$, without using a calculator, evaluate  (a) $\sin \alpha$ (b) $\tan \alpha$ (c) $\cos (\alpha - 180\deg)$     . Is there anyway to get tuple operations in Python to work like this:  &gt;&gt;&gt; a = (1,2,3) &gt;&gt;&gt; b = (3,2,1) &gt;&gt;&gt; a + b (4,4,4)   instead of:  &gt;&gt;&gt; a = (1,2,3) &gt;&gt;&gt; b = (3,2,1) &gt;&gt;&gt; a + b (1,2,3,3,2,1)   I know it works like that because the __add__ and __mul__ methods are defined to work like that. So the only way would be to redefine them? While moving custom profiles using eclipse from dev org to partner org found following errors Own table of contents? How can I insert a newline in a framebox? Should I sign, watermark or otherwise label a framed print? And if so how? How to share an encrypted storage on Windows, Mac OS X and Linux in a secure way I got a 2 TB drive that I have to use with both Windows 8.1 / Windows 10 and Yosemite to OS X / OS X El Capitan and maybe even on Linux.  I need to encrypt the volume. Or rather, I want to create two partitions: a 1.7 TB encrypted and unencrypted the remaining space.  Now I use Windows BitLocker to 512bit. On Mac and Linux nothing, obviously.  What do you recommend?  I saw TrueCrypt (and I read about all the confusion created after May 2014), of VeraCrypt, of GNUPG, Disklocker to read BitLocker on Unix.  But I feel lost and without a good idea.  And if I use TrueCrypt 7.1a waiting for new solutions such as precautions to prevent memory dumps and other potential crack?  And then how should I use TrueCrypt to format the drive? In GPT? MBR? Journaled? FAT? I've tried different ways to install iTunes, but to no avail. I tried with Wine, but it didn't work. Is it possible to have iTunes on Ubuntu?