I was trying to create an alias in bash  alias r='!!'   My idea was to create a simple alias r to run the previous command instead of using !! (double exclamation) to run the most recent command as it is hard to type. I know I can alias r='fc -s' to make this work, but I was trying to understand why I am not able to create an alias for !!. I want to understand what !! means to bash and why I'm not able to alias it. I can create alias for other bash builtin commands like alias cdir='cd' but then why not for !! Sorry if I couldn't explain properly.
I have this alias set in my system /etc/bashrc file:  alias root="sudo !!"   The intention of this being to run the last used command using sudo of course. When used, it of course appears to substitute the last command in history to the bashrc file upon shell initialization, and not the actual command that you would get if you were to run sudo !! in an interactive shell. I've also tried alias root="sudo fc -s" to no avail.  I realize this is probably something to do with how the BASH does command substitutions, but can someone explain why this is, and provide a usable substitute?  I'm running BASH version 3.2.51(1)-release (x86_64-apple-darwin13).
How do I install drivers for Realtek RTL8812BU? So I've been experimenting with Ubuntu on and off for a while, but I honestly have no idea what the hell I'm doing. So I have a realtek RTL8812bu WiFi dongle that I'm hoping to get working. I did some research, and came across  that a couple people across two threads said worked for them:  At the bottom it said there is a new version . So somewhere it said it was confirmed to work on kernels up to 4.16, so I checked and I'm on 4.15.0. But the problem I'm having, is what am I supposed to do? There is some installation guide at the bottom that is about as clear as mud to me since I don't know much. Lock time not involved in MySQL slow query selection? I wish to analyze some read-write contentions problems on a very huge table where writes are very fast, less than 1ms in most case. The point is that the contention makes those write queries sometimes wait for the lock for a long time, i.e. hundreds of milliseconds. But the query itself remains very fast so it's not selected as a "slow query", which threshold is actually 10ms.  The only way to gather the information I need is to put à 0ms threshold so I can capture all queries, but it's not sustainable for more than 10mn on our production environment, where it would produce about 200MB of logs per minute.  In fact I can't understand why MySQL don't include the lock time, added to the execution time, for the slow query log selection process. At least, I wish there were an option for that.  Am I missing something ? When is "EDIT"/"UPDATE" appropriate in a post? I often see questions edited into this form:     Lorem ipsum dolor sit amet blah blah blah paragraph paragraph original question.            UPDATE: The Lorem disappeared and left this message: "new information".   I find this format unaesthetic (since Stack Exchange posts are supposed to be useful in the long term and update boundaries are artifacts of the creation rather than the content) and feel that new information should, whenever possible, be incorporated into the original text “as if it had always been that way” if practical, and pointing out an update should be done mostly in comments.  Is this an appropriate writing style, and if so under what circumstances? If not, should it be removed or discouraged? Determine resultant velocity of an elastic particle-particle collision in 3d space So I have two particles that have collided in 3 dimensional space. I want the particles to rebound off of each other in an elastic manner. How do I determine the resultant velocity vector if I know: Both particles' initial velocity vector, their masses, and their initial position vectors relative to the origin.  I tried to follow the instructions on  but I am not sure how to make their equations work without polar coordinates / how to translate my data to polar coordinates.  Also, if you answer my question in terms of polar coordinates, can you explain which angle is theta and which is phi? Since there are 2 different conventions, I am not really sure which angle is being referred to in the explanation on the aforementioned website.  EDIT: This isn't for a class. I'm writing a physics engine for a gravity simulation I am making using Unity. I haven't taken kinematics since I was in high school, which is why I am so rusty. How to get JavaScript caller function line number? How to get JavaScript caller source URL? How do I prove that $x^p-x+a$ is irreducible in a field with $p$ elements when $a\neq 0$? I assume it doesn't connect to anything (other than the satelite I guess), is this right? Or it does and has some kind of charge? When I ping I have this display:  &gt; ping -i 4 www.google.fr  64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=503 ttl=46 time=45.5 ms ....... ....... 64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=508 ttl=46 time=44.9 ms 64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=509 ttl=46 time=45.1 ms   I'd like to have the time of the ping before.   Something like:  &gt; (right functions) + ping -i 7 www.google.fr  mardi 15 mai 2012, 10:29:06 (UTC+0200) - 64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=503 ttl=46 time=45.5 ms ....... ....... mardi 15 mai 2012, 10:29:13 (UTC+0200) - 64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=508 ttl=46 time=44.9 ms mardi 15 mai 2012, 10:29:20 (UTC+0200) - 64 bytes from wi-in-f94.1e100.net (173.194.67.94): icmp_seq=509 ttl=46 time=45.1 ms   How would you do this in a command line (if it's possible)? I am in the process of updating my CV. Since I often get labeled as "the bioinformatician" I get to play with many different languages and technologies, and similarly what people expect from a bioinformatician varies from person to person. So I figured it would be a good idea to indicate how much I feel I know in respective fields/languages.  Inspired by , I came to wonder whether or not its acceptable to have self-assessed ratings of your technical skills, such as: proficiency programming languages, familiarity with relevant software etc.   My own feeling is that such ratings are useful to indicate what you feel most confident or comfortable with. It would also be useful to show any potential future employer the level of competence you have in different fields. If you think about it a bit, it is common to have some type of rating for the languages one speaks, so I think an analogue to programming language proficiency should not be that alienating.  On the other hand there is the risk of rendering your CV like, as a friend of mine put it, a role-playing game character sheet.   Is it common to have such ratings on skills? Are there any potential problems with it?   Edit: What I was thinking is a small listing something like: How to change Facebook username? Is there any difference in meaning between 'efficacy' and 'efficiency'? I am preparing a book for publication which contains the following passage:     Stromberg in Religious Liberalism in Eighteenth-Century England   (1954) noted that 'the critical moment in the emergence of a positive   spirit of reform...consisted in the awareness of evil as being social   and remediable. It begins about 1750.'   My proof reader (my wife) has picked this out suggesting it should be the past tense. However if I say It began about 1750 it seems to convey too much certainty about the exact date. I just want to convey an impression of it being something which emerges in the mid-eighteenth century. I believe use of the present tense is the way to go.   But what is this artifice called, this use of the present to convey mild uncertainty? How to connect to wifi using just the terminal? Why is CBS.log file size 20 GB Auto increment filename I have a need to collect some duplicate files and want to avoid name collisions. The problem is that this collection of files might be added to by another execution of my script before the files are cleaned out and just want to continue to increment the number.  I decided on a simple until loop to increment the number like so.  until [[ ! -f ${PWD}/DUPES/${num}-$1 ]]; do num=$((num +1)) done mv --no-clobber $1 ${PWD}/DUPES/${num}-$1   I can't imagine ever exceeding 1k files in an extreme example, so my questions are...  Is this a terribly inefficient way to achieve this? Should I be parsing the existing files to get the highest leading number to start incrementing from there, or is this ok for the extreme example I put forth?  Or is there a better way all together? Persist sort/filter selections I just reached the 3k rep limit required for close votes and have started exploring the vote-to-close UI that's opened up to me, and I have a request.  The review queue has a Do Not Close button, but when I click the close link under a question that has close votes (i.e. it shows close (1)), there isn't an option for me to vote against closing the question. I came across a question that had a vote to close it as not a question, but it had just been updated with code and more details and was no longer a candidate for closing. However, I couldn't cast a vote to not close it from the question itself. When I clicked on close, it brought up the usual voting UI, and "Do Not Close" was not an option.  TL;DR, do this:   Open a question in the close votes review queue Note the Do Not Close button Click the question title to go to it Click the close (n) link under the question (assuming it hasn't already been closed) Notice the lack of an equivalent "Do Not Close" option   Could a "Do Not Close" option be added to the close button popup for questions that already have close votes, that way the review interface isn't the only place a "Do Not Close" vote can be cast?  Edit: Okay, so 5 3 "Do Not Close" votes kicks it out of the review queue, it doesn't have "no effect" as suggested in the comments. (See , in which the  was just updated a few minutes ago to say 3 DNC votes.) I still don't see why the same DNC option can't be available from the question.  Basically, I guess I would like some rationale behind this bullet point from :     Only accessible from the review queue (so rather difficult to target a specific question). Yes, this is very much by-design. Can "THAT" be omitted here? So we can say   "Do you think (that) he'll come?"   (in other words, we can omit THAT in conversation)  But what about with a sentence like   "Did he deny （that） he went to Thailand?"   Can "that" also be omitted like in the sentence above? How is Cycles different from Blender Internal? How does Cycles work and how is it different from Blender Internal?  Which is better? I am a Chinese citizen married to a US citizen last year. I am going to apply for a UK tourist visa. The name shows on my passport is my maiden name, while any other documents the UK visa needed, such as bank statement, is with my married name. I can provide my marriage license to prove the link between my maiden name and married mane.   Can I apply for this UK visa with my situation?