Using Physical EFI Disk Image as a Virtual Hard Drive
Use physical harddisk in Virtual Box
Solving $f(x+y) = f(x)f(y)f(xy)$ I had an little issue when loggin in with Safari on Mac OS X (El Capitan).   When entering the password in Safari, there is a key symbol that lets you choose among any password that is stored in your keychain. This button interferes with the "forgot?" button that Stack Exchange adds and you can't press the Safari button.     Please move this "forgot?" button below the text field, like most other sites implement this. Where to put my code: plugin or functions.php? I'd like to loop though each feature in a layer and calculate its ellipsoidal area using QgsDistanceArea() in PyQGIS 3.  Everything works fine on unprojected layers, but I get strange results when input layer is in projected CRS.  So far I have written this:  from qgis.core import *  def calculate_area(in_lyr_name, ellipsoid, units):     input_layer = QgsProject.instance().mapLayersByName(input_lyr_name)[0]      area = QgsDistanceArea()     area.setEllipsoid(ellipsoid)      features = input_layer.getFeatures()     feature_area = 0     error_features_counter = 0      for i, feat in enumerate(features):         geom = feat.geometry()         polygon_area = 0         try:             if geom.isMultipart():                 polygons = geom.asMultiPolygon()                 for polygon in polygons:                     polygon_area += area.measurePolygon(polygon[0])             else:                 polygon = geom.asPolygon()                 polygon_area = area.measurePolygon(polygon[0])              feature_area += polygon_area          except AttributeError:  # catches NoneType geometries (broken etc.)             error_features_counter += 1             pass      # calculated area is in sq. metres (see the "else" case)     if units == 'km²':         final_area = feature_area / 1e6     elif units == 'Ha':         final_area = feature_area / 10000     else:         final_area = feature_area     return final area, error_features_counter   How do I get a constant result that does not depend on the presence of projection? Algebraic Proof that $\sum\limits_{i=0}^n \binom{n}{i}=2^n$ I'm well aware of the combinatorial variant of the proof, i.e. noting that each formula is a different representation for the number of subsets of a set of $n$ elements. I'm curious if there's a series of algebraic manipulations that can lead from $\sum\limits_{i=0}^n \binom{n}{i}$ to $2^n$. "provide" vs. "provide with" I am wondering if the following sentence is correct:     We add the information their study provides with to our article.   The context is: their study provides with some information. And we add the information to our article.  I want to keep the word "add", and someone told me that "provides with to" sounds wired... What causes the dimensions of a star increase when its hydrogen fuel is exhausted? Why do you write "occurred" but "listened"? The past tense of to occur is occurred (not occured), but the past tense of to listen is listened (not listenned).  Why? What is the general rule that is applied to make the past tense of a verb? I see that there a number of questions (, , , , ) on best practices, none of them answer the issue I am going to talk about.  We all need to prepare large documents (or slides) from time-to-time. And once you have reached a certain number of pages, you find that compiling the whole document takes a substantial time, which you need to do to check that the part you have written is error free, specially if it contains a number of images.   To circumvent the situation, I have used the following practices over years to keep compile time at minimum.   Divide the document in to many chapters: The chapters are put in separate files. Only the one I am working one is uncommented.  \documentclass{book}  \begin{document}  %\input {chapterone.tex} \input {chaptertwo.tex} %\input {chapterthree.tex} %\input {chapterfour.tex}  \end{document}    The above technique can also be used for \include.   Keep a preamble replica of the main file in a temporary file (build file): I use this technique when I am preparing a presentation with many slides, say a hundred. Prepare a main file, copy it to another build file. Delete everything between  \begin{document} and \end{document} in the build file. Prepare a slide (or a group of slides) in the build file. Cut and paste the contents between \begin{document} and \end{document} in the build file to relevant location in the main file only when satisfied with the output (image locations, overfull boxes etc.)     We can hear your inputs about the best practices you practice when a you are preparing a document or presentation from scratch.    Now, I have failed to find a good answer in the case when you have finished the whole document or presentation and now you need tweaking the small things, may be edit a text here, add an image there. What will be your best practice?  Perhaps, again keeping only one chapter uncommented will be usable here. But what about large presentations? May be adding a \end{document} just after the point-of-change will be beneficial, but only if you can put that before midpoint of the file.  Commenting a part of the file will also work, but that is error-prone, at least for me. Partitioning $\{1,2,\ldots,k\}$ into $p$ subsets with equal sums, where $p$ is prime Let $p$ be a prime natural number. For which positive integer $k$ can the set $\{1,2,\ldots,k\}$ be partitioned into $p$ subsets with equal sums of elements ?  Obviously, $p\mid k(k+1)$. Hence, $p\mid k$ or $p\mid k+1$. All we have to do now is to show a construction. But I can't find one. I have tried partitioning the set and choose one element from each set but that hasn't yielded anything. Any hint will be appreciated. Allow sound file uploads in questions and answers? Should Stack Exchange introduce the ability to upload embedded sounds (maybe via HTML5/Flash, whichever the user has) as part of questions and answers to Stack Exchange?  It could require a certain amount of rep to stop new users from doing it frivolously.  My rationale behind this is the new language &amp; usage sites.  I often find myself thinking that it might be helpful, when discussing a regional dialect or something, for the person answering to just pronounce what they're trying to describe in words. PS4 Controller not connecting to PS4 and won't reset? I was playing my PS4 two days ago and then packed it up with two controllers that were both connected to this PS4.   I got to where I was going, set everything up and now the controllers won't connect. They show pulsing orange when they plug in, but when I hit the PS Button to connect, it blinks white 1-2 times and goes back to orange.   I have tried resetting them both.  Can anyone help? Testing pointers for validity (C/C++) Is there any way to determine (programatically, of course) if a given pointer is "valid"? Checking for NULL is easy, but what about things like 0x00001234? When trying to dereference this kind of pointer an exception/crash occurs.  A cross-platform method is preferred, but platform-specific (for Windows and Linux) is also ok.  Update for clarification: The problem is not with stale/freed/uninitialized pointers; instead, I'm implementing an API that takes pointers from the caller (like a pointer to a string, a file handle, etc.). The caller can send (in purpose or by mistake) an invalid value as the pointer. How do I prevent a crash? How to make a cylinder / pipe with slanted ends (like pasta penne)? Is there any difference between Present Perfect and Present Perfect Continuous? I have studied "present perfect" and "present perfect continuous" for a week. I know forms, verb and helping verb I should use when I write them.  For me, they have nearly same definition because I can use them interchangeably in Thai language. (My native language)  For example, the sentences        I have learned English language in the past few weeks.    I have been learning English language in the past few weeks.       have no difference in meaning to me. They both mean "I began learning the English language in the past and I am still learning it"  Can I use them interchangeably in English? Or is there any difference between them? For example, when should I use present perfect but not present perfect continuous? D'Alemberts Principle to solve a Classical Mechanics problem I found this question on this very site and was curious on how to solve it using D'Alembert's Principle  .I already know how to do it by balancing the torque about toppling point so please don't post the latter as an answer . My attempt was to displace the upper sphere by $d\theta$ which gives its virtual displacement as  $rd{\theta}cos(\theta)$j(notice we are only interested in the y component becuz the only component of the applied force which is gravity in this case is the y component in the dot product the other components vanish) similarly the cylinder is also displaced $r'd{\phi}cos(\phi)$ where r' is the distance from the point of toppling of the center of mass. $r'cos(\phi)=H/2=r(1+sin(\theta))$ ,$r'sin(\phi)=R=r(1+cos(\theta))$ and $tan(\phi)=H/2R$ the equation coming from D'Alemberts principle is $mgrcos(\theta)d\theta=Mgr'cos(\phi)\phi$ I tried solving this but couldn't arrive at the right answer. Any help would be appreciated! Why can't Transporter technology be used as a weapon? Seems like this is the most powerful weapon of all: transport your enemy into a bulkhead, planet, etc. Transport your enemy's ship inside a planet, etc.  Is there some technical reason that it can not be used this way? Limits of sequences of sets I am starting to learn about the liminf and limsup of a sequence of sets. However, I do not understand the very basics, such as why $\lim\sup A_n=\bigcap_{n\in N}\bigcup_{k&gt;n} A_k,$ and why $\lim\sup A_n=\bigcup_{n\in N}\bigcap_{k&gt;n}A_k.$ Can someone break these definitions down for me?  Also, why is $\lim\inf\subseteq\lim\sup$? This is what my  looks like when it first loads:    But if we unselect math.SE, we get a y-axis rescaling mess:    I'm using Firefox. I'm in China, so many things involving Google and Imgur are blocked, and I use  to stop the browser attempting to load unloadable Google objects.  I'm hoping other users can check whether or not this issue is localized to my system, and if it's not just me, here's the bug report. Why doesn't a commutator cause the rotation to reverse periodically or stop? I understand the field magnets attracting/repelling the armature/coil so that it turns one half-turn and then, because the commutator is turned, its contact with the brushes has switched sides, and the current goes in the opposite direction, reversing the electromagnetic polarity. Then, because the polarity is swapped, it attracts/repels to complete the second half-turn. The thing is, isn't it a bit of a gamble that it will turn in the same direction? Couldn't the it just be pulled/pushed back, more or less undoing the half-turn?  I'm also a bit confused how the rotation doesn't just stop once the commutator is oriented so that the brushes are contacting both sides of the commutator. In other words, there's a brief period just as the commutator switches the current directions where each both the brushes are in contact with both sides of the commutator where the current is neutralized. Shouldn't this stop the motor?    For reference, I'm just talking about a simple DC motor.