I'm trying to run an update cursor. Usually if I have an issue with databases with enterprise connections, making a connection file clears it up. This time when I tried to execute my code I just get a Runtime Error: cannot open workspace message.   I went ahead and changed the version but that didn't work either. I also tried using the workspace without the connection file and I got the same error. I've yet to make it past edit = arcpy.da.Editor(workspace)  Here's the bulk of my immaculate code:  def build_connection_file():     """This function handles everything involved in building a connection file to the feature class"""      directory = r"C:\TempConnectionFiles"     if not os.path.isdir(directory):         os.path.makedirs(directory)      feature_dataset = r"ThisIsReal"     feature_class = r"ThisIsReal"      sde = r"Database Connections\Real.sde"      versions = [version.name for version in arcpy.da.ListVersions(sde)\                 if (getpass.getuser() in version.name)]      print versions[-1]      connection_name = "ThisIsReal.sde"     if not os.path.isfile(os.path.join(directory, connection_name)):         arcpy.CreateDatabaseConnection_management(             out_folder_path = directory,             out_name = connection_name,             database_platform = "real_platform",             instance = "real_instance",             account_authentication = "OPERATING_SYSTEM_AUTH",             username = "",             password = "",             save_user_pass = "DO_NOT_SAVE_USERNAME",             database = "real_database",             version_type = "TRANSACTIONAL",             version = versions[-1])      connection_feature_class_full = os.path.join(         directory, connection_name, feature_dataset,         feature_class)      print connection_feature_class_full      #this was required last time I did this.     table_view = arcpy.MakeTableView_management(         in_table = connection_feature_class_full,         out_view = r"connection_table", where_clause = "",         workspace ="", field_info = "")      arcpy.ChangeVersion_management(         in_features = table_view, version_type = "TRANSACTIONAL",         version_name = versions[-1], date = '')      print("changed version")      return connection_feature_class_full  connection_feature_class = build_connection_file() edit = arcpy.da.Editor(connection_feature_class_full) edit.startEditing(True, False) edit.startOperation()   Is there a setting in my database that could be responsible for this? Is there something wrong with my code?
I used python add in to make a tool bar in Arcmap that edits features on a map. It works on a file geodatabase, but not on an ArcSDE version one. I've been getting an FDO error: 0. The solutions that I've found all involve opening a workspace, but I'm getting an error doing that as well. Here is the relevant portion of my code:          outFolderPath = r"U:\tempStuff"         outName = "Stuff.sde"         databasePlatform = "SQL_Server"         instance = "SQL Server"         arcpy.CreateDatabaseConnection_management(outFolderPath, outName,                                                   databasePlatform,                                                   instance)         print "Centroid of buidling:(%r,%r) Side length: %r" % (xCoordinate,                                                                 yCoordinate,                                                                 bob)         print "workspace is %r" % outName #outName is workspace          #Start edit session with an undo/redo stack then start         #edit operation         print "Starting editing"         edit = arcpy.da.Editor(outName) #outName is workspace Line 86         edit.startEditing(True, True)         edit.startOperation()          #stuff happens          cursor = arcpy.da.InsertCursor( fc, ["SHAPE@"])         cursor.insertRow([stuff])             #stop the edit operation and then save changes         edit.stopOperation()         edit.stopEditing(True)          del cursor         print "Building should be drawn"   This is the exact error I've been getting:  Traceback (most recent call last):   File "C:\Users\153289\AppData\Local\ESRI\Desktop10.3\AssemblyCache\{0BEF4E61-6332-4BCA-A908-959CA3C0B4E7}\leetScripts_addin.py", line 86, in onClick     edit = arcpy.da.Editor(outName)#outName is workspace RuntimeError: cannot open workspace   What's am I doing wrong in my code?
Can you re-equip equipment to the same creature? Example of vector space such that $cv = 0$ where $c \ne 0$ and $v \ne \vec{0}$ Is there an example of a vector space $V/F$ such that $0 \ne c \in F$, $\vec{0} \ne v \in V$, but $c \cdot v = 0 $?  I couldn't think of an example. If a car hits a wall at a speed of $v$, and an identical car hits a wall at a speed of $2\,v$, with the kinetic energy equation $E_K = \frac{1}{2}mv^2$ (the speed goes from $v$ to $0$) the second car will lose 4 times the energy, and therefore cause 4 times the damage, but with the force equation $F = ma$ (the car hits the wall and decelerates), it will hit with 2 times the force, and cause 2 times the damage.  How can this be explained? Should I use the singular or plural verb in mathematical formulae ("Two and two make/makes four")? This looks like a question asked , but it isn't.  $$T(n)=\begin{cases} T (\sqrt{n}) + 1 \quad &amp; \text{ if } n&gt;1 \\  1 &amp; \text{ if }n=1\end{cases}$$  My professor gave this to me in class yesterday. This is where I'm stuck:   $$T(n) =  T(n^{1/2})+1 =  T(n^{1/4})+2 = T(n^{1/8})+3 = \dots =   T(n^{1/ 2 ^k})+k$$  Now this will continue till  $$n^{1/ 2 ^k}=1$$  How do I proceed ahead? If I take log on both sides, then RHS becomes zero. How do I solve the relation?  I don't want to use the Master theorem, I want to know where and why am I stuck. Difference between focusin/focusout and focus/blur, with example This is a very basic query I can't figure out....  Let's say I have a two column table like this:  userid  |  roleid --------|--------    1    |    1    1    |    2    1    |    3    2    |    1   I want to get all distinct userids that have roleids 1, 2 AND 3.  Using the above example, the only result I want returned is userid 1.  How do I do this? The ring $\Bbb Z\left [\frac{-1+\sqrt{-19}}{2}\right ]$ is not a Euclidean domain Let $\alpha = \frac{1+\sqrt{-19}}{2}$. Let $A = \mathbb Z[\alpha]$. Let's assume that we know that its invertibles are $\{1,-1\}$. During an exercise we proved that:     Lemma: If $(D,g)$ is a Euclidean domain such that its invertibles are $\{1,-1\}$, and $x$ is an element of minimal degree among the elements that are not invertible, then $D/(x)$ is isomorphic to $\mathbb Z/2\mathbb Z$ or $\mathbb Z/3\mathbb Z$.   Now the exercise asks:     Prove that $A$ is not a Euclidean Domain.   Everything hints to an argument by contradiction: let $(A, d)$ be a ED and $x$ an element of minimal degree among the non invertibles we'd like to show that $A/(x)$ is not isomorphic to $\mathbb Z/2\mathbb Z$ or $\mathbb Z/3\mathbb Z$.  How do we do that? My problem is that, since I don't know what this degree function looks like, I don't know how to choose this $x$!  I know that the elements of $A/(x)$ are of the form $a+(x)$, with $a$ of degree less than $x$ or zero. By minimality of $x$ this means that $a\in \{0, 1, -1\}$. Now I'm lost: how do we derive a contradiction from this? How to recognise/thank great cabin crew? Those of us who fly a lot will know that there is a bit of a variety in cabin crew. Some (sadly more common on certain airlines) do the very bare minimum to ensure a safe flight, but nothing more. Many (especially on airlines noted for good customer service) provide a good service.  Every so often though, you come across a flight crew who go the extra mile. These are the ones always friendly, always helpful, always thinking ahead and solving the problem before it has happened. One moment they're serving you your drink, the next reassuring a little old lady about the flight, the next magicing a colouring book to turn an impending toddler crisis into a happy small child, then answering queries on arrivals and immigration for a first time travaller, then back to offer you a top up of what you're drinking (which they've remembered exactly). Not very often found, but very much appreciated when you happen across them on your travels!  In the case when you do luck out and find yourself on a flight with a great cabin crew (who go well beyond what you normally experience as "good" on that airline/kind of airline), is there a standard/common way to recognise them at the end of the flight? Not just to thank them then and there, but also to let the airline know that this person/group are what the rest of their staff should be aspiring to. Is there any standard way, or does it vary entirely by carrier? How can a Photon have a "frequency"? I picture light ray as a composition of photons with an energy equal to the frequency of the light ray according to $E=hf$. Is this the good way to picture this? Although I can solve elementary problems with the formulas, I've never really been comfortable with the idea of an object having or being related to a "frequency". Do I need to learn quantum field theory to really understand this? Definite Integral: $\int_0^1\frac{x^{2} -1}{\log x}\,dx$ How to figure out the following integral? I have not been able to solve it from some time. $$\int_0^1\frac{x^{2} -1}{\log x}\,dx$$ Bash/Korn shell script edited on Windows throws error '...^M: not found' I am doing some challenges. This is one them. I am trying to brute-force 4 digit pin with the password to get my desired answer. After connecting to the port It prompts me to enter the password then space then 4 digit pin. I tried to brute-force the pin using the script:  #!/bin/bash   nc localhost 30002   sleep 2    for i in {0000..9999};       if [[ $(echo 'UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $i' &lt;/dev/stdin) = ^Wrong*]];                         then          continue       echo '[+] Pincode Cracked! Pincode = $i'       fi   done  but it seems that this doesn't input the pass and pin to stdin, before i tried doing something like this -&gt; if [[ $(echo 'UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $i') = ^Wrong* ]]; What am I doing wrong here? UPDATE: Okay, so after researching around. I wrote this: for i in {0000..9999} do     if [ (echo &quot;UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $i&quot; | nc localhost 30002 | grep -o Wrong) == &quot;Wrong&quot; ]    then       sleep 0.1       continue    fi    echo &quot;- - - - - - - - - - - - - - - - - - - - - - - - [$i]&quot; done  This might even work but as you can see it opens new connections in the loop which makes it really slow and exhaust the system. What is needed for a game's stats to be saved? Last night I played a few games with my friend. While in the last game, I suddenly remembered something I had to do and was about to leave but my friend told me that I would lose my progress if I did so. I stayed until the end, through the scoreboard screen and quit while the next map was loading. Taking a look  now, I can't see any of yesterday's games. I don't remember how much XP I had yesterday so there is no sure way for me to check that. I had gotten a dozen ribbon and I don't see them in the feed, but there could be specific conditions to be showing them.  My questions then.   If you quit a game early, do you lose progress / XP? What if you quit on the scoreboard? Do you need to wait for the next map to load to save your progress? Any idea why the games aren't showing up? Some of them I definitely waited for the next map to load. Is there a delay for them to be shown on Battlelog?   Thanks. What is a plain English explanation of "Big O" notation? I'd prefer as little formal definition as possible and simple mathematics. Detect when browser receives file download Convert UTC/GMT time to local time I want to show that for $\gcd(a,b) = 1$ $a,b \in Z$   $\gcd(a+b, a-b) = 1$ or $\gcd(a+b, a-b) = 2$ holds.      I think the first step should look something like this:      $d = \gcd(a+b, a-b) = \gcd(2a, a-b)$   From here I tried to proceed with two cases. 1: $a-b$ is even, which leads to $\gcd(a+b, a-b) = 2$ 2: $a-b$ is odd, which leads to $\gcd(a+b, a-b) = 1$  My main problem I think is, that I do not know how I should include $\gcd(a,b) = 1$ in the proof.  Any help is appreciated. Thx in advance. Cherio Woltan How to set up beamer to grey out past items but hide future items? I know about beamer's  feature \setbeamercovered{invisible} and \setbeamercovered{transparent} to hide or grey out upcoming item's . But is there some way to have past items greyed (transparent) and future items hidden (invisible), so that only the current item is black/highlighted? And the best would be if on or 1 slide after the last all the item's could be visible highlighted. Something like this:   [grey] past 1 [grey] past 2 current [hidden] future 1 [hidden] future 2 [hidden] future 3   Is there any easy way of doing this? Show that if the smallest prime factor $p$ of the positive integer $n$ exceeds $\sqrt[3]{n}$, then $\frac{n}{p}$ must be prime or 1.  I'm stuck trying to prove this. I tried this using contradiction, but I haven't been able to prove it.  My approach:  Let $p$ be the smallest prime factor of the positive integer $n$.  Let $p &gt; \sqrt[3]{n}$  Then we must show that $\frac{n}{p}$ is either a prime number or 1.  We know that $n = pe$ for some $e \in \mathbb{Z}$.  Thus, $\frac{n}{p} = e$  We also know that $p$ > $\sqrt[3]{n}$, so $p^3 &gt; n$, and $p^2 &gt; \frac{n}{p}$  So, assume $\frac{n}{p} = e$ is not prime nor 1, meaning it's a composite number. Let's try to get a contradiction.  If $\frac{n}{p}$ is composite, then $\exists a,b \neq 1: \frac{n}{p} = ab $  Now, here's where I get stuck. What can I do with this info? $\frac{n}{p} = ab $ and $p^2 &gt; \frac{n}{p}$.