Find remainder when $777^{777}$ is divided by $16$.   $777=48\times 16+9$. Then $777\equiv 9 \pmod{16}$.   Also by Fermat's theorem, $777^{16-1}\equiv 1 \pmod{16}$ i.e $777^{15}\equiv 1 \pmod{16}$.  Also $777=51\times 15+4$. Therefore,   $777^{777}=777^{51\times 15+4}={(777^{15})}^{51}\cdot777^4\equiv 1^{15}\cdot 9^4 \pmod{16}$ leading to $ 81\cdot81 \pmod{16} \equiv 1 \pmod{16}$.  But answer given for this question is $9$. Please suggest.
How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .
Are there any hash outputs not produced by the MD5 hash function? I need to use it as a placeholder for an empty hash while comparing two hashes. I like using Stack Overflow (or any other Stack Exchange sites) and was wondering if there was an app I could install on my phone or other device that would allow me to use the site on-the-go or straight from my desktop.  Some systems to consider:   Windows 8 Android iPhone/iOS   What are some apps that I could install to my computer or phone to enhance my Stack Exchange experience? How to pull data from internal memory on an unrooted phone? Yesterday, I suddenly discovered that I had lost all the user files on the internal memory of my android phone. All my photos, my music, my PDFs, audio recordings, everything. I will explain the events leading up to this in a separate paragraph below.  I have a Lava Z90 phone and I do not use an external SD card, so I must work with my phone to recover all data. I've been googling and following stuff I get from the internet(including Stack Overflow). Here's what I have done so far.   Tried using photo recovery apps available on Play Store. None of them worked. Decided to go more technical. Enabled USB Debugging and OEM Unlocking from Developer options in my phone. Then I used ADB pull command, pull /dev/block/mmcblk0 /home/data.img to try create an image of the entire internal storage so I can analyse it using PhotoRec. It says pull: not found I assumed this is because my phone isn't rooted?  I tried to root it with the KingoRoot apk but that didn't work. I have Ubuntu on my PC and there is not KingoRoot for Ubuntu. My next step would be to use Wine to run KingoRoot on my machine and try to root my phone that way.   I have the following questions:   How can I create an image, a data dump of my entire internal storage that i can later analyse for my data? Can I do it with an unrooted phone? If not, how can I root my phone with ADB? Am I going about this right? Is there a better, easier way to recover data that I should use instead?   Thank you very much.  How I lost my data  I recently uninstalled the TikTok app from my phone. Yesterday I connected my phone to my PC over mtp and found that there were certain leftover folders on the internal memory. One was a folder with Chinese name, one was a folder called ByteDance and one folder called Thumbnails. I assumed that the first two were leftovers from the TikTok app and the third was mere thumbnails. So I deleted them to save space. Nothing happened that day, except that I couldn't access any of my WhatsApp images through WhatsApp(they were still accessible through the gallery). However, when I woke up the next morning, all my data on the internal memory was gone. I still have contacts my messages and my settings, just that everything that was accessible through the file explorer has disappeared. What is model identifiability? I know that with a model that is not identifiable the data can be said to be generated by multiple different assignments to the model parameters. I know that sometimes it's possible to constrain parameters so that all are identifiable, as in the example in Cassella &amp; Berger 2nd ed, section 11.2.  Given a particular model, how can I evaluate whether or not it's identifiable? I'm experimenting with VPNs, so I wanted to install pptpd.  john@desktop:~$ sudo apt-get install pptpd [sudo] password for john:  &lt;snip&gt; The following extra packages will be installed:   bcrelay The following NEW packages will be installed:   bcrelay pptpd 0 upgraded, 2 newly installed, 0 to remove and 11 not upgraded. Need to get 90.5 kB of archives. After this operation, 442 kB of additional disk space will be used. Do you want to continue [Y/n]? y   And everything runs fine until I get down to here:  WARNING: The following packages cannot be authenticated!   bcrelay pptpd Install these packages without verification [y/N]? n E: Some packages could not be authenticated   No authentication?  I'm no security expert, but I'm fairly sure that's a bad thing.  So I .  john@desktop:~$ apt-cache policy pptpd pptpd:   Installed: (none)   Candidate: 1.3.4-3ubuntu1   Version table:      1.3.4-3ubuntu1 0         500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages john@desktop:~$ apt-cache policy bcrelay bcrelay:   Installed: (none)   Candidate: 1.3.4-3ubuntu1   Version table:      1.3.4-3ubuntu1 0         500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages   They're coming from Ubuntu.com and not being properly authenticated?  What's going on here? Drawing different tikz shapes parameterized by data from a file I have a file with three columns of data, x, y, r.  # x y r 1 1 0.1 2 2 0.5 3 3 1.2   and so on. I'd like to loop over the rows, and draw a circle at x,y with radius r for each row.  I first thought I'd use pgfplots with customized marks, but I couldn't figure out how to pass the radius parameter into the pgfplot mark handler. Then I thought I'd use tikz and pgf directly, but I couldn't figure out how to reference the values for r inside a draw command sequence.   Any thoughts ? I'd be very grateful for some help. I'm trying to connect 32 I²C "root of trust"  devices.    I'm thinking about a good way that does that, I mean what kind of communication should I use? A digital multiplexer that selects a device? but based on what? switching on the VDD source? but that needs reinitialization of the device and that takes time. Probability of first actor winning a "first to roll seven with two dice" contest? Two players P and Q take turns, in which they each roll two fair and independent dice. P rolls the dice first.  The first player who gets a sum of seven wins the game. What is the probability that player P wins the game? Should it be /about_us or /about-us?  From usability point of view, I personally think /about-us is much better for end-user yet Google and most other websites (and javascript frameworks) use underscore naming pattern. Is it just matter of style? Are there any compatibility issues with dashes? Is there a sandbox to post test questions? I have noticed a behaviour that may or may not be a  bug. It is a discrepancy between the preview and the rendered result, which is why I would need to post a question to check it out.  Is there an official place to do that? Blog Overflow database error , which is linked from site-specific blogs, says  Error establishing a database connection  I believe this is an error. Adding materials to more than one object Is it possible to add a texture or material to more than one object at a time? Google map only loading half of itself Objects disappear when looking through camera When I go to camera perspective, there are parts of my object that I can't see. I tried adding and deleting my camera a lot of times and positioning it so that the objects I would like to see on my camera view will be seen but to no avail, I still get the same problem.    What could be wrong with my camera set-up? After the training phase, is it better to run neural networks on a GPU or CPU? My understanding is that GPUs are more efficient for running neural nets, but someone recently suggested to me that GPUs are only needed for the training phase. Once trained, it's actually more efficient to run them on CPUs.  Is this true? How can I prevent iTunes from auto starting when I plug in an iOS device? Blender Cycles Bake Not Looking Like Object in Rendered View I have a couch in Blender that looks like this in rendered view.    I baked it with a combined texture and this is what it came out to be.    This is what it looks like added to the mesh.    Why does the view with the baked image not look exactly like the rendered view?  Does it have something to do with my mesh and faces?  This is my mesh.    This has never happened to me before as I baked a couple things before this which came out perfectly. Pop up option are not popping up after snipping the area I want to put four figures in a single row. The code I am trying to use is taken from .  This puts three figures in a row. When I add a fourth one, I get three images in row and the last one appears in the second row. But I want all of them in one row. Here is my code.  \documentclass[12pt,twoside]{report}% Use this line for the print version of the thesis   \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \begin{document}  \begin{figure}         \centering         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{gull}                 \caption{A gull}                 \label{fig:gull}         \end{subfigure}%           \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{gull}                 \caption{A gull2}                 \label{fig:gull2}         \end{subfigure}%          ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{tiger}                 \caption{A tiger}                 \label{fig:tiger}         \end{subfigure}         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{mouse}                 \caption{A mouse}                 \label{fig:mouse}         \end{subfigure}         \caption{Pictures of animals}\label{fig:animals} \end{figure} \end{document}   As I have mentioned above, it works for three figures.  But I can not use it for four figures. What should I change?   What does  width=\textwidth mean?   I changed    \begin{subfigure}[b]{0.3\textwidth}   to  \begin{subfigure}[b]{0.2\textwidth}   but it didn't help.  Then, I changed     \includegraphics[width=\textwidth]{mouse}   to  \includegraphics[width=0.5\textwidth]{mouse}   Still no solution. How to install the latest stable version of Chromium? Is there an easier way to install Chromium than what is described ?  Furthermore, is there an easier way to stay up to date with current Chromium releases rather than having to re-build Chromium each release? (a script which automatically grabs and installs the latest build possibly?).  Related: