I have a small project consisting of a Google maps satellite open layer with two new shapefiles overlaid on it. I have then used print composer to add a grid and some labels. I have also selected lock layers for map items and draw map canvas items in the map tab. However, when I come to import the exported map in to another document, the layers have shifted and the map has zoomed in to an offset position. This occurs in both pdf and image formats. How do I ensure the map I produce in print composer does not alter when saved for export?  I hope someone can help as I have noticed another user asked . Thanks in advance
I am a beginner using QGIS (1.8.0 Lisboa) on a Mac (OS X 10.6.8 Snow Leopard). I work on a file with two layers in the following sequence (top to bottom):    a vector polygon layer with a few outlines of various buildings in France and Italy (CRS: EPSG:4326 - WGS 84 - "on the fly" re projection is activated ) a Google satellite layer uploaded via open layer plugin.   Sometimes when changing the scale (scrolling in and out) the Google layer updates a little wrong in size or position compared to the polygon layer. But as soon as I "pan" the map everything reconstructs right. Now the problem I have concerns the print composer.  The result of any kind of export - pdf, or image or svg - of my map (vector layer + Google layer in the background) differs from what is shown in the preview of the print composer: the vector layer and the Google layer positions are mismatching and in a different scale. I can send some pictures showing screenshots of the print composer preview and the final results if required.  I tried almost everything:    new files with different CRS settings "cache" update preview "render" update preview different paper sizes,  different scales,   The problem appears only using an open layer map (Google, OpenStreetMap...). If I try the same using two vector layer (shapefile) - one with the buildings, another one with the city in background - everything works out great.  ...exasperating! Since it is a real important research project I would be very grateful for some help and tips.
I want to copy a live production database into my local development database.  Is there a way to do this without locking the production database?  I'm currently using:  mysqldump -u root --password=xxx -h xxx my_db1 | mysql -u root --password=xxx -h localhost my_db1   But it's locking each table as it runs. USB stick mysteriously become write protected So, somehow over the weekend, my 1GB USB flash drive has managed to become write-protected.  There is no switch on the stick, so I'm concluding that something has corrupted at some point.  Obviously I can't format it or remove.  The output from dmesg | tail is:  Buffer I/O error on device sdb1, logical block 328168 lost page write due to I/O error on sdb1 sd 73:0:0:0: [sdb] Unhandled sense code sd 73:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 73:0:0:0: [sdb] Sense Key : Data Protect [current] Info fld=0x0 sd 73:0:0:0: [sdb] Add. Sense: Write protected sd 73:0:0:0: [sdb] CDB: Write(10): 2a 00 00 05 08 00 00 00 01 00 Buffer I/O error on device sdb1, logical block 328200 lost page write due to I/O error on sdb1   I think the second and final lines are a giveaway to corruption, but I don't know how to interpret this output.  Could someone help to see if this output gives any indication?  I usually eject the drive before removing it, but I may have been lax once or twice.  The data isn't critical, it's just bugging me.  Any suggestions on how to fix it (if the drive even can be) would be greatly appreciated. What package should I use to typeset units? I know there are a few packages related to typesetting units:   unitsdef units, which can be seen as a "base package" used by unitsdef SIunits siunitx, which is the successor to SIunits maybe others? like cjwunits and hepunits   What is the difference between them? Do they also work inside Math mode? And, more importantly, which one should I use?  Suggestion for people trying to answer this question: show some examples of how to typeset both simple and complex units. For instance, try typesetting these items:   100 Celsius 3 x 10^5 km/s gravitational constant is measured in N m^2/kg^2 10 kHz = 1 s^{-4} sin(x) meters   I think these examples cover most needs when writing scientific texts: simple measurements (value + simple unit), values written in scientific notation, simple fractional units, complex fractional and squared units, units without any value accompanying them, units with arbitrary exponents, and arbitrary math code instead of a simple value. If $A$ is a non-empty set, then $A \notin A$ Exercise 3.2.2 Use the axiom of regularity and the singleton set axiom to show that if $A$ is a set then $A \notin A$.  Axiom of Regularity: If $A$ is a non-empty set, then there is at least one element x of A which is either not a set, or is disjoint from A.  Singleton Set Axiom: If $a$ is an object, then there exists a set $\{a\}$ whose only element is $a$, we refer to $\{a\}$ as the singleton set whose element is $a$ Furthermore, if $a$ and $b$ are objects, then there exists a set $\{a,b\}$ whose only elements are $a$ and $b$    I think I can give the proof when A is the non-empty set which contains finite elements. However, can anyone give any hint for the general case?  Suppose $A \in A$   Then eixsts $x$ such that either $x$ is not a set or $x \cap A$=$\emptyset$  Then it is clear thar $x \ne A$ (if $x = A$, then $x \cap A \ne \emptyset$)  We observe that as an element, $A$ $\ne$ $x$, $A$ $\in$ $A$  Then $A$ $\in$ $A-x$   Define the new set $A-x$ as $A_1$  then exists $x_1$ such that $A \in A_1-x_1$  After finite steps  we find that $A \in \emptyset $  which leads to contradiction. If there are injective homomorphisms between two groups in both directions, are they isomorphic? If I have two groups, $G$ and $H$ and two injective homomorphisms $\phi:G \to H$ and $\psi: H \to G$, then by the first isomorphism theorem applied to $\phi$, we have that $G \cong \mathrm{Im} (\phi)$, a subgroup of $H$. Similarly, $H$ is isomorphic to a subgroup of $G$. For finite groups, this guarantees that $G \cong H$ but does this hold for infinite groups?  Weird things can happen for infinite groups, e.g $n\mathbb Z \subsetneq \mathbb Z$ but $n \mathbb Z \cong \mathbb Z$. I'm wondering if this kind of thing stops an isomorphism from occurring.  I think this question generalises to rings, modules, fields and so on. Can this be answered for all of these structures? Booting a Windows 7 installation on different hardware I'm in a situation where I could do with very quickly migrating a Windows 7 (RTM x64) installation from one machine to another.  What options are open to me in terms of getting W7 to boot after the drive is picked up and moved from one box to another? I thought it was supposed to be a little less sensitive to this kind of move than XP, but it doesn't work - it is stuck in a reboot loop and never reaches a GUI.  Tried a few things so far, none of which have worked:   Changed SATA mode in the BIOS of the target machine between ATA and AHCI run Windows 7 Startup Repair tried safe mode, no change   (I will keep this list up to date as suggestions come in)  UPDATE: I can confirm this reboot loop is due to STOP error 0x0000007B, and these codes follow:  0xFFFFF880009A98E8 0xFFFFFFFFC0000034 0x0000000000000000 0x0000000000000000    UPDATE: I didn't get anywhere on this and I ended up just rebuilding the machine. I think it should be theoretically possible, so I'm going to leave the question open in case someone comes along in future with an answer. Have Blender on about 4 machines rendering animations. Just spotted on one of the machines its rendering something different from the actual scene that I have setup.    Top window shows a different set of layers objects to whats actually being rendered in the rendering window below.  In my scene contents, layers objects 1-5 are not visible, but these are the ones that look like they are being rendered.  The only thing I can assume is that perhaps it might be because I did not save the document before clicking render, but I would not have expected that behaviour (you dont need to save your word document before printing it).  Can anyone confirm why this is happening? When closing a question as a duplicate, it is becoming harder and harder to search for a good original as the pool of questions and answers grows and grows.  While the new dupe closing dialog is a huge step forward, it doesn't always work - if you've spent some time on the site, you know there are perfect answers to many new questions but you can't always find them. Or can't be bothered to, as your time is limited.  A way to further improve this could be introducing a vote for canonical answers.  It could, for example, work like this:   Answers get a new icon, the "canonical vote" (signified here by a cannon because I can't think of anything that makes sense right now.)     Only users with a certain minimum rep (maybe 1k+ or 2k+) see this icon. The icon would work like the favourite icon: You can toggle it on or off at any time. The hover message for the icon could read e.g.      This is a "canonical answer": It answers the question asked in the most extensive and general way, and is very likely to benefit other users with the same problem.    Questions that contain an answer with three or more canonical votes get special  treatment:      They show up on the top in search results; maybe even under a special heading ("Questions with canonical answers")  They show up prominently in the "close as dupe" dialog (i.e. the canonical votes influence the metric that is used to determine the questions shown there).  There could be some rewards for users whose answers receive "canonical" votes - maybe a badge if ten of your answers get at least three canonical votes, or a counter of canonical answers in your profile. It would be really interesting as it's a badge that you can't game your way to, but this whole rewarding part is entirely optional.  would be a great safeguard against over-use of this feature.    Dupe (but sans cannon):       Related: Is it possible to make abstract classes in Python? Proper analyses for 2x2 contingency tables So I have multiple questions about the different types of analyses that can be used on a 2x2 contingency table and when different analyses should be used.   To open, I'll note that this stems from my efforts to find the appropriate analyses to run for research using categorical data in a 2x2 contingency table. In my case I have two conditions: control and experimental and within the experimental group there are two items of interest (say, Item A and Item B). In all cases I'm investigating whether an outcome occurs or not: How many experimental participants show the outcome on Item A? How many experimental participants show the outcome on Item B? How many control participants show the outcome? So in addition to comparing Item A with the Control group (A vs. C) and Item B with the Control group (B vs. C), I also want to compare Item A with Item B (A vs. B).   My understanding is that for between-subjects comparisons (e.g., A vs. C   &amp;   B vs. C) a  is traditionally used and that for within-subjects comparisons (e.g., A vs. B) that  is a common choice.   Question 1: is this an accurate understanding of the common choices for statistical tests using 2x2 contingency tables?    My follow-up questions, and where most of my confusion lies, are related to what to do when multiple observed cell counts are low (less than 10). I've explored numerous threads here, the Wikipedia pages for different topics (Yates's correction, Fisher's exact, etc.), a few journal articles, and descriptions in R-packages, but I have found conflicting views.   Some sources indicate that you should use , others say it's out-dated because, in addition to being overly conservative, it was only preferred because the other options were computationally intense.   Others say that you should use , but I've seen additional information suggesting that Fisher's exact test is only appropriate if you know both the row and column totals and that other options (Boschloo, Barnard, etc.) are generally more powerful. However, which of those to use is also not clear.  Finally, even others suggest that the Pearson's $\chi^{2}$ test is appropriate as long as the expected cell counts are not low.   I've seen some indication that these arguments occur for McNemar's test as well (e.g., continuity correction &amp; McNemar's exact test).  Question 2: Is the assumption regarding cell counts about expected cell counts or observed cell counts? If the observed cell counts are low, does that matter to the type of test that should be used?  Question 3: What is an exact test and when should exact tests be used?    In addition to answers to these questions, I would also greatly appreciate any suggestions as to books or articles I can read to learn more about this. Part of my struggle with all of this has been just general difficult finding clear information about these topics and how they relate to one another. I'm writing code to do Xml serialization. With below function.  public static string SerializeToXml(object obj) {     XmlSerializer serializer = new XmlSerializer(obj.GetType());     using (StringWriter writer = new StringWriter())     {         serializer.Serialize(writer, obj);         return writer.ToString();     } }   If the argument is a instance of class without parameterless constructor, it will throw a exception.     Unhandled Exception:   System.InvalidOperationException:   CSharpConsole.Foo cannot be serialized   because it does not have a   parameterless constructor.    at   System.Xml.Serialization.TypeDesc.CheckSupported()   at   System.Xml.Serialization.TypeScope.GetTypeDesc(Type   type, MemberInfo sourc e, Boolean   directReference, Boolean throwOnError)   at   System.Xml.Serialization.ModelScope.GetTypeModel(Type   type, Boolean direct Reference)    at   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type   type , XmlRootAttribute root, String   defaultNamespace)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type, String defaultName space)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type)   Why must there be a parameterless constructor in order to allow xml serialization to succeed?  EDIT: thanks for cfeduke's answer. The parameterless constructor can be private or internal. How accurate is the GPS on the iPhone's Find My iPhone app?  I used Find My iPhone app to track a friend. The first 3 stops were dead on but when it refreshed it showed them to be several streets over from actual location. What could cause that? How to run scripts every 5 seconds? I have a script that needs to be run every five seconds. I know that cron can do tasks by the minute, but is there a way to run something every second? Why do Jedi use lightsabers instead of blasters? Blasters seem to be more practical. Is there a special bond or something between lightsabers and Jedi? How can I prove $n - 2\sqrt{n} = \Theta(n)$ How can I explain to a non-native why the plural of a noun isn't used adjectivally? How can I explain to a non-native speaker that while this is correct:     The felling of trees.    And this is also correct:     tree felling   This is not:     *trees felling   To a non-native it seems very reasonable that since many trees are being felled and given that the felling of trees uses the plural, the inverse form would also use the plural and become trees felling.  To a native speaker such as myself, the latter is very obviously wrong, but I couldn't figure out how to formalize this into a rule that a non-native can understand. How to prove $\sum\limits_{r=0}^n \frac{(-1)^r}{r+1}\binom{n}{r} = \frac1{n+1}$? Other than the general inductive method,how could we show that $$\sum_{r=0}^n \frac{(-1)^r}{r+1}\binom{n}{r} = \frac1{n+1}$$  Apart from induction, I tried with  to check the validity, but I can't think of an easy (manual) alternative.  Please suggest an intuitive/easy method. My code runs inside a JAR file, say foo.jar, and I need to know, in the code, in which folder the running foo.jar is.  So, if foo.jar is in C:\FOO\, I want to get that path no matter what my current working directory is. $$\lim_{x\to 0} \frac{\ln(1+x)}x$$  The process I  want to take to solving this is by using the definition of the limit, but I am getting confused. ( without l'hopitals rule)   $$\lim_{h \to 0} \frac{f(x+h) - f(x)}h$$  $$\lim_{h \to 0} \frac{\frac{\ln (1+x+h)}{x+h} - \frac{\ln(1+x)}x}h$$  $$\lim_{h \to 0} \frac{x\ln(1+x+h) - (x+h)\ln (1+x)}{hx(x+h))}$$  At this point I get confused because I know the answer is $1$, but I am not getting this answer through simplification of my formula. Suppose we have a sample of size n= 9, where the sum equals 27, and the sum of the squaredvalues equals 113. Sample mean is 27/9=3 and mean of squared values is 113/9 = 12.56 Can we then say that the sample variance $S^2 = E(\overline X^2) - E(\overline X)^2 = 12.55 - 9 = 3.56$ ?