CASE WHEN @Filter = 'Department' THEN Employee.Department END BETWEEN @From AND @To
SQL Switch/Case in 'where' clause
Maximum value of $\sin A+\sin B+\sin C$? What is the maximum value of $\sin A+\sin B+\sin C$ in a triangle $ABC$. My book says its $3\sqrt3/2$ but I have no idea how to prove it.   I can see that if $A=B=C=\frac\pi3$ then I get $\sin A+\sin B+\sin C=\frac{3\sqrt3}2$. And also  maximum is attained for $a=b=c$. But this does not give me any idea for the proof.  Can anyone help? To prove that if $ab\equiv ac\bmod n$ and $(a,n)=1$ then $b\equiv c\bmod n$ I've always wondered about this and never found a good solution.  But  reminded me of it.  When I have a URL on my website it can be displayed and accessed any of the following ways:  http://www.somesite.com/subdirectory http://www.somesite.com/subdirectory/ http://www.somesite.com/subdirectory/index.htm http://www.somesite.com/subdirectory/index.html http://www.somesite.com/subdirectory/index.php http://www.somesite.com/subdirectory/index.asp http://www.somesite.com/subdirectory/some-relevant-keywords http://www.somesite.com/subdirectory/some-relevant-keywords.htm http://www.somesite.com/subdirectory/index.php?page=some-relevant-keywords http://www.somesite.com/subdirectory/?page=some-relevant-keywords http://www.somesite.com/subdirectory/?page=some-relevant-keywords&amp;even=more-keywords   etc...   Now, I can understand the merits of adding keywords in the URL. Even the most basic SEO guide will mention to do just that. ... but for the sake of sanity, clarity, ease of reading, ease of use, and so on, including web compliance ...  Is it preferred to have a file-extension or not?  Really, deep down my logic tells me: yes, it should. The reason being is this stems back to the days of the past when the internet was mostly USENET, FIDONET, FTP and GOPHER.   See, if a URL has no filename, then it normally is considered a directory. This is where index.htm came about, because this by default lists the directory if no index file is found. However, soon enough, web programmers started overriding this and using index.htm to actually serve the content of that web directory as a page. The main difference, was markup language was added in, and this was parsed in the browser. With this markup language, the Content-Type:text/html; tag in the response header became the indicator to what filetype it was for any file. HTML seems to be the only "filetype" that just doesn't have consistently named extensions, except for when they are saved.  Unfortunately, once web pages became the main thing, it became a security error to actually display the directory contents, so everything stayed hidden with only the actual URL content being displayed.   Not to mention the cross-platform file-naming wars.. windows based require a 3 or less digit extension, and unix/mac can have more. So should it be .HTM or .HTML or NONE and let the platform decide?  So in essence, I guess what I am trying to figure out is beyond SEO and dealing more with aesthetics and web compliance. How to derive variance-covariance matrix of coefficients in linear regression Profile avatar lost on several sites after profile edit (Gravatar replaced with Identicon) I have had the same network-wide profile avatar for many years; it's a custom image which I installed nework-wide soon after I registered for Stack Overflow back in 2011. I still see that image e.g. on  and  but not, for instance, on this site, or e.g. on   (The example originally linked to my Unix &amp; Linux profile instead of Super User but I experimentally changed my profile back to the gravatar one there.)  I routinely update my profile presentation text every few months, and did so again a few days ago. Comments below seem to indicate that others who recently edited their profile are experiencing the same problem.  My preferred avatar is a Gravatar which is connected to my email address, which has always been the same (MD5 091f411d57db5be8298e057a32e5ad72). The replacement seems to be a generic identicon with a different MD5. I don't recall seeing this identicon as an option in my profile before:    You'll notice that the gravatar is still visible as an option, but I can find no way to replace it on all sites in one go. I switched back to the gravatar one on Unix &amp; Linux and noticed that the help next to the "Save" button says     Your profile will be updated on all public communities.   but alas, that did not in fact happen. Do I really have to go over 170+ member sites and manually select my gravatar on each? I am using  to show the branch name in gnome terminal (Ubuntu 15.10) when working in a git repository. Based on the above I now have the below in my ~/.bashrc file:  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes    ...  # Add git branch if its present to PS1 parse_git_branch() {  git branch 2&gt; /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } if [ "$color_prompt" = yes ]; then  PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' else  PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' fi unset color_prompt force_color_prompt   As a result I now get:    so it works. But why has the coloring of my user@host been removed? And I would also expect that the branch name should be colored. Before it looked like this:    UPDATE: I have now tried this guide instead:    adding this to .bashrc:  parse_git_branch() {      git branch 2&gt; /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "   and that works:    Notice in .bashrc I also have this (default):  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes   I have yet to find the reason why that snippet gives the correct result and the other version does not. Any input on this?  Here is the version of my .bashrc that has the old snippet enabled that does not work: Why is the derivative of a circle's area its perimeter (and similarly for spheres)? When differentiated with respect to $r$, the derivative of $\pi r^2$ is $2 \pi r$, which is the circumference of a circle.  Similarly, when the formula for a sphere's volume $\frac{4}{3} \pi r^3$ is differentiated with respect to $r$, we get $4 \pi r^2$.  Is this just a coincidence, or is there some deep explanation for why we should expect this? I have 4GB RAM. When I open Firefox, IntelliJ IDEA or VS Code and some other application my memory is about used up thus my machine hangs and I can't do anything. I can't even close any applications.    Date and time are shown in the top bar so that I can view it any time without any thing typing.   If I would view memory status in this way without typing anything then I can make a decision whether to open an application or whether this application may put my machine in hanging state or not.    Is it possible in Ubuntu 18.04 LTS? Why didn't Harry die in the dark forest? Lost my APFS partition after using EaseUS partition manager on Bootcamp I used macOS mojave(APFS partition) and Windows10(Bootcamp). And I tried to expand Bootcamp partition with moving Windows OEM partition by EaseUS partition master in windows. After this, I can’t find APFS partition installed macOS.  I use MacBook Pro 2016.  I think “disk0s2” was APFS partition, but now it is “Windows Recovery” partition.  Do you have any ideas to solve this? (I am Japanese, so I'm sorry for my poor English)  I tried “gpt show” and “diskutil list” on macOS Recovery   Additional information  I tried dd if=/dev/disk0s2 count=1 bs=512 command in a Terminal app of macOS Utility from network boot, and the terminal says,  -bash-3.2# dd if=/dev/disk0s2 count=1 bs=512 | vis -c 1+0 records in 1+0 records out 512 bytes transferred in 0.005472 secs (93568 bytes/sec) )us??-ҵ?\^A\0\0\0\0\0\0\0?\M^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ure and the Scripts Folder Sums in math mode: how to display index under the sigma sign? I have a fraction with sums above and under the line. How can I convince LaTeX to write the indices of the sums under the sigma instead of next to it?  \begin{displaymath}   \frac{\sum_{s \in S} s^2}{\sum_{p \in P} p^2} \end{displaymath} How do I have a camera follow my object in Unity? I have an object that automatically moves by itself and I want the main camera to automatically follow it.(Like in games such as geometry dash and jetpack joyride)  This is the code for the automatic moving object in case it is needed:  using UnityEngine; using System.Collections; public class automove : MonoBehaviour { public static int movespeed = 5; public Vector3 userDirection = Vector3.right;    public void Update() {     transform.Translate(userDirection * movespeed * Time.deltaTime);  } }   So does anyone know any good scripts I could add to the main camera to follow this object that automatically moves? Thanks in advance! No grub menu after Ubuntu install, booting directly into Ubuntu How to customize my titlepage? The standard titlepage is quite simple. I am looking for a very  and need help customizing my title page.  It should match the  classicthesis doctoral thesis template  Below a minimal working example:   \documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook} \XeTeXinputencoding iso-8859-1 \usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}  \usepackage[parts,pdfspacing,dottedtoc]{classicthesis}    \frontmatter  \begin{document}     \pagestyle{scrheadings}        %this is the place to set up my cover sheet.       %*******************************************************      % Abstract     %*******************************************************    %\renewcommand{\abstractname}{Abstract}    \pdfbookmark[1]{Résumé}{Résumé}   \begingroup    \let\clearpage\relax    \let\cleardoublepage\relax    \let\cleardoublepage\relax       \chapter{Résumé}     Résumé de la thèse en français\dots      \vfill      \chapter*{Summary}   Résumé de la thèse en anglais\dots    \endgroup             \vfill     \end{document} Problem  For what natural numbers is $n^3 &lt; 2^n$?  Attempt @ Solution   For $n=1$, $1 &lt; 2$ Suppose $n^3 &lt; 2^n$ for some $n = k \ge 1$ It looks like the inequality is true for $n = 0$, $n = 1$ and $n\ge10$ But, how can I prove this through induction? Prove that if $A$ is an infinite set then $A \times 2$ is equipotent to $A$ I want to prove that if $A$ in an infinite set, then the cartesian product of $A$ with 2 (the set whose only elements are 0 and 1) is equipotent to $A$.  I'm allowed to use Zorn's Lemma, but I can't use anything about cardinal numbers or cardinal arithmetic (since we haven't sotten to that topic in the course).  I read a proof of the fact that if $a$ is an infinite cardinal number, then $a+a=a$, which is something similar to what I want to prove.   Any suggestions will be appreciated :) How do you remove duplicates from a list whilst preserving order? Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question: QGIS 3.4 : Add points to exact locations? I would like to add several coordinates at specific British National Grid Easting and Northing values. I know this can be done by bringing in a .csv, but I want to know is there a way to manually enter the numbers in QGIS 3.4, and then the point moves to that location ? I've read that in QGIS 2.x there was a plugin called Numerical Vertex Editor that doesn't seem to exist for 3.x ? In viewing the weekly list of rep change, I see  on top: razpeitia2 5 16  member for: 2 years, 7 months link #1 week rank +8529 change 727 total reputation 2,286 week reputation    How can someone with 727 total have 2286 for the week with no bounties?  Call me curious.  Is this a bug or something else here?