This morning my dual boot (ubuntu 16.04/Win10) Lenovo x230i laptop showed the GRUB2 menu on power up, then decided to hang dead. After reboot it behaves as if there is no bootable disk, even though it sees HDD in BIOS and is able to run bad sector check on it.   Loading from Ubuntu Live CD I can not access the /dev/sda disk by any means, all I see is 467 Gb of unallocated disk space and i/o error.    Any routine to try and recover the HDD? If my HDD is (like it probably is) dead, any way to recover data?   Update:  Lenovo bad sector check fixed like 400 sectors, and now the disk can be accessed with no error. It still appears as unallocated space with no partitions. Gpart program is now doing is check and seems to have found two partitions 349 mb each (the system ones). I assume the hdd must be fried and I can get some data out at most.
About two weeks ago I had a problem with my PC that my brother wrote a question about at .  I still haven't solved the problem, so my PC is unusable now.  Now I think that it would be simpler to re-install both Win7 &amp; Ubuntu than repair them, but there're some data on their partitions. I want to recover this data.  These partitions are not mountable for some reason. I don't know why.  sudo fdisk -l about the problematic partitions:     Device    Boot      Start         End      Blocks   Id  System /dev/sda1            2048     147912703    73955328   83 Linux /dev/sdb2            206848   174079999    86936576    7  HPFS/NTFS/exFAT   And in GParted:      And the error of the mount command:  Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   And the exact same message for /dev/sda1  How can I recover my data from those HDDs?  EDIT     I have tried to specify the type of the drive:  $ sudo mount -t ext4 /dev/sda1 /olddisk mount: wrong fs type, bad option, bad superblock on /dev/sda1,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so $ sudo mount -t ntfs /dev/sdb2 /olddisk NTFS signature is missing. Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   EDIT     sudo ntfsfix /dev/sdb2 returns:  Mounting volume... NTFS signature is missing. FAILED Attempting to correct errors... NTFS signature is missing. FAILED Failed to startup volume: Invalid argument NTFS signature is missing. Trying the alternate boot sector Unrecoverable error Volume is corrupt. You should run chkdsk.
Subtracting from a specific column I've got two branches that are fully merged together. However, after the merge is done, I realise that one file has been messed up by the merge (someone else did an auto-format, gah), and it would just be easier to change to the new version in the other branch, and then reinsert my one line change after bringing it over into my branch. So what's the easiest way in Git to do this? Etymology for “Mc‑” and “O’‑” prefix in surnames There is clearly a prefix in names like McDonald, McChrystal, O’Brian, O’Neal.  What does this Mc- and O- prefix signify? It looks like Donald, Chrystal, Brian, Neal are perfectly fine names on their own, so why is there a prefix before it? What is $\sum_{n=1}^{\infty} \frac{n}{2^{\sqrt{n}}}$? If everything in the universe doubled in size overnight, would it be noticeable? I was trying to prove this question.   Q. If G is a group of even order, prove that it has an element a, such that a$\neq$e satisfying $a^2$=e.   I tried solving it using Principle of mathematical induction.  So, Let O(G)=2m, where m$\in$ $N$.   We proceed by induction on m.   For m=1, O(G)=2, $\therefore$ G contains two elements.  G=$\{{e,a}\}$. Now, e has order 1. So, a can not have order 1. $\therefore$ a has order 2. So, it true for m=1.  Now, let it be true for m=k.  Then, we have a group G of order 2k, where $\exists$ an element a$\in$ G, whose order is 2.   We wish to prove it for m=k+1.   Then G has order 2k+2.   I don't know how to proceed further. It's been sometime and Google has yet to index my site. How can I get Google to index my website? Is there any example of a non-measurable set whose proof of existence doesn't appeal to the Axiom of choice? Is there any example of a non-measurable set whose proof of existence doesn't appeal to the Axiom of choice?  What would it imply if there was such an example?  EDIT: For instance, maybe this will help understand the kind of example I had in mind, it is known that an important feature to determine that the AC is needed in the Banach-Tarski case is the non-transitivity of rotations on Euclidean space, one might find an example of a transitive group for some given space keeping the rest equal and make the AC unnecessary?  I guess then it might be said that this transitivity will be in this particular case equivalent to the AC or some amount of it, but I guess that it would be important to show this if it hadn't been realized before. Is there any way to create a bootable Ubuntu USB flash drive from the terminal without using any third-party applications like , , ,  etc.  I tried to create a bootable Ubuntu flash drive with dd method,  sudo umount /dev/sdb sudo dd if=/path/to/ubuntu.iso of=/dev/sdb bs=1M   It creates files on the USB disk, but when I try to boot the USB disk it shows an Operating System Not Found error. How Does the Community User Set Bounties? I decided on poking around some profiles and I hit the . I knew that Community was a background process but then I noticed that it had set some bounties. What criteria does Community follow to know what questions to set bounties on? Are these questions with a lot of views or upvotes or all of the above? Consider square matrices over a field $K$. I don't think additional assumptions about $K$ like algebraically closed or characteristic $0$ are pertinent, but feel free to make them for comfort. For any such matrix $A$, the set $K[A]$ of polynomials in $A$ is a commutative subalgebra of $M_n(K)$; the question is whether for any pair of commuting matrices $X,Y$ at least one such commutative subalgebra can be found that contains both $X$ and $Y$.  I was asking myself this in connection with frequently recurring requests to completely characterise commuting pairs of matrices, like . While providing a useful characterisation seems impossible, a positive anwer to the current question would at least provide some answer.  Note that in many rather likely situations one can in fact take $A$ to be one of the matrices $X,Y$, for instance when one of the matrices , or more generally if its  (so coincides with the characteristic polynomial). However this is not always possible, as can be easily seen for instance for diagonal matrices $X=\operatorname{diag}(0,0,1)$ and $Y=\operatorname{diag}(0,1,1)$. However in that case both will be polynomials in $A=\operatorname{diag}(x,y,z)$ for any distinct values $x,y,z$ (then $K[A]$ consists of all diagonal matrices); although in the example in  the matrices are not both diagonalisable, an appropriate $A$ can be found there as well.   I thought for some time that any maximal commutative subalgebra of $M_n(K)$ was of the form $K[A]$ (which would imply a positive answer) for some $A$ with minimal polynomial of degree$~n$, and that a positive answer to my question was in fact instrumental in proving this. However I was wrong on both counts: there exist (for $n\geq 4$) commutative subalgebras of dimension${}&gt;n$ (whereas $\dim_KK[A]\leq n$ for all $A\in M_n(K)$) as shown in , and I was forced to correct  in the light of this; however it seems (at least in the cases I looked at) that many (all?) pairs of matrices $X,Y$ in such a subalgebra still admit a matrix $A$ (which in general is not in the subalgebra) such that $X,Y\in K[A]$. This indicates that a positive answer to my question would not contradict the existence of such large commutative subalgebras: it would just mean that to obtain a maximal dimensional subalgebra containing $X,Y$ one should in general avoid throwing in an $A$ with $X,Y\in K[A]$. I do think these large subalgebras easily show that my question but for three commuting matrices has a negative answer.  Finally I note that  to the cited MO question mentions a result by Gerstenhaber that the dimension of the subalgebra generated two commuting matrices in $M_n(K)$ cannot exceed$~n$. This unfortunately does not settle my question (if $X,Y$ would generate a subalgebra of dimension${}&gt;n$, it would have proved a negative answer); it just might be that the mentioned result is true because of the existence of $A$ (I don't have access to a proof right now, but given the formulation it seems unlikely that it was done this way).  OK, I've tried to build up the suspense. Honesty demands that I say that I do know the answer to my question, since a colleague of mine provided a convincing one. I will however not give this answer right away, but post it once there has been some time for gathering answers here; who knows somebody will prove a different answer than the one I have (heaven forbid), or at least give the same answer with a different justification. Weighted choice short and simple I'm trying to get:  document.createElement('div')  //=&gt; true {tagName: 'foobar something'}  //=&gt; false   In my own scripts, I used to just use this since I never needed tagName as a property:  if (!object.tagName) throw ...;   So for the second object, I came up with the following as a quick solution -- which mostly works. ;)  The problem is, it depends on browsers enforcing read-only properties, which not all do.  function isDOM(obj) {   var tag = obj.tagName;   try {     obj.tagName = '';  // Read-only for DOM, should throw exception     obj.tagName = tag; // Restore for normal objects     return false;   } catch (e) {     return true;   } }   Is there a good substitute? A function $f: \mathbb R \to \mathbb R$ satisfies equation $f(x+y)=f(x)f(y)$ for all $x,y\in \mathbb R $ Do you have advantage when multiple sources give advantage and only one gives disadvantage? As I understand it:   if you have Advantage from two different sources, you simply have Advantage (no stacking) if you have advantage from one source, and disadvantage from one source, they cancel out.     So what if you have advantage from two or more sources, and disadvantage from one source?  My assumption is that you simply have advantage, or put another way, you have Advantage on a roll when the # of Advantages > # of Disadvantages (and vice versa).  Is that correct? Bibliography style elsarticle-num-names with DOI and hyperlinks but no explicit url I prepared my article with elsarticle, using \citep &amp; \citet throughout. I originally used apalike bibliographystyle but now need to change it to elsarticle-num-names for citation formatting requirements (see point #2 below).  Now, I am attempting to make 2 changes:     add DOIs to the bibliography change reference style to [1] for \citep and Author et al. [1] for \citet.   I want to keep hyperref and do not want explicit URLs (only DOIs) but cannot make this work!  Thank you for any help you might have!  MWE:  \documentclass[preprint,12pt]{elsarticle} %\usepackage{hyperref}  \journal{Test Journal} \begin{document} \begin{frontmatter} \title{The Title} \author{Prof. Big Ol' Wanker} \address{123 Happy Lane} \begin{abstract} TEXT \end{abstract} \begin{keyword} keyword 1 \sep keyword 2 \sep keyword 3 \end{keyword} \end{frontmatter}  \section{SECTION1TEST} \noindent cite: \cite{Richards1931} \\ citep: \citep{Richards1931} \\ citet: \citet{Richards1931} \\  \bibliography{library} \bibliographystyle{elsarticle-num-names}  \end{document}   Here is the reference for Richards1931 from my library.bib file:    @article{Richards1931, author = {Richards, LA}, doi = {10.1063/1.1745010}, file = {:D$\backslash$:/Papers/Richards - 1931 - Capillary Conduction of Liquids Through Porous Mediums - Journal of Applied Physics.pdf:pdf}, issn = {01486349}, journal = {Journal of Applied Physics}, pages = {318}, title = {{Capillary Conduction of Liquids Through Porous Mediums}}, url = {http://scitation.aip.org/content/aip/journal/jap/1/5/10.1063/1.1745010}, volume = {1}, year = {1931} }   without hyperref (wanted hyperlinks present, DOI displays correctly, but unwanted URL is present):    with hyperref (hyperlinks not present, DOI displays incorrectly, and unwanted URL is present): Does the plastic cap on a Presta valve serve any purpose once fitted to a rim? I can see the use of the valve cap on a Presta valve when the tube is still packaged (it obviously stops the valve puncturing the tube), but does it do anything except look pretty (or not) once you've fitted the tube to a rim?  I've kept them on out of habit, because I've had problems with sticking Schrader valves in the past when I've lost the caps and dirt/grime has got in there - but the design of Presta valves suggests to me that they wouldn't suffer this fate.  Given that I really need to , is replacing this cap something I can leave out of my daily chores? Are there any universal rules in appropriating “_an,” “_sh,” “_es,” “_ch” for the demonyms of countries? Suffixes indicating people and language of country vary by country:  _an: American, German, Italian, Belgian, Australian, Russian, Ukrainian, Korean,  Mexican, Brazilian, Chilean, Argentinean, Indonesian, Malaysian, Iranian, Egyptian, Somalian, Palestinian  _sh: English, British, Polish, Danish, Swedish, Turkish,    _ch: French, Dutch  _ese: Chinese, Taiwanese, Japanese, Vietnamese, Portuguese  _no: Filipino, Latino  _i: Israeli  _: Thai  Among the above, _an seems to outnumber other suffixes.  Are there any simple rule to govern appropriation of suffix turning a country name into adjective, indicating people and language of countries in the world in terms of say, region, race, or cultural background? Or is it just discretional? Whence came the different varieties of the "long i" diphthong? What is the origin of “long long i” before voiced consonants (the [ai] of wide, while, &amp; tribe) versus “short long i” before unvoiced consonants (the [ʌi] of white, wife, &amp; wipe)? When did this difference appear? Is it just a secondary distinction, or are there minimal pairs for these two diphthongs?  Obviously the distinction is not present in all accents—though its presence in most leads me to believe it's not a late arrival—and yet I've never found a dictionary that distinguishes them. Random point uniform on a sphere If $X=(x,y,z)$ is a random point uniform on the unit sphere in $\mathbb{R}^3$,  Are the  coordinates $x$, $y$, $z$ uniform in interval $(-1,1)$?