Prove $(n-1)! = -1 \ (\textrm{mod n})$ iff n is prime  I can understand how the first part of the proof $(n-1)!=-1 \ (\textrm{mod n})$ is true if n is prime simply by testing it out. However, I'm unsure of how to go about proving it.
How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks.
Difference between LiveCD, LiveUSB, full-install, and persistence? I am currently running Ubuntu as a guest vm on a Win 7 host via VirtualBox, but I would like to have a portable version of Ubuntu when I am not using my laptop.   I am unsure as to the difference between the following:  1)LiveCD with persistence; 2)LiveCD without persistence; 3)LiveUSB with persistence; 4)LiveUSB without persistence; 5)Full-install.   I have a USB flash drive (32GB), and I also have empty DVDs lying around. I know that persistence means that data can be saved, but I am unsure as to which option to choose. What is the difference between a LiveUSB and a full-install on a USB thumbdrive and why would I want to pick one over the other? Thanks for any help. Adding Layer using esriRequest Response in ArcGIS API for JavaScript? For various reasons I need to add layers to a map object using a response returned by an esriRequest to an ArcGIS Server. One reason being the data will change constantly and hard coding FeatureLayer URLs would prove inefficient.  I have successfully been able to return a JSON object containing attribution that appears to be the same data one would see on the layers REST node.     maps = [];  require([     "esri/map", "esri/layers/FeatureLayer",      "esri/dijit/Print", "esri/tasks/PrintTemplate", "esri/request",      "esri/config","esri/dijit/BasemapToggle",      "dojo/_base/array", "dojo/dom", "dojo/parser",  "dojo/domReady!"  ], function (Map, FeatureLayer,Print, PrintTemplate, esriRequest,      esriConfig,BasemapToggle,arrayUtils, dom, parser){  parser.parse();  console.log("Map Start");  esriConfig.defaults.io.proxyUrl = "http://........./proxy.ashx";  maps.addRespLyrs = function addRespLyrs (layer) {     if (layer.type == "Feature layer") {         console.log(layer.name);         maps.map.addLayer(layer);     } };   maps.handleMapInfo = function handleMapInfo (resp) {     console.log("handleMapInfo called");     maps.layers = resp.layers;     console.log(maps.layers);     for (i in maps.layers) {         var layer = maps.layers[i];         maps.addRespLyrs(layer);     } };  maps.layerRequest = function layerRequest () {     var mapInfo = esriRequest({         "url": "https://........./Application Name/MapServer/layers",         "content" : {"f":"json"},         "handleAs" : "json",         "callbackParamName" : "callback"     });     mapInfo.then(maps.handleMapInfo); };  maps.map = new Map("cpCentCent", {     basemap:"topo",     center: [-98.5795, 39.8282],     zoom: 5 });   console.log("Map End");   When attempting to add the data using the addLayer() method I recieve an error thrown from deep with in esri's API.      init.js:199 TypeError: a.id.match is not a function(…) "TypeError: a.id.match is not a function   Any thoughts as to what could be going wrong here or how to create a layer from my JSON? Word for phrases that are examples of what they describe A lady and a monster A famous problem:  A lady is in the center of the circular lake and a monster is on the boundary of the lake. The speed of the monster is $v_m$, and the speed of the swimming lady is $v_l$. The goal of the lady is to come to the ground without meeting the monster, and the goal of the monster is to meet the lady.  Under some conditions on $v_m,v_l$ the lady can always win. What if these conditions are not satisfied?  Edited: the monster cannot swim. If the conditions are not satisfied, then monster can always perform a strategy such that the lady will not escape the lake. On the other hand this strategy is not desirable for both of them because they do not reach their goals. As there was mentioned, this deals with undecidability of the problem. On the other hand, if you imagine yourself to be this lady/monster, you can be interested in the strategy which is not optimal. What is it? If there are such strategies in the game theory?  Edited2: My question is more general in fact. If we have a game with one parameter $v$ when two players $P_1, P_2$ are enemies and if $v&gt;0$ then for any strategy of $P_2$ the player $P_1$ wins. If $v\leq 0$ then for any strategy of $P_2$ there is a strategy of $P_1$ such that $P_2$ does not win and vice versa. I am interested in this case. From the mathematical point of view as I have understood the problem is undecidable since there is no an ultimate strategy neither for $P_1$ nor for $P_2$. But we are solving somehow these problem IRL. Imagine that you are a lady in this game - then you would like to win anyway even while knowing that your strategy can be covered by the strategy of the monster. On the other hand, the monster knows that if he will cover all strategies of the lady she will never reach the shore and he will never catch her. I mean they have to develop some non-optimal strategies. I hope now it's more clear. Why doesn't this perpetual motion machine using the buoyant force work? How discontinuous can a derivative be? There is a well-known result in elementary analysis due to Darboux which says if $f$ is a differentiable function then $f'$ satisfies the intermediate value property.  To my knowledge, not many "highly" discontinuous Darboux functions are known--the only one I am aware of being the Conway base 13 function--and few (none?) of these are derivatives of differentiable functions.  In fact they generally cannot be since an application of Baire's theorem gives that the set of continuity points of the derivative is dense $G_\delta$.  Is it known how sharp that last result is?  Are there known Darboux functions which are derivatives and are discontinuous on "large" sets in some appropriate sense? Show $\operatorname{Aut}(C_2 \times C_2)$ is isomorphic to $S_3=D_6$ Every Function in a Finite Field is a Polynomial Function How to format a USB or external drive? Using Ubuntu 11.10, how do I format an external or USB drive? I don't find an option to 'format' when I right click. In the new version, the drives don't come up on the desktop, but instead come on the Launcher. Can we implement temporary automatic comment ban on 'x' number of validated rude comment flags? There's been problems with abusive comments since the site started.   We still haven't managed to conquer the issue.   Users can be issued chat bans and post bans. The API automatically bans IP addresses with validated spam flags. (Would it be difficult to implement comment bans? Would mods have the power to impose comment restrictions?).   Although comments have been classically referred to as second class citizens, rude comments on the site are the one place that is driving people away.   Can we implement temporary automatic comment ban on 'x' number of validated rude comment flags? It would probably be better if the exact heuristics were not disclosed publicly, much like the serial voting scripts  This question  was asked 7 years ago. Can we revisit it?  This question is related, but is asking for a more complex approach: Efficiently selecting a set of random elements from a linked list Proof Check: Every Cauchy Sequence is Bounded Whenever I'm trying to close a file that has been changed, I get the save file dialog    I remember that the Don't Save button used to have focus, so I could press it using Spacebar, while pressing Enter would click on Save. But now on Lion, I'm unable to find a way to press the Don't Save using keyboard only, since Tab doesn't change focus to anything, and space doesn't work either.  This is the same for all file save dialogs in the system. Is there any way I can press the Don't Save button using keyboard only? Does the Draconic Bloodline sorcerer's Elemental Affinity feature apply to the spell Dragon's Breath? The  feature Elemental Affinity states:     [When] you cast a spell that deals damage of the type associated with your draconic ancestry, you can add your Charisma modifier to one damage roll of that spell.   The  spell (XGtE, p. 154) incorporates a damage roll, but it is not a direct consequence of the spell:     Until the spell ends, the creature can use an action to exhale energy of the chosen type in a 15-foot cone. Each creature in that area must make a Dexterity saving throw, taking 3d6 damage of the chosen type on a failed save, or half as much damage on a successful one.   Would one of these exhalations qualify for the application of the Elemental Affinity feature? If so, is only one eligible or every one throughout the duration of dragon's breath \mathbb{Z} yields undefined control sequence error When we refer to a house that belongs to a family, we say "family's house". Pluralizing family gives us "families". Referring to the houses of several families, we say "families' houses". Forming the plural possessive in such a case is rather simple.  I encountered a more complex use of this recently - referring to a single house owned by a single family in a set of houses owned by a set of families.  We can say "the families' houses" to refer to all of the houses owned by all of the families.  We can say "one of the families' houses" to refer to one of the houses owned by one or more of the families. In this context, "one of" applies to "the families' houses".  If we were instead to apply "one of" to "the families", and want to refer to the one house owned by "one of the families", how would this be written?  My first though was "one of the families's house", taking "one of the families" as a single noun and appending 's to it. This looks (and sounds) a bit strange, though. "One of the families' house" and "one of the family's house"/"one of the family's houses" seem wrong to me, and I can't really determine the correct way to say/write this.  Is there a definitively correct way that this should be written?  EDIT: To clarify, although I think I made it clear, in this context, there are several families, and each owns one house. The goal of the sentence is to refer to one of those houses without stating which specific house. Example: "The players and their families want to celebrate their team's victory; this will likely entail a party at one of the families's house". How can I make a part of a texture glow? How to set file input value when dropping file on page? I have a training set with about 3000 positive instances and 3000 negative instances. But my test data set is pretty much un-balanced. The positive set only has 50 instances and negative has 1500 instances.This causes the precision very low. Are there any approaches to solve this problem? I use SVM to build classifier. I'm trying out  with gnuplot to generate the data.  This works by having pgfplots write some stuff to an external file, run gnuplot on the file, and then use the generated data to plot the graph.  The problem I'm having is that I get different behaviour under xelatex as pdflatex or lualatex.  In xelatex, the data file is littered with ^^I whereas in the other two formats these are tabs.  It appears that the code ^^I is getting stored as a macro which then gets written out to the file, so possibly there's something funny going on with the ^^I syntax: xelatex is reading it literally.  Indeed, when I do \show\pgfplots@TAB (the macro in question) then for pdflatex and lualatex then I get a literal tab whereas for xelatex I get ^^I.  So how do I get a tab in xelatex?  And why isn't \gdef\pgfplots@TAB{^^I} working?  (The previous line in the code, by the way, is \catcode`\^^I=12 - I don't know if that has anything to do with it.)