Lost windows 8 data recovery
How do I recover my accidentally lost Windows partitions after installing Ubuntu?
Make hyperref take pdfinfo from \title and \author I once read about an option for hyperref that automatically takes the info provided via the standard \author and \title, and puts it into the pdfinfo. Now I want to implement it in my template and can't find it anywhere in the hyperref manual nor anywhere else.  Did I dream about this or can someone help me out here?  (A similar, but more general question: ) Is there a way to log all Microsoft SQL Server queries executed on a certain server, with their respective durations?  I'd like to be able to analyze all queries will a tool like what  does for PostgreSQL. While we're at it: do you know of any such tools? Warning when battery is fully charged I would like to get an alert (with sound) when my laptop battery is fully charged.  How can I do that? Let $1, \omega, \dots, \omega^{n-1}$ be the roots of the equation $z^n-1=0$, so that the roots form a regular $n$-gon in the complex plane. I would like to calculate $$ \prod_{j \ne k} (\omega^j - \omega^k)$$  where the product runs over all $j \ne k$ with $0 \le j,k &lt; n$.    My attempt so far  Noting that if $k-j = d$ then $\omega^j - \omega^k = \omega^j(1-\omega^d)$, I can re-write the product as $$ \prod_{d=1}^{\lfloor n/2 \rfloor} \omega^{n(n-1)/2}(1-\omega^d)^n$$  I thought this would be useful but it hasn't led me anywhere.  Alternatively I could exploit the symmetry $\overline{1-\omega^d} = 1-\omega^{n-d}$ somehow, so that the terms in the product are of the form $|1-\omega^d|^2$. I tried this and ended up with a product which looked like $$\prod_{j=0}^{n-1} |1 - \omega^j|^n $$  (with awkward multiplicative powers of $-1$ left out). This appears to be useful, but calculating it explicitly is proving harder than I'd have thought.  The answer I'm expecting to find is something like $n^n$.    My motivation for this comes from Galois theory. I'm trying to calculate the discriminant of the polynomial $X^n+pX+q$. I know that it must be of the form $ap^n+bq^{n-1}$ for some $a,b \in \mathbb{Z}$, and putting $p=0,q=-1$, the polynomial becomes $X^n-1$. This has roots $1, \omega, \dots, \omega^{n-1}$, so that $(-1)^{n-1}b$ is (a multiple of) the product you see above. An expression for $a$ can be found similarly by setting $p=-1,q=0$. error when adding user to wheel group in CentOS 7 I am trying to grant sudo privileges to a user of a CentOS 7 devbox by typing gpasswd -a user wheel, but the attempt is failing.  What am I doing wrong?    Here is what I typed:    I discovered that the user is not in the wheel group as follows:    [user@localhost git]$ sudo yum install git [sudo] password for user:  Sorry, try again. [sudo] password for user:  Sorry, try again. [sudo] password for user:  user is not in the sudoers file.  This incident will be reported.   I then logged in as root and typed the following to add the user to the wheel group:    [user@localhost git]$ su - Password:  Last login: Thu Aug 20 17:11:31 PDT 2015 on pts/0 [root@localhost ~]# gpasswd -a user wheel Adding user user to group wheel [root@localhost ~]# exit logout   I finally tried to use the sudo command again but it failed as follows:    [user@localhost git]$ sudo yum install git [sudo] password for user:  user is not in the sudoers file.  This incident will be reported. [user@localhost git]$ How to change keyboard layout in Lubuntu 15.10? I have recently upgraded my PC from Lubuntu 14.10 to 15.10. Before the upgrade my keyboard layout matched my Danish keyboard. But after the upgrade I probably have a standard English/US layout.   Preferences/Language Support, doesn't let me configure the keyboard layout. Preferences/Keyboard and Mouse, only let me configure stroking delay and similar.    I don't know about iBus and fcitx, as far as the tooltip infomation tells me, its for more complex languages such as Chinese.  I don't have a US icon in the taskbar, no keyboard and/or language icon at all.  Things I have tried:   Running the following in a terminal works, but only until the next reboot:  setxkbmap -layout dk  I got the following parameter in the file /etc/default/keyboard:  XKBLAYOUT="dk"  Installing and running the app Lxkeymap changes the keyboard to Danish when I run it, but rebooting will change the layout back to US.   I don't want anything fancy, I just want to set my keyboard layout to Danish. How can I do that? What sites should have hyperlinking (onebox) support in chat? Some sites are . What additional sites should the chat support?  One suggestion per answer. Suppose we have two functions, $f:X\rightarrow Y$ and $g:Y\rightarrow Z$. If both of these functions are onto, how can we show that $g\circ f:X\rightarrow Z$ is also onto? Is paralleling diodes a bad idea? I'm trying to repair an 800W power supply (see my previous question on this.) One thing that gets me is that the design has two schottky diode packages (in TO-220) in parallel. I was always told this was A Bad Idea, but since they are thermally coupled to the same heatsink, does it present a problem in this instance? I've also noticed the same for the input bridge rectifier, two are used in parallel. $t^3$ is never equal to Let $t$ be a real number such that $t^2=at+b$ for some positive integers $a$ and $b$. Then for any choice of positive integers $a$ and $b$, $t^3$ is never equal to: (A). $4t+3$ (B). $8t+5$ (C). $10t+3$ (D). $6t+5$  We have $t^3 = at^2+bt$ and so for (A) we have $t^3 = 4t+3 = 4(at^2+bt)+3$. I don't see how to continue since this is a cubic equation. Is there an easier way of finding a contradiction? Can a single sentence be used to distinguish between isomorphic classes of finite structures? The answer seems to be yes, judging from the following exercise I found in the book Mathematical Logic by H.D. Ebbinghaus, J. Flum, and W. Thomas:     Let $S$ be a finite symbol set and let $\mathfrak{U}$ be a finite $S$-structure. Show that there is an $S$-sentence $\varphi _{\mathfrak{U}}$ the models of which are precisely the $S$-structures isomorphic to $\mathfrak{U}$.   I think I have an idea of how to solve this exercise, but I seem to be unable to materialize it. Thanks. How many rationals of the form $\large \frac{2^n+1}{n^2}$ are integers? getting exception while putting list data into the map So I'm pretty sure there's at least 2, one for both X &amp; Y.   Much like other iterations of the other Pokemon games, are there other Legendaries? How many legendaries, and what are their names? Monotone functions and non-vanishing of derivative Removing small spaces (slivers) between polygons? I enjoy going fast and my current bicycle tops too early, what kind of upgrades would I need to make to achieve a taller final gear? sed - replace string with file contents I have two files: file1 and file2.  file1 has the following contents:  ---   host: "localhost"   port: 3000   reporter_type: "zookeeper"   zk_hosts:      - "localhost:2181"   file2 contains an IP address (1.1.1.1)  What I want to do is replace localhost with 1.1.1.1, so that the end result is:  ---   host: "1.1.1.1"   port: 3000   reporter_type: "zookeeper"   zk_hosts:      - "1.1.1.1:2181"   I have tried:  sed -i -e "/localhost/r file2" -e "/localhost/d" file1 sed '/localhost/r file2' file1 |sed '/localhost/d' sed -e '/localhost/r file2' -e "s///" file1   But I either get the whole line replaced, or the IP going to the line after the one I need to modify. I'd wish to visit Dubai with my girlfriend, but after reading  and  I started to get a little worried about it. How should I book an hotel? Must I book two singles? Could it be a problem if we walk together in the city and go together to restaurants and malls without being married? Suppose $X, Y$ are independent random variables with $X\sim NB(r,p)$ and $Y\sim NB(s,p)$. Then $$X + Y \sim NB(r+s,p)$$  How do I go about proving this? I'm not sure where to begin, I'd be glad for any hint.