Group by using a key
Dataset collapsing/reducing
I am using wp_get_attachment_image_src to construct the srcset attribute of an img tag. In that attribute I want to output a comma separated list of image urls along with the image widths.  Using the Media Settings page, I have configured the image sizes to be as follows:   Thumbnail size: 150x150 Medium size: 640x480 Large size: 1024x768 Small size: 278x320   The wp_get_attachment_image_src function returns the correct urls and the correct widths for the image sizes full, medium and small. small is a custom size I added using add_image_size.  If I call wp_get_attachment_image_src( $image_id, 'large' ), the returned array looks like this:  array (     0 =&gt; 'http://localhost/wp-content/uploads/2014/10/image-1024x768.jpg',     1 =&gt; 640,     2 =&gt; 480,     3 =&gt; true, )   Checking the image which can be found at that url turns up the image with the correct dimensions.  Currently i am using the php builtin function  to circumvent this problem, but this function call takes significantly longer than simply accessing the index returned by wp_get_attachment_image_src:  Without getimagesize (mtime before and after execution):   '0.83761000 1415195440' '0.83831600 1415195440'   With getimagesize:   '0.34808000 1415195635'  '0.35323900 1415195635'   What can I do to make wp_get_attachment_image_src return the correct dimensions? Binding single key (such as 'F1') to multiple keys (such as 'Ctrl+C') in Gnome I know how to map a single key to a command using the gconf settings. I also know how to map a single key to another key (F1 -> ctrl) using Xmodmap. My question is how can I map a single key such as F1 to a multi-key operation such at ctrl+c. I am basically trying to set up a single key to simulate copy. I can think of two ways to possibly do this:   Map single key to multiple keys so that when the single key is pressed it is essentially pressing ctrl+c. Use gconf settings to execute the copy “command” upon the single key press. I am not sure if there is a “command” to copy text. Is it feasible to compile Python to machine code? In Minecraft, I know you can breed animals. In fact, in recent updates it's required for the player who just can't start their mornings without bacon and eggs!  I've tried pulling two pigs together in a single pen, but all they do is snort at me. And the chickens? Well, there's plenty of eggs, but no hatching.  How do I get them to make more bacon and eggs? Hyperlinks are not visible in the generated PDF CV I came to this conclusion: the primes that can't be written as the sum of two squares (lets use$p\prime$ to denote) can be written as ${p}\prime \equiv 3 \;(\bmod\; 4)$.  I need a simple proof to show this and am stuck. I would appreciate guidance! Home Electric Panel Questions I’m having a pool put in and the pool guys said they need a 20 amp breaker for the pool equipment. My outside panel says 100 amps (see picture). But my panel inside adds up well over 100 amps. Is this normal?  The breakers never trip even with the dryer, AC, and other appliances running. Best practices for managing and deploying large JavaScript apps What are some standard practices for managing a medium-large JavaScript application? My concerns are both speed for browser download and ease and maintainability of development.  Our JavaScript code is roughly "namespaced" as:  var Client = {    var1: '',    var2: '',     accounts: {       /* 100's of functions and variables */    },     orders: {       /* 100's of functions and variables and subsections */    }     /* etc, etc  for a couple hundred kb */ }   At the moment, we have one (unpacked, unstripped, highly readable) JavaScript file to handle all the business logic on the web application. In addition, there is jQuery and several jQuery extensions. The problem we face is that it takes forever to find anything in the JavaScript code and the browser still has a dozen files to download.  Is it common to have a handful of "source" JavaScript files that gets "compiled" into one final, compressed JavaScript file? Any other handy hints or best practices? First time I've used cycles rendering engine.  I'm using a movie clip as the background in short animation. Selected RBGA under Property Tab, and Transparent under Film Tab.  It looks good and individual frames in OpenGL active viewport render, and looks fine.  When I try to get it to spit out PNG files of the finished animation the objects render out fine, except no movie clip background as Blender Render engine did when using Paper Sky setting.  Operator error, or am I trying to do something Cycles won't do?  Haven't found an answer in my searches so far.  Can anyone point me in the right direction please.   Addition:  I think I found my problem after a couple more hours of research.  Post should read "operator ignorance" instead of operator error.  Too tired to try the solution tonight, everything looks better in the morning. Thanks anyway.  Sorry, I just saw your posts.  Really tired.  Much appreciation. Is it only red, green and blue that can make up any color through additive mixture? I'm reading about color vision and have some trouble understanding the motivation for why the  was suggested in the first place. The book I'm reading ("Psychgology: The science of mind and behavior") states:     At the beginning of the nineteenth century it was discovered that any colour in the visible spectrum could be produced by some combination of the wavelenghts that corresponds to the colours blue, green and red in what is known as additive color mixture.   From the explanation in the book, it seems like this somehow should be a reason for also supposing that the human retina was composed of cones sensitive to the colors green, red and blue respectively. I guess this would be a valid argument if it was only red, green and blue that, through additive mixture, could make up any color.  Is it only red, green and blue that, through additive mixture, can make up any color? One asks “how does x taste,” implying that they’d like an adverb describing the way it tastes. But one answers with an adjective, “it tastes good” instead of “it tastes well,” which would imply that x is tasting something else. What’s the reason for this discrepancy? What should I do when my Minecraft Launcher 1.3.11 wouldn't log me in? The console output is:                                              Sorry, but we couldn't connect to our servers. Please make sure that you are online and that Minecraft is not blocked. (CertificateNotYetValidException:NotBefore:Tue Apr 08 20:47:05 CST 2014) How do I calculate standard errors for sums of OLS coefficients? Calculating CR of monsters that do not deal calculable damage Determine which app is drawing on top of other apps? Is there a way to determine which application is drawing on top of other applications?  For example, Facebook Messenger app can draw the chat bubbles on top of everything, but how do I know which app is doing this?  My problem:  I have an app which is drawing ads on top of everything and I wanna know which app is doing this. Not just to uninstall it, but to warn everyone that uses this app. (I didn't install any application recently and I already verified the recent updates.)  I tried to use the Dump View Hierarchy for UI Automator from the Android Studio, but it seems that the applications that draw on top can't be selected this way.  (Click image to enlarge) Why doesn't calling a Python string method do anything unless you assign its output? Position of \caption gets counter incremented twice Do Indian passport holders with UK Tier 2 need to get a tourist visa for Mexico? I'm an Indian passport holder currently resident in the UK under a Tier 2 (General) visa and planning on going to Mexico on a holiday. So I was looking into the rules on the Mexican embassy in the UK and :     According to the new regulations who entered into effect on 18th, May   2016 (article 26 of the Guidelines and Requirements for Migratory   Services) regarding foreign nationals visiting Mexico, holders of a   valid UK visa, regardless their nationality, are not required to apply   for a Mexican visa as a tourist, business (Non-Lucrative Activities)   or transit visitors for a stay of up to 6 months. This regulation does   not apply to British Travel Document holders.   However, :     PERMANENT RESIDENT IN THE UK (ILR / ILE / PERMANENT RESIDENTS)        According to Mexican regulations which came into force in June 2009,   Permanent residents in the United Kingdom wishing to travel to Mexico   do not require a visa to enter the country as tourists or business   visitors for up to 180 days and as visitors in transit for up to 30   days, regardless their nationality.   So which one is correct? Are Tier 2 holders with an Indian passport allowed visa-free / visa on-arrival entry to Mexico? Title is the question itself.  How can I show below without L’Hospital’s Rule  $$ \lim_{x\to \infty} ( 1 + x )^\frac{1}{x} = 1 $$ Installing 2 versions of Ubuntu on same hard drive?