I am trying to make the pygame window background transparent. I want it to show content, but just the background fully transparent. Here is my code so far: import pygame pygame.init()  screen = pygame.display.set_mode((600, 600), flags=pygame.NOFRAME)  If you need more info just ask!
Is it possible to get a fully transparent window in Pygame (see the desktop through it)?  I've found how to create a window without a frame, but there doesn't seem to be any obvious way to make it transparent.  I'd be willing to tie into system-specific technology/frameworks as long as there are solutions for both Windows and Mac OS X, but I'm not sure which direction to be looking.  The only topic I was able to find , which isn't something I can do for this particular project (needs to be Pygame).
Here's the very dumb way:  def divisorGenerator(n):     for i in xrange(1,n/2+1):         if n%i == 0: yield i     yield n   The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb :-)  I can find prime factors and their multiplicity fast enough.  I've an generator that generates factor in this way:  (factor1, multiplicity1) (factor2, multiplicity2) (factor3, multiplicity3) and so on...  i.e. the output of   for i in factorGenerator(100):     print i   is:  (2, 2) (5, 2)   I don't know how much is this useful for what I want to do (I coded it for other problems), anyway I'd like a smarter way to make  for i in divisorGen(100):     print i   output this:  1 2 4 5 10 20 25 50 100     UPDATE: Many thanks to Greg Hewgill and his "smart way" :) Calculating all divisors of 100000000 took 0.01s with his way against the 39s that the dumb way took on my machine, very cool :D  UPDATE 2: Stop saying this is a duplicate of  post. Calculating the number of divisor of a given number doesn't need to calculate all the divisors. It's a different problem, if you think it's not then look for "Divisor function" on wikipedia. Read the questions and the answer before posting, if you do not understand what is the topic just don't add not useful and already given answers. Have we managed to make a perfect vacuum? Have we managed to make a device without any atom inside it on earth? I was reading about vacuum , and I found in the examples part  that even on the best man made vacuum devices, there are still millions of "molecules per $cm^3$". So my other question here is, what are these molecules and what is the mass of them? My understanding is that heat is essentially atomic vibrations. If there are almost no atoms, how can there be residual heat?  Also, as I understand in space there is no heat transfer via convection and it is mainly through EM radiation. In this case, why is it that if i were to go into space with no suit and just an airtight helmet through which I could breathe, I would still freeze to death very quickly? Parsing DateTime on Localized Systems Eigenvalues of Householder matrix What would be the eigenvalues for a Householder matrix defined as: $H = I - 2 u u^T$? Can someone explain it  to me intuitively or with a simple proof? On the canonical isomorphism between $V$ and $V^{**}$ What is the VTable Layout and VTable Pointer Location in C++ Objects in GCC 3.x and 4.x? How can I change a cell's background color based on the cell's current value? I have a column with function values of True or False:  =IF(ISNA(A1), false, true)   from row 1 to 5000+ rows. I would like to mark all the False as red background color or text as red. Is there any function available? How do I remap multi-key sequences to individual keys? I just bought an IBM Model M keyboard. While awesome, it lacks a windows key and multimedia keys. While there are many programs out there that can map one key to another, or one key to a key sequence, are there any programs that will map a keyboard sequence to a single key?  Edit: OS = Win7 How to toggle Scroll Lock in Excel 2010 without a Scroll Lock key in the keyboard I have a notebook with no Scroll Lock key (or any shortcut using the 'Fn' key).  Somehow Excel 2010 got the Scroll Lock on. I see it left down in the status bar and now I can't navigate through cells using the arrow keys, which is pretty annoying. It wasn't turned on some hours ago, so I think I must have hit some Scroll Lock toggle shortcut in Excel 2010 by mistake.  Anyone knows what hot to turn off Scroll Lock in Excel (shortcut or menu option)? I cannot submit my answer to    I am aware that my reputation is low. Also, spam posting is discouraged.  My answer includes a compilation of Android graphing libraries, with links, so fellow hackers do not have to Google each and every one of them.  I believe this answer is superior to the current answers, because it is updated to 03/2012 and covers more than 90% of all Android charting libraries.  How can I post the answer, or how can I increase my reputation without being able to post quality answers? The old school websites included just a bunch of links to other places, I am an old man!  Alternative solution would be to blog it, and just post a link to my blog, which is not optimal. I would like to use client-side Javascript to perform a DNS lookup (hostname to IP address) as seen from the client's computer. Is that possible? Do you ever need to specify 'javascript:' in an onclick? AFAIK, you never need to specify the protocol in an onclick:  onclick="javascript:myFunction()" Bad  onclick="myFunction()" Good  Today I noticed in  on Google Anallytics that they are using it:  &lt;a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');"&gt;   Is this example just plain wrong, or is there ever a reason to specify javascript: in anything other than a href? TikZ: Bend text so that it follows a line I have two arrows going from a node on the left to a node on the right. Both arrows are slightly bent. I want to label the arrows with text that is bent just like the arrows. This is as far as I've got:  \begin{tikzpicture} \node (One) at (-3,0) [shape=circle,draw] {One};  \node (Two) at (3,0) [shape=circle,draw] {Two}; \draw [-&gt;, thick] (One) to [bend right=45]  (Two); \draw [-&gt;, thick] (One) to  [bend left=45] (Two); \node (mental) at (0,1.75) {Some bent text}; \node (non-mental) at (0,-1.75) {Some more bent text}; \end{tikzpicture} Restricting T to string and int? Possible point location algorithm I need to calculate possible point location based on its speed and some other factors. For example, there is a man in the middle of the forest and I need to calculate his possible location at some time periods. There are few facts about his movement:   His speed differs at certain periods of time - it can be raining, or it can be super hot - speed lowers / increases; Some objects in space - swamps, rocks - can lower his speed as well; At some time periods the man does not move at all.   So, here is the question - is there any algorithm that can calculate possible location of the man based on following parameters? The output should be a polygon for every given time_period.  {   time_periods: [{     from: 2012-12-12T20:00:00,     to: 2012-12-12T22:00:00,     speed: 5   }, {}],   objects: [{     geodata: POLYGON(...),     speed_modifier: 0.5   }, {}] }   Generated polygons will be visualized on the map afterwards. Is your MAC address revealed when you hit up a website? I have two cameras, a 6mpix Panasonic FZ8, and 14mpix Canon A2200.  When I compare shots from two cameras, one of differences I notice is dpi number that camera reports in JPG info:   FZ8 reports dpi=72 A2200 reports dpi=180   What physical meaning can these numbers have? I am at loss for guesses.    I am fairly familiar with notion of dpi in scanning and printing. I can calculate density of pixels on the sensor of the camera. But then, the linear density of pixels on the sensor will be hundreds times larger than number above. So what, if anything, does it mean? OpenGL Line Width How to Combine IN-Opeator with LookupIds in a caml-query?