I wanted to change the chapter numeration in such a way that the introduction of my thesis has number I and the first chapter has number 1 and so on. So I changed the style of the numeration using Roman for the Introduction and Arabic for the other chapters in this way:  \documentclass[11pt,a4paper]{book}   \usepackage{hyperref}  \begin{document}  \stepcounter{chapter} \renewcommand*\thechapter{\Roman{chapter}}   %set the style to roman  \chapter{Introduction} My amazing intro \newpage  \setcounter{chapter}{0}                     %reset the chapter counter: here lies the problem, I guess \renewcommand*\thechapter{\arabic{chapter}} %change style to arabic  \chapter{Chapter 1} My first chapter \newpage \chapter{Chapter 2} My second chapter. \end{doument}   I got what I wanted: the numeration of section and equations in the intro. is of the type I.1 and frot he chapter 1 I have 1.1, but now the hyperref package makes some mess: since in this way the introduction and the first chater are, according to the internal numeration, both the chapter 1, references to section 1.1 is actually section I.1 and so on.  To be clearer: when in the pdf I click on the reference to the section 1.1, the link sends me to the section I.1 in the introduction.  How can I solve this?
The following MWE produces a PDF whose TOC has two entries: “Foo” and “Bar” with correct page numbers. So far, so good. However, upon clicking on the link to “Bar”, I am taken to the page for “Foo” instead.  \documentclass{report} \usepackage{hyperref} \newcommand*\backmatter{\setcounter{chapter}{0}}  \begin{document} \tableofcontents \chapter{Foo} \backmatter \chapter{Bar} \end{document}   (Produced with pdflatex, run twice.)  This MWE is whittled down from a (much!) more complex document but the above does seem to reproduce the error reliably.  Re-setting the chapter count seems to confuse hyperref, even though the page references are still accurate. Notice that in my real document, \backmatter does other things, including setting the numbering style to alphabetical so there’s no chance of confusion even though both chapters are ostensibly labelled as “Chapter 1”.  How do I fix this? Is this a bug? Are there workarounds?
Suppose $ T \subset \mathbb{C} $. Show that the corresponding set $ S \subset \Sigma $ is  a. a circle if $ T $ is a circle. b. a circle minus (0, 0, 1) if $ T $ is a line.  Here we are defining $ \Sigma $ to be the Riemann sphere, given by the set: $$ \Sigma = \left \{(\xi, \eta, \zeta) : \xi^{2} + \eta^{2} + (\zeta - \frac{1}{2})^{2} = \frac{1}{4} \right \} $$  To take a point from $ \mathbb{C} $ to $ \Sigma $ we can use the following:  $$ \xi = \frac{x}{x^{2} + y^{2} + 1}; \eta = \frac{y}{x^{2} + y^{2} + 1}; \zeta = \frac{x^{2} + y^{2}}{x^{2} + y^{2} + 1} $$  We define a circle on $ \Sigma $ to be the intersection of a plane of the form $ A\xi + B\eta + C\zeta = D $ with $ \Sigma $. We also know the converse of this problem is true, that the intersection above yeilds a set in $ \mathbb{C} $ with the following property:  $ (C - D)(x^{2} + y^{2}) + Ax + By = D $. As you can see, when C = D, then an equation for a line is yeilded, otherwise it is a circle.   I really am at a  loss about how to solve this problem. The only thing I can think to do is to pick 3 points on a circle or radius $ r $ with center $ z_{0} $, use these points to find two vectors in $ \Sigma $, take their cross product to get a normal vector, use this normal vector to get a plane. Once I have the plane in form $ A\xi + B\eta + C\zeta = D $ then I could prove that the circle I had chosen corresponds exactly with $ (C - D)(x^{2} + y^{2}) + Ax + By = D $. Is there not an easier, less computation way to do this? MySQL Syntax error message "Operand should contain 1 column(s)" I tried running the following statement:  INSERT INTO VOUCHER (VOUCHER_NUMBER, BOOK_ID, DENOMINATION) SELECT (a.number, b.ID, b.DENOMINATION)  FROM temp_cheques a, BOOK b WHERE a.number BETWEEN b.START_NUMBER AND b.START_NUMBER+b.UNITS-1;   which, as I understand it, should insert into VOUCHER each record from temp_cheques with the ID and DENOMINATION fields corresponding to entries in the BOOK table (temp_cheques comes from a database backup, which I'm trying to recreate in a different format). However, when I run it, I get an error:  Error: Operand should contain 1 column(s) SQLState:  21000 ErrorCode: 1241   I'm running this in SQuirrel and have not had issues with any other queries. Is there something wrong with the syntax of my query?  EDIT:  The structure of BOOK is:  ID  int(11) START_NUMBER    int(11) UNITS   int(11) DENOMINATION    double(5,2)   The structure of temp_cheques is:  ID  int(11) number  varchar(20) Why can other users see the files in my home folder? I just added a new, underprivileged "desktop user," and I was surprised to discover that it can see the files in my home folder.  What is the rational for setting up such lax permissions? I have a Canon 550D which I've been using for around a year now. I really love it and have learned a great deal with this and the 18 - 135mm kit lens. But now with experience I feel the need to get some better glass. I won't be buying a new body any time soon because I figure investing in some good glass is more important.   As I have looked around, I see quite a few good used L lenses I can get in ebay for good bargain prices. But I know that the EF lenses don't have the same focal length in the cropped sensors. Is it a wise decision to buy these EF lenses or buy the cropped sensor alternatives?  I have the following lenses in mind that I am looking to buy down the line from the canon range over the next several months.  16-35mm f/2.8L, 24-70mm f/2.8L, 70-200 f/4L.  Are these apt choices for cropped sensors? I know most pros with FFs use these but I am a bit skeptic that they will serve the same purpose for me. If so what are the alternatives for this that have almost as good image quality? Ways to put numbered balls in boxes no box being empty I know the formula for putting $n$ identical balls in $r$ different boxes such that each box has at least 1 ball, but what is the formula for putting $n$ different balls in $r$ different boxes, no box being empty?  Thanks! Why are some of my screen-recording/capturing/sharing applications (or app features) not working in Ubuntu 17.10 (and later releases)? After upgrading to Ubuntu 17.10 I noticed some of my screencasting applications are not working, for example screencasting tools like SimpleScreenRecorder and vokoscreen. ()  Also I noticed features like screenshot from GIMP is not working properly, producing blank screenshots (). Shutter too is producing glitchy screenshots ().  Screen-sharing option on Skype is also not working ().  The issue occurs sometimes on later Ubuntu releases too.  Why is this happening and how do I fix this? Downloading large files reliably in PHP int fn();  void whatever() {     (void) fn(); }   Is there any reason for casting an unused return value to void, or am I right in thinking it's a complete waste of time?  Follow up:   Well that seems pretty comprehensive.  I suppose it's better than commenting an unused return value since self documenting code is better than comments. Personally, I'll turn these warnings off since it's unnecessary noise.    I'll eat my words if a bug escapes because of it... I was thinking about something the other day (that is probably stupid), and thought this would be a good place to talk about it.  If someone wanted to draw its family tree over the last 1000 years, he'd write a binary tree with a depth of about 40 (counting 25 years on average between each generations). This tree would have 240 leaves, or about 1012 ancestors on the deeper level. That is obviously much more than the total world population and a stupid figure when you think about it.  The only explanation that I can think of is that a real genealogy tree must have "linked" branches at several levels that change the actual number of ancestors. Anyway, for an average person, how many ancestors would that make? Could one assume that all or nearly all of the persons that lived in its country or world region a 1000 years ago would be part of its ancestors? Line breaking with hyperref href with an underline in itemize I have a simple itemized list like the following MWE:  \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{hyperref} \usepackage{lmodern} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage{lipsum} \begin{document} \begin{itemize} \item \href{http://google.com}{[ID1]: \underline{\lipsum[1]}} \end{itemize} \end{document}   This unfortunately doesn't break the block of text as expected, as shown below:    How can I fix this item so it will line break properly? How do I programmatically create a new content type? I'm building a module (my_module) in Drupal 7. It has some functionality and also will create a new content type. In my_module.install, I implemented hook_install() (my_module_install()).    Can I use more hook_install() to create a new content type (my_module_install()) in this module? If the answer is yes, how should I do this? Otherwise, should I do this in another module? My Ubuntu is running fsck on every bootup On every bootup it's the same:  /dev/sda1: clean, 908443/38690816 files, 44176803/154733312 blocks   Is it some kind of option Ubuntu uses to ensure filesystem consistency or is there something wrong with my HDD? fsck takes up to 30s while booting and so about triples the time needed otherwise.  Full output (partly in German):  Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... done. Begin: Running /scripts/local-bottom ... done. done. Begin: Running /scripts/init-bottom ... done. fsck von util-linux 2.20.1 /dev/sda1: sauber, 908443/38690816 Dateien, 44176803/154733312 Blöcke udevd[623]: unknown key 'SYSFS{idVendor}' in /lib/udev/rules.d/45-libticables.rules:6  udevd[623]: invalid rule '/lib/udev/rules.d/45-libticables.rules:6'   * Starting mDNS/DNS-SD daemon                                                 [ OK ]  * Starting Reload cups, upon starting avahi-daemon to make sure remote queues are populated                                                                   [ OK ]  * Starting configure network device security                                  [ OK ]  * Starting bluetooth daemon                                                   [ OK ]  ####* Starting all other stuff How to extract files to another directory using 'tar' command? I thought tar archive.tar /users/mylocation would work, but it doesn't. How can I do that? Is it Safe to Delete Files From /var/tmp? How to Edit PDFs? In the time-dependent Schrodinger equation, $ H\Psi = i\hbar\frac{\partial}{\partial t}\Psi,$  the Hamiltonian operator is given by  $$\displaystyle H = -\frac{\hbar^2}{2m}\nabla^2+V.$$  Why can't we consider $\displaystyle i\hbar\frac{\partial}{\partial t}$ as an operator for the Hamiltonian as well? My answer (which I am not sure about) is the following:   $\displaystyle H\Psi = i\hbar\frac{\partial}{\partial t}\Psi$ is not an equation for defining $H$. This situation is similar to $\displaystyle F=ma$. Newton's second law is not an equation for defining $F$; $F$ must be provided independently.   Is my reasoning (and the analogy) correct, or is the answer deeper than that? Using Python to convert from more than one CRS I have a Python function which converts Eastings and Northings to Latitude and Longitude if line_count == 0:                     keys = row                     print('keys', keys)                     line_count += 1                 else:                     inProj = Proj(init='epsg:27700') # British National Grid                     outProj = Proj(init='epsg:4326') # WGS84                     x1, y1 = row[1], row[2]  # easting, northing                     x2, y2 = transform(inProj, outProj, x1, y1)                     row[1], row[2] = y2, x2                                          json_doc = {}  At the moment it converts from epsg:27700 (British National Grid) to WGS84, however there is a possibility I will get TM75 Irish Grid too. Is there any way I can get Python to recognised which CRS is applicable for the conversion? How do I pack textures for sending off to a render farm Whenever i try to send a project off to a render farm such as sheepit, it says it needs the textures packing with the file in order to render correctly.  How would I do this? Bending of light - photon's inertia instead of mass Using classical mechanics, the formula for gravitational attraction is   $$F = G\frac{m_1m_2}{r^2}.$$   This formula does not work for photons, and we need to use Einstein's theory of gravity to account for that, as the photon is massless. What if, instead of using the mass of the photon, we rather used the inertia of it?  The momentum of a photon is     $$p=\frac{h}{\lambda}.$$  Thus, using that, we can calculate its supposed 'mass' (inertia) as momentum is also equal to mass times velocity. So 'mass' of a photon is     $$m=\frac{p}{v}=\frac{h}{\lambda  c}.$$   If we use this mass as the mass of a photon, can we use Newton's equation for gravitational attraction? Is it possible to do vector calculus in Mathematica?