my if - then statement results to false even though the condition is true  I've tried casting values to doubles      dblCompare = CDbl(rng1.Offset(0, -12).Value2)     If dblTotal = dblCompare Then         'If the values match, then record the Unique IDs in Columns AI:AN         Range(Cells(m, 35), Cells(m, 35 + k - 1)) = arr     End If   dblCompare = 114954.48 and dblTotal = 114954.48.  However, the statement results to false and the pasting of the array into the Range is completely skipped.  Sometimes the if-then statement results to true and the contents of the array is pasted into the range, but sometimes it doesn't.  VBA appears to be very buggy.  All I can think of is that dblCompare needed to be type cast to a Double.  My declarations:   Option Explicit Sub Find_Recs()     Dim i As Integer, j As Integer, k As Integer, m As Integer     Dim strSearch As String     Dim dblTotal As Double, dblCompare As Double     Dim rng1 As Range, rng2 As Range     Dim arr As Variant ' ' 'code here ' ' End Sub
I have trouble comparing 2 double in Excel VBA  suppose that I have the following code  Dim a as double Dim b as double a = 0.15 b = 0.01   After a few manipulations on b, b is now equal to 0.6  however the imprecision related to the double data type gives me headache because  if a = b then  //this will never trigger end if   Do you know how I can remove the trailing imprecision on the double type?
Loop-cut won't go all the way around How do I get:  $$\cos{\theta} \lt \frac{\sin{\theta}}{\theta} \lt 1$$ I am trying to evaluate the following sum. Here $x\in\mathbb{R^{+}}$. $$f(x)=\sum_{n=1}^{\infty}\frac{(n-1)!}{\prod_{r=1}^{n}(x+r)}$$ At present I do not know how to proceed. Any hints are appreciated. Thanks. I am trying to print a List of Appendices (LoA) for my thesis, separate from the Table of Contents (ToC).   I wish for my ToC to look like this, with depth up to subsections (2?):  CONTENTS  CHAPTER   I. Introduction......1    1.1 Section title...1     1.1.1 Subsection...1  Appendices ..... 2   and for an LoA on a new page, with depth 0, thus:  APPENDICES  APPENDIX A. Proof of Theorem 1...1 B. Proof of Theorem 2...1   I am trying to achieve this using the report class, in a way that allows me to type appendices using the hierarchy that I obtain from the chapter, section commands. This is as opposed to defining a custom myappendix command into which I insert my appendix content. (I realize that I only need the titles from the appendix chapters for the LoA, but I'd like for the appendix content to have such structure.)   For instance, this approach would solve my problem:   \chapter{Introduction} \section{Section title} \subsection{Subsection} % \begin{appendices} is also acceptable \appendix   % Some settings are changed now \chapter{Proof of Theorem 1} \chapter{Proof of Theorem 2} % \end{appendices} if environment is begun   whereas the following approach would not:  \chapter{Introduction} \section{Section title} \subsection{Subsection} \myappendix{Proof of Theorem 1} \myappendix{Proof of Theorem 2}   I realize several questions have been asked regarding this before, but none of them quite solved my problem. Notably,  defines a custom appendix command;  defines two custom commands to maintain some hierarchy, but I will have to do more work to handle the inclusion of another layer (subsection) into the appendix.    is the closest to what I want: it does give me a separate LoA, but it also adds appendices to ToC and I can't quite figure out how to suppress the entires in ToC. The moment I use   \addcontentsline{toc}{\setcounter{tocdepth}{-1}}   the line   \xpatchcmd{\@chapter}{\addcontentsline{toc}}{\addcontentsline{toa}}{}{}%   fails because I am not adding anything to the ToC anymore.   My approach: Since I was using titlesec and tocloft packages anyway, I tried to do the following:   Stop ToC once appendix command is issued Start a new counter for appendices using tocloft Using the &lt;after-code&gt; option of titlesec, add contents line after every chapter.    My MWE   \documentclass[a4paper]{report} \usepackage{lipsum} % for arbitrary text  \usepackage{tocloft,etoolbox,titlesec} \newcommand{\listappendixname}{List of Appendices} \newlistof{appendix}{apc}{\listappendixname}  \makeatletter \g@addto@macro{\appendix}{     \clearpage     \addcontentsline{toc}{chapter}{Appendices}     \addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}     \titleformat      {\chapter}      [display]     {\huge\bfseries\filcenter}      {\Large \MakeUppercase{\@chapapp} \thechapter}      {1.5ex}{}     {\refstepcounter{appendix} \addcontentsline{apc}{appendix}{\protect{\@chapapp \thechapter}}} } \makeatother  \title{Title} \author{Author}  \begin{document} \maketitle \tableofcontents \clearpage \listofappendix  \chapter{Introduction} \lipsum[1] \section{Section} \lipsum[2] \subsection{Subsection} \lipsum[3]  \appendix  \chapter{Proof of Theorem One} \lipsum[4] \chapter{Proof of Theorem Two} \lipsum[5]  \end{document}   produces the following LoA:  List of Appendices  Appendix...... 5   It doesn't get the Appendix title or number, and fails after the first one.  Could you please help me obtain a separate LoA in a way that I can still use LaTeX's chapter, section, ... hierarchy? (I am okay with using different packages, the book class, or any approach other than mine.) Infinite algebraic extensions of $\mathbb{Q}$ I need help to solve the following exercise:   If $K$ is an algebraic extension of $\mathbb{Q}$ (finite or infinite), then we let $O_{K}$ denote the ring of algebraic integers in $K.$ If $\frak{P}$ is a prime ideal of $O_{K}$ then $\frak{P}∩\mathbb{Z}$ is a prime ideal of $\mathbb{Z}.$ Moreover, if $\frak{P}$ is non-zero, then so is $\frak{P}∩\mathbb{Z}$ . Thus $\frak{P}∩\mathbb{Z}=$$ p\mathbb{Z}$ for some prime $p.$ Show that $O_{K}/\frak{P}$  is a field, and is an algebraic extension of $\mathbb{F}_{p}$; then show that it is Galois over $\mathbb{F}_{p}$ with abelian Galois group.  Now suppose that $K/F$ is a (finite or infinite) Galois extension. Let $\frak{P},$  $O_{K}$ be as before and put $\frak{p}=\frak{P} \cap $$O_{F}$, a prime ideal of $O_{F}.$  Show that $\mathrm{Gal}(K/F)$ acts transitively on the set of prime ideals of $O_{K}$ above $\frak{p}.$   Thanks in advance Does the verb &quot;provide&quot; always have to be used with &quot;with&quot;? For example,  Can you provide me with some good examples? Can you provide me some good examples? Can you provide some good examples?  I suppose it's a transitive verb, isn't it? Moreover, is the following type of usage correct?  You should provide food for your dog before you go on vacation.  If you could give me some good examples regarding &quot;provide&quot; with different types of usage, I'd appreciate that. I was given a laptop with a totally dead display. I do not want to pay to replace the broken display, but I would like to use the laptop as a server and connect to it via SSH to control it.  I have pulled out the internal hard drive from the broken laptop, and I want to install Debian GNU/Linux and the SSH server onto this HDD using a working Debian laptop.  However, the hardware in the two laptops is very different, and I am wondering what kind of problems I would run into when I plugged the drive back in to the laptop with the broken display because of this?  How would I make this work? What is the proper way for me to install a bootable copy of Linux onto a HDD that will be used by a computer with different hardware? Can you use Magical Secrets to choose high level spells when multiclassing as a Bard? Say you have a Wizard 7/Bard 9. You gain your 17th level and choose to gain the level in Bard (which grants you Magical Secrets). According to the Multiclass Spellcaster: Spell Slots per Spell Level table, you now have a single 9th level spell slot. Can the spells you choose from Magical Secrets be 9th level spells even though you can only cast up to 5th level Bard spells? How to disable battery charging? From the pmset man page:     POWER SOURCE ARGUMENTS      -g with a 'batt' or 'ps' argument will show the state of all attached power sources.      […] Certain Apple battery calibration tools may temporarily disable   battery charging, even though your Apple portable is plugged into AC   power.      Such tools will never surprise you with this behavior; you will know   it's happening. This state will be reflected in an additional line of   output to 'batt' or 'ps' readings, including the pid of the app   inducing this behavior.       'ChargeInhibit':    1432    So, does any piece of publicly available software exist to force the battery not to charge? Cannot install WPS Office I'm using Ubuntu GNOME 16.10 and was trying to install WPS Office. I tried to install using software centre But it wasn't installing without giving any error logs. Then I opened it with Gdebi installer. Here is what I saw.    I have already trying enabling multiverse repositories.  Edit: I have downloaded the amd64 package from the WPS official site, but even now installing through terminal I still get the missing dependencies error. How do I use itertools.groupby()? I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function.  What I'm trying to do is this:  Take a list - in this case, the children of an objectified lxml element Divide it into groups based on some criteria Then later iterate over each of these groups separately.  I've reviewed , but I've had trouble trying to apply them beyond a simple list of numbers. So, how do I use of itertools.groupby()?  Is there another technique I should be using?  Pointers to good &quot;prerequisite&quot; reading would also be appreciated. How do you fix a bad merge, and replay your good commits onto a fixed merge? How do I figure out the right size font / text for a given read distance? Your UK visa application has been issued.      PLEASE DO NOT GO TO THE VISA APPLICATION CENTRE BEFORE THEY CONTACT YOU.      You will be contacted by the Visa Application Centre when your documents are ready for collection, or have been dispatched via courier where this is relevant.       You are reminded that you should avoid making travel plans until you have collected your passport, as the outcome of your visa application is not final until you receive your passport.      Please ensure you check the details on your visa when collecting your passport. If you need to contact us you can do so via our International Enquiry Service at www.gov.uk/contact-ukvi-outside-uk      Kind regards,      UK Visas and Immigration   British Embassy Abu Dhabi     Your UK visa application has been issued.   I know words like processed, forwarded, received, refused but never heard anything like that, so I am confused. Let $G$ be a group with $|G| = n$ and let $ \emptyset \ne S \subseteq G$.   I want to show that $S^n$ is a subgroup of $G$ where by $S^n$ I mean the set $\lbrace s_1\cdots s_n \; | \; s_i \in S\rbrace$. How is the classical twin paradox resolved? I read a lot about the classical twin paradox recently. What confuses me is that some authors claim that it can be resolved within , others say that you need . Now, what is true (and why)? I'd like to use epigrafica specifically for chapters and sections, but like to use times font for main texts.  \usepackage{epigrafica}          % for chapter/section \usepackage{newtxtext,newtxmath} % for main text   Is there any way to do this? I can only use pdftex. Is there PvP in Diablo 3? How does it work? How do we "restore" notepad after crash? So, I thought I had a good understanding of this, but just ran a test (in response to a conversation where I disagreed with someone) and found that my understanding is flawed...  In as much detail as possible what exactly happens when I execute a file in my shell? What I mean is, if I type: ./somefile some arguments into my shell and press return (and somefile exists in the cwd, and I have read+execute permissions on somefile) then what happens under the hood?  I thought the answer was:   The shell make a syscall to exec, passing the path to somefile The kernel examines somefile and looks at  of the file to determine if it is a format the processor can handle If the magic number indicates that the file is in a format the processor can execute, then   a new process is created (with an entry in the process table) somefile is read/mapped to memory. A stack is created and execution jumps to the entry point of the code of somefile, with ARGV initialized to an array of the parameters (a char**, ["some","arguments"])  If the magic number is a  then exec() spawns a new process as above, but the executable used is the interpreter referenced by the shebang (e.g. /bin/bash or /bin/perl) and somefile is passed to STDIN If the file doesn't have a valid magic number, then an error like "invalid file (bad magic number): Exec format error" occurs   However someone told me that if the file is plain text, then the shell tries to execute the commands (as if I had typed bash somefile). I didn't believe this, but I just tried it, and it was correct. So I clearly have some misconceptions about what actually happens here, and would like to understand the mechanics.  What exactly happens when I execute a file in my shell? (in as much detail is reasonable...)