Consider the $n\times n$ matrices with elements in $\mathbb{Z}_{29}$. How many of these are invertible?    In total there are $29^{n^2}$ matrices of of dimension $n\times n$. Now I need to find how many of these are invertible modulo $29$. My plan of attack is to find how many are not invertible and then subtract this amount. A matrix $A$ is not invertible modulo 29 if and only if $$\det{(A)}\in\mathbb{Z}_{29}^\times\iff \gcd{(\det{A},29)}=1.$$  Now I'm not really sure how to advance any further. Clearly if $\det{A}&lt;29$ then the gcd is $1$ since $29$ is prime, but how do we analyse larger determinants?
Let $\mathbb{F}_3$ be the field with three elements. Let $n\geq 1$. How many elements do the following groups have?   $\text{GL}_n(\mathbb{F}_3)$ $\text{SL}_n(\mathbb{F}_3)$   Here GL is the , the group of invertible n×n matrices, and SL is the , the group of n×n matrices with determinant 1.
java.rmi.NoSuchObjectException: no such object in table I am writing a very simple RMI server, and I am seeing intermittent java.rmi.NoSuchObjectExceptions in the unit tests.   I have a string of remote method calls on the same object, and while the first few go through, the later ones will sometimes fail. I am not doing anything to unregister the server object in between.  These error do not appear always, and if I put in breakpoints they tend to not appear. Are those Heisenbugs, whose race conditions dissolve when looking at them through the slowed down execution of the debugger? There is no multi-threading going on in my test or server code (though maybe inside of the RMI stack?).  I am running this on Mac OS X 10.5 (Java 1.5) through Eclipse's JUnit plugin, and the RMI server and client are both in the same JVM.  What can cause these exceptions? How do I get an animated gif to work in WPF? What control type should I use - Image, MediaElement, etc.? What's the best way to check if a String represents an integer in Java? I normally use the following idiom to check if a String can be converted to an integer.  public boolean isInteger( String input ) {     try {         Integer.parseInt( input );         return true;     }     catch( Exception e ) {         return false;     } }   Is it just me, or does this seem a bit hackish?  What's a better way?    See my answer (with benchmarks, based on the  by ) to see why I've reversed my position and accepted  to this problem.  I think this original code will be used by most people because it's quicker to implement, and more maintainable, but it's orders of magnitude slower when non-integer data is provided. Need linebreaks in some columns of a wide table I am trying to create linebreaks in some of the cells of my table, since I have long sentences and the table doesn't fit on an A4 page. How to let LaTeX choose the linebreaks?  Here is my code   \begin{table}[hbt] \centering \begin{tabular}{lllllll}     \toprule     &amp;  Raumgewicht $\gamma$'$_m$ and [$\frac{kN}{m^3}$] &amp;Reibungswinkel $\phi$'$_m$[]&amp; Kohäsion c'[] &amp; M$_E$-Wert []&amp; N$_SPT$ [] &amp; k-Wert []  \\     \midrule     Auffüllungen/Deckschicht&amp; 18&amp; 27 &amp; 0 &amp; 10* &amp; 17 &amp; -\\     Rückstausedimente nicht vorbelastes&amp; 21 &amp; 28 &amp; 10 &amp; 10 &amp; 15 &amp; $5\times10^-8$ - $1\times10^-6$ \\     Rückstausedimente vorbelastet &amp; 22 &amp; 32 &amp; 10 &amp; &gt;50 &amp; 91 &amp; $5\times10^-8$ - $1\times10^-6$ \\     Moräne &amp; 22 &amp; 36 &amp; 5 &amp; &gt;50 &amp; &gt;100 &amp; $1\times10^-8$ - $5\times10^-6$\\     \bottomrule \end{tabular} \caption{Bodenkennwerte} \label{tab:Bodenkennwerte} \end{table}   My preamble is  \documentclass[12pt,a4paper]{scrartcl} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{booktabs} \usepackage{stackengine} \usepackage[top=3cm, bottom=2.5cm, left=2.5cm, right=2.5cm, footskip = 1cm]{geometry} \usepackage{hyperref} Let $A$ be a non-empty set and $n$ be the number of elements in $A$, i.e. $n:=|A|$.  I know that the number of elements of the power set of $A$ is $2^n$, i.e.  $|\mathcal{P}(A)|=2^n$.  I came across the fact that exactly half of the elements of $\mathcal{P}(A)$ contain an odd number of elements, and half of them an even number of elements.  Can someone prove this? Or hint at a proof? How can I find the difference between two angles? Are there either examples, or a mention of this having happened, of students permanently transferring from one magical school to another in Potterverse?  Canon only please (books/JKR/Pottermore).  Please note that I am only asking about transfers, e.g. you must already be studying in one school. Therefore an example of Malfoys considering sending Draco to Durmstrang is not in scope, since that happened before he attended Hogwarts. Also, guest-studying during Tri-Wizard doesn't count as it wasn't permanent.  Also, if the answer is a "no", please provide evidence (other than "well I read the books before and I don't remember a single case like that", unless you have eidetic memory) from entire canon. How do I find the index of an element in a list in Racket? Check if element found in array c++ NOTE: Signing up or Logging in via OpenID is no longer officially supported from any of our sites. Currently,  is still on the internet, but we are in the process of completely removing it.    Stack Overflow was an early and strong supporter of . We built our sign up/log in flow around it. We were idealistic and had , but these hopes weren't realized. Over the years people have wondered if  is . We've had to remove support as OpenID providers  or .  The time has come to part ways. The reality is OpenID support has created a ton of complexity in our codebase and the number of users actively using OpenID simply don't justify that cost. Users have spoken with their actions. You prefer Google, Facebook and Stack Exchange (aka email/PW) based account auth.     Of our 9,813,747 accounts around one-tenth of a percent are actively using OpenID (defined as having visited a site in the past 12 months). If you include all the inactive accounts it is still less than 2.9% of all accounts.  So, what is the plan?   DONE - Remove the ability to create a new account with most OpenID providers DONE - Add the ability to  DONE - Convert Launchpad (used on  ) to OAuth DONE - Remove creating new accounts with Steam from  (Steam removed support for OAuth. Only 454 accounts that use Steam have visited Arqade in the past 6 months.) DONE - We will email all users that rely on deprecated OpenID credentials and request that they  DONE - Run an announcement banner for any user who signs in with deprecated OpenID credentials urging them to  DONE - End support for logging in via OpenID  In progress - Remove  (note: only 0.2% of authorized sites in the last year have been non-Stack Exchange sites.)   Obviously, if your account relies on OpenID, then make life easy and go now and .   If you've forgotten what you credentials you use to login, then  to refresh your memory. If you don't see one of the three account types shown in the image below (Google, Facebook or Stack Exchange) then click the "add more logins" button to add one of them to your account.    Remember, SE OpenID accounts are really email/pw accounts handled through complicated OpenID code path. They will be migrated to a simpler email/pw only code path as a part of this change. No extra work required on your part. I was just reviewing my "capitalization standards" for titles and such and was wondering if there's a macro to do the same thing I'm forced to do by hand nowadays. My personal rules (feel free to disagree/comment on them) are as follows:   the first letter (a number is a letter too for the sake of these rules) always gets capitalized, every word gets capitalized individually, the exception to the rule above (and just the rule above) are  such as prepositions and the like.   In other words: I'd like a capitalization command (like \MakeUppercase) that will capitalize every word not included in a list of words and that will always capitalize the first word of its argument.  Doable?  PS: one such "list" of closed class words (also known as "function words") can be found . A loss and gain problem This is a very simple but confusing puzzle.  A customer buys goods worth $200$ rupees from a shop. The shopkeeper selling these goods makes zero profit from this purchase.  The lady gives him a $1000$ rupee note.  The shopkeeper has no change, so he goes next door to another shopkeeper to get change for the $1000$ rupee note. He keeps $200$ for himself and returns $800$ to the customer.  Later, the second shopkeeper from next door comes back with the $1000$ rupee note with a stamp on it saying "counterfeit" and takes his money back.  How much loss does the first shopkeeper face? Given a function:  function x(arg) { return 30; }   You can call it two ways:  result = x(4); result = new x(4);   The first returns 30, the second returns an object.  How can you detect which way the function was called inside the function itself?  Whatever your solution is, it must work with the following invocation as well:  var Z = new x();  Z.lolol = x;  Z.lolol();   All the solutions currently think the Z.lolol() is calling it as a constructor. Categorize my data into 3 groups Support for N-Gons (polygons consisting of more than 4 vertices) has been in Blender for a while now, but many of us still may not know when to use them, and how to do so effectively.  In what situations do N-Gons really come in handy? When should they be just plain left out? Do they have any place in finished models? Trying to Remember a Book that explored evolution of Dinosaurs to intelligence and then encountering humans Many, many years ago, I read a book where dinosaurs were assumed to have suvived the K-T event (or it never happened), and they evolved to intelligent species that used not only language (which combined sound, posture, and colour changes on their skin) but also used technology.  In the series, a human is captured or somehow gets integrated with one of the evolved dinosaur groups.  Again, from a very faint memory, the dinosaurs had a level of technology that would be about middle ages, and the humans were much more analogous to American Indian.  That's really all I can recall about the book, and I am trying to find it for my daughter to read.  Can anyone help me out? Why is integration the inverse of differentiation, I mean why do I get the same function when I integrate and then differentiate the result? Start a git commit message with a hashmark (#) How to logout an user from the connected app? NOTE: I am not interested in calling /secur/logout.jsp since it ends all the active salesforce sessions.  I am developing a web application that is registered on salesforce as a connected app, so I am using salesforce credentials to authorize the user.  Application is developed in REST API and the communication with salesforce is happening in restful manner.   Auth url:   Authorization:  Method 1: If there is no salesforce session active, The user is taken to salesforce login page, where he enters his salesforce details to be authorized and after which he is taken to home page of my web application.  Method 2: If there is already a salesforce session active in another tab, the user is directly authorized and is taken to home page of my web application.  Now I am trying to implement logout button for my application, such that the following scenarios are covered,  Scene 1: The user is authorized using method1, and the user press the logout. Upon trying to logback the user is prompted for credentials.  Scene 2:  The user is authorized using method2, and the user should use logout to logout of the web application (not from active sessions). Upon login, the user should be again able to login using method2.  Can someone help me on how to implement the logout button such that it covers scenario 1 &amp; 2.  Thanks in advance. How do I summon a baby mob? In Minecraft Java Edition, one can summon baby zombies and drowned using the IsBaby NBT tag: /summon zombie X Y Z {IsBaby:1b}  Likewise, one can summon baby breedable mobs (Pigs, Cows, etc.) by giving them a negative Age NBT tag (the number of ticks until the mob grows up): /summon cow X Y Z {Age:-100000}  Since NBT is inaccessible from commands in Bedrock Edition, the above commands will not work there. How do I summon baby mobs in Minecraft Bedrock Edition?