If $v$ is an $m$-vector and $X$ is an $m \times n$ full rank matrix, how can I find the value for $n$-vector $s$ that satisfies the following?  $$ \frac{\partial}{\partial s} \|Xs - v\|^2 = 0 $$
It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?
Creating Users on secondary server in log shipping I have a production Server say ServerA I have setup log shipping to ServerB which is left in read-only mode. The purpose of this log shipping is to lower the load on production server for some expensive queries (painful reports).   Now if I have to create some logins using our domain accounts. I cannot do this because the secondary database is in standby mode.   I thought if I create these logins on Primary server it will be copied over to secondary server then the logs are restored there but this isnt the case.   I have done a lot of research online finding a way around to this. I found the following resources for this. I tried every method suggested in this articles but none of them seems to work.   1)   2)   3)   Has someone experienced the same issue? what did you do? Is there any way around for this issue? Any suggestions any pointer please. Xubuntu Dropbox icon fail I am trying to install Ubuntu 16.04 LTS on a Dell XPS 13 (9350). The laptop came with Windows 10 pre-installed. I am installing from a pendrive but I think the issue would be the same if I used e.g. a USB DVD drive.   Dude, where's my hard drive?  I am blocked because the installation program cannot find 8.6Gb of free space on my hard drive despite the fact that there are hundreds of Gb free according to Windows. Digging a bit into the problem, it seems that Ubuntu cannot see my hard disk at all.    This is the output of GParted:    I am not sure what that drive mounted at /cdrom is, but it seems the only device that exists in the system that is not a RAM disk or a loop device:   Content of /proc/partitions:   ubuntu@ubuntu:~$ cat /proc/partitions   major minor  #blocks  name     1        0      65536 ram0     1        1      65536 ram1     1        2      65536 ram2     1        3      65536 ram3     1        4      65536 ram4     1        5      65536 ram5     1        6      65536 ram6     1        7      65536 ram7     1        8      65536 ram8     1        9      65536 ram9     1       10      65536 ram10     1       11      65536 ram11     1       12      65536 ram12     1       13      65536 ram13     1       14      65536 ram14     1       15      65536 ram15     7        0     130048 loop0     7        1    1104188 loop1     8        0    1970239 sda     8        1    1953439 sda1   Summary of fdisk -l:   ubuntu@ubuntu:~$ sudo fdisk -l |grep Disk Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors Disk /dev/loop0: 127 MiB, 133169152 bytes, 260096 sectors Disk /dev/loop1: 1.1 GiB, 1130688512 bytes, 2208376 sectors Disk /dev/sda: 1.9 GiB, 2017525248 bytes, 3940479 sectors Disklabel type: dos Disk identifier: 0x00000000   Result of fdisk of the only non-loop non-RAM device (not sure this is relevant):   ubuntu@ubuntu:~$ sudo fdisk -l |grep -A 50 sda Disk /dev/sda: 1.9 GiB, 2017525248 bytes, 3940479 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000  Device     Boot Start     End Sectors  Size Id Type /dev/sda1  *      129 3907007 3906879  1.9G  c W95 FAT32 (LBA)   I am blocked at this point. Any help will be much appreciated.   Additional information (following comments):   Running dmesg |grep -i sata shows (among others) eight lines that suggest some kind of error:   ata1: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF) ata2: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF) ata3: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF) ata4: SATA link down (SStatus 0 SControl 0) ata5: SATA link down (SStatus 0 SControl 0) ata6: SATA link down (SStatus 0 SControl 0) ata7: SATA link down (SStatus 0 SControl 0) ata8: SATA link down (SStatus 0 SControl 0)  I have "Restarted" windows instead of only "Shutdown" it to avoid problems with "fast startup", following some recommendations I have read of other users having problems installing Linux on Windows 10 laptops.ago   Regarding SATA, the BIOS says: "SATA Operation: RAID ON". The other two options available are "Disabled" and "AHCI".    I have followed the instructions of these two pages from Dell: , . Twitter Bootstrap - multiple image (thumbnail) carousel - move thumbnails one at a time I have the following code  &lt;?php if ($handle = opendir('C:/xampp/htdocs/movies')) {     while (false !== ($file = readdir($handle))) {         if ($file != "." &amp;&amp; $file != "..") {             echo $file."&lt;br /&gt;\n";         }     }     closedir($handle); } ?&gt;   When it does have mb language such as japanese, it doesn't display properly instead it display like kyuukyoku Choujin R ?????~? rather then kyuukyoku Choujin R 究極超人あ～る  Anyway to make it display the correct name or make it still download-able by others?  Thanks for helping me :) Math book: Exercise - Solution environment If I use this code provided by a question formulate of Sebastian .  \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{lipsum}  \newtcolorbox[auto counter]{problem}[2][]{% breakable, blankest, enhanced, attach boxed title to top left={yshift=-\tcboxedtitleheight}, left=\tcboxedtitlewidth+1mm, top=0pt, colback=white, fonttitle=\bfseries\sffamily, coltitle={cyan!60!black}, colbacktitle=white, colframe=white, title=\thetcbcounter,  overlay unbroken and first={% \node[fill=gray!30, inner sep=1pt, minimum width=\tcboxedtitlewidth,  outer sep=0pt, text=cyan!60!black, anchor=north] at(title.south)  {\foreach \i in {1,...,#2}{\if#2gt1{\,}\fi$\bullet$}};},#1}  \begin{document}  \lipsum[1]  \begin{problem}{1} \lipsum[2] \end{problem}  \begin{problem}{4} \lipsum[3] \end{problem}  \begin{problem}{2} \lipsum[4] \end{problem}  \end{document}   How could we create solutions environment, so we have at the end of the book solution of the exercises where each one have reference to chapter, page, number of exercise with the corresponding level of difficulty? How do I find the current machine's full hostname in C (hostname and domain information)? In a C project (POSIX), how do I get the fully qualified name for the current system?  For example, I can get just the hostname of my machine by doing gethostname() from unistd.h. This might give me machine3 in return, but I'm actually looking for machine3.somedomain.com for example.  How do I go about getting this information? I do not want to use a call to system() to do this, if possible. Why are irrational numbers uncountable and rationals countable? Question 1: Why are irrational numbers uncountable and rationals countable?  I really struggle to understand this. I initially thought it had something to with the fact that between any two numbers there will always be a irrational number. But now it has come to my attention that the same holds for rational numbers. So I can't really see the difference between them. What is it that makes the difference? Why can we line up all rational numbers one-to-one with the natural numbers, but not the irrationals with the naturals?  Sorry for a perhaps basic question, but I really, really struggle with it. Thanks. Unable to open any graphical app with "sudo" Tried to find some answer here: , but it didn't solve my problem.  $ sudo gedit Failed to connect to Mir: Failed to connect to server socket: No such file or directory. Unable to init server: Could not connect: Connection refused.  (gedit:4574): Gtk-WARNING **: cannot open display:   only gedit in terminal works fine. This is my local computer, not a remote system. fontenc vs inputenc Do I need to activate the firewall? I only use Ubuntu for a home desktop use? In many experiments in quantum mechanics, a single photon is sent to a mirror which it passes through or bounces off with 50% probability, then the same for some more similar mirrors, and at the end we get interference between the various paths. This is fairly easy to observe in the laboratory.  The interference means there is no which-path information stored anywhere in the mirrors. The mirrors are made of 10^20-something atoms, they aren't necessarily ultra-pure crystals, and they're at room temperature. Nonetheless, they act on the photons as very simple unitary operators. Why is it that the mirrors retain no or very little trace of the photon's path, so that very little decoherence occurs?  In general, how do I look at a physical situation and predict when there will be enough noisy interaction with the environment for a quantum state to decohere? Show that $\mathbb{Z}/n^2\mathbb{Z}$ is not isomorphic to other group I'm currently working on a proof, but didn't get the right idea, a hint would be appreciated:  Show that $\mathbb{Z}/n^2\mathbb{Z}$ is not isomorphic to $\mathbb{Z}/n \times \mathbb{Z}/n$  So, lets assume there is an isomorphism between these groups, my first idea to was to construct a contradiction with the homomorphism property. But I don't know how, there should be an element in  $\mathbb{Z}/n \times \mathbb{Z}/n$ which is not in $\mathbb{Z}/n^2$ to reach this kind of contradiction. Of course there is $n \in \mathbb{Z}/n^2$ which is not in the other group but I don't know if this helps.  Thanks After the events on Miller's planet, it seems to come as a revelation to Brand that     Miller had only landed a couple hours ago, and died a few minutes ago.   The crew of the Endurance, even when they were back at NASA headquarters, had all the information they needed to figure out the time dilation and how long Miller had been on the planet. As such, they must have known that     Miller, even in the best case, would have only had a couple hours worth of data.   Why use all those resources (fuel and time) just for that? Baby Rudin claim: $1+\frac{1}{3}-\frac{1}{2}+\frac{1}{5}+\frac{1}{7}-\frac{1}{4}+\frac{1}{9}+\frac{1}{11}-\frac{1}{6}...$ converges This sequence is a rearrangement of the series $1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\frac{1}{5}...$. Note that at this point in the text we do not have any theorem about the convergence of rearrangements.  Let $\{s_n\}$ be the sequence of partials sums of the series then for $n \ge 0$  $s_{3(n+1)} = \sum ^n _ {k=0} \frac{1}{4k+1} + \frac{1}{4k+3} - \frac{2}{4k+4}$  We can view it as the sequence(on $n$) of partials sums of  $\sum_0 a_n = \sum_0 \frac{1}{4n+1} + \frac{1}{4n+3} - \frac{2}{4n+4}$  Where $|a_n| = a_n = \frac{1}{4n+4}\{\frac{3}{4n+1}+\frac{1}{4n+3}\} \le \frac{1}{4n^2}$.  By the comparison test $s_{3(n+1)}$ converges to some real $\alpha$.  But $s_{3(n+1)+1} = s_{3(n+1)}+ \frac{1}{4n+5}$ and $s_{3(n+1)+2} = s_{3(n+1)}+ \frac{1}{4n+5}+\frac{1}{4n+7} $hence we have a partition of $\{s_n\}$ into subsequences which tend to $\alpha$ and this implies $s_n \rightarrow \alpha$.  Is my proof correct? Any alternative solutions are appreciated. Synchronize/change Area51 profile image I just visited  and noticed that my profile picture is not the same as on all other sites.  According to  the image will be synchronized when synchronizing the complete profile. I did that but the image is still the same.  Then I wanted to change the image in the Area51 profile directly - but I can only change to a gravatar image and can't use the new and fancy Stack Exchange image.  Is that a bug? It should be trivial, and it might even be in the help, but I can't figure out how to navigate it. How do I indent multiple lines quickly in vi? Well, one example is this file of the game The Sims 2 for PS2: quickdat.arc. The file contains this .arc extension, but it's no one an archive file and it contains some data of the game inside. How can I do this? Put so many files in one?  How to do something like this? All the game files inside one without using a file compressor? fsck error on boot: /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY I dual boot Ubuntu and Windows 7. I was browsing on FireFox in Ubuntu and all of a sudden I get some error message, so I rebooted.  Now when I try to boot into Ubuntu I get this message:  fsck from util-linux 2.26.2 /dev/sda6 contains a file system with errors, check forced. /dev/sda6: Inodes that were part of a corrupted orphan linked list found.  /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.         (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda6 requires a manual fsck  Busybox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs) _   How can I fix this? How to detect using c# if a pendrive is plugged into a USB port? Is there a way to find out when in a LAN anyone plugs in a pendrive to the USB port?  Programatically (in C# preferably) or through some tool. Basically I'd imagine a client application sits on each terminal and monitors the USB ports and sends the information to the server.   a.) Can I get the details of the file(s) being copied? b.) Is there a way to do this without a client application?   EDIT  I dont want to disable the USB port entirely. its to be on a need to have basis. Basically just want the users on the LAN to share data responsibly and know that whatever data is tranfered is monitored and logged and can be questioned later.