I'm trying to highlight rows/columns/diagonals in a matrix. I came across , which looks very clean. Unfortunately, it seems to cause some issue with spacing in the matrix, and I can't figure out why. Below is a MWE and the output:  \documentclass{article} \usepackage{amsmath} \usepackage{tikz}  \newcommand{\tikzmark}[2]{     \tikz[overlay,remember picture,baseline]      \node[anchor=base] (#1) {$#2$}; }  \begin{document}  No highlighting: \begin{equation}   A =   \begin{bmatrix}     a_{11} &amp; 0 &amp; 0 \\     0 &amp; a_{22} &amp; 0 \\     0 &amp; 0 &amp; a_{33}\\   \end{bmatrix} \end{equation}  Highlighting: \begin{equation}   A =   \begin{bmatrix}     \tikzmark{top}{a_{11}} &amp; 0 &amp; 0 \\     0 &amp; a_{22} &amp; 0 \\     0 &amp; 0 &amp; \tikzmark{bottom}{a_{33}}\\   \end{bmatrix} \end{equation} \begin{tikzpicture}[overlay,remember picture]   \draw[opacity=.4,line width=3mm,line cap=round] (top.center) -- (bottom.center); \end{tikzpicture}  \end{document}     What is the \tikzmark command doing, and is there anything that can be done to preserve the standard matrix spacing?
I'm about to use this diagram to make computing 3x3 determinants clear and easy for my students. I tried to add this picture to my lecture but it's blurred due to the bad quality of the picture. So i want to create exactly the same figure using latex.  I've searched and read a few topics about highlighting elements and diagonals in matrix but it does not work in this case. I want to add plus signs and minus signs as in the picture, and highlight elements in the matrice with elements outside the matrice.  I appreciate all your help and your advice. Thank you in advance !
This is inspired by some discussions in .  In the Harry Potter universe, how are Dementors born?  Or are they artificially created by some magical means? Electric Potential produced by Hollow Sphere Let there be a hollow sphere (Throughout the question we will ignore the thickness of the sphere) which is positively uniformly charged,q of radius,  R. Suppose there to be a test positive charge, q' at point P which is r distance away from the hollow sphere(r>R, P is outside of hollow sphere).  Now I have an doubt on evaluating Electric Potential,V at point P.  Both source charge,q and test charge,q' are +ve, so source charge will repel the test charge which will make the charge, q' to go to infinity.I have to apply external force, F' to displace the charge, q' from infinity to point P against the equal but repulsive force, F.In short, F' is  displacing the q' from infinity to P.  So External Force, F' will do +ve work and Repulsive Force, F will do -ve work. This way the Electric Field,E produced by hollow sphere is Opposite to Displacement of test charge(i.e.,θ=180).  Now we know that E=k(q/(r^2))  [Please Notice that infinity is the lower limit of integration]  Also V=-∫r∞(E dr cosθ)=-∫r∞(E dr cos 180)=∫r∞(E dr)  At last I ended up to V=- k(q/r). I know that V=k(q/r).  I just want to know why I am having this shitty negative sign in my equation. While using Wild Shape, do I use Unarmored Defense or the creature's Armor Class? How does the computer know that the PC was not properly shut down? Actually, this question struck me because of power cuts in my house. When there is a power cut, there is a sudden loss of power from the computer.   How does the computer know that the shutdown was not properly done? What is the maximum value of the Process ID?  Also, is it possible to change a Process ID? Press-and-hold or Long-Press Gestures: Unintuitive? Often, I find people struggle with the usage of press-and-hold gestures on mobile/web platforms. The mere thought of having a user press on a defined object and hold for an arbitrary amount of time before the product reacts seems overtly complicated and unobtrusive. My questions are:   For what use cases do press-and-hold gestures best fit? Have there been published studies with regards to press-and-hold gesture intuition? Are there more viable alternatives to this system? How do I make Div Container 100% width only on homepage of site? I'm planning to visit a summer school in the Schengen zone. What kind of visa should I apply for? I will be attending a summer school which will last 10 days.  I want to know: for applying for a Schengen visa, is the purpose of my trip considered as touristic or study? \RequirePackage{filecontents} \begin{filecontents}{\jobname.bib} @article{Arter95,     Author = {David Arter},     Date-Added = {2013-08-11 17:38:06 +0000},     Date-Modified = {2013-09-01 15:13:22 +0000},     Journal = {Journal of Common Market Studies},     Number = {3},     Pages = {361-287},     Title = {The {EU} {Referendum} in {Finland} on 16 October 1994:              {A} Vote for the {West}, not for {Maastricht}},     Volume = {33},     Year = {1995}}  @article{Detlef95,     Author = {Jahn, Detlef; Storsved,Ann-sofie},     Date-Added = {2013-08-11 17:14:34 +0000},     Date-Modified = {2013-08-11 17:16:45 +0000},     Journal = {West European Politics},     Number = {4},     Pages = {18-37},     Title = {Legitimacy through referendum? The nearly successful domino‚Äêstrategy of the Eu‚Äêreferendums in Austria, Finland, Sweden and Norway},     Volume = {18},     Year = {1995}} \end{filecontents} \documentclass{article} \usepackage[ngerman]{babel} \usepackage{natbib} \bibpunct{(}{)}{;}{a}{}{,} \makeatletter \renewcommand\@biblabel[1]{} \makeatother  \begin{document}  \cite{Arter95}  \bibliography{\jobname} \bibliographystyle{plainnat}  \end{document}   Please help. I want the author's name displayed like this "Arter, D." instead of David Arter I have a daytime raster of my study area. I have 20+ counters in the study area that count "stuff" with a timestamp. Using  I determined the type of ambient light for each collected data point.   What I'd like to do:   Add a grey/semi transparent overlay to reflect the ambient light (Dusk, Sunrise, day, sunset, and dark). The end goal: produce a time-based visualization of the data collection that highlights the time of the day. Or be able to produce a snapshot at a certain time with the proper shaded overlay. Think of this as this the image: The MSDN documentation on  describes 3 contradicting rules for how the method should work.     If two objects of the same type represent the same value, the hash function must return the same constant value for either object. For the best performance, a hash function must generate a random distribution for all input. The hash function must return exactly the same value regardless of any changes that are made to the object.   Rules 1 &amp; 3 are contradictory to me.  Does Object.GetHashCode() return a unique number based on the value of an object, or the reference to the object. If I override the method I can choose what to use, but I'd like to know what is used internally if anyone knows. Definite integral, quotient of logarithm and polynomial: $I(\lambda)=\int_0^{\infty}\frac{\ln ^2x}{x^2+\lambda x+\lambda ^2}\text{d}x$ I was thinking this integral : $$I(\lambda)=\int_0^{\infty}\frac{\ln ^2x}{x^2+\lambda x+\lambda ^2}\text{d}x$$ What I do is use a Reciprocal subsitution, easy to show that: $$I(\lambda)=\int_0^{\infty}\frac{\ln ^2x}{\lambda ^2x^2+\lambda x+1}\text{d}x =\frac{1}{\lambda}\int_0^{\infty}\frac{(\ln x-\ln \lambda)^2}{x^2+x+1}\text{d}x \\ =\frac{\ln ^2\lambda}{\lambda}\int_0^{\infty}\frac{1}{x^2+x+1}\text{d}x+\frac{1}{\lambda}\int_0^{\infty}\frac{\ln ^2x}{x^2+x+1}\text{d}x \\ =\frac{\ln ^2\lambda}{\lambda}\frac{2\pi}{3\sqrt{3}}+\frac{2}{\lambda}\int_0^1\frac{\ln ^2x}{x^2+x+1}\text{d}x$$ But I hav no idea on process the remaining integral:( Anyone knows how to solve it?  THX guys! I came with another method might work for this: Recall the handy GF $$\frac{1}{x^2+x+1}=\frac{2}{\sqrt{3}}\sum_{k=0}^{\infty}\sin \left(\frac{2\pi}{3}\left(k+1\right)\right)x^k$$ Then we have :  $$\int_0^1\frac{\ln ^2x}{x^2+x+1}\text{d}x=\frac{2}{\sqrt{3}}\sum_{k=0}^{\infty}\frac{2}{\left(k+1\right)^3}\sin \left(\frac{2\pi}{3}\left(k+1\right)\right)x^k$$ With $$\sum_{k=1}^{\infty}\frac{\sin (kx)}{k^3}=\frac{\pi ^2}{6}x-\frac{\pi}{4}x^2+\frac{x^3}{12}$$ What can we arrived? Thanking users who answered my question Quite often a number of users will give similar answers to one of my questions. Sometimes someone will give an answer that is interesting, but does not really help with my question.  In all cases, I feel a need to thank the people who answered my question. It isn't always appropriate for me to upvote every answer, and I can only accept one answer. Giving a "thanks" comment on every answer appears to be frowned upon.  So, what's the etiquette? Create instance of generic type in Java? Is it possible to create an instance of a generic type in Java? I'm thinking based on what I've seen that the answer is no (due to type erasure), but I'd be interested if anyone can see something I'm missing:  class SomeContainer&lt;E&gt; {     E createContents()     {         return what???     } }   EDIT: It turns out that  could be used to resolve my issue, but it requires a lot of reflection-based code, as some of the answers below have indicated.  I'll leave this open for a little while to see if anyone comes up with anything dramatically different than Ian Robertson's . How do I set a background image while I am editing? Even/Odd Binomial Coefficients I was wondering if there's a nice general solution for the following problem:  How many numbers in the $n^\text{th}$ row of Pascal's triangle are even? How many are odd? Object Positions Reset On Blender Load What happens if a target for removal becomes ineligible after a card has been cast? When you have a card like  which reads "Exile Target Creature with power 3 or less", as I understand it, it becomes untargetable if the opponent's creature power increases thanks to a pump spell like .  But what if the Disregard is already on the stack and targeting; and they respond with Brute Strength? I'm pretty sure (and my opponent with Brute Strength was certain) that it won't exile the creature, but I don't know which rule states this, and there's no gatherer ruling on the spell. Modifying cat command to number paragraphs and display last paragraph only I have a text file for which I need to do three things:   Modify the "cat" command to highlight keywords whilst showing the complete contents of the file.  Modify the "cat" command to automatically number the paragraphs. These are separated by a single blank line.  Modify the "cat" command to display the final paragraph only.    The tricky part is that all of these need to be done by modifying the cat command.   I've seen many forum posts explaining that cat is not meant for this - and I can entirely see why. However, the challenge is that I have to use cat! Java Object Reuse Should Java Objects be reused as often as it can be reused ? Or should we reuse it only when they are "heavyweight", ie have OS resources associated with it ?  All old articles on the internet talk about object reuse and object pooling as much as possible, but I have read recent articles that say new Object() is highly optimized now ( 10 instructions ) and Object reuse is not as big a deal as it used to be.  What is the current best practice and how are you people doing it ?