How can I post a question with a long error message in it?
How do I format my code blocks?
permission denied for root@localhost for ssh connection I just installed Ubuntu 14.04 and LAMP on that. Then, I wanted to configure my server, so tried out  tutorial.  When I give the command:  ssh root@localhost   I get : Permission denied, please try again. I have logged in as root user through the command :  sudo -i   I also tried the same, by logging in through:  sudo -s   I use the same password as that I used to log in as user, but still am getting the same error message.  Could someone help me out here?  PS: I looked into  but didn't seem to work for me. When I try to remove Java with sudo apt-get remove jdk1.8.0-40 I get this:    Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   jdk1.8.0-40 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 245 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 231488 files and directories currently installed.) Removing jdk1.8.0-40 (1.8.040-1) ... find: `/usr/java/*': No such file or directory /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 586: /usr/sbin/alternatives: No such file or directory /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 598: /usr/sbin/alternatives: No such file or directory dpkg: error processing package jdk1.8.0-40 (--remove):  subprocess installed post-removal script returned error exit status 127 Errors were encountered while processing:  jdk1.8.0-40 E: Sub-process /usr/bin/dpkg returned an error code (1)   Output of  ls -1 /var/cache/apt/archives/*jdk*:  openjdk-7-jre_7u75-2.5.4-1~trusty1_amd64.deb openjdk-7-jre-headless_7u75-2.5.4-1~trusty1_amd64.deb   Output of sudo dpkg --purge --force-all jdk1.8.0-40:  (Reading database ... 231488 files and directories currently installed.) removing jdk1.8.0-40 (1.8.040-1) ... /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 586: /usr/sbin/alternatives: No such file or directory /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 598: /usr/sbin/alternatives: No such file or directory dpkg: error processing package jdk1.8.0-40 (--purge): subprocess installed post-removal script returned error exit status 127 Errors were encountered while processing:  jdk1.8.0-40   When trying the edit I get this:  (Reading database ... 231488 files and directories currently installed.) Removing jdk1.8.0-40 (1.8.040-1) ... /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 586: /usr/sbin/alternatives: Permission denied /var/lib/dpkg/info/jdk1.8.0-40.postrm: line 598: /usr/sbin/alternatives: Permission denied dpkg: error processing package jdk1.8.0-40 (--remove):  subprocess installed post-removal script returned error exit status 126 Errors were encountered while processing:  jdk1.8.0-40 E: Sub-process /usr/bin/dpkg returned an error code (1) How can I pin a program to the Windows 7 Taskbar, with parameters? i keep getting the script error problem every time i try using polygon to raster tool in ArcGIS 10.1. Please help me how I can solve this?  screenshot embedded Map display not filling window in QGIS on Mac? $f(x)f(1/x)=f(x)+f(1/x)$ Find a function $f(x)$ such that:  $$f(x)f(1/x)=f(x)+f(1/x)$$  with $f(4)=65$.  I have tried to let $f(x)$ be a general polynomial: $$a_0+a_1x+a_2x^2+\ldots a_nx^n$$  which leaves $f(1/x)$ as:  $$a_0+a_1{1\over x}+a_2{1\over x^2}+\ldots + a_n{1\over x^n}$$  On comparing the coefficients of both sides, we see that:  $$2a_0=(a_0)^2+(a_1)^2+(a_2)^2+\ldots+(a_n)^2$$  And  $$a_1=(a_0a_1)+(a_1a_2)+ \ldots +(a_{n-1}a_n)$$  I don't know how to proceed further. I know I need to compare coefficients and come to a conclusion based on their values, but I don't see what to do next. How to create custom config section in app.config? The recent user profile tab name change - from "activities" to "all actions" - was not accompanied by a hyperlink update from ...?tab=activities... to ...?tab=allactions...    Click on the "posts edited" link to see the 404-error. What's the purpose of two capacitors in parallel? What's the purpose of the two capacitors in parallel on each side of the regulator in      I've seen similar setups in other similar circuits and can guess that it's related to one being polarized an one not, but I don't really understand what's going on there. Exists a dedicated non-O(n²) Algorithm for avoiding to have overlapping elements? I am generating positions in a random fashion.  In the game world, instantiated elements have a radius, and shouldn't overlap.  The problem is that they will overlap because I use a usual random number generator combined with other fanciness. I can't use other random number generation algorithms where I can guarantee that the elements will never overlap.  A way to solve this is to use a spatial data structure and search for the nearest neighbors in that tree. When I insert an element into that tree, I update it accordingly.  This solution would do the work and it would be fast but my question is:  Is there a dedicated algorithm without that Tree implementation complexity which is faster than O(n²)? Is there a difference between installing an application via Ubuntu Software Center or a terminal? Academic dishonest: Possession of unauthorized materials during an exam that you didn't even know existed So unfortunately during an exam, I had the misfortune of using an eraser (with cover) that was not mine and had a small amount of words inside it unknown to me. I did not know this was the case, as I don't have a habit of unraveling erasers or looking at them closely?  However, now I face the problem in trying to defend myself against the accusation of me cheating.  I'm specifically concerned on my university's blank statement of "possession of unauthorized materials during an exam" is considered academic dishonesty. Seems like student conduct has all the power in trying to prove academic dishonesty, despite none of my test containing any of what to me is  unreadable, small notes. Will the Windows 10 Free Upgrade stay in the Professional channel? I have a DB Server running CentOS 6.4 and MySQL 5.5 from RPMs (not source).  I have dozens of databases but one of them is being hit quite hard with large selects which locks out other updates which in turn locks out other selects (at least I think this is what's happening!)  To alleviate this I would like to replicate one of the databases onto the same server so that the writes can write to the "master" and reads can be done on the "slave". I don't have the luxury of additional hardware.  I have found a lot of guides on the internet describing how to replicate to a different server, and one () describing how to replicate to the same server but it doesn't seem to be geared towards retrofitting this functionality to an existing database with 10s of GB of data in it already. It also talks about compiling MySQL from source.  Does anyone know how I can retrospectively convert my MySQL 5.5 config to replicate one of my databases on the same server?  My existing DB runs on port 3306 so I feel it should be as easy as firing up another instance of MySQL on port 3307 and making some changes to my.cnf but not sure what changes.  Thanks in anticipation. How many outlets can you have on one 15 amp circuit? In my rebuilding project I have counted 18 outlets and lights on one bedroom circuit that travels through 3 rooms. Is that ok? Need help in the longtable with the figure How do I redirect www to non-www in Route53? I host my site at domain.com.  My DNS entries in Route53 are as follows:  domain.com      A       xxx.xxx.xxx.xxx      300 domain.com      NS      stuff.awsdns-47.org  172800 domain.com      SOA     stuff.awsdns-47.org  900   I would like to redirect traffic from www.domain.com to domain.com, as currently this just returns a 404.  suggested a PTR record, and I added that:  www.domain.com  PTR     domain.com           300   but it didn't work. What should I be doing? Difference between "git add -A" and "git add ." The command git add [--all|-A] appears to be identical to git add .. Is this correct? If not, how do they differ? Existence of the moment generating function and variance Can a distribution with finite mean and infinite variance have a moment generating function? What about a distribution with finite mean and finite variance but infinite higher moments? Chat gives me really, really specific time gap notifications