I was just wondering what computers do when an usb is detected(plugged in). Im assuming theres some sort of scanning but i dont know any of the details :/
I'm curious how USB device recognition works in Windows. I imagine it's something like this:   When you plug in a device, it tells Windows "here's my device ID to tell you what I am" Windows looks to see if any drivers have been installed that match that device ID. The driver probably tells Windows what the device should be called - like "BlackBerry Curve" or "Canon Printer" If so, it somehow associates that device with that driver Otherwise, it looks for a matching driver online (if you let it)   Am I right? If so, that still leaves some questions.   When you install drivers, where do they go? Are they files in a folder, or do they get added to the registry? What is Windows doing when it first recognizes the device, thinks, and finally says "your new device is installed and ready to use?" Where does Windows look for missing drivers? Is it in their own database? Do device manufacturers submit drivers to Microsoft for inclusion there?   Can anybody explain how this process really works? Also, do other OSes do this differently?
I came upon an interesting way to relatively quickly compute modular exponentiation with large numbers. However, I do not fully understand it and was hoping for a better explanation.  The method basically states if you have $x^y \bmod N$, it can be computed by repeatedly multiplying by $x$ modulo $N$:  $$x \bmod N \rightarrow x^2 \bmod N \rightarrow x^4 \bmod N \rightarrow x^8 \bmod N \rightarrow \ldots \rightarrow x^{2[\log y]} \bmod N$$  This is supposed to calculate in $\mathcal{O}(\log_2 N)$ time.  An example is given:  $$x^{25} = x^{11001_2} = x^{10000_2} * x^{1000_2} * x^{1_2} = x^{16} * x^8 * x^1$$  I don't really understand how this is faster. Aren't you just doing the same thing? You're just breaking down the exponents into representations of base $2$. Also where does $x^{2[\log y]}$ come from? If you're breaking it down into exponents of two where does a logarithm come from? (Aren't logs representations of numbers in exponents of $10$?)  I'm sorry if this appears to be a really stupid question - I have minimal knowledge in math.  Also, I wasn't sure if this belongs here or on stack exchange, so give me the word and I'll move it. Convert quaternion to a different coordinate system OSVR has a right-handed system: x is right, y is up, z is near.  I need to convert orientation data from a sensor in OSVR to a different right-handed system in which x is forward, y is left, and z is up.  I need to calculate the transformation that will convert a quaternion from one system to the other.  I naively tried:  void osvrPoseCallback(const geometry_msgs::PoseStampedConstPtr &amp;msg) { // osvr to ros     geometry_msgs::PoseStamped outputMsg;      outputMsg.header = msg-&gt;header;     outputMsg.pose.orientation.x = msg-&gt;pose.orientation.y;     outputMsg.pose.orientation.y = msg-&gt;pose.orientation.z;     outputMsg.pose.orientation.z = msg-&gt;pose.orientation.x;     outputMsg.pose.orientation.w = msg-&gt;pose.orientation.w;      osvrPosePub.publish(outputMsg);     ros::spinOnce(); }   But that made things really weird. Facing north pitch is pitch, facing west, pitch is yaw, facing south, pitch is negative pitch...  How can I convert my OSVR quaternion to the a corresponding quaternion in the new coordinate system? Inequality involving sides of a triangle How can one show that for triangles of sides $a,b,c$ that   $$\frac{a}{b+c}+\frac{b}{c+a}+\frac{c}{a+b} &lt; 2$$  My proof is long winded, which is why I am posting the problem here.   Step 1: let $a=x+y$, $b=y+z$, $c=x+z$, and let $x+y+z=1$ to get   $\frac{1-x}{1+x}+\frac{1-y}{1+y}+\frac{1-z}{1+z}&lt;2$  Step 2: consider the function $f(x)=\frac{1-x}{1+x}$, and note that it is convex on the interval (0,1), so the minimum of   $\frac{1-x}{1+x}+\frac{1-y}{1+y}+\frac{1-z}{1+z}$  is reached when the function takes the extreme points. i.e. $x=y=0, z=1$.    But going back to the fact that this is a triangle, we note that $x=y=0 \implies a=0$ which is not possible, so the inequality is strict. At xmas, I had a cup of tea with some debris at the bottom from the leaves.  With less than an inch of tea left, I'd shake the cup to get a little vortex going, then stop shaking and watch it spin.  At first, the particles were dispersed fairly evenly throughout the liquid, but as time went on (and the vortex slowed, although I don't know if it's relevant) the particles would collect in the middle, until, by the time the liquid appeared to almost no longer be turning, all the little bits were collected in this nice neat pile in the center.  What's the physical explanation of the accumulation of particles in the middle?  My guess is that it's something to do with a larger radius costing the particles more work through friction... How do I set the default program? As far as I know, ping needs to create a  (which needs either root access or cap_net_raw capabilities). From my understanding the trend these last years has been to remove  binaries and replaced them with . However when I look at the ping binary on my Fedora 32, it doesn't look to have any: $ ls -la $(which ping) -rwxr-xr-x. 1 root root 82960 May 18 10:26 /usr/bin/ping $ sudo getcap -v $(which ping) /usr/bin/ping $     Does ping need to open raw socket on fedora? Or is there another way to give it the permission to open a raw socket? Difference between information and knowledge? As far as I think projection of data unto subject mind is information for the subject whereas indentation or impressions accumulated owing to projection of data unto subject mind is knowledge for the subject. I want to know am I right? Or can someone provide a more rigorous answer! How do I reenable Quack Overflow if I disabled it? Why does Super User site appear twice in vote-to-close dialog? Super User appears in both the main Off-Topic list and the Migration list of the close dialog. Is this a bug or intentional?  I also don't really understand why Server Fault appears in the main Off-Topic list and not the Migration list, apart from it being new.  Here:    and: How to "unpivot" or "reverse pivot" in Excel? I have data that looks like this:  Id | Loc1 | Loc2 | Loc3 | Loc4 ---+------+------+------+----- 1  | NY   | CA   | TX   | IL 2  | WA   | OR   | NH   | RI   And I want to convert it to this:  Id | LocNum | Loc ---+--------+---- 1  |   1    | NY 1  |   2    | CA 1  |   3    | TX 1  |   4    | IL 2  |   1    | WA 2  |   2    | OR 2  |   3    | NH 2  |   4    | RI   What's the easiest way to do this in Excel 2007? If every compact set is closed, then is the space Hausdorff? 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? Why are heatmaps on qgis 2.8.1 produced in the wrong CRS? Is it possible to be admitted to a masters in Germany with a 3-year bachelors from another country? I am a freelancer programmer and so far I have only worked on projects on Windows platform. I don't have much idea about OS X hardware. I am not looking for a very high end configuration but integrated development environment and one database server should just run fine. I have a Dell laptop i7 processor, 8 GB RAM, 1 TB HDD; I am fairly satisfied with the performance. I am mainly going to use it for app development and not for any rich graphics app development.  What are the minimum and recommended hardware requirements for Xcode development on OS X? What would make a question popular with high views? I was wondering what might be making my questions less attractive to users?  I get very low views most of the time. What should be done to increase a question's popularity? Have there been any recent attempts to falsify the  hypothesis alternative to the Doppler shift explanation for the red shift, or is it simply ignored like the pilot wave quantum mechanical hypothesis alternative to the Copenhagen hypothesis of quantum mechanics has been? What new evidence would it take to get the tired light hypothesis for the red shift reexamined as the recent fluid dynamics oil drop experiments have done for the pilot wave hypothesis of quantum mechanics? I have heard from people who have switched either way and who swear by the one or the other.  Being a huge Eclipse fan but having not had the time to try out IntelliJ, I am interested in hearing from IntelliJ users who are "ex-Eclipsians" some specific things that you can do with IntelliJ that you can not do with Eclipse.  Note: This is not a subjective question nor at all meant to turn into an IDE holy war. Please downvote any flamebait answers. How to pad zeroes to a string? When a new tag is created, should there be some kind of notification to the user?  This could serve a dual purpose:   To make the user check that this tag is really required.  Is it spelt right? Might there be a more appropriate tag to use instead? - See  To promote the creation of tag wikis.   These are both beneficial to the site.  Making users think twice about their tags reduces the amount of retagging edits that are needed and reduces noise.  Promoting tag wikis means that more new tags would come with explainations, making them more user-friendly for others.  Creating a new tag is a privilidge earned at 1500 reputation.  Hopefully the user has gained a feel for the ethos of SO by this point, and is either enjoying being a contributer or is mainly asking good, well recieved questions.  The user is probably also wanting to contribute to the site further (even if just to gain reputation), and so it makes sense to me that there should be a gentle push towards taking a little bit of time to write a short wiki for the tag you just created.  By no means should this be mandatory, and the precise format of this gentle push is more in the scope of UX guys to think up, but I wanted to see how people felt about some kind of discreet notification.  I thought of two forms this notification could take:  Option 1 - at the time of tagging      Option 2 - after posting      Update: Raphael has suggested in the comments that this could be implemented as a 10K user tool.  While I think that's a good idea on its own, I don't think it should be used instead.  I think that encouraging users with less than 10K to complete wikis for their own tags is likely to get some wikis written because there is a sense of ownership over your own tag, and by giving it a wiki you are giving it a better start in life. As with a child, users will want to equip their tag with the tools it will need to survive in the big wide world.