In R, how do I add a max by group?
Add max value to a new column in R
How do I enable the "Universe" repository from the command line? Is it "5–6 weeks are a lot of time" or "5–6 weeks is a lot of time"? I've recently flagged the following , which I got in the flag queue.   The answer does not seem to attempt to address the question at all. It looks like a comment on one of the other answers (probably Luca's).  It got rejected with the following reason:  declined - flags should not be used to indicate technical inaccuracies,            or an altogether wrong answer   I did not flag this because I thought it was wrong, I flagged it because I didn't think it was an attempt to answer the question. For what it's worth, I don't get what the guy who provided that answer even tried to say.  Was I wrong to flag it? If so why? Does the Force wane as you age? @Valorum said     ...not to mention the sheer strain that comes from continually using the Force at an advanced age.   To my feeble mind, this doesn't make sense. Approaching 900 years old, Yoda is still as strong as any whippersnapper in terms of Force power and usage. Despite his old age, Obi Wan shouldn't have any problems with using his Force powers.  This got me to thinking, does the Force begin to leave you as you age? Is it a flow of Force power that goes down based on (I hate to say this) a decrease in midichlorian count as you approach your expiration date? Use worksheet name as a variable in a lookup threeparttablex table notes for tabu tabulars with less than \textwidth Cannot connect to internet after using airmon-ng check kill In new version of Kali 2.0 with updated "aircrack-ng" tool, there is a problem between Internet connection and using cracking tools.   I have my wireless card as wlan0. And the Internet connection is fine too. Then, what I do is:  airmon-ng start wlan0 airodump-ng wlan0mon   Now the airodump-ng doesn't work, saying "Device or resource busy".  In order to run this I have to kill some processes, using:  airmon-ng stop wlan0 airmon-ng check kill airmon-ng start wlan0 airodump-ng wlan0mon   Now the cracking process is up.   I can start cracking, but now I cannot connect to the Internet after the kill process.  On typing iwconfig in terminal, I get this:  root@kali:~#iwconfig wlan0mon IEEE 802.11bgn  ESSID:"myessid"         Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00          Bit Rate=108 Mb/s   Tx-Power=20 dBm          Retry short limit:7   RTS thr:off   Fragment thr:off       Encryption key:off       Power Management:off       Link Quality=42/70  Signal level=-68 dBm         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0       Tx excessive retries:2  Invalid misc:9   Missed beacon:0  eth0      no wireless extensions. lo        no wireless extensions.   And, on running ifconfig on terminal, I get this:  root@kali:~#ifconfig lo        Link encap:Local Loopback         inet addr:127.0.0.1  Mask:255.0.0.0       inet6 addr: ::1/128 Scope:Host       UP LOOPBACK RUNNING  MTU:65536  Metric:1       RX packets:5604 errors:0 dropped:0 overruns:0 frame:0       TX packets:5604 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:0        RX bytes:452904 (442.2 KiB)  TX bytes:452904 (442.2 KiB)   There is no wlan0 or wlan0mon. I also restarted the network manager by:      service network-manager restart   But nothing changed. Though it displays wlan0 when checked using ifconfig this time. The code for reference is this  @article{matcontcl,  title= {MATCONT and CL MATCONT},  author = {A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and  B.Sautois},  year = {2006},  journal = {Continuation toolboxes in matlab}, }   This is the error that follows  This is BibTeX, Version 0.99d (TeX Live 2015/W32TeX) The top-level auxiliary file: PropuestaInvestigacion.aux The style file: abbrv.bst Database file #1: biblio.bib Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1049 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1049 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1090 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1090 of file abbrv.bst (There were 4 error messages)   How could I fix it? How do I remove any Ubuntu brand and trademark from my Ubuntu install? I am running Ubuntu 17.10 and I would like to build a completely de-branded ISO of it. This means not just dropping the Ubuntu name from /etc/lsb_release but also deleting references in the text of the installation program, in the "about this computer" screen and so on.  I've already checked other questions but I do not consider them duplicate because:    is very old and it just turned into a bunch of "try this tool" suggestions  is also old and suggests a tool called relinux that hasn't seen updates in years  does mention APT packages (and I know how this works) but not trademarks   Therefore my questions are:   Starting from a stock Ubuntu 17.10 (or an official derivative), how can I remove references to the Ubuntu trademark and logo? What exact packages do I need to uninstall? Are there images I need to replace? Are there files I need to edit other than /etc/lsb_release?   Please note that I am not interested in removing other names such as Firefox. I am only interested in the name of the distro. How to make a GIS inventory? My office will be seeing a big change in its GIS section. This section has been operational since the 1980's and has a huge collection of GIS data (i.e., shapefiles, raster files, data, etc) but never been through any inventory. Now it will happen.   Is there any automated way to extract all the information about the GIS data (i.e., shapefile, arc-info coverage, layer file, *.mxd, gdb, raster file, and more) from a PC to an Excel file? The information may include date of creation, date last edited, folder or container name, etc. If a warlock's invocation states that they can use a spell without a slot does that mean they can cast the spell as often as they want? On page 111 of the 5E hand book the invocations Misty Visions, Mask of Many Faces, Master of Myriad Forms, and Otherworldly Leap all they that you can cast them without expending a spell slot. Does this mean the spells essentially become cantrips and I can cast them as often as I want? Proof if $a \vec v = 0$ then $a = 0$ or $\vec v = 0$ I'm kicking myself over this one, but I just can't seem to make the argument rigorous. From Axler's Linear Algebra Done Right:  for a vector space $V$ with an underlying field $F$:  Take an element $a$ from $F$ and $\vec{v}$ from $V$. $a\vec{v}=\vec{0}\implies a=0 $ or $ \vec{v}=\vec{0}$  After only being able to come up with half of a direct proof, I tried doing this by proving the contrapositive $a\neq 0 \wedge \vec{v} \neq \vec{0} \implies a\vec{v}\neq \vec{0}$  Say $a\vec{v}=\vec{u}$. Since $a$ is non-zero, we can divide both sides by $a$.  $$\vec{v}=\frac 1 a \vec{u}$$  If $\vec{u}$ were $\vec{0}$ then by  $$\frac 1 a \vec{0}=\frac 1 a (\vec{0}+\vec{0})\implies\frac 1 a \vec{0}=\vec{0}$$ $v$ would be $0$ as well. Since it isn't by assumption, $\frac 1 a \vec{u}$ cannot be zero and so $\vec{u}$ cannot be as well.   Is this fully rigorous? It seems like a very simple question, but I'm not sure about it. Namely, the last step of $\frac 1 a \vec{u}\neq 0 \implies \vec{u}\neq 0$ doesn't seem obvious. I think I need to use the $1\vec{v}=\vec{v}$ axiom, but I'm not sure how.  Is there a more direct proof? This whole contrapositive business seems a bit clunky for something so simple. Proving if $a$ is not a multiple of prime $p$, then an integer $b$ exists such that $p^b - 1$ is a multiple of $a$ I tried many approaches but none of them really worked I treated $p^b-1$ as a Geometric progression but it didn't work and that is about as far as I have been able to go I have no clue how to move forward What are the advantages of stacking multiple LSTMs? What are the advantages, why would one use multiple LSTMs, stacked one side-by-side, in a deep-network? I am using a LSTM to represent a sequence of inputs as a single input. So once I have that single representation— why would I pass it through again?  I am asking this because I saw this in a natural-language generation program. Suppose a gambler starts with one dollar and plays a game in which he or she wins one dollar with probability $p$ and loses one dollar with probability $1 - p$. Let $f_{n}$ be the probability that he or she first becomes broke at time $n$ for $n = 0, 1, 2\ldots$. Find a generating function for these probabilities.  Is it binomial distribution $?$ and then use the $\operatorname{mx}\left(s\right) = rx\left(\mathrm{e}^{s}\right)$ of the binomial distribution $?$. Help$\ldots!$. I am correcting my quiz. how to get a picklist all values in apex controller How to sort Wrapper list? I have a wrapper class which contains a list of sobjects, i want to have th sorting on the fields of these objects in the wrapper list: The apex code is as follows:  Class jobsWrapper {     public JobSuite__Job__c job { get; set; }     public JobSuite__Job_Task__c jobTasks { get; set; }      public JobsWrapper(JobSuite__Job__c objjobs, JobSuite__Job_Task__c objjobTasks) {         // if(jobTasks== NULL){jobTasks = new List&lt;Job_Task__c&gt;();}         job = objjobs;         jobTasks = objjobTasks;      }      public JobsWrapper() {         if(jobTasks== NULL) {             jobTasks = new JobSuite__Job_Task__c();         }          if(job == NULL) {             job = new JobSuite__Job__c();         }             } }   I want to allow sorting the wrapper list by the fields in the job - like client, jobname, jobnumber etc and fields from the task object as taskname, reviseddue dateetc.  How can I do this? Please help, thanks in advance. Geometric intuition behind gradient, divergence and curl Jeffrey Wooldridge in his Econometric Analysis of Cross Section and Panel Data (page 357) says that the empirical Hessian "is not guaranteed to be positive definite, or even positive semidefinite, for the particular sample we are working with.".  This seems wrong to me as (numerical problems apart) the Hessian must be positive semidefinite as a result of the definition of the M-estimator as the value of the parameter which minimizes the objective function for the given sample and the well-known fact that at a (local) minimum the Hessian is positive semidefinite.  Is my argument right?  [EDIT: The statement has been removed in the 2nd ed. of the book. See comment.]  BACKGROUND Suppose that $\widehat \theta_N$ is an estimator obtained by minimizing $${1 \over N}\sum_{i=1}^N q(w_i,\theta),$$ where $w_i$ denotes the $i$-th observation.  Let's denote the Hessian of $q$ by $H$, $$H(q,\theta)_{ij}=\frac{\partial^2 q}{\partial \theta_i \partial \theta_j}$$  The asymptotic covariance of $\widehat \theta_n$ involves $E[H(q,\theta_0)]$ where $\theta_0$ is the true parameter value. One way to estimate it is to use the empirical Hesssian  $$\widehat H=\frac{1}{N}\sum_{i=1}^N H(w_i,\widehat \theta_n)$$  It is the definiteness of $\widehat H$ which is in question. Is gnu coreutils sort broken?