I have a GTK application in C++ running, and one of the widgets is a dropdown menu. I want to take a screenshot when this menu is open, but nothing happens when I press Print Screen (it works when the menu is closed). I don't think this is a GTK thing: how can I take a screenshot when the menu is open?
I need to take a screenshot that records my Eclipse IDE menu item status. For example, if I clicked the "Project" menu and there comes a list of menu items. I need to record those menu items.  The problem is when the menu item list window (which works like a context menu window) has the focus, the screenshot function is not working. I tried everything on this  and nothing works as long as the menu items window is opened. Any mouse click will close the context menu window, so I cannot use mouse either. However if there is no context menu window opened then screenshots works fine.  How can I record the screen with context menu window displayed?
Bluetooth audio delay / lag, reason completely unclear to me I have a bit of an odd situation, and wanted to ask for ideas.   Recently started connecting a JBL Charge 2+ to my MBA 11 inch, mid-2013, via Bluetooth. I noticed that there's clear delay between sound event and sound being audible via the JBL.   The problems persists across applications (so for example, playing video via VLC means the sound isn't synced, same for youtube videos in different browsers, same for mp3s that start playing with a small delay, etc.)  The delay is minor, but noticeable, in the range of 0.5s I'd say.  At first I thought it might be a Bluetooth driver issues, but now I found out the following: just connected another JBL device, a Flip 3 to the same MBA, and the sound plays without noticeable delay. I'm not sure if they use the exact same drivers, but now I'm wondering:   Is there a chance that it's a hardware problem? Didn't really consider this a possibility, but now I'm not sure anymore. How to test, and, ideally, fix this issue? How can I isolate the reason for the audio lag with the Charge 2+?   Any help would be appreciated! Someone needs to set the record straight on what exactly antiderivatives vary by: constants functions or piecewise constant functions. "There IS/ARE rice, meat and tomatoes on my plate" How does QGIS Zonal Statistics handle partially overlapping pixels? There are a couple Stackexchange posts asking this question, but neither of them were sufficiently answered:       I am writing Python scripts that perform essentially the same operations as Zonal Stats, and I have been using Zonal Stats to check my scripts' outputs.   I have noticed that when there are many cells in the polygon being queried, my results match perfectly, but there are discrepancies when there are only a few raster cells in the polygon. The following is an example of this. I am computing "count" for each polygon.  Exhibit 1:   The returned count is 0.45, which looks roughly correct if pixels can be treated fractionally rather than simply in/out.  Exhibit 2:   Similar result; count is 0.39.  Exhibit 3:    With a larger poylgon, now we see the count is exactly 2. Note that there are exactly 2 pixel centers contained in the polygon.  Exhibit 4:    Here, only one pixel center is within the polygon. The count is 1.008, though. If you exclude the polygon area from the pixel whose center is in the polygon, the remaining area is obviously greater than 0.008 of a pixel.   From these exhibits, it seems that Zonal Statistics treats these cases specially. It looks like to me that if there are less than 2 pixel centers within the polygon, it performs some kind of averaging such as polygon_area/raster_cell_area to return the count. I should note that I have 48 of these polygons, and all returned counts greater than or equal to 2 are integers; fractional counts are only returned for &lt;2.  How are these fractional-pixel counts incorporated into the other statistics output by Zonal Stats?    indicates strange behavior with max/min when using large raster cells, and my own testing returns mean values not congruous with simple "pixel center in/out of the polygon." To reiterate, I get exact agreement when the underlying raster contains many pixels within the polygon. I couldn't find any documentation about this, and it may be important when people have never had problems with Zonal Stats but use a coarse raster and remain unaware that there is a different behavior when there are only a few pixels within the polygon. How to find and delete identical points? I recently performed  on a merged point feature class in ArcGIS 10.1.  I specified "1 meter" XY tolerance for the Integrate command.  The resulting point feature appears to be what I want except points that were integrated are now stacked on top of each other, which will be problematic in future processing steps.  The attributes for my dataset consist of an OID, Shape, x, y, z.  Where x and y = UTM coordinates and z = buffer distance.  The command  does not appear to work for my dataset (i.e based on Fields: OID, Shape, x, y, z and XY tolerance = 1m) as the output still has stacked points.  I am also working with big data--the integrate output has 37 million points.    There is a related thread, titled , although I would like to open the question up to python solutions too.  What is the best way to find and delete (spatially) duplicate points?  Is there a better solution to integrating such that the output does not contain overlapping points? Vim inoremap for specific filetypes Use hostnames to connect to machines on LAN I have just had my broadband upgraded to  which means my router has had to change. Previously I was using a Thomson TG585v7 ADSL thingy provided by my ISP. One nice thing about that router was that it would act as a local DNS and allow me to find my other machines on the network by using &lt;hostname&gt;.lan instead of IP addresses.  I've now switched to a Linksys WRT320N ethernet router which connects to my fibre modem, and which I've updated to the latest firmware (1.0.04). I have 2 machines on the network which I regularly want to connect to each other; one is running Windows 7 and the other is running OS X Lion.  The problem I'm having is that I'm unable to connect to my Win7 machine from the OS X machine using the Win7 machine's name. However, I'm able to ping the OS X machine from my Win7 machine using the hostname. Will I miss anything by watching Dragon Ball Z Kai instead of the other series? I've read that Dragon Ball Z Kai is an HD remaster and recut of Dragon Ball and Dragon Ball Z. However, Kai has  while Dragon Ball has  and Z has .  If I watch only Dragon Ball Z Kai, do I miss anything I would get by watching the other two series? And is anything censored in Kai that is not censored in the others? How do I  prevent .xsession-errors from eating disk space? Is there any way to completely disable the .xsession-errors file?  I have it as a symlink to /tmp so that my laptop hard disk can (hopefully) go to sleep for once, but at least 95% of the stuff in the file (it fills up at about 500k an hour) is...  (nautilus:1618): GLib-GObject-CRITICAL **: g_value_get_object: assertion `G_VALUE_HOLDS_OBJECT (value)' failed  which is total garbage to me.  I have tried doing a symlink to /dev/null but that does not work (the resulting link is overwritten), and I also do not want the activity so that hopefully my laptop can go to sleep for once.  I am using Ubuntu 11.04, with no special add-ons to Nautilus. My problem is that, I can not give name of my folder or file with special characters like \ / : * ? " &lt; > | in windows based O.S. This is very important for me, that giving name of file/folder which contain this type of characters.  I already search and refer so many site,for this problems but all are hopeless. I also read Microsoft support page, they suggest use other characters. This is its link,    I already try Alt button + ASCII code number of this type of special characters, from numpad key, just example rename file/folder and press Alt+60 (for &lt; characters) Still it giving message that, A filename cannot contain any of the following characters: \ / : * ? " &lt; > |   Suggest me suitable solution so that I can give name of my file/folder with this type of special characters. I'm making an app with a custom list in multiple languages.  Is there an easy way so that I only have to create the site columns, content type and list once? So I don't have to create them for each language?  My app will be in English, French and Dutch.  My lists elements.xml looks like this  &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;     &lt;!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List project item, an error will occur when the project is run. --&gt;     &lt;ListTemplate         Name="List1"         Type="10000"         BaseType="0"         OnQuickLaunch="TRUE"         SecurityBits="11"         Sequence="410"         DisplayName="List1"         Description="My List Definition"         Image="/_layouts/15/images/itgen.png"/&gt;   &lt;Field       Name="Adres"       ID="{2a32d9eb-ad3b-4dbb-abba-66dd01ca7c6e}"       DisplayName="$Resources:Adres"       Type="Text"       Required="TRUE" /&gt;   &lt;Field       Name="Naampje"       ID="{ac47be45-2f43-4d16-9a06-162c85945ec9}"       DisplayName="$Resources:Naampje"       Type="Text"       Required="FALSE" /&gt;   &lt;Field     Name="Nickname"     ID="{6B0A2CD7-A7F9-41ca-B932-F3BEBB603793}"     DisplayName="$Resources:Bijnaam"     Type="Text"     Required="FALSE" /&gt;  &lt;/Elements&gt;   Well if i change my language in Sharepoint (Office 365) it's not changing the titles from dutch to the other languages i have added. In an urn there are $n$ red balls and $m$ blue balls. I extract them without replacement. Let $X$=time of first blue. What is $E(X)$?  I found PMF of $X$ and it is, if $k &gt; n+1$  $$P(X=k) =\frac{n(n-1) \dots (n-k+1)m}{(m+n)(m+n-1) \dots (n+m-k+1)}$$  How could I evaluate $E(X)$?  Edit: I'm looking for an explicit form of $E(X)$ How do I learn where the source file for a given Python module is installed? Is the method different on Windows than on Linux?  I'm trying to look for the source of the datetime module in particular, but I'm interested in a more general answer as well. Bevel is not symmetrical rsync over ssh "error in protocol data stream" (code 12). ssh works I tried:  rsync -v -v -e 'ssh -p YY' ./testfile me@XXXXX:/home   Error Message  opening connection using: ssh -p YY -l me 146.6.84.206 rsync -&gt;-server -vvve.s . /home  [sender] make_file(testfile,*,0) send_file_list done send_files starting server_recv(2) starting pid=17537 rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600)[sender=3.0.6] _exit_cleanup(code=12, file=io.c, line=600): about to call exit(12)   This works fine:  ssh -p YY me@XXXXX   Which suggests to me the problem is neither that sshd is not running nor that port YY is firewalled. I have checked anyway.  What other problems could there be?  EDIT: The problem seems to have been "self resolving." I could not replicate the following day. I started my local computer up. Perhaps notably I had a different IP address than last time. And now rsync magically works. I'd appreciate guesses as to what it could have been in light of it going away. Additive group contains exactly three elements of the set $\{p,p+q,pq,p^q,q^p\}$ I am currently developing a website which is going to take some time to finish. I need to move some 'stuff' to production frequently, while maintaining a under construction status. My front page will clearly mention that my website is under construction.  I know crawlers will access my URL before I am ready to go live. Should I tell them my site is under construction (no need to index)? If yes how?  P.S.: Eventually, I am ok to let them see my under construction front page. Which countries require a 24-hour transit visa in China? I'm transiting through China in Kunming, China.  I'm a South African national and do NOT fall under the 72-hour visa free program. However on [their official (travelchina) website][1] it says:     Nationals of most countries are eligible for the 24-hour direct   transit, while a visa is needed for the passengers transiting on   Afghanistan, Azerbaijan, Iran, Iraq, Kazakhstan, Kyrgyzstan, Malaysia,   Nigeria, Oman, Pakistan, Saudi Arabia, Sri Lanka, Thailand, Turkey,   United Arab Emirates and Yemen passports.   I'm sorry if I'm missing this, but the above is rather badly worded for me does "nationals of most countries" include ALL countries except those mentioned in the list shown?  Also again sorry if I'm missing this but again it is rather badly worded for me. I will fly via Thailand to China and then via China to Canada with an 8-hour layover in China. I see Thailand is mentioned on the list. I have a Thailand residency permit where I currently reside... Would that affect me at all?  Also, any idea if I can exit the airport in China and come back under the 24-hour visa exemption (should I be exempt)?  Many thanks. Difference between block size and cluster size In Harry Potter, we know ghosts became ghosts when they are too afraid of death to go on - I thought about it and I'm quite certain they all go to their own version of Harry's King's Cross and become ghosts when they return as Harry did.  So can they return there? Once they've been a ghost long enough that they no longer fear death, can they move on?