I have found online this question: (original post: )  What is output of:  int arr[] = {1, 2, 3, 4}; int* p = arr; int* k = p; std::cout &lt;&lt; (*(k + 2) + 1[p] + *(0 + arr)) &lt;&lt; std::endl;   I think I understand correctly the *(k + 2) and the *(0 + arr), but I really cannot understand how 1[p] can be valid and what it really means.  Any simple explanation?  I guess one should not write code like this ever (or am I wrong? any case when writing something like that would be good, readable code?), but just curious.
As Joel points out in , in  (aka: K &amp; R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?
Is there a free program to (batch) change photo file's date to match EXIF? I want to specify a directory and have the software find all the photos in the directory and its sub-directories, and if they contain EXIF date/time, it sets their filesystem timestamp to match the EXIF. Solving an equation over the reals: $ x^3 + 1 = 2\sqrt[3]{{2x - 1}}$ Solve the following equation over the reals:$$ x^3  + 1 = 2\sqrt[3]{{2x - 1}} $$ I noticed that 1 is a trivial solution, then I tried raising the equation to the 3rd, then dividing the polynomial by $(x-1)$.. But I can't see the solution, how do I go from here? Seeking Mobile Data collection software recommendations? Best way to strip punctuation from a string It seems like there should be a simpler way than:  import string s = "string. With. Punctuation?" # Sample string  out = s.translate(string.maketrans("",""), string.punctuation)   Is there? 11.4 Full Jaillbreak method Yet? I've been searching around for a a while now and So far I haven't found any full jailbreaks for ios 11.4 on a 6s. To be honest, I am new to the jailbreaking scene. I've installed Velonzy, but could find no jailbreaking tools. Am I missing something, or is there truly nothing left.  PS. I would downgrade to a system-rootable version but I haven't any SHSH blobs, or found any alternative method. Is it possible? I am trying to do a clean install of the octave3.2 package.   To do this, I removed it, then tried to reinstall it.   When I reinstalled, an error occurred. It could be a bug in the package, but I want to make sure I have everything removed so that I can do a clean install.  Is it enough to do this?  sudo apt-get --purge remove octave3.2 Why do the big nuts always remain at top? The Brazil-nut Effect Most of the time when I mixed different nuts in a bowl, I observed that the big Brazil nuts were always on top while the small peanuts settled near the base. No matter how you take it, if the big nuts are put at the bottom and then the small nuts are poured, then also after some time the big ones will come to the top. Will not the gravity attract those big nuts more and eventually will they not remain at the base? But it doesn't happen!   I googled it and found the term Brazil-nut Effect but couldn't find any proper explanation. What is the physical explanation for this effect? Let $X$ be a topological space. The diagonal of $X \times X$ is the subset $$D = \{(x,x)\in X\times X\mid x \in X\}.$$   Show that $X$ is Hausdorff if and only if $D$ is closed in $X \times X$.   First, I tried to show that $X \times X \setminus D$ is open using the fact that $X \times X$ is Hausdorff (because $X$ is Hausdorff), but I couldn't find an open set that contains a point outside $D$ and is disjoint to it... Ralink MT7601U (148f:7601) Wi-Fi adapter installation I am trying to install a Ralink wifi adapter in Ubuntu Desktop 14.04.  The system is not detecting the wifi.   lsusb lists the device as:  Bus 002 Device 004: ID 148f:7601 Ralink Technology, Corp.  I have the rt2800 USB driver listed in "/etc/modules"; Following some instructions on the web, I tried this command:  echo 148F 7601 | sudo tee /sys/bus/usb/drivers/rt2800usb/new_i  lsmod | grep rt2800 returns the following:  rt2800usb              26581  0  rt2x00usb              20041  1 rt2800usb rt2800lib              83150  1 rt2800usb rt2x00lib              48886  3 rt2x00usb,rt2800lib,rt2800usb mac80211              545990  3 rt2x00lib,rt2x00usb,rt2800lib crc_ccitt              12627  1 rt2800lib Why do you lose reputation for downvoting answers? With the confirmation that elements 113, 115, 117, and 118 are indeed fundamental elements that are now to be named on the periodic table, the next question is: what is the highest atomic number possible for an element? Feynman had a go at this years ago, and he derived (according to my limited understanding) that above element-137 (informally denoted 'Feynmanium') the electrons in the nearest orbit about the nucleus would be traveling at a velocity greater than the speed of light. (Note I am considering the Bohr model of the atom in this question.) I wished to demonstrate to my friends why this is and I came up with the following explanation.  According to Bohr's quantum condition, the angular momentum of an electron about the nucleus is given by $$ L=m_evr_n=n\hslash \implies r_n=\frac{n\hslash}{m_ev},$$ where $m_e$ is the mass of the electron, $v$ its velocity, $n$ an integer, and $r_n$ the radius of the $n$th possible orbit. Because we are concerned with the nearest orbit to the nucleus, $n=1$; and thus $$r=\frac{\hslash}{m_ev}.$$   Now, according to Coulomb's law, if the electron orbits about the nucleus the centripetal motion can be described by $$\frac{Ze^2}{4\pi\epsilon_or}=m_ev^2, $$ where $Z$ denotes the number of protons in the nucleus (the atomic number), and $e$ the elementary charge. Solving for $Z$ and substituting in $r$ from above yields $$Z=\frac{4\pi\epsilon_o \hslash v}{e^2}. $$ But what is $v$? Well, the maximum velocity an electron could ever have is the speed of light, and we wish to find the atomic number associated with an orbiting electron traveling at this speed, so we set $v=c$ and obtain our final result of $$Z=\frac{4\pi\epsilon_o\hslash c}{e^2}\approx 137.521,$$ which implies that for $Z&gt;137$, the electrons at a position of $n=1$ in the Bohr model would have a velocity $&gt;c$; and thus the highest atomic number achievable on the periodic table is 137.  Again, I just want to make sure this is a correct method for deriving element-137 before presenting. Perhaps one could explain how relativity plays a role here. I know Feynman used the Dirac equation to get this result...so could anyone (subsequently of course) expatiate on this in a simplistic manner? Thanks! disable clickable landmark on google map Why am I getting black photos when I use the Manual feature on my DSLR? I was trying to fix my audio problems using suggestions from . One of the comments suggested I execute this and only this:     killall pulseaudio   So I did, and I restarted my computer just in case, but all it did was remove my soundcard and I still couldn't hear anything. Now I don't know how to get my soundcard back.  Please note that I am extremely inexperienced when it comes to Ubuntu. Using dconf-editor I tried enabling   org -&gt; gnome -&gt; nautilus -&gt; list-view -&gt; use-tree-view     but even after the check box is selected, plus a reboot, it still doesn't switch to the tree view on the side bar.  In previous versions of Nautilus / Ubuntu the side-pane-view setting used to be in the window-state section (which is now missing)    I'm I missing something, or is there no way to enable Tree View on the side bar in 14.04?  Is there a way to manually create the missing entry back in window-state ? Show that $\frac{\sin x}{\cos 3x}+\frac{\sin 3x}{\cos 9x}+\frac{\sin 9x}{\cos 27x} = \frac{1}{2}\left(\tan 27x-\tan x\right)$ I have a MySQL database that I "inherited" and I was not given the admin credentials.  I do however have access to the box that it runs on.  Is there a way to either recover the admin credentials or create new ones? I would like to show the author names using \citet but I get just the reference number. Here is a minimal code:  \documentclass{report} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{natbib}  \begin{document}   The author \citet{toschi09} has shown that ..  \bibliographystyle{plain} \bibliography{foo}  \end{document}   And here is foo.bib  @article{toschi09, author = {Toschi, F. and Bodenschatz, E.}, title = {Lagrangian Properties of Particles in Turbulence}, journal = {Annual Review of Fluid Mechanics}, volume = {41}, number = {1}, pages = {375-404}, year = {2009},  }   What I get is:     The author (author?) [1] has shown that ..   Any help will be more than welcome, thank you! Why "be king", not "be a king"? I've heard people say "be king" (as in "I can't wait to be king") in movies and TV. Why don't they say "be a king"? Which is correct? The question is:     Are there square matrices $A,B$ over $\mathbb{C}$ s.t. $A^2+B^2=AB$ and $BA-AB$ is non-singular?   From $A^2+B^2=AB$ one could obtain $A^3+B^3=0$. Can we get something from this?  Edit:  $$A^2+B^2=AB\implies\\ A(A^2+B^2)=A^2B \implies\\ A^3+AB^2=A^2B \implies \\ A^3+(A^2+B^2)B=A^2B \implies \\  A^3+A^2B+B^3=A^2B \implies \\ A^3+B^3=0 $$