... namely that if $n &gt; 1$ and $(n − 1)!\equiv−1\pmod{n}$, then $n$ is prime.  This is for a number theory class I'm in at Penn State. My idea is to follow accordingly, but I can't get it concretely..  Reason by contradiction, suppose that $n$ is not prime.   Then $n = ab$, where $1 &lt; a, b &lt; n$  In particular $(n-1)! = ai$ for some $i\in\Bbb{Z}$. $\\$ If $(n-1)! = nj - 1$ for some $j\in\Bbb{Z}$ then it follows that a probably doesn't divide $-1$?
How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks.
I don't understand this and I'm now worried as I have donated to a lot of servers and I don't want to lose this account. On the launcher it says my new username but when I log on it says "Account not Authenticated with minecraft.net" and "Non-Valid Username".  How can I regain the ability to use my account online? ASCII to Binary and Binary to ASCII conversion tools? Which is a good tool to convert ASCII to binary, and binary to ASCII?  I was hoping for something like:  $ echo --binary "This is a binary message" 01010100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01100001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01101101 01100101 01110011 01110011 01100001 01100111 01100101   Or, more realistic:  $ echo "This is a binary message" | ascii2bin 01010100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01100001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01101101 01100101 01110011 01110011 01100001 01100111 01100101   And also the reverse:  $ echo "01010100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01100001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01101101 01100101 01110011 01110011 01100001 01100111 01100101" | bin2ascii This is a binary message   PS: I'm using bash  PS2: I hope I didn't get the wrong binary Why does water pouring from a glass sometimes travel down the side of the glass? If you have a glass of water, say, three quarters full and you pour it at an angle of say, $45^{\circ}$ with respect to the the table, the water comes out of the glass and goes directly down towards the floor.  However, when the glass is more full, or even three quarters full and the 'angle of pouring' is far less with respect the table, when the water comes out of the glass, rather than going straight down it kind of stays stuck to the glass and travels down the outside of it.  Why does this happen? (I'm sure many of you have observed it yourself by accident and ended up making a mess). One of the most common security best practices these days seems to be . I've never really found a good explanation for that, but I'm assuming it's to minimize the risk of a  malicious or infected script within the webroot from reading the database password.  But, you still have to let WordPress access it, so you need to expand open_basedir to include the directory above the document root. Doesn't that just defeat the entire purpose, and also potentially expose server logs, backups, etc to attackers?  Or is the technique only trying to prevent a situation where wp-config.php would be shown as plain-text to anyone requesting http://example.com/wp-config.php, instead of being parsed by the PHP engine? That seems like a very rare occurance, and it wouldn't outweigh the downsides of exposing logs/backups/etc to HTTP requests.  Maybe it's possible to move it outside the document root in some hosting setups without exposing other files, but not in other setups?    Conclusion:  After a lot of back-and-forth on this issue, two answers have emerged that I think should be considered the authoritative ones. Aaron Adams makes a good case in  wp-config, and chrisguitarguymakes a good . Those are the two answers you should read if you're new to the thread and don't want to read the entire thing. The other answers are either redundant or inaccurate. I'm looking for some way to run a batch file (.bat) without anything visible to the user (no window, no taskbar name, .etc..).  I don't want to use some program to do that, I'm looking for something cleaner. I've found  that uses VBScript, but I don't really like using VBS, either. I have dual US and UK citizenship, but the US citizenship has only just been realized (wasn't aware I had claim to US citizenship earlier).  Unfortunately I haven't received my US passport yet. Can I still travel to the US only using my UK passport?  I understand that the US does require citizens to travel on a US passport, but would they even know that I am a dual citizen if I've only ever traveled on my UK passport? (Especially considering that my US passport has never been used before in any form - as I haven't received it).  If I was only entering the US for a small trip,  would it show on the screen that I also have US citizenship when they scan my UK passport? Long ago someone demonstrated the following card trick with a standard 52-card deck:  (1) A volunteer selects 5 cards from a shuffled deck, which the performer does not see.  (2) The assistant puts exactly 4 of those in a pile and passes it to the performer.  (3) The performer can then identify the 5th card.  There are a few ways to execute this trick, one of which goes as follows.  (1) The assistant finds a suit common to 2 of the 5 cards, with values $x$ and $y$ modulo $13$.  (2) He then removes one of them, say $x$, such that $x-y \in [1..6]$ modulo $13$.  (3) He then puts the other one at the top of the pile.  (4) And he puts the 3 other cards after that in a permutation corresponding to $x-y$ modulo $13$.  Since (1) works by pigeonhole, (2) works because $\frac{13-1}{2} = 6$, and (4) works because there are 6 possible permutations of 3 cards, the trick succeeds. My question is whether the same trick can work with more than 52 cards. It is not obvious to me how to do so, nor compute the maximum number of (pairwise distinct) cards possible. Also, it seems to me that even if the trick can be made to work for $n$ cards, it may not work for $n-1$ cards! Any ideas? Tags are not showing up on the right side of the screen This is on Stack Overflow. On Meta I'm able to see what the tags are on the right side of the screen. In fact, I think yesterday or some point earlier today I saw tags on the right side of the screen (I can't screenshot or remember correctly).  It's right above the asked and active heading.  I know this is minor but what happened to it? It might be useful for browsing instead of having to look at the bottom of the question post.    Found an image on Google and it shows the tags on the right side of the screen: Optional argument to \item I want to filter a java.util.Collection based on a predicate. Is it possible to flash a custom ROM without a custom recovery image For an un-rooted device, almost all articles/forum posts I've read say that in order to flash a custom ROM you first need to flash (or boot) a custom recovery image like TWRP.   I'm not sure I understand why. If the bootloader is unlocked shouldn't it be possible to manually flash images that make up the custom ROM to the required partitions with fastboot flash &lt;partition&gt; [ &lt;xxxx.img&gt; ], and leave the stock recovery untouched.  I realize that this may be difficult and that there is no benefit in doing it this way, but I'm curious to know whether or not it is possible, and if not, why? Cannot Upgrade Xcode 11 to Xcode 11.1 I'm unable to upgrade Xcode 11GM to 11.1 for some time on my Mid 2014 MacBook Pro running macOS Catalina. I've installed Xcode from Mac AppStore ages ago (IIRC circa 2014), and upgraded step by step since then. Currently, I'm experiencing the following loop:   AppStore reports that I have an update. I open AppStore, open updates, click "Update" on Xcode. Mac Downloads ~2.5GB first. Installs that patch. Continues to get the full package (~7.6GB). It starts to install. After some churning and install, it reports "Cannot download Xcode now, please try again later."   I have more than enough space on the disk, and nothing is modified in Xcode or in the OS (no homebrew or something similar).  Did anyone experience something similar? Are there solutions to this? i have a simple sort of a database file which consists only of entries in the following format     variable=value   i want to create a simple vim syntax highlighting for it and set it for specific file extension  for instance, variable part could be light blue, and value part light red  i googled it and came across things such as $vimruntime\syntax\, syntax set=, syntax match, and hi keywords, but couldn't set it up myself eventually  so i want a very simple vim code snippet that would realize it by matching the left and right hand sides and coloring them separately How can I Remove .DS_Store files from a Git repository? How can I remove those annoying Mac OS X .DS_Store files from a Git repository? How to detect if JavaScript is disabled? There was a post this morning asking about how many people disable JavaScript. Then I began to wonder what techniques might be used to determine if the user has it disabled.   Does anyone know of some short/simple ways to detect if JavaScript is disabled? My intention is to give a warning that the site is not able to function properly without the browser having JS enabled.   Eventually I would want to redirect them to content that is able to work in the absence of JS, but I need this detection as a placeholder to start. Is there a good tool/program that allows me to clone a system drive to another, smaller hard drive?  I've bought a new 64GB SSD drive and would like to move my current Windows 7 Professional 64-bit installation to that new drive. My current drive is a 200GB SATA drive with one partition only. Of course there's enough free space to shrink my current partition to less than 64GB. Every countably generated sigma algebra is generated by a random variable How to access the system tray using the keyboard? Is there a way I can access the system tray items using the keyboard in Windows XP? Prevent users from submitting a form by hitting Enter I have a query to insert a row into a table, which has a field called ID, which is populated using an AUTO_INCREMENT on the column. I need to get this value for the next bit of functionality, but when I run the following, it always returns 0 even though the actual value is not 0:  MySqlCommand comm = connect.CreateCommand(); comm.CommandText = insertInvoice; comm.CommandText += "\'" + invoiceDate.ToString("yyyy:MM:dd hh:mm:ss") + "\', " + bookFee + ", " + adminFee + ", " + totalFee + ", " + customerID +  ")"; int id = Convert.ToInt32(comm.ExecuteScalar());   According to my understanding, this should return the ID column, but it just returns 0 every time. Any ideas?  EDIT:  When I run:  "INSERT INTO INVOICE (INVOICE_DATE, BOOK_FEE, ADMIN_FEE, TOTAL_FEE, CUSTOMER_ID) VALUES ('2009:01:01 10:21:12', 50, 7, 57, 2134);last_insert_id();"   I get:  {"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_insert_id()' at line 1"}