I am having a problem with adding sequential numbers to the new column based on other sorted value. I would like to use 'Sort by' column to be able to generate numbers in the 'Required number'column.   I have a script listed below (Field calculator) that allows me to generate numbers in 'Script used' column. Unfortunately, the numbers start from 0 instead of 11.  mxd = arcpy.mapping.MapDocument("CURRENT") lr=arcpy.mapping.ListLayers(mxd)[0]  tbl=arcpy.da.TableToNumPyArray(lr,("objectid","MapOrderNum"))#MapOrderNum is a field that you want to use to sorb by bs=sorted(tbl,key=lambda x: x[1]) aDict={} for i,row in enumerate(bs):  aDict[row[0]]=i def sortSeq(objectid):  return aDict[objectid]  sortSeq ( !OBJECTID!)
Is there a way to calculate a sorted field with sequential numbers?  I have seen  that outlines how to calculate sequential numbers, but this is always calculated on FID order, not on sorted order.  #Pre-logic Script Code: rec=0 def autoIncrement():      global rec      pStart = 1       pInterval = 1      if (rec == 0):           rec = pStart       else:           rec += pInterval       return rec  #Expression: autoIncrement()   An example of what I'm trying to do.  I've used an advanced sort to sort by year, month, day, and now want to have sequential numbers in the Seq field.  You'll see that my OBJECTID field is not in order, so the above code won't work.    Can this be done either in the Field Calculator or using an Update Cursor in arcpy?
What is a complete list of the usual assumptions for linear regression? What are the usual assumptions for linear regression?   Do they include:   a linear relationship between the independent and dependent variable independent errors normal distribution of errors homoscedasticity   Are there any others? How can I get a pure white background in jewelry photography, without losing sparkle and shine? I've read through several threads similar to this, but I'm looking for a comparison of two options here.   I currently take photos on a raised glass platform against a white foam board background and run about 300w of lights (3 100x LEDs @ 5000k, Home Depot Specials in softboxes and umbrellas). As you can imagine, it takes me about 15 minutes of post processing to achieve a perfect white background, and sometimes I have a particular photo that I am unable to get there.  I want to upgrade to either a photography table with a translucent background that I can place a speedlight under, or a cyclorama infinity background such as the MyStudio MS20. The latter option may require an upgrade to my lighting, which I am planning to do anyways.  The idea of course is to get a blown out 255 background with no post processing, other than color correction on the jewelry or product as needed. This would cut my time after the shoot to a ridiculously small amount of time.   Which option would make my life easier?   For reference, I currently use a D5300 with a Tamron 90mm f2.8 macro lens.  This is the best shot I got after quite a lot of effort, before and after processing:      Note that the silver is not shiny like it should be, and the sparkle on the gems is lost. If $n\ne 4$ is composite, then $n$ divides $(n-1)!$. I've placed a command block making it day all the time. I want to turn it off, but I've lost it. What's the quickest way to find it? series of young adult science fiction books from early 1980s about last of a race of martial experts that sees the destruction of his home planet I remember that the main character is trying to find the group that destroyed his home planet while he was on a mission. His planet was very difficult to live on and the people became expert in martial arts and were the best soldiers in the galaxy. They were mercenaries and often helped against tyrants. There was a very memorable section in at least one book about an initiation task that the main character had to do in that he had to survive in their wilderness for days. He was at some point surrounded in a old building by thousands of poisonous worm/snake creatures that he managed to survive until rescued by the leaders. Recently I booked a flight using my points. I am  planning to fly to Seattle WA from Indianapolis Indiana.  Stop over is Chicago.  On the day of my flight I am supposed to be in Chicago.   So I was wondering if I can directly board my Seattle flight from Chicago thereby not showing up in Indianapolis.  Is this okay?  Will United airlines cancel my entire journey if I do not show up in Indianapolis? Why the default eth0 interface is down by default on CentOS? Dark Souls 2 coop/invading problem I was playing Dark Souls II on my pc a lot. After about 200 hours of ingame time I found that I cant summon or invade anybody. I tried new characters and reinstalling but it didn't help. So any tips, and reasons. P.S. I didn't used any cheats. How is stock price determined? Is stock price determined only by the last trade that takes place?  For example, if a stock I own is trading at $3.42, and I place a Sell Limit order for $0.00, will the stock price temporarily dip to $0.00?  Likewise, if I place a Buy Limit order for $100.00 for a stock that is trading at $1.23, will the price spike to $100.00?  Is there some sort of "average price" that is reported on the stock ticker?  Thanks for your help in understanding this! How to read and understand the java stack trace? Is there a term for an issue or activity that occurs only until the moment that you ask someone else to watch? Is there a term for the coincidence that occurs when an issue ONLY occurs until the moment that you ask someone else to watch or help you resolve it?    For example, having an issue with software until you try to show someone, then it stops being problematic.  Or an issue with the computer/phone that resolves as soon as a help ticket is put in.    The final example is when you have a problem with your car (funny noise, etc) - you hesitate taking it in for weeks because you know it will disappear as soon as the mechanic drives it...then it does.    This is different than a , where the action of applying a debugger, for example, changes the behavior of the activity being watched.  It's also different from a 'works on my machine' scenario, where only the original user has the problem.   What is it called when a problem resolves itself just by the mention of it?  Jinxing the issue? :)  I see this every day supporting my software product -- the users are experienced and are not making mistakes at one time then doing something different when I watch.  The problems also truly resolve (coincidentally) as soon as they ask for help - they do not reoccur.  I guess it's a case of synchronicity? Is Ubuntu an open source software? AF mirror not flipping on Canon 350D My Canon 350D is no longer raising the AF mirror when it takes a photo.  Instead, it looks like this when the mirror flips up.   This results in a photo that is half black due to the sensor being obscured.  This camera is 9 years old and has never been dropped, mishandled or subjected to harsh temperature or humidity.  Is there any common maintenance I can do to get this thing swinging properly again? I've switched from Drupal 7.14 to 7.15 three weeks ago and therefore, I'm encountering a series of very sophisticated (for me) memory limit errors.  Those errors occur any time I'm trying to clear cache in performance or to run update scripts.  My hosting company has increased my memory limit in php.ini up to 126 M, 256 M, 512 M, and even 1024 M. But the errors still occur. I've migrated my site from shared to VPS, But the error incredibly still occurs. I have no way and no idea how to move forward.   Here are the errors:   Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 30 bytes) in /home/example/public_html/sites/all/modules/views/views.module on line 416 Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 108 bytes) in /home/example/public_html/includes/menu.inc on line 2736 Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 71 bytes) in /home/example/public_html/sites/all/modules/chain_menu_access/chain_menu_access.module on line 59 allocate 64 bytes) in /home/example/public_html/sites/all/modules/views/includes/base.inc on line 93 How to fill down in Numbers without dragging? How do you add a timed delay to a C++ program? I am trying to add a timed delay in a C++ program, and was wondering if anyone has any suggestions on what I can try or information I can look at?  I wish I had more details on how I am implementing this timed delay, but until I have more information on how to add a timed delay I am not sure on how I should even attempt to implement this. Prove that $z^2 \equiv ab\pmod p$ is solvable if and only if both or neither of $x^2 \equiv a \pmod p$, $x^2 \equiv b \pmod p$ are solvable. Suppose the $p$ is an odd prime not dividing $ab$.  Prove that $z^2 \equiv ab \pmod p$ is solvable if and only if both or neither of $x^2\equiv a\pmod{p}$ and $x^2 \equiv b \pmod p$ are solvable. Why is there a clear mirror image off a rough surface at shallow angles? The mirrors we use everyday have a highly reflective smooth surface, so that we can see a clear image.  But I found the same happens on a rough (not so smooth) surface, though only at shallow angles.  For example    this is the logo of physics stackexchange, reflected from the back of an ipad.  Considering that aluminum may contributed to reflection, I tried a different material:    this time a piece of printer paper.  Though not as clear, there is still some visible pattern resembling the logo.  The same effect can be observed on highways, where distant vehicles have a mirror image off the road; I do not have a picture at hand however.  So, why is this happening, and why only on shallow angles? Which one should be used?      To me, it makes no difference, but I'm not really sure why.   vs     For me, it makes no difference, but I'm not really sure why. Proving $(A\le B)\vee (B\le A)$ for sets $A$ and $B$