Read file system
Read-only file system
Is GNU's Java Compiler (GCJ) dead? Parsing domain from a URL I need to build a function which parses the domain from a URL.  So, with   http://google.com/dhasjkdas/sadsdds/sdda/sdads.html   or  http://www.google.com/dhasjkdas/sadsdds/sdda/sdads.html  it should return google.com  with   http://google.co.uk/dhasjkdas/sadsdds/sdda/sdads.html  it should return google.co.uk. Find all possible solutions of $$2^x + 3^y = z^2.$$    My approach.   First I substituted $x = 0$, and got the solution, then for $y = 0$. And for $x &gt;  0$ and $y &gt; 0$ , I just know the Pythagorean triple and got the solution as $(4,2,5)$ and $(4,2,-5)$. Please help me to solve it properly. 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? Proving that $(3n)!$ is divisible by $n! \times (n + 1)! \times (n + 2)!$ if $n$ is greater than 2 Prove that:  If $n$ is greater than 2, then $(3n)!$ is divisible by $n! \times  (n + 1)! \times  (n + 2)!$  From Barnard &amp; Child's "Higher Algebra".  I know that the highest power of a prime $p$ contained in $N$! is  $$ \left\lfloor{\frac{N}{p}}\right\rfloor + \left\lfloor{\frac{N}{p^2}}\right\rfloor + \left\lfloor{\frac{N}{p^3}}\right\rfloor ... $$  I'm unable to show that the formula above gives a higher value for $N = 3n$ than for the sum of its values when $N$ = $n$ , $n + 1$ and $n + 2$, considering the condition that $n &gt; 2$. How do I choose a macro lens for a Canon APS-C camera? What is the difference between "du -sh *" and "du -sh ./*"? What's the difference between du -sh * and du -sh ./* ?  Note: What interests me is the * and ./* parts. I have a manuscript that is under review in a major journal which is a main result out of a few recent years of my research. When applying for faculty positions, I would like to send the draft as a part of my writing sample. But since the material is not yet published, I am not sure if it is a good idea.  What are the foreseeable disadvantages of sending an article in review to the faculty search committee?  My area is neuroscience / biomedical engineering.  Update: The paper got into a high-profile journal, and I got a job at a different place which did not require a writing sample. How to debug hadoop mapreduce jobs from eclipse? Should I disconnect my MacBook Pro's power cord when the battery is fully charged? My friend told me that I need to disconnect the power cord when the battery is fully charged. Otherwise, I will shorten the life of the battery.  Other people say you should drain it once a month or point out that for long term storage, you should charge it to 50% and then periodically (3 to 6 months) bring it back to 50% and store it again.  I am going to use my laptop at home 90% of the time. So, I plan to have the power cord connected all the time.  I'd prefer to just plugging in my MacBook Pro and letting it be on charge long term and occasionally taking it away from the charger when I'm not at home or my desk.  Are these specific recommendations worth the inconvenience? How do we "restore" notepad after crash? I can seem to run scripts (.sh) with and without them being set as executable. So where exactly this matters? Beamer - place text of footnote in footline I must place footnotes and footcites at the bottom of the frames, like shown in the picture:   The line above the footnotes must always be there, and it must have a minimum distance to the bottom of lets say 2.5em.  So I see two possible solutions:   Add the footnote via \setbeamertemplate to the footline. Change the format of the footnoteline and let it always appear, even if no footnote was used.   For the last hours, I tried to accomplish point 1, but I had absolutely no success. Can you please help me? Otherwise I have to use *whisper* Powerpoint. ;)    EDIT: Do you know the phenomenon that only after you ask someone, you can get the right ideas? ;)  Here is a MWE of my current solution:  \documentclass[xcolor={dvipsnames}]{beamer}  \usepackage[absolute, overlay]{textpos} \usepackage{environ}   \usetheme{default} \setbeamertemplate{navigation symbols}{}%remove navigation symbols   \newcommand{\makemyrule}{%     \setlength{\unitlength}{14pt}%      minimum distance to bottom     \ifdim\footnoteheight&gt;\unitlength \setlength{\unitlength}{\footnoteheight} \fi%     check which distance is bigger     \begin{textblock*}{\linewidth}(0pt,\dimexpr\textheight-\unitlength)%    place with use of textpos         \textcolor{blue}{\rule{\paperwidth}{.3ex}}     \end{textblock*} }   \let\oldfootnote\footnote%      redefine the footnote command \renewcommand{\footnote}[1]{\Addheight{#1}\oldfootnote{#1}}  \newlength{\footnoteheight} \newsavebox{\mytext} \newcommand{\Addheight}[1]%     measure height of the text         {%                 \savebox{\mytext}{\small\strut\parbox{\textwidth}%                 {\hspace*{2em}\thefootnote#1}\strut}%       approximated by eye, not perfect!                 \addtolength{\footnoteheight}{\ht\mytext}%                 \addtolength{\footnoteheight}{\dp\mytext}%         }     \NewEnviron{myframe}[1]{%     \begin{frame}{#1}%     \setlength{\footnoteheight}{0pt}%     \BODY%     \makemyrule%     \end{frame}%     }    \renewcommand\footnoterule{}  \begin{document} \begin{myframe}{} \frametitle{Beamer example} using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al and a lot more information to create a linebreak} excessively \footnote{You do not need to read this, this is only blindtext to create even more and more text. Blindtext will go on forever, nobody can stop the allmighty blindtext. I think I am a blindtext author.} \end{myframe}{} \begin{myframe} \frametitle{Beamer example} using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al} \end{myframe}{} \begin{myframe} \frametitle{Another example} without footnotes\\ \end{myframe} \end{document}   What this does: At the beginning of each myframe-environment, the length \footnoteheight is reseted to zero. When a \footnote is placed, the height of the text is added to this length. At the end of each frame, via \makemyrule the bottom rule is created, which is above the footnote texts (my solution is not perfect) or, if there are no footnotes, at least 14pt above the bottom.  My wishes (not real problems, but I want it to work better) are   The height of the footnotetext is only approximated. I would like a solution where you can measure the height of the formatted footnote. The frame environment needs to be renamed to myframe. I would like a solution which works without changing the document. But it all failed, because I could not execute \makemyrule before \end{frame} automatically. Alright Ubuntu wizards, I jacked up my system a bit unnecessarily, which is now giving me the chance to learn more about how to fix it...a vicious cycle. Anyway, I have it mostly up and running again to my liking, though I am receiving this (photo attached) prompt when my system boots:  libkmod: ERROR ../libkmod/libkmod-config.c:686 kmod_config_parse: /etc/modprobe.d/blacklist.conf line 56: ignoring bad line starting with 'rt2800usb'   Other users had success with just deleting the bad line from their blacklist.conf file, which I have done. Line 56 no longer exists, but I'm still receiving the same error. So am I missing something? Is there some follow-up command I need to give Ubuntu after saving the conf file? How to customize Windows 10 "6 Folders" in My Computer I would like to customize the folders in the Default Folders group of My computer. It is not necessary to have the same folders appear on the left sidebar and in the middle view. How can I do that ? Let's stop displaying a user's accept rate My feature request (or anti-feature-request perhaps) is the following: Let's stop displaying a user's accept rate.  For those of you who know "Fawlty Towers", the whole issue of a visible accept rate and our behavior towards it starts to feel like .   We generally seem to agree that harassing a user about it is not appropriate and that our decision to answer a question should not depend on it, yet we display it in varying terrorist-threat-levels of color. Yes dear users, please don't pay any attention to the brightly orange colored percentage you see there. And whatever you do, don't bring it up.  But as long as you're displaying the accept rate, people will comment on it, criticize users for it and possibly reconsider answering because of it. And while I'm of the opinion that a low accept rate should not stop you from answering (we're here to make the internet better after all) and that the possible reputation gain (or lack thereof) should not factor in either, I can't blame users for considering it. It's in their face after all. And we're only people.   So let's take the issue off the table. Or at least partially. Information about a user's acceptance behavior can still always be gathered from the profile. But at least that would be less in-your-face.   "But it helps me to see if a user is a help vampire!" I'm still wondering if those are of the sparkly variety as well, but I digress. So what? If the question is bad, downvote it. Evaluate a question on its individual value. There is no need to take a user's history into account. There might be a correlation between the quality of a question and a user's accept rate, but there doesn't have to be. And if there is, the bigger problem is the question's quality.  "Exactly! A user with a low accept rate might indicate there's a problem!" I'm not arguing we should get rid of the accept-rate value within SO/SE. After all, this Q&amp;A works based on up and downvotes, as well as the acceptance of an answer. But why not use it behind the scenes to (very occasionally) nudge the user with a statement like:      "You have received several answers to your questions, yet have not accepted an answer as correct or helpful in a while. You might want to evaluate them and where possible ".    After all, in the various questions with regards to comments on low accept rates, if any comments are encouraged at all, then they are of this soft variety. So why not let the system take care of that?  I feel this would take the whole issue of accept rate off the table, while still providing the user with the information he might have missed or needs. (As a bonus, it would reduce the frequency with which the topic is brought up here on Meta) And those users who would ignore this information are most likely not convinced by a displayed percentage either. Catch Regex too complicated when splitting a string in salesforce I have created a function wherein I split a string from the csv filecsvAsString.split('\n') . It is working when the string is not so big. But when I try to split a very large string, an error will occur      regex too complicated   what I want to do is to catch if an error occur during the split process. How will I do it ? I've tried to use try and catch but the problem still occur. Is there any other possible solution? How can I make a Random Number Generator with vanilla redstone? Error java.lang.OutOfMemoryError: GC overhead limit exceeded Where should collision detection logic be placed? I am developing a small 2D game engine. The characters have a paint method which currently does the following:   Calculate the new position of the character as per its speed, etc. Update the collision grid cell ** Draw the character at the new position   ** I have created a collision grid to reduce the number of intersection checks  Now the basic algorithm which I have thought for detecting collision is:   For Each Character     Check intersection with characters in surrounding 8 cells   I can simply place this code in the paint method. But here is the problem I anticipate.  Suppose two characters A and B lie in adjacent cells in the collision grid. Now as per the above algorithm in the iteration of character A it will detect that it has collided with B. In the iteration for character B it will detect that it has collided with A.  But I have an idea that when A detects that it has collided with B, it should inform B that it has collided with A. This would save lot of comparisons when there are more than 2 actors colliding. But I am not sure how to handle this. I think instead of every character checking for its collision, I should check for the collision inside the game loop.   Would this approach be correct? How have you handled this kind of problem? I thought of the collision grid thing myself. Are there any alternatives to collision grid logic?