Get info on my source  png file.  file  old.png old.png: PNG image data, 600 x 800, 8-bit colormap, non-interlaced   I want to convert old.png from 600 x 800  into  600 x 400.  convert -resize 600x400  old.png  new.png   Check my output.  file new.png new.png: PNG image data, 300 x 400, 8-bit/color RGB, non-interlaced
I'm batch processing a folder of image to a uniform width with GraphicsMagick (though I assume the same would apply to ImageMagick):  $ gm convert -resize 1000x in.jpg out.jpg   But when I inspect some of the images, I get 999px instead of 1000px.  $ gm identify -verbose out.jpg  ==&gt; Image: out.jpg ==&gt; Format: JPEG (Joint Photographic Experts Group JFIF format ==&gt;   Geometry: 999x591   Is there a way to enforce the right width? I assume it's doing some estimation to preserve aspect ratios.
This works just fine:      protected void txtTest_Load(object sender, EventArgs e)     {         if (sender is TextBox) {...}      }   Is there a way to check if sender is NOT a TextBox, some kind of an equivalent of != for "is"?  Please, don't suggest moving the logic to ELSE{} :) It is written everywhere that gravity is curvature of spacetime caused by the mass of the objects or something to the same effect. This raises a question with me: why isn't spacetime curved due to other forces or aspects of bodies?  Why isn't it that there are curvatures related to the charge of a body or the spin of particles or any other characteristics? Showing a tensor is not a simple tensor Let $(e_1,e_2)$ be the standard basis of $\mathbb{R}^2$. Why can the element $e_1\otimes e_2 + e_2\otimes e_1$ in $ \mathbb{R}^2\otimes_{\mathbb{R}} \mathbb{R}^2 $ not be written as a simple tensor $v\otimes w$ for $v,w\in \mathbb{R}^2$?  If we suppose $e_1\otimes e_2 + e_2\otimes e_1=v\otimes w$, then can we conclude that $e_1=\lambda e_2$ for some $\lambda \in \mathbb{R}$? This would give a contradiction since $e_1$ and $e_2$ are linearly independent. However, I am not sure if the argument is valid. What are the automorphisms acting on $Q\sqrt[3]{2}$ that fixes Q? Why are one-way plane tickets more expensive than return tickets? Troubleshooting "program does not contain a static 'Main' method" when it clearly does...? A former lecturer of mine once explained why, from a syntactic point of view, the English rule that negation and questions are formed with the auxiliary do follows from other syntactic facts about English.  More precisely, if you gave a good syntactician not familiar with English a corpus of English sentences containing everything but questions and negated phrases, then s/he could infer grammatical rules from it (such as headed-ness of phrases, what kind of arguments what word takes, etc.) From some of these rules, then, s/he could see that something specific would be wrong with the sentences "Gave you the present to Mary?" and "He went not to the cinema."  Can someone explain what exactly this something is and how it follows from other sentences?  FYI, my lecturer did this in Government &amp; Binding with X-Bar theory. This may be more suitable a question for the proposed  but as it's not online yet I'm trying it here first.   Edit: the beta is online now at . I know that I can make certain blocks only placeable on a specified block, but what is the command to give an item that can only BREAK certain blocks? Multiple Bluetooth speakers simultaneously I would like to pair two sticky dude Bluetooth speakers, at one time with my iPhone. With two of them at once it would be like stereo sound. Is there an app or something maybe? How loud/obvious is a wizard casting a spell? Some spells have somatic and vocal components, that's well known.  How loud must a wizard talk? How obvious/wide should his gestures be?  Some spells that would be awesome would be fairly limited if you need to shout them (ex: mage hand, range 30ft). Use of very as an adjective is (in my experience) most frequently attested in phrases like     ...the very person I was looking for.   To use adjective very with the indefinite article sounds quite bizarre in this case:     ?...a very person I was looking for.   But consider this sentence, where indefinite a is used:     Visualizing a very transformation of the master-slave relation, Thomas presses further: the slave is brother to the master, even doubly a brother.   OED treats the two uses as separate senses of the word, with the following definitions:           (first use):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;With limitation (usually expressed by the or a possessive) to particular instances      (second use): Really or truly entitled to the name or designation   Here are two respective examples quoted in OED:     What would you say to me now, and I were your verie, verie Rosalind? (1616)   Thence we went into Queen Mary's room, and saw that beautiful portrait—that very queen and very woman. (1857)   Clearly, the difference in meaning between the two senses is quite light, and it seems to me like a kind of difference which is recurrent enough to have its own term. What is the proper term? Are there other English words having similarly related pairs of senses? And lastly, is OED jumping the gun in treating these as two senses? Could the difference in meaning instead be due to the choice of determiner? When it comes to getting a tenure-track position where one has both a lot of resources and academic freedom to do what one wants to do (so having a tenure-track position in a top university might be more useful because one may get more resources at a top university).   Or in short, when one wants to maximize one's chances of becoming a "top scientist".  There are obviously numerous factors, and "rank/prestige" should not be considered as a factor in itself. That said, the period after one gets a PhD is an extremely important time for building up connections, and those are easier to get at a top university. How to open and repair an m4v or mp4 video file? Yesterday I was filming a scene with my phone but suddenly the application crashed and when I try to open the m4v generated it says that is corrupted.  I have downloaded the video files (around 36MB) on my PC and I am trying to open and repair it. Can you suggest me a way to do it?  FFMPEG info  As suggested in comments I try check what FFMPEG says me about that file with this command  ffmpeg.exe -i VID_20120425_144739.m4v -c:v copy -c:a copy out.mp4 2&gt; log.txt   Here it is the result:  ffmpeg version N-40126-ga4b58fd Copyright (c) 2000-2012 the FFmpeg developers   built on Apr 26 2012 03:29:50 with gcc 4.6.3   configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib   libavutil      51. 47.100 / 51. 47.100   libavcodec     54. 15.100 / 54. 15.100   libavformat    54.  3.100 / 54.  3.100   libavdevice    53.  4.100 / 53.  4.100   libavfilter     2. 72.100 /  2. 72.100   libswscale      2.  1.100 /  2.  1.100   libswresample   0. 11.100 /  0. 11.100   libpostproc    52.  0.100 / 52.  0.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 003fc940] moov atom not found VID_20120425_144739.m4v: Invalid data found when processing input   Latest two lines are displayed in red. What are the pros and cons of adding a vapor barrier behind shower backer board? After much research, I have a lot of conflicting advise about the need to add a vapor barrier before installing the backer (hardy / cement) board for my bathroom shower. The &quot;expert&quot; at Home Depot, and  seem to think this is a very good idea, and even suggest sealing it with roofing tape.  (The guy on Youtube tapes it directly to the sill of tub.) However, when I asked about the tape and how far down I should go at Lowes, they told me they'd never hear of anyone doing that, and that it didn't seem like a good idea.   Likewise,  putting down caulking on the sill before applying the backer board, and then again after before adding tile, and then caulking a 3rd time under the tiles before grouting. Should I add a vapor barrier between the frame and the cement board?  Why or why not? When should end punctuation go inside quotes? I haven't written any C++ in years and now I'm trying to get back into it. I then ran across this and thought about giving up:  typedef enum TokenType {     blah1   = 0x00000000,     blah2   = 0X01000000,     blah3   = 0X02000000 } TokenType;   What is this? Why is the typedef keyword used here? Why does the name TokenType appear twice in this declaration? How are the semantics different from this:  enum TokenType {     blah1 = 0x00000000,     blah2=0x01000000,     blah3=0x02000000 }; Sheet Specific Scripts I'm currently using the below script to timestamp when an edit is made to column 7 on a sheet named "Sheet 1".  function onEdit(e) {    if ([7].indexOf(e.range.columnStart) != -1) {    e.range.offset(0, 7).setValue(new Date()).setNumberFormat("dd.MM.yyyy at HH:mm");    }   }     I have a second sheet "Sheet 2" which I need to run the same script on but against column 5.  function onEdit(e) {    if ([5].indexOf(e.range.columnStart) != -1) {    e.range.offset(0, 7).setValue(new Date()).setNumberFormat("dd.MM.yyyy at HH:mm");    }   }     I've tried .getSheetByName("Sheet1") but just cant seem to get it working correctly. When one wants to list various cases/classes/categories/types of objects in a string of conjunctions, is it preferable (or even mandatory) to keep on using (the same) preposition in front of each one them?  Moreover, does singular or plural form of the word "case", "class", "category" make any difference in the previous question?  Examples:   In the present article, we study the case of X, of Y and of Z objects. (in this example, as in most of the ones I have in mind, it is the preposition "of" which is relevant to my question). We study the cases/classes of X and of Y objects. vs. We study the cases/classes of X and Y objects.   Although it is rather clear that, in the singular case, the absence of "of" in later conjuncts may lead to a logical confusion (e.g., mistakenly taken as the one class/case of objects which are both X and Y), when it comes to plural of the words "case", "class", etc., this might not be an issue. Still, there might anyway be a rule in the plural setting as well. Systemd backed tmpfs | How to specify /tmp size manually I mount /tmp on tmpfs using:  sudo systemctl enable tmp.mount sudo systemctl start tmp.mount   But this way /tmp takes up all the free RAM:  $ df -h /tmp Filesystem      Size  Used Avail Use% Mounted on tmpfs           3.9G   12K  3.9G   1% /tmp $   How do I tell systemd tmp.mount to use only 1G? I know I can alternatively not use systemd and manually add an entry to /etc/fstab and specify the size there. But I don't want to do that. I want to use systemd backed tmpfs. series of young adult science fiction books from early 1980s about last of a race of martial experts that sees the destruction of his home planet I remember that the main character is trying to find the group that destroyed his home planet while he was on a mission. His planet was very difficult to live on and the people became expert in martial arts and were the best soldiers in the galaxy. They were mercenaries and often helped against tyrants. There was a very memorable section in at least one book about an initiation task that the main character had to do in that he had to survive in their wilderness for days. He was at some point surrounded in a old building by thousands of poisonous worm/snake creatures that he managed to survive until rescued by the leaders.