After reinstalling windows 7 on my computer I receive the follow error on bootup  bootmgr error   I can only boot into windows if I unplug the linux hard drive and I can only boot into Linux if I press Esc to open the BIOS and select the linux hard drive.   I tried using   update grub-install   but that did not seem to help. How do I get grub back to its original self with both OSs to boot into from the grub menu?  Below is my sudo update-grub command:  $ sudo update-grub [sudo] password for gin:  Generating grub.cfg ... Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported. Found linux image: /boot/vmlinuz-3.8.0-39-generic Found initrd image: /boot/initrd.img-3.8.0-39-generic Found linux image: /boot/vmlinuz-3.8.0-37-generic Found initrd image: /boot/initrd.img-3.8.0-37-generic Found linux image: /boot/vmlinuz-3.8.0-36-generic Found initrd image: /boot/initrd.img-3.8.0-36-generic Found linux image: /boot/vmlinuz-3.8.0-35-generic Found initrd image: /boot/initrd.img-3.8.0-35-generic Found linux image: /boot/vmlinuz-3.8.0-34-generic Found initrd image: /boot/initrd.img-3.8.0-34-generic Found linux image: /boot/vmlinuz-3.8.0-29-generic Found initrd image: /boot/initrd.img-3.8.0-29-generic Found memtest86+ image: /boot/memtest86+.bin done   Below is my fdisk command  $ sudo fdisk -l [sudo] password for gin:   Disk /dev/sda: 120.0 GB, 120000000000 bytes 255 heads, 63 sectors/track, 14589 cylinders, total 234375000 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 Disk identifier: 0x000764a1     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048   226250751   113124352   83  Linux /dev/sda2       226252798   234373119     4060161    5  Extended /dev/sda5       226252800   234373119     4060160   82  Linux swap / Solaris  WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.   Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 256 heads, 63 sectors/track, 121126 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x8d19c4c4     Device Boot      Start         End      Blocks   Id  System /dev/sdb1               1  4294967295  2147483647+  ee  GPT Partition 1 does not start on physical sector boundary.  Disk /dev/sdg: 4009 MB, 4009754624 bytes 145 heads, 48 sectors/track, 1125 cylinders, total 7831552 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 Disk identifier: 0x0004e24a     Device Boot      Start         End      Blocks   Id  System /dev/sdg1   *          48     7831551     3915752    7  HPFS/NTFS/exFAT  Disk /dev/mapper/cryptswap1: 4157 MB, 4157603840 bytes 255 heads, 63 sectors/track, 505 cylinders, total 8120320 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 Disk identifier: 0x45a3a931  Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table   My first attempt at   $ sudo mount /dev/sda /mnt mount: /dev/sda already mounted or /mnt busy gin@ger:~$ for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done mount: mount point /mnt/sys does not exist mount: mount point /mnt/proc does not exist mount: mount point /mnt/run does not exist mount: mount point /mnt/dev does not exist gin@ger:~$ sudo chroot /mnt chroot: failed to run command `/bin/bash': No such file or directory   Below is my boot order:  UEFI BOOT SOURCES     WINDOWS BOOT MANAGER LEGACY BOOT SOURCES     HARD DRIVE         SATO0         SATO1 NETWORK CONTROLLER (REALTEK PXE B07 D00)
I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?
Content replacement from external website strip last comma from get_the_category How do I find duplicate values in a table in Oracle? After writing the FreeNAS IMG to a 16 GB USB flash drive, I can now only use 938 MB. I used the Win32 Disk Imager tool to write the IMG to the device. Then later, when I inserted the the USB drive into my Windows 7 computer it said that it had to be formatted, because it couldn't read it. I believe this is normal. So I formatted it inside Windows using the format option when prompted. So in Windows Explorer now, 938 MB is reported as capacity of this device.    Also, when i check the properties dialog box I can see the same numbers.    And when I check with diskmgmt.msc I can see there are several volumes I don't recognize and unallocated space of 12.79 GB.    Now, I have another 2 GB USB flash drive with the same problem. It too was used for FreeNAS, and it too has a reported capacity of only 938 MB. I thought it was broken there for a while, until I saw the same problem with this 16 GB model.  I tried using diskpart on the 2 GB model, and I saw that there were several partitions there (list partitions) just like on this one. So I used the clean option to try to wipe it, but that wiped off everything so it's totally useless now. I'm not sure how to rebuild it.  Is this a standard routine, like part of the whole "user experience", that whenever you make a bootable USB falsh drive with FreeNAS, it messes up your device? I am new to FreeNAS, so i wouldn't know. But it sure looks like it. Maybe it is in fact the format operation in Windows that messes things up... I don't know. It's not very nice.  How do I restore the capacity back to 16 GB-ish (14.9 GiB)? If $A|B$ and $B|A$ then prove $A=\pm B$ If $A|B$ and $B|A$ then prove $A=\pm B$   So far I have $A|B \iff AX=B$ and $B|A \iff BY=A$ with $X,Y \in \mathbb{Z}$  Not sure how to finish, any help. Finding the number of analytic functions which vanish only on a given set. Let $S = \{0\}\cup \{\frac{1}{4n+7} : n =1,2\ldots\}$. How to find the number of analytic functions which vanish only on $S$?  Options are   a: $\infty$  b: $0$  c: $1$  d: $2$ Multiple object instances represented by two slightly shifted rectangles In a software diagram, I'd like to be able to represent multiple instances of an object by two rectangles with one of them slightly shifted. I recently learned about the pic style so I'm using it with two nodes to achieve what I want.  The following example does work, but I'd like to know if I can do the same without using the fill=white. My hack kind of assumes the entire picture background is white and that may not always hold. I'd like to be able to crop the unwanted picture part out.  \documentclass[crop,border=3pt]{standalone}  \usepackage{pgf,tikz} \usetikzlibrary{positioning}  \begin{document} \begin{tikzpicture}[     every node/.style={font=\sffamily\small},     block/.style={         rectangle, draw, align=center, minimum width=2cm,         minimum height=1.4cm, font=\sffamily\small     },     multinode/.pic={         \node [block] at (0.1,0.1) {};         \node [block, \tikzpictextoptions, fill=white] at (0,0) {\tikzpictext};% &lt;-- FILL WHITE     } ]     \node [block] (STG) at (2,5) {single\\instance};     \pic [pic text={multi\\instance}] at (5,5) {multinode}; \end{tikzpicture} \end{document}   The following images show first one version with the fill white hack, and then one version without it. Suppose I attach an blur function to an HTML input box like this:  &lt;input id="myInput" onblur="function() { ... }"&gt;&lt;/input&gt;   Is there a way to get the ID of the element which caused the blur event to fire (the element which was clicked) inside the function? How?  For example, suppose I have a span like this:  &lt;span id="mySpan"&gt;Hello World&lt;/span&gt;   If I click the span right after the input element has focus, the input element will lose its focus. How does the function know that it was mySpan that was clicked?  PS: If the onclick event of the span would occur before the onblur event of the input element my problem would be solved, because I could set some status value indicating a specific element had been clicked.  PPS: The background of this problem is that I want to trigger an AJAX autocompleter control externally (from a clickable element) to show its suggestions, without the suggestions disappearing immediately because of the blur event on the input element. So I want to check in the blur function if one specific element has been clicked, and if so, ignore the blur event. What are drawbacks or disadvantages of singleton pattern? The  is a fully paid up member of the 's , but it lately seems rather orphaned by the developer world. I still use quite a lot of singletons, especially for , and while you have to be a bit careful about multithreading issues (like any class actually), I fail to see why they are so awful.  Stack Overflow especially seems to assume that everyone agrees that Singletons are evil. Why?  Please support your answers with "facts, references, or specific expertise" Command-line mv exclusion list How To Display Too Much Data We're building a web-based platform where the main dashboard shows a table of data for users to view and analyze. As we're growing this tool, we seem to be adding more and more columns and are running out of horizontal space on smaller screen resolutions (we're seeing some data wrap). It is important to the user to view all columns at once, so column hiding is somewhat out of the question, as is horizontal scrolling (per the boss's request and because horizontal scrolling sucks anyways). I was wondering if anyone knew of a clever UI for tables with many columns.  EDIT  Below is a screen capture of the layout of the table. Unfortunately for security purposes I had to blur out the column titles. This example has rows with practically no data in them, but in use they will have lots of data that will expand wider than their respective column titles. In response to some of the answers, it is imperative that the user see all the columns, as they are all necessary to analyze the data to make certain decisions. All the data is numeric aside from the first three columns. Thanks again for any feedback.    Ok so I see that uploading this image doesn't really do it justice... it takes up the full width of the screen at 1680x1050 resolution (22") and as data fills in the columns, the left column w/the text shrinks down a bit.  EDIT 2 I just wanted to say thank you to everyone's awesome ideas. I can only select one answer, but a lot of your ideas have proven very useful and may end up in the final product. Thanks again! Illustrator Vector Graphics Appearing Pixellated Prove that in a triangle $$r^2+r_1^2+r_2^2+r_3^2=16R^2-(a^2+b^2+c^2)$$ where the symbols have their usual meanings. I am looking for a smaller or elegant proof using trigonometry. A geometric proof would be super cool. I did prove it but it took me ages to do the calculation. Thanks. Faction Membership Limits in Fallout 4 Are there any limitations to the faction memberships you can have in Fallout 4?  I'm brand-new to the Fallout universe, and just got to the point of being invited to the Brotherhood of Steel. However, I'm a bit concerned about their politics and how it may affect my standing with other factions I may encounter.  If I join the Brotherhood, will there be other factions that I can't join? Are there any other factions that have such limitations?  Note: I'm still not very far into the game, and not very familiar with the Fallout 4 universe in general, so please make liberal use of spoiler markdown in your answers. Essentially, the only things that need to be un-spoilered are Yes/No answers for the questions asked above. How to prove $\cos\left(\pi\over7\right)-\cos\left({2\pi}\over7\right)+\cos\left({3\pi}\over7\right)=\cos\left({\pi}\over3 \right)$ $\operatorname{Aut}(\mathbb Z_n)$ is isomorphic to $U_n$. How do I intercept a method call in C#? For a given class I would like to have tracing functionality i.e. I would like to log every method call (method signature and actual parameter values) and every method exit (just the method signature).      How do I accomplish this assuming that:     I don't want to use any 3rd party AOP libraries for C#, I don't want to add duplicate code to all the methods that I want to trace,   I don't want to change the public API of the class - users of the class should be able to call all the methods in exactly the same way.     To make the question more concrete let's assume there are 3 classes:     public class Caller   {      public static void Call()       {          Traced traced = new Traced();          traced.Method1();          traced.Method2();       }  }   public class Traced   {      public void Method1(String name, Int32 value) { }       public void Method2(Object object) { }  }   public class Logger  {      public static void LogStart(MethodInfo method, Object[] parameterValues);       public static void LogEnd(MethodInfo method);  }   How do I invoke Logger.LogStart and Logger.LogEnd for every call to Method1 and Method2 without modifying the Caller.Call method and without adding the calls explicitly to Traced.Method1 and Traced.Method2?  Edit:  What would be the solution if I'm allowed to slightly change the Call method? I have a brand new 32GB flash drive that was bought from Hong Kong but manufactured in China.  When I plug it in, it's detected, and when I examine the properties of the drive the size is reported to be 31.2 GB.  Windows forces me to format it but I have not manged to actually do that.  I then I browsed the internet and a forum told me to change the letter to L. After I did that I searched many programs that can help me format it, but when I checked it back, it is 4MB now.  Any idea what's happening with my drive? I need to remove every line that has a value of 2 or less in the 8th field (column).   My data looks like this:  12-31   Airport 189 379 41  49.70946503 -124.91377258   2   2880    30.8 01-01   AlberniElementary   165 331 16  49.26100922 -124.80662537   4   5760    26.1 01-09   BamfieldMarine  161 323 23  48.83490372 -125.13572693   2   2875    27.4 01-10   BamfieldMarine  161 323 23  48.83490372 -125.13572693   3   3068    38.6   I understand that using awk I can strip off the values desired and print them to another file, and I understand that sed would edit the current file. In either case, I need to retain the original file.   Note: Please provide thorough explanations with your solutions. It is not suffice to just write the command, please annotate suggestions.   Further note: The data has a header line, so most likely solution will need to      awk 'FNR >1'   I suppose? Is it possible to save `bc` command line history? bash has a handy file .bash_history in which it saves the history of commands and on the next execution of bash the history is populated with saved commands. Is it possible to save bc command history to a file in the same way and then load it on startup so that bc history is preserved? I tried reading  and it mentions readline and libedit. From ldd /usr/bin/bc I see mine uses readline and readline has  and read_history functions. Is this functionality implemented in bc or to do it I'll need to patch bc?