Shell script to ssh to machines.
Why am I still getting a password prompt with ssh with public key authentication?
Is Borden's true identity real, or another ruse? Towards the end of , it's revealed that Borden accomplishes his Transported Man trick by using his twin brother, Fallon, as a double. It then becomes clear that he has been doing this in his personal life as well as on stage - each brother leads 'half a life', sometimes appearing as Borden and sometimes as Fallon. This is how he completes the illusion: one Borden goes into the first door, the other Borden emerges from the second door a moment later. Angier doesn't know how Borden does the trick, and doesn't believe Borden uses a double despite being told as much by Cutter. He follows what he believes to be a clue in Borden's notebook and travels to Colorado to meet Nikola Tesla, who Angier believes can build a machine that can help him perform the trick. Angier believes that Tesla built a similar machine for Borden. However, the final pages of the notebook reveal that Tesla was merely a red herring, designed to get Angier out of Borden's way for a long time. Tesla, it turns out, had never built such a machine before. At this point, Tesla agrees to build Angier's machine anyway. Instead of building a machine that transports matter, he builds one that duplicates it. Angier uses this machine in his act, but in order to avoid having to deal with multiple clones (the &quot;prestige materials&quot;), one of them must die as part of the act. This all makes sense, so far, but I find it hard to believe that Borden's use of the word 'Tesla' as the key to his cipher is random. It's too coincidental that he sends Angier on a wild goose chase, but Angier returns with a working machine. A film that is otherwise so tightly plotted shouldn't rely on coincidence to move the narrative forward, so there must be something else going on. Is it possible that Borden cloned himself using Tesla's machine? SQL Servers has Traces and XEvents. These are used to capture and analyze what is going on with our SQL Server Instances. Events are stored in the stack for later analysis. For example,  If I decide to monitor any dead lock in the database, I just query the trace file to see the history of deadlock for a period of time. Here is my question:  While events occur, in our example deadlock event, is there a way to get an email notification using msdb.dbo.xp_send_dbmail? Concurrent and Blocking Queue in Java Check if a class is derived from a generic class I have a generic class in my project with derived classes.  public class GenericClass&lt;T&gt; : GenericInterface&lt;T&gt; { }  public class Test : GenericClass&lt;SomeType&gt; { }   Is there any way to find out if a Type object is derived from GenericClass?  t.IsSubclassOf(typeof(GenericClass&lt;&gt;))   does not work. I have asked this question before ( and  )  My problem is that my Self Encrypted Disk (SED) have to NOT spin down even on suspend!  I have tried , but it did not work and the disk spin downs anyway !  The problem is that if the disk spins down, because it is on suspend, it does not show the "de encryption" prompt, and boots back up on RAM, but crashed due to IO error on the disk! (that's what the disk is suposed to do !)  Anyone on how to NOT (as in NEVER) spin down a HDD ? (yes this goes against all logic but this particular case)   Thanks a lot !  Would that be useful ?   sudo hdparm -I /dev/sda [sudo] password for xqua:   /dev/sda:  ATA device, with non-removable media     Model Number:       ST500LT015-9WU142                            Serial Number:      W0VBZQQ7     Firmware Revision:  0001SDM7     Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6 Standards:     Used: unknown (minor revision code 0x0029)      Supported: 8 7 6 5      Likely used: 8 Configuration:     Logical     max current     cylinders   16383   16383     heads       16  16     sectors/track   63  63     --     CHS current addressable sectors:   16514064     LBA    user addressable sectors:  268435455     LBA48  user addressable sectors:  976773168     Logical  Sector size:                   512 bytes     Physical Sector size:                  4096 bytes     Logical Sector-0 offset:                  0 bytes     device size with M = 1024*1024:      476940 MBytes     device size with M = 1000*1000:      500107 MBytes (500 GB)     cache/buffer size  = 16384 KBytes     Form Factor: 2.5 inch     Nominal Media Rotation Rate: 5400 Capabilities:     LBA, IORDY(can be disabled)     Queue depth: 32     Standby timer values: spec'd by Standard, no device specific minimum     R/W multiple sector transfer: Max = 1   Current = 1     Advanced power management level: 254     Recommended acoustic management value: 208, current value: 0     DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6           Cycle time: min=120ns recommended=120ns     PIO: pio0 pio1 pio2 pio3 pio4           Cycle time: no flow control=120ns  IORDY flow control=120ns Commands/features:     Enabled Supported:        *    SMART feature set        *    Power Management feature set        *    Write cache        *    Look-ahead        *    Host Protected Area feature set        *    WRITE_BUFFER command        *    READ_BUFFER command        *    NOP cmd        *    DOWNLOAD_MICROCODE        *    Advanced Power Management feature set             Power-Up In Standby feature set        *    SET_FEATURES required to spinup after power up             SET_MAX security extension        *    48-bit Address feature set        *    Device Configuration Overlay feature set        *    Mandatory FLUSH_CACHE        *    FLUSH_CACHE_EXT        *    SMART error logging        *    SMART self-test        *    General Purpose Logging feature set        *    WRITE_{DMA|MULTIPLE}_FUA_EXT        *    64-bit World wide name        *    IDLE_IMMEDIATE with UNLOAD        *    Write-Read-Verify feature set        *    WRITE_UNCORRECTABLE_EXT command        *    {READ,WRITE}_DMA_EXT_GPL commands        *    Segmented DOWNLOAD_MICROCODE        *    Gen1 signaling speed (1.5Gb/s)        *    Gen2 signaling speed (3.0Gb/s)        *    Native Command Queueing (NCQ)        *    Host-initiated interface power management        *    Phy event counters        *    Idle-Unload when NCQ is active             Device-initiated interface power management        *    Software settings preservation        *    SMART Command Transport (SCT) feature set        *    SCT Write Same (AC2)        *    SCT Features Control (AC4)        *    SCT Data Tables (AC5)             unknown 206[12] (vendor specific)        *    reserved 69[4]        *    reserved 69[7] Logical Unit WWN Device Identifier: 5000c5006a036439     NAA     : 5     IEEE OUI    : 000c50     Unique ID   : 06a036439 Checksum: correct Why do ICs have NC (No Connection or No Function) pins? Let $F$ be a field and $F[x]$ a polynomial ring. Let $p(x)$ be an irreducible polynomial.  Show that $\gcd(p(x),q(x)) = 1\Longrightarrow \exists r(x),s(x)$ such that $r(x)p(x)+s(x)q(x) = 1$.  I know the proof for Bezout's identity for , but this proof uses the notion of absolute value, which cannot be applied to a polynomial ring.   I am thinking about a way to prove the statement: Use the Euclidean algorithm to compute $\gcd(p(x),q(x))$ and show that the result is $1$, and somehow go backwards to obtain $r(x)p(x)+s(x)q(x) = 1$, but it is a bit messy, and I'm not yet able to see it completely.  Please offer some help. If you have some other methods, that would be great, too. Prove if $|z| < 1$ and $ |w| < 1$, then $|1-zw^*| \neq 0$ and $| {{z-w} \over {1-zw^*}}| < 1$ A script on AIX which checks the number of parameters passed and complains if they are not correct:-  if [ "$#" -ge 1 ]; then   ... else   echo 'Usage: myscript &lt;a&gt; [b] [c]' fi   The script sets some environment variables so it is sourced. By that I mean I type the following on my command line. There is no second script, I am not sourcing a script from within another script.  . ./myscript.sh   If I pass it no parameters, I expect it to print out the usage statement but instead it runs using the parameters passed to the previous command that was sourced (not necessarily even this script!).  To double check this I added this line at the beginning of my script to prove that this was the case.  echo $# $@   If I pass it no parameters, it prints out the number and the list of parameters from a previously sourced script.  How do I get it to say $# is zero when I pass it zero parameters and source it?  The smallest possible recreate is a script thus:-  myscript.sh  echo $# $@   and then run it thus:-  . ./myscript.sh a b c   which prints out  3 a b c   then run it again without any parameters thus:-  . ./myscript.sh   which prints out the same  3 a b c   when you would expect it to print out  0   If you don't source the script and just run it thus:-  ./myscript.sh   then it works as expected and prints out  0   I hope that clarifies the issue at hand.  Since I seem to be getting lots of answers to explain why the above doesn't work and no answers to tell me what I should do instead, I thought I would have one more attempt at trying to explain what I am trying to do.  Requirement  I need to write a script that expects at least one parameter and complains if it is not invoked with a said parameter (see the first block of code in my question above), and this script needs to set some environment variables. Because of this second requirement I have assumed that I need to source the script so that the environment variables are still set when the script completes. How can you write a script that can tell when it has not been passed parameters that is also able to set an environment variable? Back in Europe I have a N64 console. As I am currently living in Japan, I find myself tempted to buy some old N64 games in Japanese. However, the articles about the N64's region locking usually assume Japanese games on an American console...  My question thus is: Can you play a Japanese N64 Game on a European console? How can I determine accuracy of past probability calculations? I do not study statistics but engineering, but this is a statistics question, and I hope you can lead me to what I need to learn to solve this problem.    I have this situation where I calculate probabilities of 1000's of things happening in like 30 days.  If in 30 days I see what actually happened, how can I test to see how accurately I predicted?  These calculations result in probabilities and in actual values (ft).  What is the method for doing this? Thanks, CP Proof that the coefficients in an OLS model follow a t-distribution with (n-k) degrees of freedom Background  Suppose we have an Ordinary Least Squares model where we have $k$ coefficients in our regression model, $$\mathbf{y}=\mathbf{X}\mathbf{\beta} + \mathbf{\epsilon}$$  where $\mathbf{\beta}$ is an $(k\times1)$ vector of coefficients, $\mathbf{X}$ is the design matrix defined by  $$\mathbf{X} = \begin{pmatrix} 1 &amp; x_{11} &amp; x_{12} &amp; \dots &amp; x_{1\;(k-1)} \\ 1 &amp; x_{21} &amp; \dots  &amp;       &amp;   \vdots \\ \vdots &amp;   &amp; \ddots &amp;       &amp;   \vdots \\ 1 &amp; x_{n1} &amp; \dots  &amp; \dots &amp;   x_{n\;(k-1)}     \end{pmatrix}$$ and the errors are IID normal,  $$\mathbf{\epsilon} \sim \mathcal{N}\left(\mathbf{0},\sigma^2 \mathbf{I}\right) \;.$$  We minimize the sum-of-squared-errors by setting our estimates for $\mathbf{\beta}$ to be $$\mathbf{\hat{\beta}}= (\mathbf{X^T X})^{-1}\mathbf{X}^T \mathbf{y}\;. $$   An unbiased estimator of $\sigma^2$ is  $$s^2 = \frac{\left\Vert \mathbf{y}-\mathbf{\hat{y}}\right\Vert ^2}{n-p}$$ where $\mathbf{\hat{y}} \equiv \mathbf{X} \mathbf{\hat{\beta}}$ ().   The covariance of $\mathbf{\hat{\beta}}$ is given by $$\operatorname{Cov}\left(\mathbf{\hat{\beta}}\right) = \sigma^2 \mathbf{C}$$ where $\mathbf{C}\equiv(\mathbf{X}^T\mathbf{X})^{-1}$ () .  Question  How can I prove that for $\hat\beta_i$, $$\frac{\hat{\beta}_i - \beta_i} {s_{\hat{\beta}_i}} \sim t_{n-k}$$ where $t_{n-k}$ is a t-distribution with $(n-k)$ degrees of freedom, and the standard error of $\hat{\beta}_i$ is estimated by $s_{\hat{\beta}_i} = s\sqrt{c_{ii}}$.    My attempts  I know that for $n$ random variables sampled from $x\sim\mathcal{N}\left(\mu, \sigma^2\right)$, you can show that  $$\frac{\bar{x}-\mu}{s/\sqrt{n}} \sim t_{n-1} $$ by rewriting the LHS as $$\frac{ \left(\frac{\bar x - \mu}{\sigma/\sqrt{n}}\right)  }   {\sqrt{s^2/\sigma^2}}$$ and realizing that the numertor is a standard normal distribution, and the denominator is square root of a Chi-square distribution with df=(n-1) and divided by (n-1) ().  And therefore it follows a t-distribution with df=(n-1) ().  I was unable to extend this proof to my question...  Any ideas?  I'm aware of , but they don't explicitly prove it, they just give a rule of thumb, saying "each predictor costs you a degree of freedom". “Unable to Connect to World” Minecraft PE 1.16.201 So my brother and I have been playing Minecraft together on our iPads for years now, but in September I got a new iPad Pro 3rd Generation and I’ve been having issues with Minecraft ever since. Every time we have tried to join each other’s worlds we get the message “Unable to connect to world”. Recently after the update on December 16th, it worked for about a week without having any issues, but now it has gone back to not letting us connect to the worlds. Both of us are able to connect to other people’s worlds, but not each other’s, we’ve tried many things to fix this but so far nothing has worked. If you have any ideas for what we should do please let me know, thank you so much! Get total amount of time between records when changed state I have a table, showing the status (healthy, broken) for each device at a given timestamp. I need to get the total amount of time of a whole breakdown.  So the data is stored like this:  device_owner   device_id    timestamp          status owner1         device_1     2001-01-01 09:00   0 owner1         device_2     2001-01-01 09:15   0 owner1         device_1     2001-01-01 09:30   1 owner1         device_2     2001-01-01 09:45   1   and so on.  The example above shows    device_1 was down from 09:00 to 09:30 (total 30 mins),   device_2 was down from 09:15 to 09:45 (total 30 mins)   What I need  Need to calculate the total amount of time for the whole breakdown for owner_1 will be 45 mins (from 09:00 to 09:45) instead of 60 mins (30 + 30).  device_owner   total_breakdown_min owner_1        45   What I've done  Currently I can define a breakdown time for each device separately (device_1 = 30mins, device_2 = 30mins). For this I transformed the table using LEAD over partition by device_owner, device_id and date part from timestamp:  device_owner  device_id     timestamp        status lead_timestamp   lead_status owner1        device_1     2001-01-01 09:00   0     2001-01-01 09:30     1 owner1        device_1     2001-01-01 09:30   1     NULL                 NULL owner1        device_2     2001-01-01 09:15   0     2001-01-01 09:45     1 owner1        device_2     2001-01-01 09:45   1     NULL                 NULL   So the datetime difference between timestamp and lead_timestamp in sum gives me the total breakdown time for a device.  ;WITH LeadStatus AS (     SELECT         D.*,         lead_status = LEAD(D.status) OVER (PARTITION BY D.device_owner, D.device_id, D.date ORDER BY D.datetime ASC),         lead_timestamp = LEAD(D.datetime) OVER (PARTITION BY D.device_owner, D.device_id, D.date ORDER BY D.datetime ASC)     FROM         #DeviceStatus AS D ) SELECT * FROM LeadStatus   It is the same device list for any owner. The data snapshot is to be taken between 2 dates (StartDate, EndDate). The records are written to a DB each n seconds and also when the device status changes. If $X,Y$ are independent $\chi ^2$ with $m$ and $n$ degrees of freedom, then $\frac{X}{X+Y} \sim\beta(m/2, n/2)$ I was reading  and I find the following problem: Let $X$ and $Y$ be independent $\chi ^2 $ with $m$ and $n$ degrees of freedom then $\dfrac{X}{X+Y} = \beta(m/2, n/2)$. Where $\chi^2(k)$ has density function $$f_{\chi^2(k)}(x)=\begin{cases}\displaystyle \frac{1}{2^{k/2}\Gamma(k/2)}\,x^{(k/2) - 1} e^{-x/2}&amp;\text{if }x&gt;0,\\ 0&amp;\text{if }x\le0 \end{cases} $$  I proved that $X+Y$ is $\chi ^2$ with $n + m$ degrees of freedom using the moment-generating function. If $Z=X+Y$ and $U=\dfrac{X}{X+Y}=\dfrac{X}{Z}$ using the formula for the density of the ratio of two independent random variables: $$f_U(u)= \int_{-\infty}^{\infty}f_X(uv)f_Z(v)|v|dv $$  then  $$\dfrac{u^{m/2-1}}{2^{(m+n/2)} \Gamma(m/2) \Gamma((m+n)/2)} \int_0^{\infty} v^{m+\dfrac{n}{2}-1} e^{-(v/2)(u+1)}dv $$  and using some algebra:  $$f_U(u)=\dfrac{u^{m/2-1} \Gamma(m+n/2)}{\Gamma(m+n/2) \Gamma(m/2) (u+1)^{m+n/2}}$$  and this is not $\beta(m/2, n/2)$, it looks more like $\beta(m/2, m/2+n/2)$ but $(u+1)^{m+n/2}$ is causing troubles.  I need help if something is false or any hint. Run a command without making me wait On the CLI, sometimes a command I type takes a while to complete, and sometimes I know when that's about to happen. I'm a bit confused on "backgrounding" and such in Linux.  What is the most common (or user-friendly way) of telling the CLI that I don't want to wait, please give me back my prompt immediately. And if it could give me a progress bar or just busy-spinner, that would be great! Use filecontents environment to write a binary file In  of mine, I was trying to show how to embed an audio file into the pdf with the multimedia package. The resulting MWE does not stand on its own because it requires an example audio file.  I guess my first question is, does TeXLive include any example audio files? The second, and potentially less uninteresting question is, can I use the filecontents environment, or some other environment, to create a binary file?  \documentclass{article} \usepackage{graphicx} \usepackage[implicit=false]{hyperref} \usepackage{multimedia}  % What goes in here to produce a usable wav file. Happy to use a different environment. \begin{filecontents}{\jobname.wav} \end{filecontents}  \begin{document} \sound[inlinesound]{\includegraphics{example-image}}{\jobname.wav} \end{document} How to control Windows 7 snap feature with two monitors? There is an  feature in Windows 7. However, it seems to not work when dragging a window to the edge that is adjoined to the second monitor. How to make it work properly? Maybe some regedit modification or something? error in python d not defined. How are percentiles calculated in Careers 2.0? I noticed that a percentile is placed at the top of my resume in Careers 2.0.    How are these percentiles calculated? Is there a certain threshold you need to be over in order for it to be displayed?