I am using ubuntu 12.04. Can I install windows 7 and use it as a dual boot system. When I tried this earlier windows doesn't detect ubuntu.Is there any solution for this.
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?
I want to  GRANT SELECT     ON ALL TABLES     TO foo;   But postgres tells me I have a syntax error at "TO". It expects a GRANT like:  GRANT SELECT     ON ALL TABLES     IN SCHEMA public     TO foo;   We have a handful of tables that have been sharded such that public, shard123, and shard124 all have a table my_table, and public.my_table is the parent of both shard123.my_table and shard124.my_table. I've GRANTed SELECT to foo for public schema, but foo doesn't have permission for any of the shard schemas.  I've also done:  ALTER DEFAULT PRIVILEGES     FOR ROLE dba     GRANT SELECT     ON TABLES     TO foo;   ...which should automatically grant for any new tables and schemas made from now on.  There are 1000 &lt; n &lt; 10000 shards/schemas, so GRANTing separately for each shard/schema is impractical.  How can I GRANT to a role for all existing tables across all existing schemas (all shards)?  Or even better, can I GRANT for all schemas LIKE 'shard%'? Story where someone gets disconnected from computers for cybercrime I read a short (in the range of 5-20 pages) science fiction story a while ago, and can't remember the title of the story or its author at the moment.  The basic story is that of a super-savvy computer hacker who got all of his knowledge of computers removed from his brain, temporarily (one year?) for cybercrime, including (IIRC) some form of identity theft, and is released into the public without any jail-time or anything. This is very hard on him, for this future-Earth relies heavily on highly interconnected computers for basic and daily needs. This is not immediately clear at the start of the story, but it becomes apparent after a little while.  Part of the story includes the main character (I don't remember if he is granted a name in the story) wanders into a cafe or a bar, and is invited to play a game of digital, . He has to turn down the invite, though, because he doesn't know and is blocked from knowing how to use computers. He also really doesn't want the other characters to know this, because apparently having your computer knowledge removed from your brain for cybercrime is a major stigma in that society. The character also has difficulty using his (futuristic equivalent of a) credit card, as that also requires some computer knowledge.  Any ideas? How can I take a screenshot with Selenium WebDriver? What if robots.txt disallows itself? Centering with \includegraphics not with \begin{figure}? I mess up with things when I try to use the figure-thing: the picture is not appearing with the correct alignment (apparently because I forget the float package). Now I want to use only the graphicx package with \includegraphics. How can I center the \includegraphics without figure?  Not working or doing centering to the document afterwards.  \includegraphics[width=0.5 \textwidth]{./Pictures/r.png}{\centering} \includegraphics[width=0.5 \textwidth]{./Pictures/r.png}\centering How do you use unlocked rewards after each mission in Splinter Cell: Double Agent? In the PC version of Splinter Cell: Double Agent, how can you use the rewards that you receive after each mission? For example, the shotgun attachment, or the colored night vision?  My list shows that the rewards are there, but I can not figure out how to use them. How do I calculate someone's age based on a DateTime type birthday? Given a DateTime representing a person's birthday, how do I calculate their age in years? Foreign key constraints failures Given the following tables:  CREATE TABLE `longdescs` (   `comment_id` int(11) NOT NULL AUTO_INCREMENT,   `bug_id` mediumint(9) NOT NULL,   `who` mediumint(9) NOT NULL,   `bug_when` datetime NOT NULL,   `work_time` decimal(7,2) NOT NULL DEFAULT '0.00',   `thetext` mediumtext NOT NULL,   `isprivate` tinyint(4) NOT NULL DEFAULT '0',   `already_wrapped` tinyint(4) NOT NULL DEFAULT '0',   `type` smallint(6) NOT NULL DEFAULT '0',   `extra_data` varchar(255) DEFAULT NULL,   PRIMARY KEY (`comment_id`),   KEY `longdescs_bug_id_idx` (`bug_id`),   KEY `longdescs_who_idx` (`who`,`bug_id`),   KEY `longdescs_bug_when_idx` (`bug_when`),   KEY `comment_id` (`comment_id`),   CONSTRAINT `fk_longdescs_bug_id_bugs_bug_id` FOREIGN KEY (`bug_id`) REFERENCES `bugs` (`bug_id`) ON DELETE CASCADE ON UPDATE CASCADE,   CONSTRAINT `fk_longdescs_who_profiles_userid` FOREIGN KEY (`who`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=82727 DEFAULT CHARSET=utf8  CREATE TABLE `trace` (   `id` mediumint(9) NOT NULL AUTO_INCREMENT,   `comment_id` mediumint(9) NOT NULL,   `type` varchar(255) NOT NULL,   `short_hash` char(22) DEFAULT NULL,   `stack_hash` char(22) DEFAULT NULL,   `trace_text` mediumtext NOT NULL,   `quality` double NOT NULL,   PRIMARY KEY (`id`),   UNIQUE KEY `trace_comment_id_idx` (`comment_id`),   KEY `trace_short_hash_idx` (`short_hash`),   KEY `trace_stack_hash_idx` (`stack_hash`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8  ALTER TABLE trace ADD CONSTRAINT `fk_trace_comment_id_longdescs_comment_id` FOREIGN KEY (`comment_id`) REFERENCES `longdescs`(`comment_id`) ON UPDATE CASCADE ON DELETE CASCADE; ERROR 1005 (HY000): Can't create table 'bugs4.#sql-4bb_6f1d' (errno: 150)   MariaDB [bugs4]> show warnings;  | Level  | Code | Message | | Warning |  150 | Create table 'bugs4/#sql-4bb_6f1d' with foreign key     constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns.  | | Error   | 1005 | Can't create table 'bugs4.#sql-4bb_6f1d' (errno: 150)                                                                                                                       |   Any idea why I get that error? FYI I looked it up and it appears that it was a bug but not anymore. Create WiFi hotspot on ubuntu Explain why $E(X) = \int_0^\infty (1-F_X (t)) \, dt$ for every nonnegative random variable $X$ Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show,   $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$   when $X$ has : a) a discrete distribution, b) a continuous distribution.   I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X&gt;  t)$. Although how useful integrating that is, I really have no idea. Reading input from text file to array in c++ I'm wanting to use Xen Hypervisor to be able to run both Ubuntu 12.04 and Windows 7 at the same time using virtualization. I can find plenty of XCP tutorials but I'm not looking to install the cloud stack, I just want the server confined to my machine.  All I need is a link to a decent tutorial for this purpose. I've read a ton of articles that lead me to believe I'm on the right track, but not enough to feel comfortable getting it right if I just dive in. I'm getting caught up on whether I need to install Ubuntu and then install Xen into it, or do I need to install Xen on a small partition and then leave the rest of the hard drive open for the virtualization... I dunno.  Basically, I need the virtualization of Windows 7 for Adobe Premiere and After Effects (until Lightworks for Linux comes out and I can afford NUKEX). If I didn't need those, I'd be rocking out a straight up Ubuntu machine or just using VirtualBox for my virtualization. However, I need Windows to run as an HVM so it runs like I would expect rather than having the issues I may run into with VirtualBox (video drivers, etc).  So, any suggestions? Good and easy way to share files on local machine I would like to have a directory that has following properties:    Many users can copy files into it  These files can be deleted/changed by these users (user A can delete/modify file that was copied into this directory)    it cant be done using normal file permissions (because permissions are retained on copy).  Here is what I found on the net:        Some use cases:    Sharing music on local machine  Simple git repository sharing (just make a bare repository writeable to many people) --- i know that there are solutions like gitosis Allow many developers to modify test instance of php app without giving them root (i guess they would copy files) --- I'm leading a team of nonprofit junior developers and I need to keep that one simple!    EDIT  AFAIK setting SGID bit is not enugh, it only affects newly created files --- and basic workflow for these use cases ivnolves copying and other operations (which cleave file's gid unchanged) I have shown that if two $n\times n$ matrices $A$ and $B$ are invertible, then $AB$ is also invertible. I am having problems though with showing that $(AB)^{-1}=B^{-1} A^{-1}$. I thought of using their left-multiplication transformations but it seems that this is only associative and not commutative so I can reverse $L_A L_B$ GSC: How to move a site from a domain to sub domain, sub folder or new domain with a sub folder? Is it possible to tell Google's Webmaster Tools that our site hosted on www. has moved to a sub folder, sub domain or a new domain with sub folder? "physical block size is 2048 bytes, but Linux says it is 512" when formatting USB - How to create a bootable USB without this error I was using:  dd  if=/path/to/my/ubuntuiso/ubuntu.iso  of=/dev/sdb1  bs=4M  &amp;&amp;  sync   In order to create bootable Ubuntu USB drives on older Ubuntu versions. It was working perfectly. Sometimes I used the Startup Disk Creator program, which  worked well.  But when I use the same methods on Ubuntu 16.04 LTS, I get some warnings while formatting it afterwards.   The installation media works as expected, but when I try to format that USB stick after my work is done, I get the following warning :    The partitioning of that Pendrive looks strange :    And it also shows my 16GB pendrive as 64GB.  After struggling a lot with Gparted, I will somehow format it. But Why is it happening like this ?? Is there any better methods of creating bootable Ubuntu in 16.04 ?  EDIT : there is a related question . But my question is not about how to format it properly. My question is "How to create a bootable USB without that errors." &amp; "Wht are the causes of that error" Is there a way to switch the mesh selection mode by a shortcut? Is there a shortcut for switching between these three modes? Is it possible to do a multiline pattern match using sed, awk or grep? Take for example, I would like to get all the lines between { and }  So it should be able to match    1. {}  2. {.....}  3. {.....      .....}  Initially the question used &lt;p&gt; as an example. Edited the question to use { and}. There's already a question like this  so that my question could be considered duplicate, but I'll try to make my point clear that this is a different question.   Is there a way to derive  from the Lorentz' Force law or just from Maxwell's Equations?   The point is that we usually define, based on experiments, that the force felt by a moving charge on the presence of a magnetic field is $\mathbf {F} = q\mathbf{v}\times \mathbf{B}$, but in that case the magnetic field is usually left to be defined later.   Now can that force law be used in some way to obtain Biot-Savart law like we obtain the equation for the electric field directly from Coulomb's Force law?  I wanted to know that because as pointed out in the question I've mentioned, although Maxwell's Equations can be considered more fundamental, those equations are obtained after we know Coulomb's and Biot-Savart's laws, so if we start with Maxwell's Equations to obtain Biot-Savart's having use it to find Maxwell's Equations then I think we'll fall into a circular argument.   In that case, without recoursing to Maxwell's Equations the only way to obtain Biot-Savart's law is through observations or can it be derived somehow? How many ways can N elements be partitioned into subsets of size K?