Is there a word for the selfish kind of (possibly humourous) delight felt at someone else's failure?  e.g.     No matter how I tried, I couldn't complete the seemingly simple task. So feeling like an idiot I gave up and asked the expert. But to my ______, he couldn't do it either!   Edit  I don't feel like schadenfreude really fits - it seems to be more about a sadistic sort of pleasure in someone else's bad fortune. Whereas I'm looking for a sort of combination of humour, a touch of triumph and maybe even relief - and a little bit of, as Walt said, "it's not just that I'm an idiot" (if applicable).
I believe it is what the Germans call "". English itself has no such equivalent word. (Although it has been adopted as a .)  Does an idiom exist that describes it?
Aborting a shell script if any command returns a non-zero value Prove $5\mid2^{4n}-1$ by induction Commenting out multiple lines of code, specified by line numbers, using vi or vim I have learned from  that it is possible to use vi/vim to comment out a specified range of line numbers.  For example, suppose I have the following bash script:  #!/bin/bash  This is my very very great script   Now suppose that I want to comment out line numbers 6 through 8 (which contain the words very, very, and great) using the # comment character.  In vi/vim, I can simply type :6,8s/^/# to obtain the following:  #!/bin/bash  This is my #very #very #great script   which comments out lines 6 through 8.  My question is, is it possible to type a similar one liner that will remove the # comment character from lines 6 through 8 (but not any other commented lines in the file)?  Having said this, I realize that there is some debate about whether I am actually using vi or vim.  In practice, I open a file script.sh with the command vi script.sh.  Also, when I type the command which vi, I obtain /usr/bin/vi.  Nevertheless, when I simply type vi and press Enter, I obtain this:  ~                              VIM - Vi IMproved ~ ~                               version 7.2.330 ~                           by Bram Moolenaar et al. ~                 Vim is open source and freely distributable ~ ~                           Sponsor Vim development! ~                type  :help sponsor&lt;Enter&gt;    for information ~ ~                type  :q&lt;Enter&gt;               to exit ~                type  :help&lt;Enter&gt;  or  &lt;F1&gt;  for on-line help ~                type  :help version7&lt;Enter&gt;   for version info   which seems to suggest that I'm actually using vim.  I am accessing a remote Ubuntu Linux cluster using SSH from my PC.  I am not using a Ubuntu Linux GUI. Calculating centroids of polygon using ArcPy? I am trying to calculate the centroids of a polygon and add the x- and y-coordinate to their respective fields:  arcpy.env.workspace = r"C:/..."  input_fc = "shapefiles/precincts_v.shp" arcpy.AddField_management(input_fc, "X", "DOUBLE") arcpy.AddField_management(input_fc, "Y", "DOUBLE")  arcpy.CalculateField_management(input_fc, "X", "!SHAPE.CENTROID@DECIMALDEGREES!.split()[0]", "PYTHON")  arcpy.CalculateField_management(input_fc, "Y", "!SHAPE.CENTROID@DECIMALDEGREES!.split()[1]", "PYTHON")    but I an invalid syntax error. Where is the mistake?  Edit: exact error message  Traceback (most recent call last):   File "C:\Users\mquentel\Dropbox\PLSS\CA voting data\Python\CONSTRUCT_merge_voting_and_census.py", line 17, in &lt;module&gt;     arcpy.CalculateField_management(input_fc, "X", "!SHAPE.CENTROID@DECIMALDEGREES!.split()[0]", "PYTHON")   File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\management.py", line 3360, in CalculateField     raise e ExecuteError: ERROR 000539: SyntaxError: invalid syntax (&lt;expression&gt;, line 1) Failed to execute (CalculateField). Why does Windows 7 ask for additional drivers when installing from a USB 3.0 drive? Proving that $1+x^py^{1-p} \le (1+x)^p(1+y)^{1-p}$ I'd like to show that $1+x^py^{1-p} \le (1+x)^p(1+y)^{1-p}$ for all $x,y \ge 0$ and $p \in [0,1]$. I started out by defining a function $f(x,y)=(1+x)^p(1+y)^{1-p}$ and checking for critical points, but there are none in the domain I'm interested in. I think I'm probably missing a slick application of Jensen's or Holder's inequalities, but so far a proof eludes me. Any suggestions would be appreciated. Printing reverse of any String without using any predefined function? What does "it" refer to in "it's raining"? In the current era of cricket, we see batsmen using switch hits to play a ball. That is, while playing a ball they change their batting side (left to right handed and vice versa) just before the ball comes to them.  My question is, can a bowler bowl a switch ball? Meaning, can a left hand bowler bowl right handed to a batsman? If it is not permitted, then is it not unfair to the bowlers that batsmen can change their batting style but not the bowlers? Or are there are any rules against a switch hit? The Equation $11^x + 13^x + 17^x =19^x  $  Has    No Real Roots Only One Real Roots Exactly Two Real Roots  More than Two Real Roots    What I have done is   The function $f(x)=11^x + 13^x + 17^x -19^x  $ is strictly increasing and being always positive it have no roots Prove that if 51 positive integers between 1 and 100 are chosen, then one of them must divide another. Given $51$ integers $a_1, a_2, \ldots, a_{51}$ satisfying $1 \leq a_i \leq 100$. Prove that there exist $i$ and $j$ such that $a_i \mid a_j$.   I'm a little unsure how to approach this problem. Thanks for any help. I am trying to solve an exercise in Shankar's QM book (concretely 4.2.1), and I am asked the probability of each possible value for the operator $L_x$ when the particle is in a certain eigenstate of another operator $L_z$. I understand that I have to "expand" the state vector in the $L_z$ basis, which in this case is just the appropriate eigenvector, and then change the base to that of $L_x$, i.e to write the $L_z$ eigenstate in the $L_x$ base. The problem is that there is just no way of doing it, since the eigenvectors of $L_x$ don't span the whole Hilbert Space.   I thought all quantum operators had a set of eigenvectors that spanned the whole space, am I wrong on that or am I wrong on my algebra? Space before chapters and contents I am using LaTeX to write my dissertation, and I have realised that on the table of contents and on every chapter page, LaTeX leaves a lot of empty space.  What I mean is that lets say in the page where chapter 1 begins, from the top of the page until the chapter title there is much more vertical space than on any other page. The same goes with chapter 2 etc... and for contents page as well.   Can anybody help me to remove that space? Is there any mistake in my code or something like that? Is this a default of LaTeX?  the preamble is  \documentclass[12pt,twoside]{report} \pagestyle{plain} \usepackage{a4paper} \usepackage{setspace} \doublespacing  \usepackage{amssymb} \usepackage{amsmath}    I've tried the methods below, but none of them work properly. Recently I'm working on a project aiming to convert the vibration of sound waves into electricity to charge batteries using a piezoelectric material (MFC type). I was trying to use the human voice as an input, but theoretically it was not enough, so do you have any ideas about some places that I can apply my project on it (that must be noisy or can give me vibrations)?  Moreover, has the MFC material been used before in this application? If I used many pieces of it in parallel would that help? Use worksheet name as a variable in a lookup I have 2 workbooks with 60 plus worksheets. I need to copy data from one workbook to the other but would like to capture and use the worksheet name within the cell. This is because when I create the workbook I make a master worksheet and then copy it 60 plus times. The above would make the cell ref for each worksheet the corresponding worksheet cell in the other file. How can I get this symbol without using bbold? How to merge two files in corresponding row? Now,I have two files:  aaaa.txt:  a=0; b=1; c=2;   bbbb.txt:  d=3 e=4 f=5   I want to merge aaaa.txt and bbbb.txt to cccc.txt.   cccc.txt as follow:  a=0;d=3 b=1;e=4 c=2;f=5   So, what can I do for this? Test to see when table is candidate for compression (row or page) Does anyone know a tool like this page  where one can determine if a table is a good candidate for row or page compression. Also I am trying to understand the benefits of compression. I have been reading about it, but still have these questions.  Will compression make more 8KB fit in the buffer cache? When does data become uncompressed i.e. in a select? will backups become faster? Is the reason that compression ads cpu overhead because e.g. inserts need to be compressed before the insert? Is there any good reason to compress tables without investigating how the tables is being used (i.e. static vs. volatile).  A colleague has started to compress many tables (page). I don't know the analysis behind this decision. I know we sometimes have resource semaphore waits during some peak hours. I actually don't think he knows what he is doing. I can see that our sos scheduler yield waits have gone slightly up. I think the compression is causing more harm and it seems that maintenance tasks overshoot more now (e.g. backups, checkdb...). random access file in java I have the following fields:   Inventory control (16 byte record)   Product ID code (int – 4 bytes) Quantity in stock (int – 4 bytes) Price (double – 8 bytes)    How do I create a fixed length random access file using the above lengths? I tried some examples online, but I either get an EOF exception or random address values when I try to access them.  I tried some more examples and couldn't understand the concept very well. I'm trying a project with it and will try to explore more on it.  Here is some example data. There might be holes in the data where No. in stock could be 23 == 023.            Quantity ID. No.   In Stock   Price  -------   --------   ------  1001       476      $28.35  1002       240      $32.56  1003       517      $51.27  1004       284      $23.75  1005       165      $32.25   Thanks for the help. How can a file be copied? How do I copy a file in Python?  I couldn't find anything under .