Sum all values in every column of a data.frame in R
How to sum data.frame column values?
How do I debug permissions? How do I debug permissions in Drupal 7?  I use core reporting, error logs, devel module error logs, backtrace and node access permission block but sometimes it is not enough. What else should I check to find out why certain fields, views or blocks are not showing to a user?  I also found there is a  for reporting on permissions called  but it is not available for Drupal 7.  I am using various permission related third-party modules:   - devel node access 7.x-1.x-dev   - fast permissions administration 7.x-2.0  - organic groups access control 7.x-1.x   - profile2 group access 7.x-1.x-dev   - ur-node access 7.x-1.x-dev Sometimes I have asked a question which got no answers, but is answered in the comments to the question.  How should I handle these questions? I can't accept an answer, so it is never an accepted question.  For example this one:   (ok here the answer in the comments is from me, but nevertheless I also have others of them) Blending colors in photoshop and illustrator I am working on a print for my wall and I am trying to create something like this:      I have already created the letters in Illustrator and now I am adding the colors in Illustrator and then exporting everything to Photoshop and then using the liquify tool to blend the colors to create a similar effect. I also used the healing patch tool to blend in the hard edges.  Is that the right way of doing it? Or is there another way? When and where was “portfolio career“ first used? The expression  meaning:  the fact of having several part-time jobs at once, rather than one full-time job:    A portfolio career is suitable for people who want to have a variety in their work life.   (Cambridge Dictionary) Etymonline has no information about the origin of the above expression, can anyone tell me when and where it was first used? I am trying to prove some theorem, and in the proof of it I have to check the fact that if the sequence $\{a_n\}_{n\in \mathbb{N}}$ converges, then $$\lim_{n\to \infty} n(a_n - a_{n-1}) = 0. $$ I think that this is true because I have tried with many different sequences and it holds, but I do not know how to prove it.  If this is not true, what is a counterexample for it? How could a gap between array modifier created objects be closed? The following exercise comes from Fulton's Algebraic Curves:     Let $k$ be an infinite field and $V = \{(t,t^2,t^3) \, ; \, t \in k \} \subset \mathbb{A}^3(k)$. Show that $V$ is algebraic and compute $I(V)$ by giving a finite set of generators.   Now, showing $V$ is algebraic is easy by noting that $V = V(X^2-Y, X^3-Z)$, but I can't find a way to describe $I(V)$ explicitly. Obviously $(X^2-Y)(X^3-Z) \in V$, but how can I find the actual generators of this ideal? Why is everybody so concerned about etc/passwd? Here is the content of my vagrant machine of this particular file:  root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/us$ nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin syslog:x:100:103::/home/syslog:/bin/false   Could anybody explain me why it is bad if some evil guy could get this file of my production server? Linear transformations map lines to lines I need help with this question:  Let $T$ be a linear map from $\mathbb{R}^n \to \mathbb{R}^m$, and let $L$ be a line in $\mathbb{R}^n$. Show that $T(L)$ is also a line (is it not enough to just consider lines in the plane). When $\min_{x \in X,y \in Y} f(x,y) = \min_{x \in X} \min_{y \in Y} f(x,y)$? How to create a bootable Ubuntu USB flash drive from terminal? I am trying to pass a variable into jq like this '.Linux.date.$var' so far I have tried quoting them by name which is working fine. But I want to use variable to call them.  I have this, which is working fine  exectime=$(date -d now);     cp $check_exec_history $check_exec_history.tmp     jq --arg key1 true --arg key2 "$exectime" --arg name "$name" '.Linux.script_executed.first = $key1 | .Linux.date_executed.first = $key2' $check_exec_history.tmp &gt; $check_exec_history;      rm $check_exec_history.tmp;   I want to get to this, but not working:  name=first; exectime=$(date -d now); cp $check_exec_history $check_exec_history.tmp jq --arg key1 true --arg key2 "$exectime" --arg name "$name" ".Linux.script_executed.$name = $key1 | .Linux.date_executed.$name = $key2" $check_exec_history.tmp &gt; $check_exec_history;  rm $check_exec_history.tmp;   I came this far: using this answer  But I am not sure where I am doing mistake.  name=first; exectime=$(date -d now);     cp $check_exec_history $check_exec_history.tmp     jq --arg key1 true --arg key2 "$exectime" --arg name "$name" '.Linux.script_executed.name==$name = $key1 | .Linux.date_executed.name==$name = $key2' $check_exec_history.tmp &gt; $check_exec_history; rm $check_exec_history.tmp; Singularity in Newton's gravitational law Sort Order on the User Filter is Surprising To Me When filling in the "Type to Find Users" , it seems to sort by exact match and then by reputation when I am on the reputation tab.   For example, please consider the following search results:    This threw me off since I thought that the sort order is reputation. I guess this often might give people what they want, but when picking a popular name is shows a lot of 0 rep users. Maybe adding a filter for low rep to the exact match might give more expected results, or just sorting on Rep? Combinatorial Proof Question: Vandermonde convolution identity Unable to Change Apple ID and password I have tried repeatedly to change my Apple ID and password without success. I have followed all of the directions trying both my emails and asked for new passwords----no luck whatsoever. Discovering transformations and interactions I am teaching myself regression using Regression Modeling Strategies by Harell and the author goes at quite the length to showcase the importance of modeling interactions and transformations of the initial variables. I can't help but wonder how to approach this in a more structured/automated way when dealing with a lot of potential variables.  Can we use recursive partitioning, for example, to somehow to do the work for us and then use the output as variables, shrink the estimates with LASSO to deal with colinearity and do a final step where we use some sort of filtering for feature importance.  In my mind this will leave us with a well specified model which can be manually inspected and improved if need be, but is this reasonable? Are there other ways to approach this? Are there some resources that deal with problems like this? How to solve a difference equation? So I have the difference equation $4y_{k+1} = 2y_k$.  I need to solve this equation, first with the initial condition $y_0 = 0$ and then with the initial condition $y_0 = 2$.  The professor wrote on the answer sheet that applying iteratively the recurrence relation it is easy to check that:  $y_k= (1/2)^k y_0 $.  Since I missed the lecture where he explained this, can somebody explain how to come about with this question?  I imagine that once I get the equation, then the initial condition $y_0 = 0$ gives us the particular solution $y_k = 0$. Thus the other initial condition $y_0 = 2$ is verified by the solution $y_k = 2(1/2)^k$.  Any help on how to get to the equation $y_k= (1/2)^k y_0$ will be appreciated. Find all $n\in\mathbb N^+$ such that the sum of the digits of $5^n$ is equal to $2^n$.   I've solved this, but I think the proof is a bit weird and I wonder if there's a better one.    My proof:  We can see that $n\neq 1$, $n\neq 2$, $n=3$, $n\neq 4$ and $n\neq 5$.  Let $n&gt;5$. Notice that $5^6$ has $5$ digits, while $\frac{2^6}{9}=7\frac{1}{9}$, so $5^6$ has to have at least $8$ digits in order for the sum of the digits to be able to at least reach $2^6$.  Everytime $1$ is added to the exponent of $5$, the amount of digits $5^n$ gets is at most $1$, while $\frac{2^{n+1}}{9}-\frac{2^n}{9}=\frac{2^n}{9}&gt;3$, so the lowest amount of digits it has to have to reach $2^n$ becomes higher by at least $4$.  When $n=6$, the amount of digits $5^n$ has is already lower than the amount it has to have in order to reach $2^n$, and I've just proved that the amount it has to have in order to reach $2^n$ grows faster than the amount of digits $5^n$ has, therefore $5^n$ will never be able to reach $2^n$ when $n&gt;5$.  Hence the only solution is $n=3$. How to use stars and bars for solving number of integral solutions to an equality?