Can a function be both upper and lower quasi-continuous? Can you give me a non-trivial example? Below is the definition I am using:
A function $f: X \rightarrow \mathbb{R}$ is said to be upper (lower) quasi-continuous at $x \in X$ if for each $\epsilon >0$ and for each neighbourhood $U$ of $x$ there is a non-empty  open set $G \subset U$ such that $f(y)< f(x) + \epsilon$ ($f(y)> f(x) - \epsilon$), for each $y \in G$.

For a slightly non-trivial example, consider 
$$f(x)=\begin{cases}\sin\Bigl(\dfrac1x\Bigr)&x\ne0,\\a&x=0.\end{cases}$$
I think you will find that this function is quasi-continuous (i.e. upper and lower) if $\lvert a\rvert\le1$, more generally upper quasi-continuous iff $a\ge -1$ and lower quasi-continuous iff $a\le1$.
