I am trying to write a script where the user can pass startDate and endDate via arguments when running the script. Here's my script (saved as test.sh)-   VAR="$(curl -f -X POST -H 'X-API-TOKEN: XXXXXX' -H 'Content-Type: application/json' -d '{"format": "csv", "startDate": $1, "endDate": $2}' 'https://xxx.qualtrics.com/export-responses' | sed -E -n 's/.*([^"]+).+/\1/p')" echo $VAR   When running the script I type the following -   ~/test.sh '"2020-05-13T17:11:00Z","2020-05-13T20:32:00Z"'   The script throws an error.
Consider I've set variable site and needs to be printed by echo or printf, but If I use single quote to write something and want to use variable then how?  Example:  $ site=unix.stackexchange.com $ echo "visit:$site" visit:unix.stackexchange.com   But If I use single quote:  $ echo 'visit:$site' visit:$site   Then we know that '' is strong quote and will not expand the variable   I've tried something:  $ echo 'visit:"$site"' visit:"$site"   but do not succeed. So, I am looking for way to print value inside variable while using single quote.
Inserting data to lookup field using rest API In alert I am getting value in data.d.results[0](This is the value that I am getting from other list using rest).Subsystem.Title and also if I use only title column then the value is inserted in the list but when I use a lookup column i.e. Subsystem, then it goes to error function.  $.ajax({         url: "https://sharepoint.com/teams/_api/web/lists/GetByTitle('Features')/Items",         type: "POST",         data:  JSON.stringify({ '__metadata': { 'type': 'SP.Data.FeaturesListItem' },    'Title': data.d.results[0].Title,'Subsystem':data.d.results[0].Subsystem.Title}),         headers: {              "accept": "application/json;odata=verbose",             "content-type":"application/json;odata=verbose",             "X-RequestDigest": $("#__REQUESTDIGEST").val()         },         success: function(d) {alert("Items Inserted!");          //window.location.href=referrer;             },         error: function() {alert("Failed to Insert Items!");} }); I'd like to use JavaScript to calculate the width of a string. Is this possible without having to use a monospace typeface?  If it's not built-in, my only idea is to create a table of widths for each character, but this is pretty unreasonable especially supporting  and different type sizes (and all browsers for that matter). What are the rules for China's visa-free transit programs? If every polynomial of degree 2 is reducible then $K$ is algebraically closed? Java Manifest.mf classpath issues I've been trying to run a jar file - let's call it test.jar - that uses the Sybase jconn3.jar on a Unix system.  I have created a MANIFEST.MF file that has the following:  Class-Path: $SYBASE/jConnect-6_0/classes/jconn3.jar commons-net-1.3.0.jar   This gives a ClassNotFoundError. $SYBASE is the system variable that points to /opt/sybase13; I've also tried the following:  Class-Path: /opt/sybase13/jConnect-6_0/classes/jconn3.jar commons-net-1.3.0.jar   and  Class-Path: opt/sybase13/jConnect-6_0/classes/jconn3.jar commons-net-1.3.0.jar   However, if I copy the jconn3.jar file from the $SYBASE/jConnect-6_0/classes to the same directory as test.jar, and update my MANIFEST.MF to read as follows:  Class-Path: jconn3.jar commons-net-1.3.0.jar   The application runs as expected.  Now, I've been able to verify the jconn3.jar file works by copying it locally; my MANIFEST.MF file includes the path to my Main-Class, so that's not at issue here.  What do you think could be the problem? I've been looking at this thing for too long now. Thanks! Where do the Python unit tests go? If you're writing a library, or an app, where do the unit test files go?    It's nice to separate the test files from the main app code, but it's awkward to put them into a "tests" subdirectory inside of the app root directory, because it makes it harder to import the modules that you'll be testing.    Is there a best practice here? How do I set the desktop background on Windows from a script? On X Windows I had a cool 'silent-alarm" reminder script that would change my root window (background) color to solid red, just for a few seconds a few moments before changing it back. Is there a way to do this for Windows XP?  I'm thinking some kind of scheduled task that uses cscript to set registry keys (HKEY_CURRENT_USER\Control Panel\Desktop) . However my attempts don't seem to have any effect. What do I have to signal to read those registry entries and re-draw the desktop? Is it possible to match encrypted documents using user-defined search terms? Suppose I am storing a number of encrypted documents in a database. I would like to make it possible to identify the subset of documents whose contents match user-specified search terms without a) maintaining a plaintext index or b) decrypting documents on the fly. Is there any way to accomplish this securely?  By the same token, I'm wondering if a collection of encrypted documents can be sorted according to an encrypted attribute (e.g., document title) without first decrypting all attribute values. Does anyone know of a good way to set up some sort of parental controls so that one user account is subject to them, but not another?  A couple of friends of mine use Ubuntu and have kids (7 to 10 years old) who use the family computer. They'd like to have some blocking of adult sites. They're not going to supervise all the time, which I know might be ideal, but there we go. And they're not particularly technical, so they don't want to have to run scripts to turn the parental controls on and off regularly, but they can cope with having different accounts for different people. I haven't found a great way of doing this. I am pretty technical, so I'm happy to spend some time at the command line to set it up, but then it needs to just work.  Please don't just link to DansGuardian. If your answer doesn't address the different user account aspect, I will vote it down. If you want to talk about general parental controls that apply to all users then please start a new question - I'm sure that plenty of people would be interested in it, and I'll link to it from this question. If my Schengen visa starts on the day of arrival which is one day ahead of departure, would they let me get into the plane? I have a question, I applied for the Schengen visa through Germany, on the form they ask me when I'd arriving (to Germany) and when I'd returning. they take this exact date as the visa period.  I wondering if they would let me get into the plane, even though my flight it a day before the arrival.  Let get the real deal; let say this:  My visa is valid from 02/12/2014 to 02/02/2015. But, my flight is scheduled to be departing on 01/12/2014, but entering Germany 02/12/2014. the flight duration is almost 9hours and there is 7hours difference between Germany and the departing flight country. Prove a assertion concerning Lebesgue space Let $f_n \in L^1$ such that $f_n\rightrightarrows f$. Then I want to conclude that If $\mu(X)&lt;\infty,$ then $f\in L^1$ and $\int f_n\to\int f$, so I want to make use of the Dominated convergence theorem, the thing is that I don't know which would be my dominating function.  I was trying to figure out if the measure could play that role, but after thinking a little bit I have realize that the measure doesn't have to be bigger than the absolute value of the functions of the sequence.  Another thing I was thinking of, is to apply Fatou's lemma, but I can't ensure that my functions are positive.  So, Can someone help me to prove this theorem please ?  Thanks a lot in advance :).    NOTE: I think this theorem is taken from Folland's Real analysis, modern techniques, and their aplications 2nd Edition :), This is to have all the definitions so we can talk the same language as in the book (this is, same notation and theorems or machinery) White regions in DensityPlot — is this a bug with ColorFunctionScaling? 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? Sources for common laboratory Saccharomyces strains? I'm used to working with bacteria - some of the more common laboratory strains sometimes come with an order from some vendors.  What's the most convenient source to order  for lab work? mkdir error: no such file or directory on a linux machine running CENTOS v 7.8.2003 I am in a directory Neutrinos I now do  mkdir /pionloop/ this works. I then go to into this new directory pionloop and do mkdir /E_0.3 and this works as well. I thus have as a result a directory Neutrinos/pionloop/E_0.3.  Now, starting in Neutrinos I want to do this in one command and therefore do mkdir /pionloop/E_0.3 and get: `mkdir: cannot create directory ‘/pionloop/E_3.0’: No such file or directory  What is going wrong here?? Default implementation for Object.GetHashCode() Answering a phone call with "Yes, XX, tell me" I have heard a lot of people pick their phone and go "Yes, XX, tell me" (highly used in India).  I think the right way should be "Hey, XX, what's up?" or "Hey, XX, what's going on"? But does this work in a professional environment? Lightning aura:iteration over two objects with dynamic key I want to do simple thing - I want to iterate over list of two objects and use displayColumns as dynamic keys to get values from selectList object:  &lt;aura:attribute name="displayColumns" type="String[]"/&gt; &lt;aura:attribute name="selectList" type="Object[]"/&gt;   &lt;table&gt;     &lt;aura:iteration items="{!v.selectList}" var="elem"&gt;     &lt;tr&gt;         &lt;aura:iteration items="{!v.displayColumns}" var="col"&gt;             &lt;td&gt;{!elem[col]}&lt;/td&gt;         &lt;/aura:iteration&gt;     &lt;/tr&gt;     &lt;/aura:iteration&gt; &lt;/table&gt;   In pure JS I would do: elem[col.value], but in lightning compiler returns:      expecting a positive integer, found 'col' at column 6 of expression:   elem[col.value]: Source   Is there any workaround without creating proper object structure in controller? Does "apropos" take a preposition? How do you use this word, anyway? Which is more correct:     Apropos of your earlier comment, I decided to....   or      Apropos your earlier comment, I decided to...   Actually, apropos is so fancy a word, even I, a word maven if I do say so myself, am not entirely sure when to use it.  If I may add to my preposition question, are there any constructions where it would be appropriate to use something like with regard to and not apropos? Windows Phone ReverseGeocoding to get Address from Lat and Long