2. (10%) Find the constants \( a \) such that the function $$f ( x ) = \left\{ \begin{array} { l l } { { \frac { 4 \sin x } { x } , } } & { { x > 0 } } \\ { { a - 2 x , } } & { { x \leq 0 . } } \end{array} \right.$$ is continuous on $\mathbb { R }$.
2. (10%) Find the constants \( a \) such that the function $$f ( x ) = \left\{ \begin{array} { l l } { { \frac { 4 \sin x } { x } , } } & { { x > 0 } } \\ { { a - 2 x , } } & { { x \leq 0 . } } \end{array} \right.$$ is continuous on $\mathbb { R }$.