Intersection of all sublists of a list
Splicing a list of arguments into a function with Sequence
From command line open package installer Log color bar/meta data in PGFPLOT File Save dialog unreadable I just updated my iMac to Mojave, and am still trying to setup my preferences.  I tried dark mode, but did not like it (half of me apps seem to ignore it anyway).  I switched to light mode, but this too has problems. The File Save dialog shows a list of Directories and existing files, but the latter are very light grey, almost indistinguishable from the background.    I have searched the Preferences menu, but can't seem to find any setting to set normal contrast levels like in High Sierra. In the following question  the notation $c\in ]a,b[$ is used. What does this mean? I have never seen it before. Newton's Law of Universal Gravitation tells us that the potential energy of object in a gravitational field is $$U ~=~ -\frac{GMm}{r}.\tag{1}$$  The experimentally verified near-Earth gravitational potential is  $$U ~=~ mgh.\tag{2}$$  The near-Earth potential should be an approximation for the general potential energy when $r\approx r_{\text{Earth}}$, but the problem I'm having is that they scale differently with distance.  $(1)$ scales as $\frac 1r$.  So the greater the distance from the Earth, the less potential energy an object should have.  But $(2)$ scales proportionally to distance.  So the greater the distance from the Earth, the more potential energy an object should have.  How is this reconcilable? How can I make a more realistic glass shader? Best way to recover mysql from a "chmod -R 777 /" with databases intact Tools to get a pictorial function call graph of code I have a large work space which has many source files of C code. Although I can see the functions called from a function in MS VS2005 using the Object browser, and in MSVC 6.0 also, this only shows functions called from a particular function in a non-graphical kind of display. Additionally, it does not show the function called starting from say main(), and then the functions called from it, and so on, deeper inside to the leaf level function.  I need a tool which will give me a function call graph pictorially with functions callee and caller connected by arrows or something like that, starting from main() to the last level of function, or at least showing a call graph of all functions in one C source file pictorially. It would be great if I could print this graph.  Any good tools to do that (need not be free tools)? I saw this question  but it doesn't have a full solution. What is the full solution to the 99 bottles of beer on the wall for Vim adventures?  Context: for the sake of being a good SO member I will give more details but a full solution will answer my question. It seems from reading the other post that my register is incorrect for some reason. I can't get the &lt;NL&gt;. I think that's the issue since pasting won't work... I am trying to perform a multiple regression in R. However, my dependent variable has the following plot:    Here is a scatterplot matrix with all my variables (WAR is the dependent variable):    I know that I need to perform a transformation on this variable (and possibly the independent variables?) but I am not sure of the exact transformation required. Can someone point me in the right direction? I am happy to provide any additional information about the relationship between the independent and dependent variables.  The diagnostic graphics from my regression look as follows:    EDIT  After transforming the dependent and independent variables using Yeo-Johnson transformations, the diagnostic plots look like this:    If I use a GLM with a log-link, the diagnostic graphics are: Writing letters of recommendation for more than one student to the same department Suppose multiple students have asked me for letters of recommendation to the same graduate department in the US. Am I expected to explicitly compare the students to one another? Am I supposed to do this in both letters (assuming they haven't been submitted yet)? Do I need to explicitly state a preference for one over the other, or can I just get away with listing relative strengths and weaknesses (for instance, "X is stronger academically, but Y has more research experience and is a stronger programmer")? How do I duplicate a whole line in Emacs? How to programmatically click a button in WPF? How can I fix a 404 Error when using a PPA or updating my package lists? PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors? Split string every nth character? I have a LAMP server with following configuration.  CPU : Intel(R) Xeon(R) CPU   RAM : 32 GB  HDD : 80 GB  Running on virtual environment.  All the things in the server are running smoothly. But I have noticed that the RAM usage is the server is increasing each day without any reason.   This is the current memory usage on my server.  # free -g              total       used       free     shared    buffers     cached Mem:            31         13         17          0          0         10 -/+ buffers/cache:          1         29 Swap:            2          0          2   And you can see the last 8 weeks memory usage below.   And i have executed the following command to find how much memory each process is consuming.  # ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x&lt;=NF ; x++ ) { printf("%s ",$x) } print "" }'          0.00 Mb COMMAND        2253.62 Mb /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock        1171.66 Mb java -jar /etc/vmagent/bin/VMAgent.jar         138.27 Mb /sbin/audispd         127.75 Mb /usr/sbin/named -u named -c /etc/named.conf -u named -t /var/named/run-root          74.29 Mb auditd          73.03 Mb automount          43.14 Mb /usr/bin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail --max-children 5 --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin --pidfile=/var/run/spamd/spamd_full.pid --socketpath=/tmp/spamd_full.sock          43.14 Mb spamd child          43.14 Mb spamd child          37.13 Mb /usr/sbin/httpd          37.02 Mb /usr/sbin/httpd          36.52 Mb /usr/sbin/httpd          36.46 Mb /usr/sbin/httpd          36.23 Mb /usr/sbin/httpd ................   For troubleshooting , i have restarted the MySQL and APACHE servers. But the result was same. Restarting the entire server will fix the issue, but i want to know what is the real issue.  Let me know if you have any idea about this issue.  Thanks,  Arun S URL to create a new Google document What is the current URL to create a new Google Document please? Since Google last updated their Docs the old URL does not work. Is there a BNF grammar of the TeX language? I'm looking for a BNF grammar of the TeX language, does it exist?  EDIT  For those of us who are not computer scientists, a BNF grammar is one kind of formal description of a CFG: .  For those who don't know their Chomsky, a CFG is a , which means (very roughly) that substitutions can be made independently of their use context. I'd like to loop though each feature in a layer and calculate its ellipsoidal area using QgsDistanceArea() in PyQGIS 3.  Everything works fine on unprojected layers, but I get strange results when input layer is in projected CRS.  So far I have written this:  from qgis.core import *  def calculate_area(in_lyr_name, ellipsoid, units):     input_layer = QgsProject.instance().mapLayersByName(input_lyr_name)[0]      area = QgsDistanceArea()     area.setEllipsoid(ellipsoid)      features = input_layer.getFeatures()     feature_area = 0     error_features_counter = 0      for i, feat in enumerate(features):         geom = feat.geometry()         polygon_area = 0         try:             if geom.isMultipart():                 polygons = geom.asMultiPolygon()                 for polygon in polygons:                     polygon_area += area.measurePolygon(polygon[0])             else:                 polygon = geom.asPolygon()                 polygon_area = area.measurePolygon(polygon[0])              feature_area += polygon_area          except AttributeError:  # catches NoneType geometries (broken etc.)             error_features_counter += 1             pass      # calculated area is in sq. metres (see the "else" case)     if units == 'km²':         final_area = feature_area / 1e6     elif units == 'Ha':         final_area = feature_area / 10000     else:         final_area = feature_area     return final area, error_features_counter   How do I get a constant result that does not depend on the presence of projection? Unwanted comma between author and year using citet command I've been using the biblatex package for a while, and since updating my TeX installation (post-el capitan upgrade) I have been experiencing the following.   If the following is typed:  Such and such has been said \citep[111]{citekey}.   The following text is displayed:  Such and such has been said (Author, 2016, p. 111).   And if the following is typed:  \citet[111]{citekey} has said such and such.   The following text is displayed:  Author, (2016, p. 111) has said such and such.   The citep command is working as I want it to, but I do not want a comma placed after the author's name when using the citet command. I would like it to display as follows:  Author (2016, p. 111) has said such and such.    If I use the \citeyearpar command, it is fine, but I would rather not have to type the author's name in manually.   Here is the command placed in the preamble:  \usepackage[backend=bibtex, style=authoryear-icomp, url=true, isbn=false, natbib=true, sortcites=true, block=space, pagetracker=false, loccittracker=constrict]{biblatex}   Here is an example of an entry in my bib file (made using BibDesk):  @article{poldrack2006, Author = {Poldrack, Russell}, Journal = {Trends in Cognitive Sciences}, Number = {2}, Pages = {59--63}, Title = {{Can cognitive processes be inferred from neuroimaging data?}}, Volume = {10}, Year = {2006}}   I have also tried changing the entry to the following:  @article{poldrack2006, Author = {Russell Poldrack}, Journal = {Trends in Cognitive Sciences}, Number = {2}, Pages = {59--63}, Title = {{Can cognitive processes be inferred from neuroimaging data?}}, Volume = {10}, Year = {2006}}   The bibliography entry appears as follows, and is fine:  Poldrack, Russell (2006). “Can cognitive processes be inferred from neuroimaging data?” In: Trends in Cognitive Sciences 10.2, pp. 59–63.  Thank you for any help that can be offered.