I'm trying to add a list of code listings to my document, with a reference to it in the TOC. By simply calling  \lstlistoflistings   I end up getting everything I need (the list of listings, an entry in the TOC, etc) EXCEPT for the fact that the entry is always named 'Contents'. I was able to change the title of the listing page itself by running the command   \renewcommand\lstlistlistingname{List of Code}   but this doesn't change the reference in the table of contents.  EDIT: Adding a minimal working example  \documentclass{Thesis}  \usepackage{listings}  \begin{document} \renewcommand\lstlistlistingname{List of Code}  \tableofcontents  \lstlistoflistings  \lstset{caption=Some Code} \begin{lstlisting} Some code \end{lstlisting} \end{document}
using the \lstlistoflistings always named as Contents in table of contents.  I did look into   and  but the solutions there did not work.  Example: (my complete preamble)  \documentclass[11pt, oneside]{Thesis}  \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplots,filecontents} \usepackage{caption} \usepackage{subcaption} \usepackage{booktabs,colortbl} \usepackage{graphicx} \usepackage{rotating} \usepackage{listings} \usepackage{color} \usepackage{comment} \usepackage[official]{eurosym} \usepackage{colortbl} \usepackage{algorithm}  \usepackage{algpseudocode} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{titlesec} \usepackage[square, numbers, comma, sort&amp;compress]{natbib}   \hypersetup{urlcolor=blue, colorlinks=true}  \renewcommand{\lstlistlistingname}{List of Code}   \begin{document}  \tableofcontents \lstlistoflistings \lstinputlisting[language=python,firstline=1,lastline=68,caption=some caption here., label=code:getbb]{Code/getBoundingBox.py} \end{document}   The renew command changes the header in the page but not in the table of contents. Any ideas?  EDIT x2:  Managed to get the naming correct by editing this in the Thesis.cls   }  \renewcommand\lstlistoflistings{  \btypeout{List of Listings}  \addtotoc{List of Listings}  \begin{spacing}{1}{ \setlength{\parskip}{1pt} \if@twocolumn   \@restonecoltrue\onecolumn \else   \@restonecolfalse \fi \chapter*{\lstlistlistingname   \@mkboth{       \MakeUppercase\lstlistlistingname}{\MakeUppercase\lstlistlistingname}} \@starttoc{lot} \if@restonecol\twocolumn\fi \cleardoublepage  }\end{spacing}   Now the name appears correctly in the TOC but the Listings do no show in the Listings page, its just empty..  A MWE can be found here:
Callback functions in Java I am on Ubuntu and I did this command:  $ uname -a Linux slabrams-desktop 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux   Does it mean I am on 32bit or 64 bit processor?  The reason I am trying to figure this out is that I was getting errors which looked like this:  cannot execute binary file   and from Googling, I thought it was a processor issue.  Any ideas? In an ideal case, we assume strings and ropes to be massless and having same tension throughout.  However, I was doing some questions which involved a rope with mass.  The question was that if a uniform thick rope of length 5 m is resting on a horizontal smooth (assume frictionless) surface and is pulled by a force of 5N from one end, then what is the tension in the rope at the point 1 m away from the end where force is applied? (sorry for the poor image)    I came to the conclusion that since rope is not fixed, tension anywhere should be zero. However, when I checked the answer, it was 4 N. I failed to understand how.  Then the next part of the question was that if the rope now hangs between two fixed points which are at same level, then what would be the tension in the rope at its lowest point?    The answer has to be expressed in terms of mass of string m, acceleration due to gravity and $\theta$ where $\theta$ is the angle that tangents to the rope make with the horizontal.  I took that force acting on lowest point is mg, since it is center of mass and hence T = mg. However, according to the answer it depends upon $\theta$ as well. However, I failed to see what I was doing wrong?  I would appreciate any help in solving these questions, since I have no clue of where exactly I am wrong. I did search the Internet and a few books, but everywhere they assumed string/rope to be massless. How to mount read-write an ext4 partition on Windows? I learned thermodynamics and the basics of statistical mechanics but I'd like to sit through a good advanced book/books. Mainly I just want it to be thorough and to include all the math. And of course, it's always good to give as much intuition about the material.  Some things I'd be happy if it includes (but again, it mostly just needs to be a clear book even if it doesn't contain these) are:   As much justifications for the postulates if possible, I'm very interested in reading more about how Liouville's theorem connects to the postulates. Have examples of calculating partition functions, hopefully not just the partition function for the ideal gas. How to create multiplied identity t-sql? I've been living in Ireland for almost a year now and I start noticing they use the word "mens" a lot. I can see it used in:   Shops, to denote the area where you can find men's clothes In sport, when they talk about "mens team".    My guess is just that they are lazy about the use of quotes, so that mens should actually be men's. However, there may be some rule I'm not aware of. So, is "mens" only limited to Irish English? When I'm allowed to use it? This is a question of the book Linear Algebra of Kenneth Hoffman.  Describe explicitly all inner products on $\mathbb{R}$ and on $\mathbb{C}$.  I think that if $&lt;,&gt;$ is one inner product on $\mathbb{R}$ (or $\mathbb{C}$) then $&lt; ,&gt;=K[,]$, where $[,]$ is the standard inner product. Is that correct? Did any Quidditch games ever end by agreement of the Captains? The game can only end when the Snitch has been caught, or by mutual agreement of the two teams' Captains; the latter is very rare, however, as one team would have to lose. (source: HP Wikia on Golden Snitch)   Is there an example from canon of this resolution to the game ever happening? Prove that $\operatorname{rank}(A) + \operatorname{rank}(B) \ge \operatorname{rank}(A + B)$ Let $A,B$ be matrices $m\times n$ $(A, B \in M_{m\times n}(R))$. How can we prove that $$\operatorname{rank}(A+ B) \le \operatorname{rank}(A) + \operatorname{rank}(B)\ ?$$ How can I include value of sharepoint's version column in a word document? I'm trying to work out a way to display the contents of the version column from SharePoint (i.e. the value that changes every time a file is checked in) as a field (or something similar) inside of a Word document.  Ideally, I'd like to know how to configure SharePoint so I could click something like "Insert > Quick Parts > Document Property > Version", and it would include the version in the document.  The goal is to make it easier for someone to correlate a printed version of a document with the version history of SharePoint.  I have been able to add editable text columns to the Document content-type and have them show up as document property quick parts.  I've also been able to add a calculated column which gets the version as a text string... however this calculated column isn't showing up in Word as a document property.  (Perhaps I'm missing a setting on the calculated column) Is $(x^2+y^2+z^2) \ \sin \frac{1}{\sqrt{x^2+y^2+z^2}}$ Differentiable in $(0,0,0)$? $$f(x,y,z)=\begin{cases} (x^2+y^2+z^2) \ \sin \frac{1}{\sqrt{x^2+y^2+z^2}} \qquad (x,y,z) \ne (0,0,0) \\ \\ 0 \qquad (x,y,z)=(0,0,0) \end{cases} $$   At first, I study the continuity in the origin.  I apply the concept of sequential continuity: $x_n \rightarrow x_0 \Rightarrow f(x_n) \rightarrow f(x_0)$   So, $x_n=\frac{1}{n}  $ $$x_n \rightarrow 0 \Rightarrow f(x_n,x_n,x_n) \rightarrow f(0,0,0)=0$$ $$\lim_{n\rightarrow +\infty} \frac{3}{n^2} \ \sin \frac{1}{\frac{\sqrt{3}}{n}}=0 $$  How can I continue the study of differentiation?  Thanks! How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having  (static in C/C++) or is in a private () namespace?  It seems bad to change the access modifier for a method or function just to be able to run a test. velocity of an object after leaving a ramp I am writing a novel and fairly new to using LaTeX.  Please bare with me if this is a silly question.  I am working off of the novel demo LaTeX file using the TexWorks software.  I have inserted my words into the file.  When I run the LaTeX code, I get the error message saying "! LaTeX Error: File `novel.cls' not found."  Do I need to download this file from somewhere?  If so, where can I get it? How to "unpivot" or "reverse pivot" in Excel? I have data that looks like this:  Id | Loc1 | Loc2 | Loc3 | Loc4 ---+------+------+------+----- 1  | NY   | CA   | TX   | IL 2  | WA   | OR   | NH   | RI   And I want to convert it to this:  Id | LocNum | Loc ---+--------+---- 1  |   1    | NY 1  |   2    | CA 1  |   3    | TX 1  |   4    | IL 2  |   1    | WA 2  |   2    | OR 2  |   3    | NH 2  |   4    | RI   What's the easiest way to do this in Excel 2007? How do I find out what version of Linux I'm running? Is there a way to determine what version (distribution &amp; kernel version, I suppose) of Linux is running (from the command-line), that works on any Linux system? Suppose I have two tables that don't have many columns (3, for example). How can I position them side by side? Looking for the name of a post apocalyptic/sci-fi tv show or film Every once in a while this starts nagging me, I have really no idea and not much to go on so here goes...  A man wearing a blue? uniform walks into a town that looks abandoned and empty and all covered in dust.  The skies are brown/dirty with no sun.  He goes into the upstairs of one of the houses. He stops at I think a fireplace, examines something, or it’s like he’s remembering something.  Then downstairs in the street, a man/person wearing rags/robes with bandages covering his face starts banging on a fire hydrant with a stick/pipe. More people in bandages/robes start appearing, there's a chase in the town. I don't remember much but he's chased into wastes? through a gully or ditch and then a vehicle (only really remember that it was steel in colour) shows up and a woman comes and shoots one or two of the people chasing him.   That’s about all I remember. I was about 6 or 7 maybe and it was afternoon maybe a little later.  I thought maybe Star Trek, but after searching I don't think it is. I think it might be 80's, maybe early 90's. I think it's sci-fi rather than post-apocalyptic. Isomorphism of quotient modules implies isomorphism of submodules? Let $A$ be a commutative ring, $M$ an $A$-module and $N_1, N_2$ two submodules of $M$.  If we have $M/N_1 \cong M/N_2$, does this imply $N_1 \cong N_2$?  This seems so trivial, but I just don't see a proof... Thanks!