I'm trying to format the front matter of a thesis and am running into trouble with both the table of contents and the list of figures.   The current table of contents looks like this:   List of Figures   List of Tables   Chapter   1. Introduction   2. etc.     What I want to do is get rid of the "Chapter" heading in the above, so right after List of Tables, it starts with "1. Introduction". Any ideas?   Also, for the list of figures. It automatically puts the figure caption when generating the list, but my captions are long. I want to keep them long in the text, but short in the generated list of figures. Is it possible to, say, just include the first sentence of the caption for the list of figures?   Thanks for your help.
When I use \listoftables and \listoffigures I get in the list long captions that appear next to the tables/figures.  I would like to use short captions for this list which summarize these captions. Is that common to do? If so, what is one way to do it?
How to convert java.util.Date to java.sql.Date? I am trying to use a  as input and then creating a query with it - so I need a .    I was surprised to find that it couldn't do the conversion implicitly or explicitly - but I don't even know how I would do this, as the Java API is still fairly new to me. On the paragraph explaining arithmetic expansion,  uncovers 2 different ways of evaluating an expression, the first one uses $(( EXPRESSION )) and the second one uses $[ EXPRESSION ]. The two ways seem pretty similar as the only difference I have found is:     $[ EXPRESSION ] will only calculate the result of EXPRESSION, and do no tests:   Yet, I am intrigued because the same document recommends using $[ EXPRESSION ] rather than $(( EXPRESSION )).     Wherever possible, Bash users should try to use the syntax with square brackets:   Why would you want that if less tests are being done? How do I convert, NSDate to NSString so that only the year in @"yyyy" format is output to the string? Creating polygons from points in Mapinfo Ubuntu 20.04 Network Performance Extremely Slow I just upgraded from Ubuntu 18.04 to 20.04 on one of the  machines, and the network performance is abhorrent. Internet speed is very fast from a google speed test (>300Mb/s for both upload and download).     However, whenever I try to browse a website or even run sudo apt update the connection will often time out. My internet is very fast on all other devices and I really don't know how to debug this problem.  sudo lshw -class network -short &amp;&amp; nmcli device status    shows  H/W path           Device           Class          Description ============================================================== /0/100/1c.6/0      wlp2s0           network        Wi-Fi 6 AX200 /3                 br-96f5b790e29e  network        Ethernet interface /4                 br-15e76fb81c05  network        Ethernet interface /5                 docker0          network        Ethernet interface  DEVICE           TYPE      STATE         CONNECTION       wlp2s0           wifi      connected     CSA HQ           br-15e76fb81c05  bridge    connected     br-15e76fb81c05  br-96f5b790e29e  bridge    connected     br-96f5b790e29e  docker0          bridge    connected     docker0          p2p-dev-wlp2s0   wifi-p2p  disconnected  --               lo               loopback  unmanaged     --               gpd0             tun       unmanaged     --                Solution:  It seems like this is a pretty common problem, and one without a definitive cause. For me, it was because Ubuntu resets the TLP configuration, and the power management went back to "on". I disabled Wi-Fi power management directly by editing:  sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf   Then changed the value from 3 to 2, saved changes and rebooted.  I actually got this solution from Reddit and this worked for my case specifically but it seems like it could be caused by a bunch of other things. Read all the proposed solutions below! Say I have a variable named choice it is equal to 2. How would I access the name of the variable? Something equivalent to  In [53]: namestr(choice) Out[53]: 'choice'   for use in making a dictionary. There's a good way to do this and I'm just missing it.  EDIT:  The reason to do this is thus. I am running some data analysis stuff where I call the program with multiple parameters that I would like to tweak, or not tweak, at runtime. I read in the parameters I used in the last run from a .config file formated as  filename no_sig_resonance.dat  mass_peak 700  choice 1,2,3   When prompted for values, the previously used is displayed and an empty string input will use the previously used value.  My question comes about because when it comes to writing the dictionary that these values have been scanned into. If a parameter is needed I run get_param which accesses the file and finds the parameter.   I think I will avoid the problem all together by reading the .config file once and producing a dictionary from that. I avoided that originally for... reasons I no longer remember. Perfect situation to update my code! Random real numbers that sum up to specific value My question relates to Chapter 3, Exercise 8 in &quot;Baby Rudin&quot;. It states: If $\sum_n a_n$ converges, and if $\{b_n\}$ is monotonic and bounded, prove that $\sum_n a_n b_n$ converges. My attempt would have been: Since $\{b_n\}$ is monotonic and bounded, $\{b_n\}$ converges and it exists $\inf \{b_n\}$ as well as $\sup \{b_n\}$. But then we have $$ \left| \sum_n a_n \inf \{b_n\} \right| \leq \left| \sum_n a_n b_n \right| \leq  \left| \sum_n a_n \sup \{b_n\} \right| \leq \max \left( \left| \sup \{b_n\} \right|, \left| \inf \{b_n \} \right| \right)\varepsilon \leq \tilde{\varepsilon} $$ since $\sum_n a_n$ converges and $\max \left( \left| \sup \{b_n\} \right|, \left| \inf \{b_n \} \right| \right)$ is a finite number. This would imply, by the comparison test, that $\sum_n a_n b_n$ converges as well. $\quad \Box$ But as there was a way longer, more rigorous proof chosen in this , I'm a bit suspicious that my proof is not complete. Am I missing something?  EDIT: Thanks everyone! @hermes: The last part of your proof gave me the following idea. As $\lim_{n \to \infty} b_n = c$ and $\{b_n\}$ is monotonic, couldn't we just set $b_n = c - c_n$ with a monotonically decreasing sequence $\{c_n\}$ which has $\lim_{n \to \infty} c_n = 0$. Then we have $$\sum_n a_n b_n = \underbrace{c \sum_n a_n}_{\text{converges by assumption}} - \underbrace{\sum_n a_n c_n}_{\text{converges by Theorem 3.42}} \leq \varepsilon_1 - \varepsilon_2 = \varepsilon $$ since  Theorem 3.42 Suppose  the partial sums of $\sum_n a_n$ form a bounded space $\quad \checkmark$ $c_0 \geq c_1 \geq c_2 \geq \dots \quad \checkmark$ $\lim_{n \to \infty} c_n = 0 \quad \checkmark$  Then $\sum_n a_n c_n$ converges.  Thus $\sum_n a_n b_n$ converges as well. $\quad \Box$ Now that should hold, I think. So I wouldn't need to go through all the estimates. Derivative of $(y-XB)' h(y-XB)$ with respect to $B$ Ubuntu server: Cannot setup dummy driver alsa (LXC container) // modprobe issue Why is 24.0000 not equal to 24.0000 in MATLAB? I am writing a program where I need to delete duplicate points stored in a matrix. The problem is that when it comes to check whether those points are in the matrix, MATLAB can't recognize them in the matrix although they exist.  In the following code, intersections function gets the intersection points:  [points(:,1), points(:,2)] = intersections(...     obj.modifiedVGVertices(1,:), obj.modifiedVGVertices(2,:), ...     [vertex1(1) vertex2(1)], [vertex1(2) vertex2(2)]);   The result:  &gt;&gt; points points =    12.0000   15.0000    33.0000   24.0000    33.0000   24.0000  &gt;&gt; vertex1 vertex1 =     12     15  &gt;&gt; vertex2     vertex2 =     33     24   Two points (vertex1 and vertex2) should be eliminated from the result. It should be done by the below commands:  points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :);   After doing that, we have this unexpected outcome:  &gt;&gt; points points =    33.0000   24.0000   The outcome should be an empty matrix. As you can see, the first (or second?) pair of [33.0000 24.0000] has been eliminated, but not the second one.  Then I checked these two expressions:  &gt;&gt; points(1) ~= vertex2(1) ans =      0 &gt;&gt; points(2) ~= vertex2(2) ans =      1   % &lt;-- It means 24.0000 is not equal to 24.0000?   What is the problem?    More surprisingly, I made a new script that has only these commands:  points = [12.0000   15.0000           33.0000   24.0000           33.0000   24.0000];  vertex1 = [12 ;  15]; vertex2 = [33 ;  24];  points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :);   The result as expected:  &gt;&gt; points points =      Empty matrix: 0-by-2 What is the difference between correlation, causation and prediction? Suppose we have a set of events $\Omega$, containing events $A$ and $B$. My econometrics professor tried to distinguish the following three terms today.    Causation --- $A$ causes $B$ if the occurrence of $A$ always leads to another specific outcome $B$. For example, clapping my hands causes a sound to be emitted.  Prediction --- $A$ predicts $B$ if on average, $B$ is the expected outcome from $A$ occurring. In other words, whereas causality is deterministic, prediction is probabilistic. For example, studying for a test would predict doing well on the exam. But there's no guarantee.   Correlation --- $A$ and $B$ are correlated if when one occurs the other does too. But there may be some hidden variable causing both.    Are these distinctions meaningful? Or did he make these terms up?   My Questions   What is the difference between causation and correlation?  Are "causes" always deterministic? Not sure if this is a bug or a feature, but I noticed today that if I , it annoyingly one-boxes a link to the room, which is not a link to the info page! That's it. I'm gonna pack up and leave! Such annoyance! But for the time being,  Is this behavior expected? If so, what is the reason for changing the links? If this is really a bug since the responsible bot is not seeing parts of the URLs and ends up one-boxing, and hence linking to the wrong message, could this be fixed please? Worth pointing out that too much exposure to annoying things results in a higher blood pressure. Scamming a scammer? I have seen many questions like:      My question is: what happens if you receive this money (without doing anything or giving your bank account number) but do not do anything scammer wants?  I especially want to know about what happens with the money you got and possible legal consequences.    Is it considered yours because scammer transfered it to you? Do you have to return it? If yes, to whom and in what form? And finally, how is it that scammers are just sending money to random people? Aren't they scared that someone will simply not return it? I understand that this may be stolen money, but it surely took some effort (cash/time) to "acquire" it, so why are they just sending it away? I don't know if this is appropriate for math.stackexchange, or whether philosophy.stackexchange would have been a better bet, but I'll post it here because the content is somewhat technical.  In ZFC, we can prove that the (second-order) Peano axioms have a model, call it $\mathbb{N} = (N,0,S)$. Furthermore, $\mathbb{N}$ is unique up to isomorphism. Thus, it would seem that we've pinned down $\mathbb{N}$.  However, if ZFC is consistent, then it has some very peculiar models. In particular, it has a model $(V_0,\in_0)$ whose "native" $\mathbb{N}$, let call it $\mathbb{N}_0$, is a model for the sentence "ZFC is consistent," and another model $(V_1,\in_1)$ whose "native" $\mathbb{N}$, lets call it $\mathbb{N}_1$, is a model for the sentence "ZFC is inconsistent."  But in reality, in other words, for the "real" $\mathbb{N}$, only one of these can be sentences can be true. Furthermore, the objects $\mathbb{N}_0$ and $\mathbb{N}_1$ aren't isomorphic, since the set of sentences they satisfy are different.  So it seems to me that $\mathbb{N}$ cannot truly be pinned down. Furthermore, its categoricity is, in some sense, illusory. Is this correct, or am I missing something? Determine if $.ajax error is a timeout System freezes/unresponsive/unusable when copying large file to USB What does the explicit keyword mean in C++? We were taught that an independent clause must have a complete thought/idea.     This is the only mammal that can fly.     How can "This is the only mammal" be treated as an independent clause?            It was a grammar lesson and there was no context there. In this situation how can I decide that it is an independent clause? Though for sure, there should be an independent clause in a correct sentence, and the clause starting with 'that' is not independent. But by this way, I can't fit it with the rule that every independent clause must have a complete thought. A simple sentence must have an independent clause. If the sentence has no independent clause how we can call it a sentence? Can even two dependent clauses form a sentence? Underlined math in a Beamer presentation: felt-tip marker underlining