How to check if a variable is equal to one string or another string?
Why does `a == x or y or z` always evaluate to True?
Floor a date in SQL server In SQL Server, how do I "floor" a DATETIME to the second/minute/hour/day/year?  Let's say that I have a date of 2008-09-17 12:56:53.430, then the output of flooring should be:   Year:  2008-01-01 00:00:00.000 Month: 2008-09-01 00:00:00.000 Day: 2008-09-17 00:00:00.000 Hour: 2008-09-17 12:00:00.000 Minute: 2008-09-17 12:56:00.000 Second: 2008-09-17 12:56:53.000 How do I download a YouTube video? What are instructions on how to download videos from YouTube?    Notice: Terms of Service Violation  Please be aware that by following any of the answers below, you will be violating YouTube's . In particular, from Section 5.B.:     Content is provided to you AS IS. You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content. Is it correct to say "I kindly request you to..."? Isn't kindness already implied when you say "I request you to..."?  When I say "I humbly request you to...", the word humbly helps me to label the state of my behavior during the request.  On the other hand, what value does the word kindly add to the request? font set problems in beamer i want to set the main font in my beamer as "Consolas" i do like this :  \documentclass{beamer} \usepackage{fontspec} \usetheme{Warsaw} \begin{document} \setmainfont{Consolas} \begin{frame} we discuss the ambiguities of existing security definitions and then provide a general framework for defining AKE security when involve strong adversary capabilities \end{frame} \end{document}   but after compile it , the font doesn't change, it is the same with that before the main font was set. what's the reason? How to derive variance-covariance matrix of coefficients in linear regression Why can we treat quantum scattering problems as time-independent? From what I remember in my undergraduate quantum mechanics class, we treated scattering of non-relativistic particles from a static potential like this:   Solve the time-independent Schrodinger equation to find the energy eigenstates.  There will be a continuous spectrum of energy eigenvalues. In the region to the left of the potential, identify a piece of  the wavefunction that looks like $Ae^{i(kx - \omega t)}$ as the incoming wave. Ensure that to the right of the potential, there is not piece of the wavefunction that looks like $Be^{-i(kx + \omega t)}$, because we only want to have a wave coming in from the left. Identify a piece of the wavefunction to the left of the potential that looks like $R e^{-i(kx + \omega t)}$ as a reflected wave. Identify a piece of the wavefunction to the right of the potential that looks like $T e^{i(kx - \omega t)}$ as a transmitted wave. Show that $|R|^2 + |T|^2 = |A|^2$.  Interpret $\frac{|R|^2}{|A|^2}$ as the probability for reflection and $\frac{|T|^2}{|A|^2}$ as the probability for transmission.   This entire process doesn't seem to have anything to do with a real scattering event - where a real particle is scattered by a scattering potential - we do all our analysis on a stationary waves.  Why should such a naive procedure produce reasonable results for something like Rutherford's foil experiment, in which alpha particles are in motion as they collide with nuclei, and in which the wavefunction of the alpha particle is typically localized in a (moving) volume much smaller than the scattering region? Can't indent heredoc to match code block's indentation If there's a "First World Problems" for scripting, this would be it.   I have the following code in a script I'm updating:  if [ $diffLines -eq 1 ]; then         dateLastChanged=$(stat --format '%y' /.bbdata | awk '{print $1" "$2}' | sed 's/\.[0-9]*//g')          mailx -r "Systems and Operations &lt;sysadmin@[redacted].edu&gt;" -s "Warning Stale BB Data" jadavis6@[redacted].edu &lt;&lt;EOI         Last Change: $dateLastChanged          This is an automated warning of stale data for the UNC-G Blackboard Snapshot process. EOI  else         echo "$diffLines have changed" fi   The script sends email without issues, but the mailx command is nested within an if statement so I appear to be left with two choices:    Put EOI on a new line and break indentation patterns or Keep with indentation but use something like an echo statement to get mailx to suck up my email.   I'm open to alternatives to heredoc, but if there's a way to get around this it's my preferred syntax. Apparently, .  How the heck did that happen? Carmichael number square free Show that if $n$ is a , then $n$ is a square-free.  I did this: Let $n= (p^t)(m)$  where $t &gt;1$. Then by modular property,  $$b^p= b \mod n , \,\, b^m= b \mod n$$ Above two equations are also true in$\mod p$, $\mod p^t$. But in$\mod m$, just $b^n=b \mod m$.  And I tried to use CRT But I couldn't.  I think that I've chosen wrong way Segmentation fault on large array sizes I have a Queue&lt;T&gt; object that I have initialised to a capacity of 2, but obviously that is just the capacity and it keeps expanding as I add items.  Is there already an object that automatically dequeues an item when the limit is reached, or is the best solution to create my own inherited class? Continuous and bounded imply uniform continuity? Is there a GLM bible? Is there consensus in the field of statistics that one book is the absolute best source and completely covering every aspect of GLM - detailing everything from estimation to inference? In Iron Man 3,      When the real villain kidnapped the President of the United States,   it is never explained why none of the other Avengers came to help, or why Tony didn't call them. The only explanation so far is: "it was an Iron Man movie...", but an in universe answer would be good. If $A^2 = I$, then $\operatorname{rank} (A+I) + \operatorname{rank} (A-I) =n$ If $A^2 = I$ where $A$ is an $n\times n$ matrix, then why is $\operatorname{rank} (A+I) + \operatorname{rank} (A-I) =n$.   I am not sure why this seems to be true. In computer science we discuss an abstract machine called a "deterministic finite automaton". The standard initialism for this term is "DFA". This makes sense in the singular usage of the initialism.  However, the pluralization of the word "automaton" is "automata". One speaks of "an automaton" or "many automata". Consequently, it seems intuitive to form an initialism of the phrase "deterministic finite automata" as "DFA".   This does not seem correct, as "DFA" could be either plural or singular. On the other hand, "DFAs" also does not seem correct because it would seem to expand to "deterministic finite automatons", a phrase which no self-respecting computer scientist would ever utter.   This appears to be a duplicate of the question here   But that question was never clearly resolved. What to do? Evaluation Symbol: Consistent Implementation "The volume boot has only 0 bytes disk space remaining" After a recent update, I'm getting an alert saying:  The volume boot has only 0 bytes disk space remaining   But my computer has plenty of HD space free. Does anyone know how I resolve this. (If it's relevant, I'm using the whole disk encryption feature of the alternate install image for Ubuntu 12.04). Data Not Backed Up, Partition Type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF I was trying to install Linux on my MacBook for class when I bricked my computer, which now in an unbootable state.   I made my partition too small, so I was going to delete and create a larger one. However, Disk Utility did not allow me to delete the small partition. I followed the instructions from   However, not only was I still unable to delete it, but upon restarting I realized my primary partition (located on the same disk) changed into FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF, and I had no options to boot.  (I am sure I performed the command on the correct disk and partition)  I saw some similar threads, but my main bootable drive is the one that got corrupt.   I don't want to lose any data. I'm not the most terminal savvy, so ANY help is appreciated, and I will kindly provide any additional information!  (Disk 0, partition 2 is my main partition, and that only one I care about)  Below are the results of  $ diskutil list and $ gpt -r show disk0.        UPDATE: :  I have followed @klanomath 's instructions. At the last step I received the following error:  Checking prerequisites Checking the partition list Checking for an EFI system partition Checking the EFI system partition's size Checking the EFI system partition's file system Problems were found with the partition map which might prevent booting Error: -69766: The partition map needs to be repaired because there's a problem with the EFI system partition's file system Underlying error: 8: POSIX reports: Exec format error    FINAL UPDATE: SUCCESS!  I just wanted thank @klanomath for helping me through this entire process. He spent 11 hours TeamViewing with me until not only my files were accessible, but until I could access my computer as could before this whole debacle (and this was after 5 hours of email correspondence).   To any future reader with this problem: PLEASE don't give up, it can be fixed! How to get rid of navigation symbols in beamer?