This question is different to  which was asked previously because it is using the Python parser specifically, rather than VB.  Syntax calculates the field correctly within tool (see raw below).  Copy the python snippet directly from the results window to migrate into main script, and the syntax returns as invalid.  Not sure how to fix.  Raw (working):  "\\\\ftp\\raw\\" + "20160206" + "\\Win\\Charles\\" + !NAME! + ".shp"   Copied snippet verbatim (Invalid):  arcpy.CalculateField_management(outShp, "Link", """"////ftp//raw//" + "20160206" + "//Win//Charles//" + !NAME! + ".shp"""", "PYTHON_9.3","#")   Having trouble getting it to run properly, have tried adding 'r' and using different combinations of escapes and it just won't run.
Getting an error while trying to script it, specifically "Cannot use VB for services."  Snippet and VB code block as follows:  Raw block (works within ArcMap): "\ftp\raw\YYYYMMDD\Files\Charles" +[NAME]+".ntf"  Snippet:      date = '"20160207"'      arcpy.CalculateField_management(outShp, "Link", '"\\\\ftp\\raw\\"' + date + '"files"' + "[NAME]"+ '".shp"', "VB", "")   Not sure what the issue is, somehow need to be able to insert the date and have it syntactically be correct (in either VB or python).  I didn't explain very well I have a column that contains a portion that is part of the hyperlink, so need to concatenate A column to the end of B column (with the partial path) to complete the link
Alphabetically display the items in itemize I am wondering whether it is possible to display the items alphabetically regardless of the order we type on the backend? For example I am using itemize as follows:  \begin{itemize}     \item ISDYNSTP:  Is dynamic time step used?     \item ISCDCA:     \item MVAR     \item IS2TL_ \end{itemize}   But I want to display the items in the alphabetical order. I don't know whether it is possible or not. I have like hundreds of itemize items. Actually I am trying to create a glossary for the different parameters. Is it wasteful to use a heating element, instead of doing useful work? Consider a computer CPU consuming electrical energy to perform calculations and consequently emitting heat.  Assumption: That a CPU consuming x Watts of power, emits the same amount of heat as an incandescent heating element which consumes the same amount of power.  The rest of the question assumes that this is true: the energy has to go somewhere, and I can't see that the outcome of the calculations counts as "somewhere".  I've long repeated the claim that "wasteful" appliances such as incandescent lightbulbs, over-full kettles, computers left running, etc. are not wasting power if we make the assumptions:   the appliance is in a room which we aim to maintain at above a certain temperature, warmer than the external temperature (cf a home in winter) the room leaks heat to the outside faster than the "wasteful" appliances emit heat. the room contains an electric heater the electric heater is regulated by a thermostat   In these circumstances, I think (?), if a light bulb produces excess heat, its only effect is to cause the thermostat to switch off sooner, so what energy you've "wasted" in the light bulb, is "saved" at the heater.  I don't think that's controversial.  But my question is:   If a CPU does useful work, and emits all the input energy as heat as a side effect But a heating element emits the same heat, without doing useful work Is it therefore wasteful to use heating elements? Is it more efficient to (for example) run  on a CPU, to get "free" computation as a side-effect of heating?   One reason to heat a room with a heating element, rather than with CPUs, is that the heating element is much cheaper to produce. But ignoring the initial cost of the hardware, would a "heater" made out of 20 CPUs, each running at full capacity and consuming 50W each, output less thermal heat than a 1KW element that does nothing else useful?  To be useful, of course, the CPUs would need to output the result of their computations, which would account for a tiny amount of energy. Let's assume that's negligible.  I'm sure there's a flaw in there somewhere; probably that the assumption above is false. What have I missed? Why is the Converse to Lagrange's Theorem False? I am studying elementary Algebraic Topology recently. I have seen that a topological space is identified with a group. We are telling the group as Fundamental Group. So every topological space $X$ and for any $x \epsilon X$ there is a fundamental group $\pi_1 (X,x)$. I have a question about the converse. If we consider any arbitrary group $G$, then does there exist a topological space $X$ and an element $x\epsilon X$ such that $\pi_1 (X,x)=G$? What partitioning scheme do you recommend for a desktop? I've always created three or four primary partitions -- root, swap, home, and sometimes a separate boot partition. Ubuntu's default install offers LVMs. I've never had to add additional drives or space, so it never seemed like a big deal. Whenever I do a fresh install, though, I always think there might be a better way. How to solve the functional equation $f\left(x^2+f(y)\right)=y+f(x)^2$ How to solve the following functional equation:  Find all $f:\mathbb{R}\to\mathbb{R} $ such that: $$ f\left(x^2+f(y)\right)=y+f(x)^2 $$ Holds for every $x,y\in\mathbb{R}$.  A friend gave it to me, probably its an olympiad question.  I started with the equation $f(f(y))=y+f(0)^2$ which seems to be quite helpful, but I couldn't do it effectively. How to solve it properly? Duplicate application icons in Ubuntu dock upon launch How to turn off "unread messages" feature on Windows XP login screen? In Windows XP, if you have logged onto Windows Live Messenger at some point, then it'll start displaying how many unread messages on the Windows login screen. How can I turn it off? How do you get a Media Type (MIME type) from a file using Java?  So far I've tried JMimeMagic &amp; Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type (not merely based on the extension)? Is convex hull of a finite set of points in $\mathbb R^2$ closed? Is the convex hull  of a finite set of points in $\mathbb R^2$ closed? Intuitively, yes. But not sure how to show that. Thanks! How to test apex classes with Pagereference? I'm struggling to test a class with pagereference. Following is the class...  public with sharing class redirectOrderPartner{  public String currentRecordId {get;set;} public orders__c orderId {get;set;}  public redirectOrderPartner(ApexPages.StandardController controller) {      }     Public Pagereference go(){      currentRecordId  = ApexPages.CurrentPage().getparameters().get('orderid');      system.debug('---currentRecordId  ---'+currentRecordId  );     orderId = [select id from orders__c where name =: currentRecordId limit 1];      system.debug('---orderid---'+orderId);      PageReference pageRef = new PageReference('/apex/OrderTrackingClass?id='+orderId.id);     pageRef.setRedirect(true);     return pageRef;    }   }   Following is what I tried....    @isTest  public class redirectOrderPartner_TEST  {             static testMethod void Test(){            Account acc = new Account(Name='ABC Corp.');           insert acc;            orders__c tempOrder = new orders__c(name = '0001234567', account__c = acc.id );           insert tempOrder;            Test.startTest();            PageReference pageRef = Page.redirectOrderPartner;           Test.setCurrentPage(pageRef);            ApexPages.Standardcontroller sc = new ApexPages.Standardcontroller(tempOrder);           ApexPages.currentPage().getParameters().put('Id',tempOrder.name);           PW_redirectOrderPartner ec = new redirectOrderPartner(sc);           ec.go();                                   Test.stopTest();       }   } I get the following error message on testing..     System.QueryException: List has no rows for assignment to SObject   What am I missing? Thanks Obi-Wan left Anakin for dead, and one movie later (in A New Hope) he was saying Anakin had been killed by Darth Vader.  What exactly did Obi-Wan know about Anakin and Darth Vader before A New Hope started? Is there a way to get correctly aligned print export with OpenLayers plugin? I am a beginner using QGIS (1.8.0 Lisboa) on a Mac (OS X 10.6.8 Snow Leopard). I work on a file with two layers in the following sequence (top to bottom):    a vector polygon layer with a few outlines of various buildings in France and Italy (CRS: EPSG:4326 - WGS 84 - "on the fly" re projection is activated ) a Google satellite layer uploaded via open layer plugin.   Sometimes when changing the scale (scrolling in and out) the Google layer updates a little wrong in size or position compared to the polygon layer. But as soon as I "pan" the map everything reconstructs right. Now the problem I have concerns the print composer.  The result of any kind of export - pdf, or image or svg - of my map (vector layer + Google layer in the background) differs from what is shown in the preview of the print composer: the vector layer and the Google layer positions are mismatching and in a different scale. I can send some pictures showing screenshots of the print composer preview and the final results if required.  I tried almost everything:    new files with different CRS settings "cache" update preview "render" update preview different paper sizes,  different scales,   The problem appears only using an open layer map (Google, OpenStreetMap...). If I try the same using two vector layer (shapefile) - one with the buildings, another one with the city in background - everything works out great.  ...exasperating! Since it is a real important research project I would be very grateful for some help and tips. I know that electric current is the flow of electrons but electrons have a very slow drift speed (about 2mm/s). How is it that electric current reaches its destination at almost the speed of light? If $a,b$ are the roots of the equation $2 x^2 -3 x +1 = 0$, find an equation whose roots are $a/(2b +3)$, $b/(2a +3)$ If $a,b$ are the roots of the equation $2 x^2 -3 x +1 = 0$, find an equation whose roots are $a/(2b +3)$, $b/(2a +3)$   I was practicing quadratic equation questions online but I am stuck on this question.  I found the values of roots $a= 1$, $b= 1/2$ Trying to purge MySQL fails I'm running in circles currently, trying to fix some mysql problem.  I couldn't use apt-get for a while now, because it always stuck at the line Setting up mysql-server-5.6 (5.6.27-0ubuntu0.15.04.1) ... and didn't let me do anything. So I tried to reinstall mysql, purging it. While I was able to remove mysql-server and mysql-client eventually, I'm still unable to purge mysql-common. Obviously, I managed to corrupt something, but how can I get my system back and running at this point?  ...:~# apt-get purge mysql-common Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   mysql-common* 0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 423600 files and directories currently installed.) Removing mysql-common (5.6.27-0ubuntu0.15.04.1) ... Purging configuration files for mysql-common (5.6.27-0ubuntu0.15.04.1) ... update-alternatives: error: /var/lib/dpkg/alternatives/my.cnf corrupt: invalid status dpkg: error processing package mysql-common (--purge):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  mysql-common E: Sub-process /usr/bin/dpkg returned an error code (1)   -  ...# sudo dpkg -P --force-all mysql-common (Reading database ... 424733 files and directories currently installed.) Removing mysql-common (5.6.27-0ubuntu0.15.04.1) ... Purging configuration files for mysql-common (5.6.27-0ubuntu0.15.04.1) ... update-alternatives: error: no alternatives for my.cnf dpkg: error processing package mysql-common (--purge):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  mysql-common   -  ...:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 15.04 Release:    15.04 Codename:   vivid   My goal is to just get it back and running again (mysql). Shift numbers into a different range I was wondering how can I shift my data that fall between a range lets say [0, 125] to another range like [-128, 128].  Thanks for any help Annoying lines ruining the image I was planning to do a 1920x1080 wallpaper from my favourite musician's cover. Everything was going good so far until I used correction brush which totally ruined my whole work. There are pixelated lines (how do I call these?!) everywhere! They're everywhere, it's very visible when zooming. Using Content-Aware Fill did nothing about it. I beg for help. Sorry if I did something wrong writing this post, i'm a beginner. Exercise $1.8$ of chapter one in Hartshorne. In exercise 1.8 of chap I in Hartshorne algebraic geometry,       Let $Y$ be an affine variety of dimension $r$ in $\mathbf A^n$. Let $H$ be a hypersurface in $\mathbf A^n$, and assume that $Y \nsubseteq H$. Then every irreducible component of $Y \cap H$ has dimension $r-1$.     I refered to a . In this solution, why $f$ is not a unit in $B$? Why are memory statistics in top and htop different? Whenever I use top and htop commands to see memory stats, they are always different as shown in figures. Which should I trust?