I need to call a program in command line that will be executed in batch mode. This program receives a file with extension .jlink that contains a series of commands that the program JLink.exe will execute and then close.  I tried to execute in the following way:  os.system('C:/SEGGER/JLink_V490d/JLink.exe -CommanderScript D:\Files\CommandFile.jlink')   But this command executes the program in normal mode, not accepting the arguments.  How can I call as execution of command line and then send that command so the program executes in batch mode with those arguments?
How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?
It is possible to press ⎇ Backspace on macOS in order to delete the previous word (left of the cursor), and ⌘ Backspace to delete the previous line (left of the cursor). If you have an external keyboard with a "delete" key (or the "forward delete key"), or are able to emulate the delete key via software, it is possible to press ⎇ Delete to delete the word to the right of the cursor. However, perhaps surprisingly, it is not possible to press ⌘ Delete in order to delete the line to the right of the cursor.  Now, I have only been able to make this possible by emulating a ⌘⇧→ and then a Backspace with BetterTouchTool. However, I want to avoid doing something like this because BTT does not work at a "low enough level" for me – that is to say, the action is not entirely reliable.  Is there any official macOS way to delete the line to the right of the cursor? If I have a Windows executable, how can I find out which dlls it will load?  I'm just talking about which ones that will be loaded statically, not ones it might load dynamically with something like LoadLibrary. Elastic net penalty I have a question about the elastic net penalty as implemented in glmnet in R compared to the original paper by Zou and Hastie (2005). In glmnet the penalty is listed as   $$ (1-\alpha)/2||\beta||_2^2+α||\beta||_1. $$  but in the paper it is  $$(1-\alpha)||\beta||_1 + \alpha||\beta||_2^2.  $$  Does anyone know where the factor $\frac12$ some from? (Never mind the fact that the $\alpha$'s were swapped between the two parameterisations.) In both cases the penalties are multiplied by $\lambda$, but what are the mathematical/technical arguments for not using a simple convex combination of the lasso and ridge penalties? why only square root approach to check number is prime How do you add more than one material to a mesh?   I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it.  I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal. Hyperlinks to web sites using anchors sometimes don't work Why do fantasy writers depict pointy hats as the headgear of choice for Witches and Wizards? They don't always wear a hat, but when they do, it's pointy.   Why do fantasy writers depict pointy hats as the headgear of choice for Witches and Wizards? On some Microsoft Access queries, I get the following message:  Operation must use an updatable query. (Error 3073).  I work around it by using temporary tables, but I'm wondering if there's a better way.  All the tables involved have a primary key. Here's the code:  UPDATE CLOG SET CLOG.NEXTDUE = (     SELECT H1.paidthru      FROM CTRHIST as H1     WHERE H1.ACCT = clog.ACCT AND     H1.SEQNO = (         SELECT MAX(SEQNO)          FROM CTRHIST          WHERE CTRHIST.ACCT = Clog.ACCT AND          CTRHIST.AMTPAID &gt; 0 AND         CTRHIST.DATEPAID &lt; CLOG.UPDATED_ON     ) ) WHERE CLOG.NEXTDUE IS NULL; Any help would be appreciated.  If $n$ is a natural number $\ge 2$ how do I prove that any graph with $n$ vertices has at least two vertices of the same degree? Calling C/C++ from Python? Making separate Python installation that can call ArcPy? I read this sentence in a book:     I just took part in a study over in the Psychology Department.   Why do we add over in front of in the here? Are both expressions correct? If yes, do they have different meanings? It seems to me that I came across both of them in books, but I'm not sure. Is there any difference between mapping and function? I wonder if there is any difference between mapping and a function. Somebody told me that the only difference is that mapping can be from any set to any set, but function must be from $\mathbb R$ to $\mathbb R$. But I am not ok with this answer. I need a simple way to explain the differences between mapping and function to a lay man together with some illustration (if possible).  Thanks for any help. When saving a .qgs file in QGIS, another appears. Is this a backup? When saving a project file (.qgs), which when executed is automatically loaded with qgis.bat, there's another .qgs file which appears in the same directory of the original project file, although this one is not loaded with the qgis.bat file:    This is just out of curiosity but is the latter designed to be a backup of the original .qgs file? How do I enable or disable Apport? The system crash dialog is annoying me, how can I turn it off? I'd also like to know how to turn it back on just in case I need it to report a problem. I need to create an edit component for an SObject from which I do not know the objectApiName at design time. I only know the Id of the SObject. objectApiName could be any valid SObject-name.  Now I want to use lightning:inputField   This needs to be wrapped by lightning:recordEditForm  In case I hardcode it to "Order", provide a vaild Order Id and let the controller load the order and assign it to the Parent-attribute, this works flawlessly:  &lt;aura:attribute name="recordId" type="String" default="" /&gt; &lt;aura:attribute name="Parent" type="SObject" default="{}" /&gt; &lt;aura:attribute name="ParentType" type="String" default="" /&gt; &lt;b&gt;{!v.ParentType}({!v.recordId})&lt;/b&gt; &lt;br/&gt; &lt;lightning:recordEditForm recordId="{!v.recordId}"  objectApiName="Order"&gt;     &lt;lightning:messages /&gt;     &lt;lightning:inputField fieldName="Name" /&gt;     &lt;lightning:button class="slds-m-top_small" variant="brand" type="submit" name="update" label="Update" /&gt; &lt;/lightning:recordEditForm&gt;   It looks like below and even the Update-button works as expected and saves the record:    But what I really want is  &lt;lightning:recordEditForm recordId="{!v.recordId}"  objectApiName="{!v.ParentType}"&gt;   Note the {!v.ParentType} instead of the hardcoded "Order"  As an great unfortunate, this only collapses to that error-popup    In the screenshot you see, that the ParentType is correctly bound to v.ParentType (right above the button) which a I also verify in the console  Suspicion  I set the ParentType-attribute as a result of APEX call (asynchronously). This seems to be too late for the lightning:recordEditForm. It tries to render with objectApiName at a time where it is still blank, hence it crashes during initialization...  Question  Is there a clean way to avoid this and get something to fly with an dynamic objectApiName?  Trying to use $A.createComponents()  As @sfdcfox suggested I jump on the $A.createComponents() which turned indeed out to be tricky, exactly as sfdcfox has predicted. Im following this .  Added a button to the markup    Added a handler to the js-controller:  makeEdit : function(cmp, evt, hlp) {      console.log('ParentId :: ', cmp.get("v.ParentId") );      console.log('ParentType :: ', cmp.get("v.ParentType") );      $A.createComponents([             ["lightning:recordEditForm",{                 "recordId"          : cmp.get("v.ParentId"),                 "objectApiName"     : cmp.get("v.ParentType"),             }],             ["lightning:inputField",{                 "fieldName" : "Name"             }]         ]         ,function(components, status, errorMessage){             if (status === "SUCCESS") {                 var wrapper         = components[0];                 var inner           = components[1];                 wrapper.set("v.body", inner);             }             else if (status === "INCOMPLETE") {                 console.log("No response from server or client is offline.")                 // Show offline error             }             else if (status === "ERROR") {                 console.log("Error: " + errorMessage);                 // Show error message             }         }     ); },   Now I can press the button - but nothing - I repeat: n o t h i n g - gets rendered at all. What is my fault here? Note that the console.log get output and the attribute are holding good values. Imagine you are surviving in the wilderness traveling in a wandering manner. You've found this landscape that is wonderfully abundant in food and basking in a very favorable climate. Therefore, you decide that this is your new residence.  Night is approaching, so you haphazardly piece together a makeshift shelter to make for a more enjoyable living experience while you get your act together.  This shelter is only temporary. After you've become familiar with the land and have gathered finer resources, you will begin creating a proper home complete with securities, amenities, and furnishings.  The word I am looking for is an adjective meaning something similar to "created recklessly for temporary use."      The shelter you were building on your first night was a(n) ________   abode.   The words and phrases "ad-hoc", "off the cuff", "on the run" came to my mind, but none of those are understood to mean what I am trying to communicate (in fact, two of them are not even close). If you think of a word with a meaning that you believe to be similar to what I am searching for, I'd love to hear from you!  Thank you. How can the Anomalous Expansion of Water from 4$^\circ$C to 0$^\circ$C be explained with reference to subatomic particles? Please help me to prove this trigonometric equation.  $\cos \left( 36^\circ \right)-\cos \left( 72^\circ \right) = \frac{1}{2}$  Thank you.