LinkedHashMap and NullPointerException
What is a NullPointerException, and how do I fix it?
I've installed Xcode and MacPorts on a brand new mid-2013 MacBook Air, but MacPorts doesn't work, saying that it cannot find anything.  mba:~ cnst$ sudo port install wget Warning: The Command Line Tools for Xcode don't appear to be installed; most ports will likely fail to build. Warning: See http://guide.macports.org/chunked/installing.xcode.html for more information. ---&gt;  Computing dependencies for wgetError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it? mba:~ cnst$   And, indeed, there is no make or clang in the path, but it is definitely installed, though:  mba:~ cnst$ find /Applications -name "clang" -or -name "make" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang /Applications/Xcode.app/Contents/Developer/usr/bin/make mba:~ cnst$   Why is there no make or clang in the path?  Why MacPorts doesn't work?  I notice that  mentions that you have to install something from ADC, Apple Command Line Developer Tools, but ADC doesn't work since last Thursday or Friday due to their security breach, so, the developer tools are nowhere to be found.  What's the proper solution here? Will I still receive OTA updates after rooting my Nexus 5? Natural examples of deformation retracts that are not strong deformation retracts The question  asks for examples of deformation retracts which are not strong deformation retracts. A comment is given refering the asker to Exercise 0.6 in Hatcher. (The description of this space also appears in , which is about this very same exercise.)  This space, however, seems to be constructed specifically for this purpose.     Are there any naturally occurring (by which I mean not constructed specifically for this purpose, arising in some other way) spaces that are deformation retracts but not strong deformation retracts?   The main reason for asking is that it doesn't seem very likely to me that one would stumble upon such a space at random, so I don't know what to watch out for. One can never be too careful. Add "Delete with reason" button/dialog to existing moderator tools for flagged answers While this is an old problem, it's one that will only increase with time.  As Stack Exchange sites gain in popularity, more and more users are coming to the sites in search of answers to their specific problems.  Unfortunately, not all of them understand the basic operating principals behind Stack Exchange, and ask questions, or start discussions as separate answers.  Deleting these answers is fine, but more often (I would argue almost always) than not, a new user doesn't understand why.  Granted, comments are a way of doing this, but there are drawbacks to comments:   They require extra, replicated effort on the part of the moderator for something that they do repetitively The message will be inconsistent; messages like this would be consistent, cite the relevant resources that guide the user in the right direction The larger size would have a higher chance of grabbing the user's attention, as well as put more weight behind the action (as it's officially attached to the answer in a consistent manner). The banner will serve as an example of what not to do to other users who can see the deleted post.   Additionally, there are tools that can help with auto-commenting on posts, but these have their drawbacks as well:   Not all moderators use these tools The messages that are delivered by the tools are ultimately generated initially by the moderators, so the message will not be consistent These tools are not always available on other devices (e.g., mobile platforms)   It would be helpful to the user if they had a reason indicating why the answer was deleted.  Something along the lines of:    In order to accomplish this, I propose an additional (not a replacement) button in the moderation tools labeled "delete with reason".  Mods would still be able to delete answers outright, they just have the option now of stating why in an easy manner which will allows for more time to moderate harder.  Placement is not important (screen real estate is valuable, yes), but I envision it looking something like this in the moderator tools:    When clicking "delete with reason", a dialog, much like the "close" dialog will appear with options:    Initial options for the reasons could be:   Asking a new question Starting discussion   A mechanism like this has the potential for other benefits as well:   Users with an answer deleted with a reason might actually be directed to perform the right action now, and in the future (creating better site denizens) Users who wish to contest the deletion of an answer on meta can cite that specific reason, which mods can specifically address (which actually might reduce noise on meta about "why was my answer deleted?") Can reduce flags on answers asking "why was this deleted?" (admitted, I've not personally experienced this to be a pervading problem on Stack Overflow, but this might be the case for other mods on other Stack Exchange sites) Other Stack Exchange sites which don't have that many users will give a better experience to their users when their first action isn't ideal for a Stack Exchange site; this will enhance the chance that the site will retain the user and get good contributions from them (as per Farseeker's comments: , ).   Additionally, if this works well for the moderator tools, I imagine that it would not be such a leap to eventually have this graduated to users with the rep to cast delete votes, thus allowing non-mods to deliver a more clear message to new users about how to best participate on a Stack Exchange site. How do I use sudo to redirect output to a location I don't have permission to write to? I've been given sudo access on one of our development RedHat linux boxes, and I seem to find myself quite often needing to redirect output to a location I don't normally have write access to.  The trouble is, this contrived example doesn't work:  sudo ls -hal /root/ &gt; /root/test.out   I just receive the response:  -bash: /root/test.out: Permission denied   How can I get this to work? Is there a free or open source library to read Excel files (.xls) directly from a C# program?   It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited) file, but I'd like to eliminate the manual step. Prove $f(x) = \sqrt x$ is uniformly continuous on $[0,\infty)$ I have seen a proof in   Below shows an alternative proof. Please correct me if im wrong.  Proof:  For any given $\varepsilon &gt;0$,  Let $\delta_1 = \frac{\varepsilon}{2}$, $\forall x,y \in [1,\infty)$ with $|x-y|&lt;\delta_1$  Since $|\sqrt x + \sqrt y|\geq2$  $$|\sqrt x - \sqrt y|  = \frac{|x-y|}{|\sqrt x+\sqrt y|} &lt; |x-y| &lt; \delta_1 = \frac{\varepsilon}{2}$$  Hence, $\sqrt x$ is uniformly continuous on $[1,\infty)$.  $\sqrt x$ is continuous on [0,1] , so $\sqrt x$ is uniformly continuous on [0,1].  So, there exist $\delta_2 &gt; 0$ such that $\forall x,y \in [0,1], |x-y|&lt;\delta_2$, $|\sqrt x -\sqrt y| &lt;\frac{\varepsilon}{2}$  Let $\delta = \min{(\delta_1,\delta_2)}$  $\forall x,y \in [0,\infty)$ with $|x-y|&lt;\delta$,  Case 1: $x,y \in [0,1]$ Proven above as $|x-y| &lt; \frac{\varepsilon}{2} &lt; \varepsilon$  Case 2: $x,y \in [1,\infty)$ Proven above as $|x-y| &lt; \frac{\varepsilon}{2} &lt; \varepsilon$  Case 3: $x \in [0,1] , y \in [1,\infty]$  $$|\sqrt x-\sqrt y| = |\sqrt x -1+1-\sqrt y| \leq |\sqrt x-1| + |\sqrt y -1| &lt; \frac{\varepsilon}{2} + \frac{\varepsilon}{2}= \varepsilon$$  by applying case 1 and case 2. I've only just begun studying group theory (up to Lagrange) following on from vector spaces and I am still finding them almost frustratingly  arbitrary. I'm not sure what exactly it is about the axioms that motivated them defining groups.  My textbook asks you to list 'common features' of vector spaces and then later defines a set of axioms for vector spaces under addition, scalar multiplication and both, noting that the axioms under addition form an Abelian group. So are groups just a generalisation of vector spaces under any binary operation?  My main problem is that the book notes that 'the axioms may seem rather arbitrary' and links groups with vector spaces but doesn't elaborate.   When introducing groups, you are tasked to complete Cayley tables for the symmetries of an equilateral triangle and square.  Then, similarly to the delivery of vector spaces, notes that the tables have common properties (Closure, Identity, inverse and association) and defines a group as a set of elements under a binary operation that has these features.  So what's so important about these 4 properties? For example, if 1 or 2 the properties were excluded form the  axioms, or we added an extra few properties as axioms how would that cripple the effectiveness of groups?  Are the group axioms ever difficult to work with or do they always work, forgive the crude Littlewood analogy, like a mathematical skeleton key?  What is it about these 4 properties that make groups such a powerful tool in mathematics and physics?  My best guess is that a group is the best way to express our sense of  symmetry and what is symmetric mathematically, but I would prefer some elaboration. Methods for autocompletion in TexStudio don't work I've made a mymacros.sty file which I would like my LaTeX files to be able to access with commands that I've defined. I've managed to get it to work by putting \usepackage{mymacros} in my preamble.   However when I try to autocomplete I can't. I looked at this question:     ), which recommends 3 ways of doing this, none of which work for me.    The first it recommends is to have mymacros.sty open in the editor. But this doesn't work.  The second is to activate the option Editor -> Automatically load included files in the configure TeXstudio options panel. However while I have an Editor tab , there is no such option there.  The third is to using .cwl files, however I'm not sure how to go about this. In the completion tab I've noticed that there is a mymacros.sty option that has come up, which I ticked but that has had no effect. Do I need to make my own mymacros.cwl file? I've tried to look this up but haven't had any luck.  Anyone have any ideas? Thanks in advance! 500 Error on index.php file When running sudo apt-get update I get these following errors:  Err archive.ubuntu.com quantal InRelease Err archive.ubuntu.com quantal-updates InRelease Err archive.ubuntu.com quantal-backports InRelease Err archive.ubuntu.com quantal-security InRelease Err archive.ubuntu.com quantal Release.gpg   Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] Err archive.ubuntu.com quantal-updates Release.gpg   Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] Err archive.ubuntu.com quantal-backports Release.gpg   Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] Err archive.ubuntu.com quantal-security Release.gpg   Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] Reading package lists... Done W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal/InRelease   W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-updates/InRelease   W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-backports/InRelease   W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-security/InRelease   W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-updates/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-backports/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-security/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80] W: Some index files failed to download. They have been ignored, or old ones used instead.   I am using Ubuntu 12.04. This is the command I used after installing Ubuntu from window installer. I am sure my laptop is connected to internet. What can I do now? How to install ns2 on Ubuntu Subversion Obliterate feature I was just thinking of writing a shell script to implement the obliterate functionality in an easy to do way (externally, using the suggested way, but automated).  Here's what I had in mind:  On the client   svn list -R &gt; file-list. filter file-list in several ways like grep to create a file "files-to-delete", something like a set of grep XXX  file-list&gt;&gt;files-to-delete. transfer files-to-delete to the server using scp.   On the server   Dump the repository svnadmin dump /path/to/repos &gt; repos-dumpfile, this can be kept as a backup too. Filter the dump file, for each word in "files-to-delete", do: cat repos-dumpfile | svndumpfilter exclude $file &gt; new-dumpfile Create a new repository and load the new file to it svnadmin create new-name; svnadmin load new-name &lt; new-dumpfile   Would this work? How can it fail? Any other ideas? I have two areas of my house which are cantilevered. One is a bay area which extends about 2'. The other is the bottom of a fireplace box (gas fireplace). I have placed two layers of R-13 (I think) insulation in this area, but inside the house it's like a heat sink where all of the heat is sucked out ... very cold to the touch in the winter time. Obviously there must be a better way to insulate this area.  My question is, what is the best way to insulate a cantilevered area so as to allow the inside area of the house to not be so cold in the winter time? Can markdown icons be available on the iPad? As you can see by the screenshot below, neither buttons nor even the live-preview is available on the iPad.    StackExchange is great on mobile devices, maybe it can be full available in mobile safari as well.  The same thing happens with the tags autocomplete, there is no options for it! we need to check previous questions to know what tags are available to use. How to remove a repository? I had a look at Knuth's The Art of Computer Programming, book 1. In chapter 1, section 1.2.2, exercise 25, he presents the following algorithm for calculating logarithm:  given $x\in[1,2)$, do the following:  L1: [Initialize] Set $y\leftarrow0$, $z\leftarrow x/2$, $k\leftarrow1$.  L2: [Test for end] If $x=1$, stop.  L3: [Compare] If $x-z&lt;1$, go to L5.  L4: [Reduce values] Set $x\leftarrow x-z$, $z\leftarrow x/2^k$, $y\leftarrow y+\log_b(2^k/(2^k-1))$, and go to L2.  L5: [Shift] Set $z\leftarrow z/2$, $k\leftarrow k+1$, and go to L2.  (The algorithm needs an auxiliary table which stores $\log_b2$, $\log_b(4/3)$, and so on, to as many values as the precision of the computer.  Then Knuth concludes: this exercise is to explain why the above algorithm will terminate and why it computes an approximation of $y=\log_b x$.  Well, I see that it works, but I am not able to explain why... Helpful flags not getting updated after getting 'close question' privilege Possible Duplicate:          I recently got the ability to cast close votes. So, even if I flag a question as 'not constructive' or 'not a real question', it is still considered as a close vote. What is strange is that my 'helpful flag' count has stopped increasing after this change. Or at least it doesn't increase in cases where my flagging was automatically changed to a close vote and the post actually was closed. Is this how it is supposed to be?   I am guessing that once the post gets closed, the moderators are probably not bothered about marking flags as helpful. The only problem is that the Deputy badge will be much more difficult to get now. Earlier all the flags were getting converted to helpful, but now they just go in as close votes and don't show up on my profile page. I use a Windows 10 machine remotely at work. Both the local and remote machine are in the same ISP network (not same local network, but same ISP). I've been using it like that for almost a year now and I had never experienced absolutely any issues.  Until recently. I don't know if anything specific triggered this behavior, but I feel that it started happening after I upgraded the remote to W10 1903. I later upgraded the local one as well and I feel that it only made the problem worse (but I don't really have any data).  From time to time, the session will freeze - the image stops updating. However, what I type and mouse clicks are still being sent. No error message is shown whatsoever, the image simply freezes. To make it work again, I have to close and re-open the session. Everything that I had typed and/or clicked while it was frozen is there.  Is there any way I can debug this? I need to sync the Downloads folder to iCloud and then all the downloads should automatically sync with iCloud.   I tried to:   Create a new Downloads folder in the terminal of MacBook in the Documents directory. Tried to move the default Download folder to the newly created folder.   When I tried to use the mv command to move the default Downloads folder to the newly created Downloads folder in Documents in the terminal, it gives permission denied error.  I am trying to achieve what was suggested by user PhillipHolmes in the below thread, please. Thank you:    Thank you