Command in .bash_profile returns outdated result
date command not resolving properly in bash alias
Proving this identity $\sum_k\frac{1}{k}\binom{2k-2}{k-1}\binom{2n-2k+1}{n-k}=\binom{2n}{n-1}$ using lattice paths So, I'm working with OpenGL (I'm not exactly sure of the version), and I want to do an old-style lighting setup by essentially drawing a black rectangle over the screen, and drawing white circles over the areas that should be lit. I already have the rectangle and the circles, but I can't figure out how to make it so that the white circles are transparent when applied to the black areas. Any ideas? I tried to use blending modes, but it still evades me...  EDIT: Here's the code that I'm using (Python).  view_buf = Buffer(GL_INT, 4) glGetIntegerv(GL_VIEWPORT, view_buf) view = view_buf.to_list() if hasattr(view_buf, "to_list") else view_buf.list  glDisable(GL_DEPTH_TEST)  glDisable(GL_LIGHTING)  glEnable(GL_BLEND)  if logic.lights['smooth']:     glEnable(GL_LINE_SMOOTH)  # # Make sure we're using smooth shading instead of flat # glShadeModel(GL_SMOOTH)  # Setup the matrices  glMatrixMode(GL_PROJECTION) glPushMatrix() glLoadIdentity() gluOrtho2D(0, view[2], 0, view[3]) glMatrixMode(GL_MODELVIEW) glPushMatrix() glLoadIdentity()  #glAlphaFunc(GL_GREATER, 0.5)  glColor4f(0.0, 0, 0, 0.75)  glBegin(GL_QUADS);                              # Draw Black screen glVertex2d(0.0, 0.0); glVertex2d(view[2], 0.0); glVertex2d(view[2], view[3]); glVertex2d(0.0, view[3]); glEnd()  glColor4f(1, 1, 1, 1)  degtorad = 3.14159/180.0   glBlendFunc(GL_ZERO, GL_SRC_ALPHA)  def DrawCircle(x, y, radius, fill = 1, step = 11):      glVertex2f(x, y)      if fill:         glBegin(GL_TRIANGLE_FAN)     else:         glBegin(GL_LINE_LOOP)      for a in range(0, 360, step):         angle = degtorad * a         glVertex2f(x + (sin(angle) * radius), y + (cos(angle) * radius))      glEnd()   #for layer in range(len(logic.lights['layers'])): #   size =  for light in logic.lights['points']:     DrawCircle(light[0][0] * view[2], (1 - light[0][1]) * view[3], light[1], step = light[2])     if logic.lights['smooth']:         DrawCircle(light[0][0] * view[2], (1 - light[0][1]) * view[3], light[1], 0, light[2])  # Reset the state glPopMatrix() glMatrixMode(GL_PROJECTION) glPopMatrix() Why are airline passengers asked to lift up window shades during takeoff and landing? I have always wondered why the windows shades have to be raised during take off and landing. I can't think of any safety issues by having a closed window. Ubuntu16.04 boots into initramfs Ubuntu doesn't boot up and it goes into initramfs. I am writing from a live CD trial session. what should I do?  I understand that the boot flow is broken and that when the files from root are going to be loaded into the ram, it does not find the files in the root directory. Please correct me if I'm wrong.  The following is the output from ashell as I input the "exit" command:  (initramfs) exit /dev/mapper/ubuntu--vg-root contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found.  /dev/mapper/ubuntu-vg-root: UNEXPECTED INCONSISTENCY; Run fsck MANUALLY.     (i.e., without -a or -p options)  fsck exited with status code 4. The root file system on /dev/mapper/ubuntu--vg-root requires manual fsck I often need to view on the canvas the (selected or not) features from the current active vector layer.  In this situation, I only need to view something on the canvas, without doing anything on the canvas itself (so, the active window is always the Attribute Table).  This is what I usually do:   Open the Attribute Table for the current active layer; Select the first feature; Press Ctrl+P button (i.e. the "Pan map to the selected row" button); Minimize the Attribute Table; View something on the canvas for the current feature; Go to the first step until needed.   Is there a way (a method, a shortcut) for directly browsing every feature on the canvas without the needing of going backwards and forwards with the Attribute Table? I mean, something like a "next" button?  (I may use the workaround of splitting the windows of the Attribute Table and of the canvas within the monitor, or also docking the Atrribute Table, but I would like to work on the full QGIS window).    EDIT I saw that my question was casted as a duplicate of  question. The two questions are very similiar, but I think it should be left as open for two reasons:   the related duplicated question doesn't have an accepted answer; my question is slightly different because I'm looking for the possibility of displaying only the selected features (and the @Joseph's , that I marked as accepted, answers well to my request). I'm trying to find an alternative to the standard tombstone qed symbol for more informal papers. I initially thought of an empty square with Pub written inside, but what would actually be better would be a small beer mug symbol. (much like the one found in this set of icons )  Unfortunately there doesn't seem to such a symbol in the comprehensive latex symbol list (although many funny symbols can be found there). Has anyone thought about this? Is there any quick-and-dirty solution? right now   I have setup /etc/fstab like this:  //192.168.5.167/H /mnt/ssd cifs credentials=/root/.smbreds,noauto,x- systemd.automount 0 0   I want to set it up like first network should be connected and then fstab mount should get mounted. I performed principal component analysis (PCA) with R using two different functions (prcomp and princomp) and observed that the PCA scores differed in sign. How can it be?  Consider this:  set.seed(999) prcomp(data.frame(1:10,rnorm(10)))$x              PC1        PC2  [1,] -4.508620 -0.2567655  [2,] -3.373772 -1.1369417  [3,] -2.679669  1.0903445  [4,] -1.615837  0.7108631  [5,] -0.548879  0.3093389  [6,]  0.481756  0.1639112  [7,]  1.656178 -0.9952875  [8,]  2.560345 -0.2490548  [9,]  3.508442  0.1874520 [10,]  4.520055  0.1761397  set.seed(999) princomp(data.frame(1:10,rnorm(10)))$scores          Comp.1     Comp.2  [1,]  4.508620  0.2567655  [2,]  3.373772  1.1369417  [3,]  2.679669 -1.0903445  [4,]  1.615837 -0.7108631  [5,]  0.548879 -0.3093389  [6,] -0.481756 -0.1639112  [7,] -1.656178  0.9952875  [8,] -2.560345  0.2490548  [9,] -3.508442 -0.1874520 [10,] -4.520055 -0.1761397   Why do the signs (+/-) differ for the two analyses? If I was then using principal components PC1 and PC2 as predictors in a regression, i.e. lm(y ~ PC1 + PC2), this would completely change my understanding of the effect of the two variables on y depending on which method I used! How could I then say that PC1 has e.g. a positive effect on y and PC2 has e.g. a negative effect on y?    In addition: If the sign of PCA components is meaningless, is this true for factor analysis (FA) as well? Is it acceptable to flip (reverse) the sign of individual PCA/FA component scores (or of loadings, as a column of loading matrix)? apt-get update fails to fetch files, “Temporary failure resolving …” error Show path of a body of where it should go after linear impulse is applied I am making a game with Andengine and Box2D. I have a dynamic body and I apply linear impulse on the body to move it around when the user have touched the screen.  Now I want to show the path where the body will go when the user have touched. If you have played Angry Birds or Basket Ball Shoot or any other which have projectile motion with a path shown you will get my point. I want to show the white dots which are shown in those games. What's wrong with this query: INSERT INTO Users( weight, desiredWeight ) VALUES ( 160, 145 ) WHERE id = 1;  It works without the WHERE clause. I've seemed to have forgot my SQL. queries with db_select don't respect integers SSL certificate for a public IP address? My teacher told me that two parallel lines have a point of intersection, it is called Point at infinity. But I I can't understand how it can be true or how was it proved, can someone explain this to me?  Thank you. Every time I read the tips for installing an SDK, IDE, some extension and so on, it says, that I should unpack them in /opt folder. Why do I need to do that?   When I was installing Ubuntu, I read that I should set only 10-20 GiB for the / file system and remaining space set for /home. So should I extend the space for root folder, or leave all stuff at /home? Is there any difference? I'm looking for a way to prove $$\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^{2m+1}}=\frac{(-1)^m E_{2m}\pi^{2m+1}}{4^{m+1}(2m)!}$$ I know that $$\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^{2m+1}}=\frac{1}{4^{2m+1}}\left(\zeta\left(2m+1,\frac14\right)-\zeta\left(2m+1,\frac34\right)\right)$$ so maybe I could simplify the above more? Vote to close a deleted question - bug? I just successfully added my Close vote to a question on Stack Overflow that had already been deleted by the author.  The question can be found .        The only purpose I see for such functionality is perhaps to stop someone from escaping the initial surge of wrath from critics, then subsequently undeleting their question.  And that would be a pretty strange thing to guard against.  It seems far more likely that this is an oddity that was overlooked.  So I'm just curious - is voting to close a deleted question a bug, or is it ?  If by design, what is the rationale behind it? E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages I am not sure what caused this error, but here is what the whole error says, and also this is sitting as a notification, and preventing me from updating any software using Update Manager - Please provide some assistance or tell me how to figure out what to do to fix it.  Could not calculate the upgrade  An unresolvable problem occurred while calculating the upgrade.  Please report this bug against the 'update-manager' package and include the following error message: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.' I'm reading a lot of documentation on sed, and am still stumped on my particular use case.  I want to replace this line in a conf file with my own line:  Replace this line: #maxmemory &lt;bytes&gt; with: maxmemory 26gb  This is what I tried:  sed s/maxmemory.*bytes.*/maxmemory 26gb/ /etc/redis/redis.conf  I get the error: sed: -e expression #1, char 30: unterminated `s' command  Which stumps me because I don't know what that means. So my question is:  How can I accomplish what I want? What does that error mean? (so I can learn from it) Image with axis