The Question:  Let $n=(6t+1)(12t+1)(18t+1)$, where $t\in \Bbb Z$ and $6t+1$, $12t+1$, $18t+1$ are prime, and $(a,n)=1$.  Show that $a^{n-1} \equiv 1\pmod n$.    My Thoughts:  This blatantly looks like Fermat's Little Theorem, but I can't seem to find a way to adapt the proof of it for this question.  In particular, the proof of FLT fails in the last step in this case when you divide by $(n-1)!$:  $$a^{n-1}(n-1)! \equiv (n-1)! \pmod n \implies a^{p-1} \equiv 1 \pmod n$$  is a false statement because $(n-1)!$ is in fact a multiple of $n$.  Any hints?
Suppose k is an integer such that $6k + 1$, $12k + 1$, $18k + 1$ are primes. Show that $n = (6k + 1)(12k + 1)(18k + 1)$ is a Carmichael number.  This is a question on a past exam that I find difficulty to answer. Can anyone help?
I've been testing PCA via SVD to decompose a simple time series data matrix, $X$.  I have two signals $x_1(t)$ and $x_2(t)$ in a data matrix where $M$ rows represents each timepoint sample and each column represents $x_1$ and $x_2$.  The mean signal, $\hat{x}$, is defined as the mean along the row axis (average of $x_1$ and $x_2$ along each timepoint).  I normalize each column of $X$ by subtracting its mean and dividing by the standard deviation.  When I use [U S V] = svd(Xz) in matlab, regardless of how the variables are distributed (whether they are correlated or uncorrelated), one of the columns of the right singular matrix, V, always points in the same direction (to a multiplicative constant) as the mean vector $(1/2, 1/2)$.  But when add an additional third time series, this is never the case (where the mean vector is $(1/3, 1/3, 1/3)$.  Because I normalize the standard deviation for each vector, it does make sense that the direction of most variance given by PCA would be the diagonal 45 degree line.  But if both variables $x_1$ and $x_2$ are independent gaussians, couldn't the PCA direction be any direction since the distribution is radially symmetric?  MATLAB Code:  s = RandStream('mcg16807', 'Seed', 0); RandStream.setDefaultStream(s);  G = zeros(1000,2); G(:,1) = 40*randn(1000,1)-100; G(:,2) = tan(G(:,1)) + randn(1000,1); X = G - repmat(mean(G),[size(G,1), 1]); Xz = X./repmat(std(G),[size(G,1), 1]); [U S V] = svd(Xz); G_mean = mean(Xz,2); corrcoef(G_mean, U(:,1)) corrcoef(G_mean, U(:,2)) How to order the Ubuntu Phone? Yes, of course, I want that Ubuntu Phone.   Where is the order now button? In Bash, when to alias, when to script, and when to write a function? It's taken me almost 10 years of Linux usage to ask this question. It was all trial and error and random late-night internet surfing.  But people shouldn't need 10 years for this. If I were just starting out with Linux, I'd want to know: When to alias, when to script, and when to write a function?  Where aliases are concerned, I use aliases for very simple operations that don't take arguments.   alias houston='cd /home/username/.scripts/'   That seems obvious. But some people do this:  alias command="bash bashscriptname"   (and add it to the .bashrc file)   Is there a good reason to do that? I'm trying really hard, but I genuinely can't think of any circumstances in which I'd want to do that. So, if there is an edge case where that would make a difference, please answer below.  Because that's where I would just put something in my PATH and chmod +x it, which is another thing that came after years of Linux trial-and-error.  Which brings me to the next topic. For instance, I added a hidden folder (.scripts/) in the home directory to my PATH by just adding a line to my .bashrc (PATH=$PATH:/home/username/.scripts/), so anything executable in there automagically autocompletes.  If I needed to.  I don't really need that, though, do I? I would only use that for languages that are not the shell, like Python.  If it's the shell, I can just write a function inside the very same .bashrc:  funcname () {   somecommand -someARGS "$@" }   As I stated, I found a lot of this out through trial and error. And I only truly saw the beauty of functions when my computer died and I was forced to use the computers of the people around me when they weren't using them.   Instead of moving a whole directory of scripts from computer to computer, I ended up just replacing everyone else's .bashrc with my own, since they had never even made a single modification.  But did I miss anything?   So, what would you tell a beginning Linux user about when to alias, when to script, and when to write a function?   If it's not obvious, I'm assuming the people who answer this will make use of all three options. If you only use aliases, or only use scripts, or only use functions—or if you only use aliases and scripts or aliases and functions or scripts and functions—this question isn't really aimed at you. How to handle a native OS (Ubuntu) file upload window in selenium webdriver with python? This is my first time here but I have already posted this question on SO. I keep getting solutions for Windows + Java and not for Linux or python for that matter.  I am using Selenium and Python to automate a file upload application for the past many hours but nothing helpful!   The HTML DOM structure for this file upload is an input tag with its type attribute value = 'file'. I know I can make use of the send_keys.   The problem is I am not supposed to use send_keys() (as per the question I am trying to solve). The assumption is there are other ways of doing it.  Can anyone suggest me alternative ways to upload the file? I do get solutions for windows but not for Linux(Ubuntu). I know there are applications/tools to automate GUI components like AutoIt but there is nothing for Linux close to AutoIt.  I can say I have done my homework to find a solution. Only after not finding anything useful, I am asking this question, please help! Should I sign, watermark or otherwise label a framed print? And if so how? I have an opportunity to show some of my work in a small local coffee shop.  Are there any guidelines/practices to signing, labeling or watermarking a photo which is to be on display?  Or should a photo be signed, labelled or marked at all? Is signing the back of the photo and showing my name on a separate card below the frame itself the "better" way to do this?   I noticed many people on the web put a very noticeable watermark with their logo, copyright and name right on the photo.  Personally, I find this distracting as it often ruins the photograph itself often turning what could be art to kitsch. Painters most often sign the painting itself but this to me is not distracting because it is done with the painter's own hand and it often "works" with the painting. One of my coworkers has provided me with a Bash syntax that I am unfamiliar with.  My Google foo has failed me on figuring out what it does and why/when I should use it.    The command that he sent me was of this form:  someVariable=something command   Initially, I thought that this was equivalent to the following:   someVariable=something ; command   Or  someVariable=something  command   But this doesn't appear to the be case.  Examples:   [Jan-03 11:26][~]$ # Look at the environment variable BAZ. It is currently empty [Jan-03 11:26][~]$ echo $BAZ  [Jan-03 11:27][~]$ # Try running a command of the same format     [Jan-03 11:27][~]$ BAZ=jake echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:27][~]$ # Now, echo BAZ again. It is still empty:     [Jan-03 11:27][~]$ echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:28][~]$     [Jan-03 11:28][~]$ # If we add a semi-colon to the command, we get dramatically different results: [Jan-03 11:28][~]$ BAZ=jake ; echo $BAZ jake [Jan-03 11:28][~]$ [Jan-03 11:28][~]$ # And we can see that the variable is actually set: [Jan-03 11:29][~]$ echo $BAZ jake [Jan-03 11:29][~]$   What does this syntax do?  What happens to the variable that has been set?  Why does this work? Can I secretly kill every guard in a town? Is it possible to kill all of the guards in a town?  Ideally, I'd like to do this secretly so the entire town doesn't see my deeds and put a bounty on my head.  Edit: I was questing in Markarth and was told by a guard to back off and stop being nosy. I didn't and when I went to the Shrine of Talos I was set upon by a bunch of guards.  Now I have a huge bounty and I had to sneak/kill my way out of the city.  Every time I killed a group of guards the bounty was reduced by $1000, but I still have a $30,000 bounty.  I haven't even been through 1/3 of the city yet and know there has to be a lot of quests, so what do I do?  The only solution seems to kill every single guard (and inhabitant). Where in Qt Creator do I pass arguments to a compiler? Duplicity Backup Browse I have made a duplicity backup with Ubuntu 14.04 in another laptop of my home directory.  I copied all duplicity back files to my current laptop to "/home/user/Ubuntu-backup"  How do i browse the content of that backup see if it is worth restoring? I want to restore how do i restore from those files. Open chrome and launch the settings page Need polite phrases expressing disagreement with the information/conclusions of another person, especially an educator Windows 7, file properties, date modified, how do you show seconds? Anyone know a way to immediately show the seconds of a file's date modified property in the GUI? So if you create a file, any file in any directory, right-click and choose Properties, the date modified (if it's recent) will say something like "dd/mm/yyy hh:mm, one minute ago" - reminder this is in Windows 7. Windows XP did it normally. Then they changed something.  If you wait a while, eventually you'll see the seconds, I'm not sure how long a while is, but this is incredibly annoying if you want to troubleshoot something that relies on the seconds of timestamps... is there a setting? registry key I can change perhaps?  I'm literally using Chrome, pasting in the path of the directory to be able to see the seconds quickly (as a workaround) but would be nice to be able to use Win7. How is unattended-upgrades started and how can I modify its schedule? I'm wondering who starts unattended-upgrades in my debian-jessie:   my man page   DESCRIPTION    This program can download and install security  upgrades  automatically    and  unattended,  taking care to only install packages from the config‐    ured APT source, and checking for dpkg prompts about configuration file    changes. All output is logged to /var/log/unattended-upgrades.log.    This  script  is  the backend for the APT::Periodic::Unattended-Upgrade    option and designed to be run from cron (e.g. via /etc/cron.daily/apt).  But my crontab doesn't show anything by crontab command:  @stefano:/etc/cron.daily$ crontab -l no crontab for stefano # crontab -l no crontab for root  But my unattended-upgrade work fine!(my unattended-upgrades log file) :  2017-02-05 12:42:42,835 INFO Initial blacklisted packages:  2017-02-05 12:42:42,866 INFO Initial whitelisted packages:  2017-02-05 12:42:42,868 INFO Starting unattended upgrades script 2017-02-05 12:42:42,870 INFO Allowed origins are: ['o=Debian,n=jessie', 'o=Debian,n=jessie-updates', 'o=Debian,n=jessie-backports', 'origin=Debian,codename=jessie,label=Debian-Security'] 2017-02-05 12:43:15,848 INFO No packages found that can be upgraded unattended   Where do I have to check/modify if I want to change my schedule? The limit of reciprocal is the reciprocal of the limit While I was reading the book Exploratory examples for real analysis, I came across this:     to show that : $$\lim_{x\rightarrow x_o}\frac{1}{h(x)} = \frac{1}{\lim_{x\rightarrow x_o}{h(x)}} = \frac{1}{M}$$      Discussion:Let $\epsilon \gt 0$.we want to find $\delta \gt 0$ such that       if  $0 \lt |x-x_0| \lt \delta $,then $\Big|\frac{1}{h(x)}-\frac{1}{M}\Big|\lt \epsilon$.      In order to get expression involving $|h(x)-M|$,we first find the common denominator:        $\Big|\frac{1}{h(x)}-\frac{1}{M}\Big|=\Big|\frac{M-h(x)}{M~h(x)}\Big|$      $~=\Big|\frac{h(x)-M}{|M|~|h(x)|}\Big|$.      As we have to deal with variable term $|h(x)|$ in denominator.We can construct bound .Let $\epsilon =\frac{|M|}{2}$ ,since lim$_{x\to x_o}h(x)=M$,there exists $\delta_1\gt 0~~$ s.t.       if $0 \lt |x-x_0| \lt \delta_1 $,then $|h(x)-{M}|\lt \frac{|M|}{2}$.      As you study steps below,identify that step where $h(x)\neq 0$ for all $0 \lt |x-x_0| \lt \delta_1 $ plays a critical role:      $|M|=|M-h(x)+h(x)|$      $~~~~~~\leq |M-h(x)|+|h(x)|$      $~~~~~~= |h(x)-M|+|h(x)|$      $~~~~~~\lt \frac{M}{2}+|h(x)| \implies$      $\frac{|M|}{2} \lt |h(x)| \implies$      $\frac{1}{h(x)}\lt \frac{2}{|M|}$,where $0 \lt |x-x_0| \lt \delta_1 $.      Now that we've bound for $1/h(x)$,we can apply the definition to term $|h(x)-M|$.      Since     lim$_{x\rightarrow x_o}h(x)=M$,we can find $\delta_2 \gt 0$ such that,       $~~~~~~~~~~~~~~~~~~~~~~~~~~~~$if  $0 \lt |x-x_0| \lt \delta_2$, then $|h(x)-M|\lt \frac{|M|^2 \epsilon }{2}$   The thing I can't understand is for what purpose did the author work with such complicated expression involving $\epsilon $ in the end of the discussion? For the ring $\Bbb{Z}[\sqrt{d}]=\{a+b\sqrt{d}\mid a,b \in \Bbb{Z}\}$ where $d$ is not divisible by the square of a prime, prove that the norm $N(a+b\sqrt{d})= |a^2-db^2|$ satisfies the assertions: $N(x)=0$ if and only if $x=0$; $N(xy)=N(x)N(y)$ for all $x$ and $y$; $x$ is a unit if and only if $N(x)=1$; and if $N(x)$ is prime, then $x$ is irreducible in $\Bbb{Z}[\sqrt{d}]$. Is there a limit to Rule 0? Rule Zero: All other rules can be changed by the GM.   I appreciate that there is a massive amount of work that goes into being a GM and the last thing that any GM wants or deserves is to have his players constantly questioning everything they do. However, a group I am currently playing with has been having a huge problem with a GM who has been using rule 0 to deny virtually every skill check and give all his custom enemies powers that have either no save or unbeatable DCs. Then, whenever he realizes he has made the fight unwinnable he brings in one of his level 60+ GMPCs to instantly win the fight, making us feel even more helpless.  We try to hold our tongues and not be the dreaded Rules Lawyer, but he keeps pulling out stuff so ridiculous that we have to question it… and every time we do we find that he is either misunderstanding or completely disregarding the rules. When this happens he always jumps immediately to rule 0. He probably cited rule 0 around 6 times in our last session (and we only had one combat encounter). How can I take shallow depth of field photos with a point-and-shoot camera? I have a compact digital camera, and in macro mode I can manage to achieve a blurred background, if the background is far enough away. Can this be done when taking non-macro pictures, and if not, is there a way to simulate it?  When I shoot portraits with my brother's DSLR, it is quite easy to fade out the background. But with my point and shoot camera, I haven't been able to take such photos.   I choose a large aperture for my camera but it still doesn't work. I know that standing further and zooming will result in a smaller depth of field, but it doesn't seem to be enough to get the really nice "bokeh" look. I've tried macro mode, and that will work if the subject is close enough and the background far enough away, but how can it be done with non-macro pictures?   Why are DSLR cameras are so much better in this area? What are the general recommendations to do this using a compact or super-zoom camera? Find four groups of order 20 not isomorphic to each other and prove why they aren't isomorphic.   So far I thought of $\mathbb Z_{20}$, $\mathbb Z_2 \oplus\mathbb Z_{10}$, and $D_{10}$ (dihedral group), but I can't find another one. Would $U(50)$ work? I know it has order 20 and is cyclic but I'm not exactly sure how to move from there. Can someone to point me on the right direction? What kind of ship was flying away from Rey in her flashback? The ship flying away from Rey in her flashback of being left on Jakku looks like one of the ships in the group that takes her away when she is captured.  If so, and it is a First Order ship that dropped her off, this is an interesting Easter egg. Where's the energy in a boosted capacitor? Suppose I look at a parallel plate capacitor in its rest frame and calculate the electrostatic energy, $E$.  Next, I look at the same capacitor in a primed frame boosted in the direction perpendicular to the plane of the plates. In this frame, the $E$-field is the same strength, there is no magnetic field, and the volume over which the $E$-field extends is less by a factor $1/\gamma$. This suggests $E' = \frac{1}{\gamma} E$, but relativity states that energy transforms as $E' = \gamma E$.   Where is the missing energy?