Get on the plane, get in the car?
Does one work in or on an aeroplane?
Missing $ inserted Mcrypt extension is missing in 14.04 server for mysql What is the reason the log transformation is used with right-skewed distributions? I once heard that      log transformation is the most popular one for right-skewed distributions in linear regression or quantile regression   I would like to know is there any reason underlying this statement? Why is the log transformation suitable for a right-skewed distribution?   How about a left-skewed distribution? How to remove the WordPress version from some .css/.js files I know that I can use the following function to remove the version from all .css and .js files:  add_filter( 'style_loader_src', 'sdt_remove_ver_css_js', 9999 ); add_filter( 'script_loader_src', 'sdt_remove_ver_css_js', 9999 ); function sdt_remove_ver_css_js( $src ) {     if ( strpos( $src, 'ver=' ) )         $src = remove_query_arg( 'ver', $src );     return $src; }   But I have some files, for instance style.css, in the case of which I want to add a version in the following way:  function css_versioning() {     wp_enqueue_style( 'style',         get_stylesheet_directory_uri() . '/style.css' ,         false,         filemtime( get_stylesheet_directory() . '/style.css' ),         'all' ); }   But the previous function removes also this version. So the question is how to make the two work together? Reverse polarity protection How to populate the geometry column in a PostGIS table? After loading a polygon shapefile into PostGIS, the geometry column (geom) is blank for several features. In one case, only a single feature has the geometry calculated and all others are blank. I'm using the PostGIS SHP and DBF loader v.2.0. I am creating a spatial index, and using COPY rather than INSERT. I have loaded several other point datasets and they geom column is populated just fine... (Otherwise, things are working just fine for the polygons: when I create a new feature, the geometry is calculated / geom field populated...etc.) Have I done something wrong when importing the data?  Solution by @ThomasG77 (in comments) PgAdmin3 [doesn't] display features that are too complex but they are present.  You can try SELECT length(ST_astext(the_geom)) from your_table to confirm or you can find &quot;true&quot; empty geometry with SELECT * from your_table WHERE the_geom IS NULL;. What software do you use to keep up to date on literature, and if Google Scholar, how do you avoid information overload? Backgrounder:  The  (Pointer to IMPLementation) is a technique for implementation hiding in which a public class wraps a structure or class that cannot be seen outside the library the public class is part of.  This hides internal implementation details and data from the user of the library.  When implementing this idiom why would you place the public methods on the pimpl class and not the public class since the public classes method implementations would be compiled into the library and the user only has the header file?  To illustrate, this code puts the Purr() implementation on the impl class and wraps it as well.  Why not implement Purr directly on the public class?  // header file: class Cat {     private:         class CatImpl;  // Not defined here         CatImpl *cat_;  // Handle      public:         Cat();            // Constructor         ~Cat();           // Destructor         // Other operations...         Purr(); };   // CPP file: #include "cat.h"  class Cat::CatImpl {     Purr(); ...     // The actual implementation can be anything };  Cat::Cat() {     cat_ = new CatImpl; }  Cat::~Cat() {     delete cat_; }  Cat::Purr(){ cat_-&gt;Purr(); } CatImpl::Purr(){    printf("purrrrrr"); } Can't mount an IDE HDD - "can't read superblock" error message I'm trying to mount my HDD,  /dev/sdb, which is connected via an enclosure but every time I try do so I get an error message   mount: /dev/sdb: can't read superblock   How do I solve this problem and mount my HDD? How can I find the method that called the current method? How to specify ec2 instance types for different services? After I have specified a default EC2 instance type for my Juju charm, how do I override that for one of the services?  For instance, the  deploys wordpress and mysql, and I can set the default-instance-type in my environments.yaml so both services are m1.small  But how do I configure it so that (only) the mysql service gets deployed on an instance type better suited to a database, like m2.xlarge ? CSV API for Java Can anyone recommend a simple API that will allow me to use read a CSV input file, do some simple transformations, and then write it.  A quick google has found  which looks promising.  I just wanted to check what others are using before I couple myself to this API. Set shortcuts to change keyboard layout in Windows 10? Is there any way to set keyboard shortcuts to quickly change to a different language/keyboard layout? The old shortcuts still seem to work (when set back in Windows 7), but I can't seem to find anything to change it in Windows 10. Confirm and agree to negative questions I am trying to prove the following: Let $R=\mathbb{Z}[i]$, $a, b \in \mathbb{Z}, ab \neq 0$. Show that $a+bi$ is an irreducible element in $R$ if and only if $a^2 + b^2 ∈ \mathbb{Z}$ is prime. Since $R$ is a Euclidean domain, irreducible elements are prime. I think this is relevant, but am stuck on where to go from here. Conjugating verbs for nouns referring to groups of people Possible Duplicate:          Frequently when reading tech articles, I see sentences like "Microsoft have released ..." or "Apple have announced ...". This seems wrong to me because the nouns are singular; Microsoft and Apple are individual companies, even though they refer to groups of people. I have not seen this usage outside of tech journalism, but it's pervasive enough that it makes me wonder: is this actually the correct usage?  As a follow-up question, is it correct to use a plural pronoun for a singular antecedent like this? For example, "Apple has announced they are changing their name to Orange" or "Apple has announced it is changing its name to Orange". The second form seems technically correct but sounds awkward. What's the associated matrix of this linear operator? Let $V$ be a complex vector space of dimension $n$ with a scalar product, and let $u$ be an unitary vector in $V$. Let $H_u: V \to V$ be defined as  $$H_u(v) = v - 2 \langle v,u \rangle u$$  for all $v \in V$. I need to find the characteristic polynomial of this linear operator, but the only way to find it that I know of is using the associated matrix of the operator.  I don't know how to find this matrix because I don't know how to deal with the scalar product. Is there some other way to find the characteristic polynomial? If not, how can I find the associated matrix of this linear operator?  Thanks in advance. Recover harddrive data I have a dell laptop that recently "died" (It would get the blue screen of death upon starting) and the hard drive would make a weird cyclic clicking noises.  I wanted to see if I could use some tools on my linux machine to recover the data, so I plugged it into there.  If I run "fdisk" I get:  Disk /dev/sdb: 20.0 GB, 20003880960 bytes 64 heads, 32 sectors/track, 19077 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Disk identifier: 0x64651a0a  Disk /dev/sdb doesn't contain a valid partition table   Fine, the partition table is messed up.  However if I run "testdisk" in attempt to fix the table, it freezes at this point, making the same cyclical clicking noises:  Disk /dev/sdb - 20 GB / 18 GiB - CHS 19078 64 32 Analyse cylinder   158/19077: 00%   I don't really care about the hard drive working again, and just the data, so I ran "gpart" to figure out where the partitions used to be.  I got this:  dev(/dev/sdb) mss(512) chs(19077/64/32)(LBA) #s(39069696) size(19077mb)  * Warning: strange partition table magic 0x2A55. Primary partition(1)    type: 222(0xDE)(UNKNOWN)    size: 15mb #s(31429) s(63-31491)    chs:  (0/1/1)-(3/126/63)d (0/1/32)-(15/24/4)r    hex:  00 01 01 00 DE 7E 3F 03 3F 00 00 00 C5 7A 00 00  Primary partition(2)    type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX) (BOOT)    size: 19021mb #s(38956987) s(31492-38988478)    chs:  (4/0/1)-(895/126/63)d (15/24/5)-(19037/21/31)r    hex:  80 00 01 04 07 7E FF 7F 04 7B 00 00 BB 6F 52 02   So I tried to mount just to the old NTFS partition, but got an error:  sudo mount -o loop,ro,offset=16123904 -t ntfs /dev/sdb /mnt/usb NTFS signature is missing.   Ugh.  Okay.  But then I tried to get a raw data dump by running  dd if=/dev/sdb of=/home/erik/brokenhd skip=31492 count=38956987    But the file got up to 59885568 bytes, and made the same cyclical clicking noises.  Obviously there is a bad sector, but I don't know what to do about it!  The data is still there... if I view that 57MB file in textpad... I can see raw data from files.  How can I get my data back?  Thanks for any suggestions,  Solution:  I was able to recover about 90% of my data:   Froze harddrive in freezer Used Ddrescue to make a copy of the drive Since Ddrescue wasn't able to get enough of my drive to use testdisk to recover my partitions/file system, I ended up using photorec to recover most of my files How to get div height to auto-adjust to background size? How do I get a div to automatically adjust to the size of the background I set for it without setting a specific height (or min-height) for it? How to resize partitions? Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?