When we click on a tag tab key should press or can we get any key action using javascript or tab key.  &lt;head&gt; &lt;script type="text/javascript" src="jquery-1.8.3.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function(){ $('a').click(function(e){ //press tab key })}) &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="text" /&gt; &lt;div&gt;Tab Key &lt;span&gt;9&lt;/span&gt; &lt;a href="#"&gt;click&lt;/a&gt;&lt;/div&gt; &lt;/body&gt;
Is it possible to simulate key press events programmatically in JavaScript?
Prove: If $a\mid m$ and $b\mid m$ and $\gcd(a,b)=1$ then $ab\mid m$ Prove: If $a\mid m$ and $b\mid m$ and $\gcd(a,b)=1$ then $ab\mid m$  I thought that $m=ab$ but I was given a counterexample in a comment below.  So all I really know is $m=ax$ and $m=by$ for some $x,y \in \mathbb Z$. Also, $a$ and $b$ are relatively prime since $\gcd(a,b)=1$.   One of the comments suggests to use , i.e., $aq+br=1$ for some $q,r\in\mathbb{Z}$. Any more hints?  New to this divisibility/gcd stuff. Thanks in advance! How to pass the password to su/sudo/ssh without overriding the TTY? If $\gcd(a,b)=1$, how can I find the values that $\gcd(a+b,a^2+b^2)$ can possibly take? I can't find a way to use any of the elemental divisibility and gcd theorems to find them. Correct usage of will and would Consider the following sentence     It will/would rain tomorrow.   I understand "would" usually means something that is really improbable.  So "it would happen" means it might happen but it is very unlikely; while "it will happen" means it is going to happen  But what if I want to say      It will not happen?   Because the meaning of "it will not happen" represents something that is unlikely or, worse still, not going to happen, shouldn't it be more accurate to say "it would not happen"?  However, to contravene the aforesaid suggestion - if I am confident that the thing is not going to happen, should I use "will" to indicate the definite nature of my statement?  To further complicate the issue, what if I want to say     I think you will not be able to do it.    or      I think you would not be able to do it.    Which one is more accurate/correct,  given that "I think" already conveys a sense of "less than definite" and "will/would not be able to" conveys the same sense as "unlikely"? Combine 4 cells in a table Here is a simple table.  I want to merge 4 cells. I want to combine the three "this" cells area in this table. I thought I have to use multirow and multicolum at same time. However, I could not find how to use it.  If possible, could you post the modified LaTeX source code?     My LaTeX code:  \documentclass{article} \usepackage{multirow}% http://ctan.org/pkg/multirow \usepackage{hhline}% http://ctan.org/pkg/hhline \begin{document}  \begin{table}[ph] \begin{center} \begin{tabular}{c|c|c|c|c} \hline \multirow{2}{*}{Raaa (k)} &amp; \multicolumn{4}{c}{C ()} \\ \hhline{~----}  &amp; 3.3 &amp; 2.5 &amp; 1 &amp; 0.5 \\ \hline \multirow{2}{*}{Raaa (k)} &amp; \multirow{2}{*}{this} &amp; this &amp; 0.5 &amp; 0.6\\ \hhline{~~~--}            &amp;                       &amp; this &amp; 0.7 &amp; 1.2 \\ \hline \end{tabular} \caption{R, C ripple size} \label{T:peak} \end{center} \end{table} \end{document} Change Folder Permissions I started off with changing to the folder I want to change permissions for, and that is the opt folder.  $ cd /opt/ test@testVM:/opt$   So I tried changing the permissions for this folder now using:  sudo chmod 775   And that hasn't worked. It showed this message:  Try 'chmod --help' for more information.   There is something I am forgetting or leaving out.  Please can you show me what I am doing wrong?  Thanks in advance. Proving that an integral domain has at most two elements that satisfy the equation $x^2 = 1$. Why can’t the Doctor’s companions understand babies and horses? The Doctor claimed to speak both horse and baby. The reason human companions can understand every language is because the TARDIS translates. So why can't anyone else understand babies and horses? Finding $E(|X_1|\ |\max |X_i| )$ Suppose $X_1,\ldots,X_n$ are a random sample of $U(-\theta,\theta)$ with $\theta&gt;0$. How can find $$ E\left(|X_1|\ \big|\max |X_i| \right) $$ that $1\leq i\leq n$? Can I attack a specific player? I was in a clan and someone kicked me from it.   I think I'm stronger than him. Is there any way I can attack him? The only method I see to attack is random players. Can I attack a specific player? Links in [link text][number] format don't work properly if they follow a tag using the new [tag:tagName] format. Here's the result of [tag:python] [gold badge page][1]:      [gold badge page]   Putting the tag inside the link is worse. Here's the result of [[meta-tag:bug] some text][2], where [2] is google.com:        The part of the link outside the tag just disappears silently.  EDIT: To be more precise, the entire link to [2] disappears. The markup that is produced contains (invalid) nested anchor tags, as shown here from Firefox's "View Source":  &lt;a href="http://google.com" rel="nofollow"&gt;&lt;a href="/questions/tagged/bug" class="post-tag required-tag" title="show questions tagged 'bug'" rel="tag"&gt;bug&lt;/a&gt; some text&lt;/a&gt;   So the tag is still a link, but it is a link to the tag page, which is the behavior it would have if the link to [2] didn't exist at all. The user's desired behavior in this case is... ambiguous, to be charitable.  EDIT 2: I briefly included markup from Firebug here, but it turned out to be irrelevant. It has now been removed to improve readability. See  if you're interested. I am looping through a text file, using 'while read'. I read three variables from each line - two filenames and a decimal number. I know that this works in a vanilla setup (loop, read line, echo line, extract variables, nothing else), because I have tested it on my input file.  I am getting an odd result, though, once I add in the meat of my routine - which is a call to ffmpeg to merge the audio and video streams represented by the filenames. Successive 'read' operations omit leading characters from the line. I read  that calls for 'read' input within a 'while read' loop can cause problems, and wonder if the ffmpeg call is doing something that confuses bash, but this seems unlikely and bizarre! NB: I don't really understand the ffmpeg call - I got it from an answer to another question.  Any help would be appreciated!  The first 'read' works as expected (and the ffmpeg command completes):  LINE  1 vidsNeedingSound/448£generic@06_10_16-09_30_47.mp4 soundToAdd/448£generic@06_10_16-12_11_54.wav 6.988354 V: vidsNeedingSound/448£generic@06_10_16-09_30_47.mp4   A: soundToAdd/448£generic@06_10_16-12_11_54.wav   D: 6.988354   The second 'read' loses 36 characters from the beginning of the line (and the ffmpeg command fails because the file represented by the variable V which takes the first item of the line doesn't point at a file):  LINE  2 6-09_30_47.mp4 soundToAdd/452£generic@06_10_16-12_11_54.wav 9.64663 V: 6-09_30_47.mp4   A: soundToAdd/452...   The third 'read' works as expected (and the ffmpeg command completes):  LINE  3 vidsNeedingSound/452£left@06_10_16-09_30_47.mp4 soundToAdd/452£left@06_10_16-12_11_54.wav 9.862118 V: vidsNeedingSound/452£left@06_10_16-09_30_47.mp4   A: soundToAdd/452...   The fourth 'read' loses 37 character (one more than the last fail) from the beginning of the line (and the ffmpeg command fails):  LINE  4 09_30_47.mp4 soundToAdd/452£right@06_10_16-12_11_54.wav 9.431392 V: 09_30_47.mp4   A: soundToAdd/452....   That's the pattern. When not preceded by a successful call to ffmpeg, the 'read' works as expected. After each successive successful ffmpeg call, characters are omitted from the beginning of the line: 36 characters to begin with, then 37, 38, 39...  The clincher is that when ffmpeg fails after a 'successful' read (due to another problem), the following 'read' works as expected.  CONCLUSION: a successful ffmpeg call results in a read fail on the next iteration through the loop.  Why does this happen, and how can I stop it?  Here's my code: ...  # Loop through lines in the merge file IT_COUNT=1 while read MERGE_LINE                do              echo "LINE " $IT_COUNT     ((IT_COUNT+=1))     echo $MERGE_LINE   # testing use     read VID_FILE AUD_FILE DURATION &lt;&lt;&lt; "$MERGE_LINE" # Get the data from each line     echo "V: $VID_FILE   A: $AUD_FILE   D: $DURATION"         # testing use ....     # add audio to video     ffmpeg -i $VID_FILE -i $AUD_FILE -filter_complex "aevalsrc=0:d=$AUD_SHIFT[s1];[s1][1:a]concat=n=2:v=0:a=1[aout]" -c:v copy -map 0:v -map [aout] $FILE_OUT -hide_banner  done &lt;$MERGE_FILE     Thanks for looking! Define a new block environment in LaTeX beamer I have two kinds of examples in my document. I want to use different colors, say, red and blue. This is what I am doing now.  \documentclass[]{beamer} \usetheme{Madrid} \begin{document}  \begin{frame} \frametitle{Test} \setbeamercolor{block title}{fg=white,bg=red!75!black} \begin{block}{First Kind Example} This is example of the first kind. \end{block} \setbeamercolor{block title}{fg=white,bg=blue!75!black} \begin{block}{Second Kind Example} This is example of the second kind. \end{block} \end{frame}  \end{document}   I know this is kind of stupid. I want to define two new block environments, one for each color, so I don't need to use setbeamercolor every time I use them.   \begin{block1}{First Kind Example} ... \end{block1} \begin{block2}{Second Kind Example} ... \end{block2}   I know I need to define these two new environments in the preamble, but don't know how. Thanks for the help.  By the way, what is a good reference on these kinds of tricks in LaTeX/beamer? Any recommendations? Cant install via Ubuntu Software- "apt transaction returned result exit-failed" I'm using 17.04 ( Clean Install ), and as far as I remember, every try to install any sofware- it fails with that error code.  I tried sudo apt-get update &amp;&amp; apt-get upgrade and problem persists.  any idea why?   edit: Using software Updater gave this result :   edit : output of update  guy@LG-LAPTOP:~$ sudo apt-get update &amp;&amp; apt-get upgrade [sudo] password for guy:  Ign:1 http://il.archive.ubuntu.com/ubuntu zesty InRelease Ign:2 http://il.archive.ubuntu.com/ubuntu zesty-updates InRelease               Ign:3 http://il.archive.ubuntu.com/ubuntu zesty-backports InRelease             Err:4 http://il.archive.ubuntu.com/ubuntu zesty Release                           503  Service Unavailable Get:5 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]      Err:6 http://il.archive.ubuntu.com/ubuntu zesty-updates Release                   503  Service Unavailable Get:7 http://archive.canonical.com/ubuntu zesty InRelease [10.2 kB]             Err:8 http://il.archive.ubuntu.com/ubuntu zesty-backports Release                 503  Service Unavailable Get:9 http://archive.canonical.com/ubuntu zesty/partner Sources [1,416 B]       Get:10 http://archive.canonical.com/ubuntu zesty/partner amd64 Packages [1,616 B] Get:11 http://archive.canonical.com/ubuntu zesty/partner i386 Packages [1,612 B] Get:12 http://archive.canonical.com/ubuntu zesty/partner Translation-en [708 B] Get:13 http://security.ubuntu.com/ubuntu zesty-security/main amd64 DEP-11 Metadata [11.7 kB] Get:14 http://security.ubuntu.com/ubuntu zesty-security/main DEP-11 64x64 Icons [9,219 B] Get:15 http://security.ubuntu.com/ubuntu zesty-security/universe amd64 DEP-11 Metadata [14.4 kB] Get:16 http://security.ubuntu.com/ubuntu zesty-security/universe DEP-11 64x64 Icons [31.0 kB] Reading package lists... Done                                          E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty-updates Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://il.archive.ubuntu.com/ubuntu zesty-backports Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. guy@LG-LAPTOP:~$    output of apt get  guy@LG-LAPTOP:~$ sudo apt-get install putty Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   putty-tools Suggested packages:   putty-doc The following NEW packages will be installed:   putty putty-tools 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 661 kB of archives. After this operation, 2,713 kB of additional disk space will be used. Do you want to continue? [Y/n]  Err:1 http://il.archive.ubuntu.com/ubuntu zesty/universe amd64 putty-tools amd64 0.67-3   503  Service Unavailable Err:2 http://il.archive.ubuntu.com/ubuntu zesty/universe amd64 putty amd64 0.67-3   503  Service Unavailable E: Failed to fetch http://il.archive.ubuntu.com/ubuntu/pool/universe/p/putty/putty-tools_0.67-3_amd64.deb  503  Service Unavailable E: Failed to fetch http://il.archive.ubuntu.com/ubuntu/pool/universe/p/putty/putty_0.67-3_amd64.deb  503  Service Unavailable E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? guy@LG-LAPTOP:~$ How does wizard & cleric spell preparation and casting work? In 3.X wizards had spellbooks, while clerics had their entire spell list, but they both memorized/prepared spells every day from those lists, and had a certain number of slots for preparing spells in.  Now in 5e preparing spells and spell slots aren't the same thing. What's going on here? How does their spellcasting work now? How to prevent different checksums for different typesets Bash script doesn't see SIGHUP? I've got the following script:  #!/bin/bash echo "We are $$" trap "echo HUP" SIGHUP cat    # wait indefinitely   When I send SIGHUP (using kill -HUP pid), nothing happens.  If I change the script slightly:  #!/bin/bash echo "We are $$" trap "kill -- -$BASHPID" EXIT    # add this trap "echo HUP" SIGHUP cat    # wait indefinitely   ...then the script does the echo HUP thing right as it exits (when I press Ctrl+C):  roger@roger-pc:~ $ ./hupper.sh  We are 6233 ^CHUP   What's going on? How should I send a signal (it doesn't necessarily have to be SIGHUP) to this script? I've always had this question about the pronunciation of Sean.  Is Sean a word from another language? Is it actually not pronounced Shawn and instead it's some sound between Shawn and Seen? Also, why isn't it pronounced as Sawn instead of Shawn, when the word Sean doesn't even have the letter 'h' in it to get that -sh sound?  Bottom line is, why is Sean pronounced Shawn instead of Seen? I have an email account that has passed 60GB of emails, and currently I'm having a lot of trouble using an email client to archive emails of last year (2011).  Via terminal, I am trying to use  to locate the files between 2011-01-01 and 2011-12-31, but no avail.  How can I find files between two dates?  If relevant, the end goal will be a batch that will move each file found, matching the date interval, to a folder. incoming mail just sits in the drop folder I want a document library to recieve email and store it so followed the steps outlined here:   I seem to be a bit stuck.  The mail's being delivered to the machine and it's appearing as .eml files in the drop folder, so SMTP and delivery is OK.    I assume Sharepoint's supposed to pick up the file, stick it in a library and delete it, but it doesn't, the mail file just sits there.  Nothing in the logs, obviously.  I haven't set this up before, how often does the timer service come about and pick up the mail?