include a PHP result in img src tag
php - insert a variable in an echo string
Can't plot with gnuplot on my Mac I am trying to plot with gnuplot on my Mac (OS X 10.8.5). I have installed X11 and XQuartz 2.7.4 and after that I installed gnuplot, but unfortunately gnuplot couldn't plot.   Simple plots like the following fail to render and have no error message to help understand what is amiss:   [1/10/13 $gnuplot &gt;plot sin(x) I'm pretty sure that you can't take a magnifying glass and make it focus to a point that is hotter than the surface of your light source. For example, when you're outside trying to fry ants with your magnifying glass, it's impossible to get it hotter than 5,000 C (the temperature of the surface of the sun). My dad was arguing with me about it because he didn't see why this was true. My easiest argument was that the 2nd law of thermodynamics prevents this from happening because heat can't flow passively from a place of lower energy/entropy to a place of higher energy/entropy. He didn't buy it, saying that there wasn't anything preventing the light from focusing to a hotter point.  So I was wondering, are there some laws of optics that prevent this from happening? Or alternatively, is there a way to show that you could build a perpetual motion machine from this? Any help is appreciated. Place questions with X net downvotes on hold automatically To resolve the frequent issue of poor question unfairly gaining answers, and thus paving the way for more poor questions to be asked  I Propose  EDIT: From feedback, have changed net vote threshold to 5 (to at least match that of the current 5 users at 3k rep) END EDIT     If a question has 5 net downvotes, the question is put   on hold automatically, and no answers are allowed until the question   is resolved/has been edited and net votes are > -5.   The net vote threshold could be perhaps different, to avoid grey area questions being on hold unfairly, but this also needs to be high enough to allow for early action.  On hold note, something such as:     This question has been put on hold via community voting on the   question, and cannot receive answers. To resolve this, edit and   improve the question.   This proposal would assist in stopping poor questions from receiving answers, as currently questioners not wanting to put in any effort know they will likely get an answer eventually.  This could also help improve site quality by making people improve their questions before they can have answers, so answers are only given to decent questions. Gaming with Virtualbox, has it worked for you? Currently I am using Windows 8. I have a virtual box with Ubuntu set up for development. Aside from that I sometimes just want to relax and enjoy a game (Battlefield 3, Skyrim, Saints Row: The Third, etc) after hours of research and development.   I want to have my main machine with linux, and install windows on a virtual box.   What I want to know, from those who have tried or seen it:   How is the performance? I've never been clear on this but, even if I install the correct drivers on the windows box, will it matter? At least on this part, I'm just curious how it offload. Which drivers will matter the most.  Mouse and Keyboard integration, I'll be honest, sometimes the mouse integration in Virtual Box is a bit frustrating, mouse cursor disappears, etc.    I'm not sure if this is the right place to ask. I'm merely trying to come back to linux, yet I'm a PC gamer so I can't throw away Steam. I'm aware of the linux client, but most of those games won't work.   If there's a right place to ask this whether StackExchange sites or any other site let me know.   Cheers and I hope those in the same position find a middle ground. Prove $A\cup (A\cap B) = A$ Best practice when analysing pre-post treatment-control designs Custom DataTable using Vanilla Datables in LWC I'm trying to build a custom datable because I want the functionality to sort, search and paginate and also add action buttons in each row. Initially, my VF page was using  but we have now decided to rebuild that page in LWC.  I found a similar  but it hasn't really worked for me.  I then found  (Javascript) and  (ES2018) I have tried to implement Vanilla Datatables but I keep running into issues such as:      TypeError: Cannot read property 'length' of undefined   The above error is thrown because the library is unable to find the body of the table.   My point is that I feel this library won't work because it's using document, window and so on.   I was wondering if there is a way I could convert this library to something that is more suited to LWC basically have it "export" the modules. Since I'm not a JS expert I'm unable to put the pieces together.   Just for some context, I'll post my code here:  &lt;template&gt;     &lt;table class="sobject-table slds-table slds-table_cell-buffer slds-table_bordered"&gt;         &lt;thead&gt;             &lt;tr class="slds-line-height_reset"&gt;                 &lt;template for:each={fieldSetData} for:item="field"&gt;                     &lt;th key={field.apiName} title={field.fieldLabel} class="" data-scope="col"&gt;                         &lt;div class="slds-truncate" title={field.fieldLabel}&gt;{field.fieldLabel}&lt;/div&gt;                     &lt;/th&gt;                 &lt;/template&gt;             &lt;/tr&gt;         &lt;/thead&gt;         &lt;tbody&gt;             &lt;template for:each={records} for:item="row"&gt;                 &lt;tr key={row} class="slds-hint-parent"&gt;                     &lt;template for:each={row} for:item="data"&gt;                         &lt;td key={data.id} data-label="Name" data-scope="row"&gt;{data.value}&lt;/td&gt;                     &lt;/template&gt;                 &lt;/tr&gt;             &lt;/template&gt;         &lt;/tbody&gt;     &lt;/table&gt; &lt;/template&gt;   import {LightningElement, api, wire} from 'lwc'; import {processRecords} from 'c/recordGenerator'; import getFieldSetData from '@salesforce/apex/FieldSetData.getFieldSetData'; import getSobjectRecords from '@salesforce/apex/DeomoCTRL.getRecords'; import VanillaDatatable from '@salesforce/resourceUrl/VanillaDatatable'; import {loadScript, loadStyle} from 'lightning/platformResourceLoader';  export default class ManageSelectedIndicators extends LightningElement {     @api recordId;     records;     fieldSetData;     @wire(         getFieldSetData,         {objectName: 'SOBJECTName', fieldSet: 'FIELSETName'}     ) wiredFieldSetData({error, data}) {         console.log('wired called in Child')         if (data) {             this.fieldSetData = data;             this.getData();         }     }       constructor() {         super();         console.log('Constructor called in Child');     }      connectedCallback() {         console.log('Connected callback');     }      renderedCallback() {         console.log('Rendered callback');         Promise.all([              loadScript(this, VanillaDatatable + '/VanillaDataTables/src/vanilla-dataTables.js')          ]).then(() =&gt; {              const table = new DataTable(                  document.getElementsByClassName('.sobject-table'),                  //Also tried this.template.querySelector('.sobject-table'),                  {searchable: true, sortable : true}              );          })          .catch(error =&gt; {             console.log(error);          });     }      getData() {         getSobjectRecords ({             sobjectId: this.recordId         })         .then(response =&gt; {             this.records= processRecords(response, this.fieldSetData);         })         .catch((error) =&gt; {             console.log(error);         });     }  }   Edit: I have also tried lwc:dom="manual" that didn't seem to work either.  Is there any other way I could achieve these functionalities? Or do I have to write custom code to achieve this? When I used  pip install ipython   or  pip install "ipython[notebook]"   I get the following error:  Downloading/unpacking ipython   Downloading ipython-2.3.1-py27-none-any.whl (2.8MB): 2.8MB downloaded Installing collected packages: ipython Cleaning up... Exception: Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main     status = self.run(options, args)   File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run     requirement_set.install(install_options, global_options, root=options.root_path)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1435, in install     requirement.install(install_options, global_options, *args, **kwargs)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 671, in install     self.move_wheel_files(self.source_dir, root=root)   File "/usr/lib/python2.7/dist-packages/pip/req.py", line 901, in move_wheel_files     pycompile=self.pycompile,   File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files     clobber(source, lib_dir, True)   File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber     os.makedirs(destsubdir)   File "/usr/lib/python2.7/os.py", line 157, in makedirs     mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/IPython'  Storing debug log for failure in /home/username/.pip/pip.log   What does this error mean? How do I fix it? Is PCA still done via the eigendecomposition of the covariance matrix when dimensionality is larger than the number of observations? I have a $20\times100$ matrix $X$, containing my $N=20$ samples in the $D=100$-dimensional space. I now wish to code up my own principal component analysis (PCA) in Matlab. I demean $X$ to $X_0$ first.  I read from someone's code that in such scenarios where we have more dimensions than observations, we no longer eigen-decompose the $X_0$'s covariance matrix. Instead, we eigen-decompose $\frac{1}{N-1}X_0X_0^T$. Why is it correct?  The normal covariance matrix is of size $D\times D$, each element of which tells us the covariance between two dimensions. To me, $\frac{1}{N-1}X_0X_0^T$ is not even of the correct dimensions! It is $N\times N$ matrix, so what would it tell us? Covariance between two observations?! Semicolons at the end of list items In school, we were taught to end each list item with a semicolon. But I have never actually seen this. Can somebody please confirm this? Should we end each list item with anything at all?  I've seen people use periods after each list item, colons, and even commas. But I've never seen a semicolon at the end of each item — and even if I have, it would be that rare that I've forgotten.  Example:   item; item; item; item In English, the number 0 is treated as plural. It is then:   0 seconds 1 second    1.2 seconds   2 seconds     Shouldn't it be "nobody want to go there," instead of "nobody wants to go there"?  I also saw in TOEFL that "any __" should be used with a singular.  But I see it very common that it is a plural also.  Why is that?  (updated: example, "we don't have any apples any more" vs "If you get any apple, please let me know.") Zsh says "no matches found" when trying to download video with youtube-dl I downloaded youtube-dl using pip on CrunchBang (a Debian Wheezy distro). When I run   youtube-dl {video URL}   I get  zsh: no matches found: {video URL}   I guess it has something to do with zsh, because I found some users on Arch forums complaining about it. When I switched to bash it worked. But when I try to run it using  tar zxvf jre-8u151-linux-i586   I get tar (child): jre-8u151-linux-i586: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2  What is wrong? The name and place matches prefectly. Have we managed to make a perfect vacuum? Have we managed to make a device without any atom inside it on earth? I was reading about vacuum , and I found in the examples part  that even on the best man made vacuum devices, there are still millions of "molecules per $cm^3$". So my other question here is, what are these molecules and what is the mass of them? How to make a font with Adobe Illustrator? I have recently created my own font/typeface with Adobe Illustrator, and I would like to use it as a real font (e.g I would like to use it as I type something).   Is this possible in Adobe Illustrator or would I need a different software?   If so what program would be good for creating a font? How do I go about porting Ubuntu Touch to different devices? I wanted to create an account for Ubuntu One, but I got impatient when the email with the verification code didn't arrive... I thought I might have typed the wrong address, closed the window and tried again. it told me the address already existed and I just got the code. But since I closed the window I missed it. Is there any way to recover the code? How to convert an instance of std::string to lower case I want to convert a std::string to lowercase. I am aware of the function tolower(). However, in the past I have had issues with this function and it is hardly ideal anyway as using it with a std::string would require iterating over each character. Is there an alternative which works 100% of the time? Probability of people attending same and different places $5$ tourists plan to attend Octoberfest. Each attends a location at random from the choices: Alpine, Bingeman, Concordia, Kitchener, Queens, Schwaben, Transylvania. Q What is the probability that two attend one location and three attend another same location?  I get that there are $\binom{5}{2}$ possibilities to create 2 groups. There are $\binom{7}{2}$ ways to choose 2 places so shouldn't it be $\frac{\binom{7}{2}\binom{5}{2}}{7^5}$? Periodic function implies periodic primitive? If $f$ is a periodic function with $T = \pi$, does that mean that $F$ (a primitive of $f$) has the same period ? What about the inverse implication (periodic primitive implies periodic function) ?