Ruby is_a?(Integer) issues
How to test if a string is basically an integer in quotes using Ruby
I'm trying to remember a film I saw years ago (1980's?).  The only part I clearly remember is a man and girl being bricked up alive (in a tower?) and escaping by turning his (magically large) coat or cloak into a rudimentary hang glider.  The film had a medieval sword/sorcery setting. How to encode the filename parameter of Content-Disposition header in HTTP? Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition header in the HTTP response of the form:  Content-Disposition: attachment; filename=FILENAME  The filename parameter can be used to suggest a name for the file into which the resource is downloaded by the browser.  (Content-Disposition), however, states in  (The Filename Parameter) that the file name can only use US-ASCII characters:     Current [RFC 2045] grammar restricts   parameter values (and hence   Content-Disposition filenames) to   US-ASCII.  We recognize the great   desirability of allowing arbitrary   character sets in filenames, but it is   beyond the scope of this document to   define the necessary mechanisms.   There is empirical evidence, nevertheless, that most popular Web browsers today seem to permit non-US-ASCII characters yet (for the lack of a standard) disagree on the encoding scheme and character set specification of the file name. Question is then, what are the various schemes and encodings employed by the popular browsers if the file name “naïvefile” (without quotes and where the third letter is U+00EF) needed to be encoded into the Content-Disposition header?  For the purpose of this question, popular browsers being:   Firefox  Internet Explorer  Safari Google Chrome  Opera Why is the complex number $z=a+bi$ equivalent to the matrix form $\left(\begin{smallmatrix}a &-b\\b&a\end{smallmatrix}\right)$ Possible Duplicate:          On Wikipedia, it says that:     Matrix representation of complex numbers   Complex numbers $z=a+ib$ can also be represented by $2\times2$ matrices that have the following form: $$\pmatrix{a&amp;-b\\b&amp;a}$$   I don't understand why they can be represented by these matrices or where these matrices come from. Comment submission broken for comments that end with @username Generally accepted root mean square (RMS) error for rectifying topographic maps This is a generic inquiry on the common practice/standard for determining the acceptable values of RMS when georeferencing topographic maps.  Is there an absolute value?  Some literature suggests that it should be "less than or equal to 1/2 of the side of a cell which make up the total resolution of the image." After lethal first strike damage to an indestructible creature, will it still do damage? If I were to attack with a 4/4 indestructible creature and it's blocked by a 4/2 creature with first strike, would my indestructible creature still attack during the second combat damage step, or would it just tap, not assigning any damage? I want the entries in the TOC for the indices to align with the Chapter entries. I can do this with \addcontents. \printindex also puts an entry in the TOC but it is aligned with the section entries.   So I want to:    change how printindex makes its entry into the TOC or  to eliminate printindex entry.   MWE:  \documentclass{book} \usepackage{multind}        % create the indices \makeindex{names}            \makeindex{subject} \newcommand{\Ndx}[1] { \index{names}{#1} }     % define the type of entry \newcommand{\Sdx}[1] { \index{subject}{#1} }   % to the indices \usepackage[headings]{fullpage}         % 8-1/2, 11 page with 1" margins \usepackage{fancyhdr} \pagestyle{fancy} \begin{document} \fancyhead{} \fancyfoot{} \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} \fancyhead[LE,RO]{\rightmark} \fancyhead[RE,LO]{\thepage} \tableofcontents        % put table of contents here  \chapter{\bf Logic, Plausibility, and Probability} \label{Ch:Logic} \section{Logical Arguments and Reasoning } It is obvious that logical arguments are essential to the judicial system. The logic must be able to treat syllogisms\Sdx{syllogism} that range from deductive\Sdx{syllogism!deductive} to abductive\Sdx{syllogism!abductive}, that is from strong to weak syllogisms \Sdx{syllogism!weak}\Sdx{syllogism!strong} as illustrated in the table taken from Author \Ndx{Author} \Ndx{Cohen} \Sdx{Cohen on probability} \clearpage \addcontentsline{toc}{chapter}{Subject Index} \printindex{subject}{Subject Index} \addcontentsline{toc}{chapter}{Name Index} \printindex{names}{Name Index} \end{document} Proof Verification : Prove -(-a)=a using only ordered field axioms I need to prove for all real numbers $a$, $-(-a) = a$ using only the following axioms:     Thanks to many members of the Mathematics Stackexchange Community, I have the following proof worked out:  Theorem: The Additive Inverse Identity is Unique  $ ( \forall a,b,c \in \mathbb{R} )(a+b=0) \land (a+c=0) \\ ( \forall a,b,c \in \mathbb{R} )(a+b=a+c) \\ ( \forall a,b,c \in \mathbb{R} )(b=c) \\ \text{QED} \\ $  Theorem $\textbf{a} \cdot \textbf{0 = 0}$  $ \begin{align} a \cdot 0 &amp;= a \cdot 0 \\ a \cdot (0 + 0) &amp;= a \cdot 0 \\ a \cdot 0 + a \cdot 0 &amp;= a \cdot 0 \\ a \cdot 0 + a \cdot 0 + (-a) \cdot 0 &amp;= a \cdot 0 + (-a) \cdot 0 \\ a \cdot 0 &amp;= 0 \\ &amp;\text{QED} \\ \end{align} $  Theorem: $-\textbf{1} \cdot \textbf{(a) = (}-\textbf{a)}$  $ \begin{align} a \cdot 0 &amp;= 0 \\ a \cdot \left[ 1 + (-1) \right] &amp;= a + (-a) \\ 1 \cdot a + (-1) \cdot a &amp;= a + (-a) \\ -1 \cdot (a) &amp;= (-a) \\ &amp;\text{QED} \\ \end{align} $  Theorem: $-\textbf{(}-\textbf{a) = a}$  $ \begin{align} 0 &amp;= 0 \\ -a \cdot 0 &amp;= 0 \\ -a \cdot \left[ 1 + (-1) \right] &amp;= 0 \\ -a \cdot 1 + -a \cdot (-1) &amp;= 0 \\ -a + \left[ -(-a) \right] &amp;= 0 \\ -(-a) &amp;= a \\ \text{QED} \\ \end{align} $  Does everything look alright? Have I missed anything?  Also--why is it necessary to show that the additive inverse is unique?  Many thanks in advance. How to vertically center content with variable height within a div? What is the best way to vertically center the content of a div when the height of the content is variable.  In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a solution with no, or very little use of CSS hacks and/or non-semantic markup. From what I understand, entropy is a concept defined by the experimentalist due to his ignorance of the exact microstate of a system. To say the number of accessible microstates $W$ of the universe is constantly increasing is nothing more than saying 'ignorance begets ignorance'.  I have often encountered the argument of ever increasing entropy for the presence of an inherent time asymmetry, most prominently in the works of Penrose. It just doesn't seem to make sense.  Let us imagine alien beings who are experiencing time in reverse. For them, increasing ignorance is in the direction of our decreasing ignorance. So how can perpetual increase in entropy indicate an 'arrow of time'?  One possible explanation (I thought of) for this argument was the fact that there may never be a mechanism to reduce ignorance. I will pose this as a question:  An observer determines the number of possible microstates of system+observer to be $W_0$ at time $t_0$. After improving his measurements, can he (at a later time) measure $W'$ (where $W_0&gt;W'$) as the number of possible microstates? Assume that all the microstates are equally probable in this case.  Unless the above in false in general, how else can anyone claim that entropy reveals an arrow of time?  EDIT: I am performing this discussion for isolated systems (the universe or it's parts if relevant). The means I propose to reduce entropy in the present, is by redefinition of macroscopic variables and of microscopic models used to count the number of distinguishable micro-states (that obviously yield the same macro-state). This is essentially an argument against the robustness of entropy via redefinition. The level 4 spell Polymorph requires concentration to maintain.  The subject retains their personality and alignment, but they have the mental statistics of the new form, which must be a beast and cannot speak or cast spells.  If a caster targets themselves with this spell, can they concentrate to maintain it, or does this depend on the mental statistics of the beast form they choose?  This situation certainly occurs in practice, since Wizards reaching level 10 in the School of Transmutation gain the Shapechanger feature.  This allows them to cast Polymorph, but only upon themselves and only to change into a beast of CR 1 or lower.  Beasts with CR 1 or less range in Intelligence from the Giant Eagle (Int 8) to the Frog (Int 1). Deleting Objects in JavaScript Low Quality Posts you Have Already Flagged I just discovered that it is possible to get a post in the Low Quality Posts review queue that you have already flagged for closing, making reviewing that item impossible. Obviously, I don't want to 'Looks Good' something that I know should be closed, but at the same time I cannot 'Recommend Close' something I have already flagged leaving the only option being to skip the post.  Can the queue be changed so that it does not show posts which you have already flagged? How can I run an external program from C and parse its output? I've got a utility that outputs a list of files required by a game.  How can I run that utility within a C program and grab its output so I can act on it within the same program? UPDATE: Good call on the lack of information.  The utility spits out a series of strings, and this is supposed to be portable across Mac/Windows/Linux.  Please note, I'm looking for a programmatic way to execute the utility and retain its output (which goes to stdout). Need help with SQL Server PIVOT I know about the PIVOT feature in SQL Server and I've read a few other questions and answers on here but I just can't seem to grasp it in order to do what I need. I'm trying to run some calculations and I have the following:  TABLE office_settings column office_id (bigint not null) column setting_value (NVARCHAR(500) NOT NULL)  office_id    setting_value -------------------------------------------- 4             0.2 4             0.2 4             2 4             3 5             0.2 5             0.2 5             2 5             3   I'd like to convert this using PIVOT (assuming that's the right tool for the job) to this, basically "grouping by" the office_id column, so:  office_id    value_1    value_2    value_3   value_4 ------------------------------------------------------     4         0.2         0.2         2         3     5         0.2         0.2         2         3   I should also mention that I need to CAST the setting_value column values to DECIMAL(4,2) in the process of this - in case that has any bearing on the T-SQL required to accomplish it.  Any ideas? Is "education" a count noun? How to resize my dual-boot partitions I have a dual-boot laptop with both Windows 10 and Ubuntu 16.04.  Currently, the Windows side has too much disk space, and I want to resize things so that the Ubuntu side has more.  Firstly, I went into the Windows disk management and shrunk the Windows partition by 20GB. I then wanted to expand the Ubuntu partition, but it seemed like this option was greyed out.  Can I expand the Linux partition from Windows or do I need to be in Ubuntu or do I need to create a boot disk and do it that way?  Or do I need third party software?  Any help gratefully received. $f_n:[0,1]\to [0,1]$ continuous, $f_n\to f$ uniformly, prove: ${\frac1n}\sum_{k=1}^{n}{f_k} \to f$ uniformly I was able to prove, hopefully correctly, that the sum converges uniformly. But, I'm not sure how to show it converges uniformly specifically to $f$.  The way I proved it converges uniformly was by using the Dirichlet convergence test, by taking $a_k(x) = \frac1n$ and $b_k(x) = f_k(x)$. $\sum_{k=1}^n{b_k(x)}$ is uniformly bounded on $[0,1]$ by $n+2$ for instance, and $a_n$ is monotone and uniformly convergent to 0 because it does not depend on the value of $x$.  I got rather stuck after this. I guess I have to use the continuity of the functions and the uniform convergence of both, but I can't figure out how to show that they converge to the same thing. Any help will be greatly appreciated. I'm having a heck of a time trying to disable the option  "Check for updates Automatically"  I ran composer to see what plist was being modified and it looks like ~/Library/Preferences/com.oracle.javadeployment.plist  &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"    "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt;     &lt;key&gt;/com/oracle/javadeployment/&lt;/key&gt;     &lt;dict&gt;         &lt;key&gt;deployment.macosx.check.update&lt;/key&gt;         &lt;string&gt;false&lt;/string&gt; &lt;/dict&gt; &lt;/dict&gt; &lt;/plist&gt;   So I experimented with changing that value to true or false and it would not effect the checkbox under the Java Control Panel > Update > Check for Updates Automatically  Your assistance would be much appreciated.  Initially I was looking @ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin How is $\dfrac1{(1-x)^5}=\sum_{n\geq0}{n+4\choose4}x^n$ Can someone please explain to me how is $$\dfrac1{(1-x)^5}=\sum_{n\geq0}{n+4\choose4}x^n$$  Thanks!