How to define an abbreviation
Space after LaTeX commands
The canonical way to return multiple values in languages that support it is often . Option: Using a tuple Consider this trivial example: def f(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return (y0, y1, y2)  However, this quickly gets problematic as the number of values returned increases. What if you want to return four or five values? Sure, you could keep tupling them, but it gets easy to forget which value is where. It's also rather ugly to unpack them wherever you want to receive them. Option: Using a dictionary The next logical step seems to be to introduce some sort of 'record notation'. In Python, the obvious way to do this is by means of a dict. Consider the following: def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return {'y0': y0, 'y1': y1 ,'y2': y2}  (Just to be clear, y0, y1, and y2 are just meant as abstract identifiers. As pointed out, in practice you'd use meaningful identifiers.) Now, we have a mechanism whereby we can project out a particular member of the returned object. For example, result['y0']  Option: Using a class However, there is another option. We could instead return a specialized structure. I've framed this in the context of Python, but I'm sure it applies to other languages as well. Indeed, if you were working in C this might very well be your only option. Here goes: class ReturnValue:   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return ReturnValue(y0, y1, y2)  In Python the previous two are perhaps very similar in terms of plumbing - after all { y0, y1, y2 } just end up being entries in the internal __dict__ of the ReturnValue. There is one additional feature provided by Python though for tiny objects, the __slots__ attribute. The class could be expressed as: class ReturnValue(object):   __slots__ = [&quot;y0&quot;, &quot;y1&quot;, &quot;y2&quot;]   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  From the :  The __slots__ declaration takes a sequence of instance variables and reserves just enough space in each instance to hold a value for each variable. Space is saved because __dict__ is not created for each instance.  Option: Using a  (Python 3.7+) Using Python 3.7's new dataclasses, return a class with automatically added special methods, typing and other useful tools: @dataclass class Returnvalue:     y0: int     y1: float     y3: int  def total_cost(x):     y0 = x + 1     y1 = x * 3     y2 = y0 ** y3     return ReturnValue(y0, y1, y2)  Option: Using a list Another suggestion which I'd overlooked comes from Bill the Lizard: def h(x):   result = [x + 1]   result.append(x * 3)   result.append(y0 ** y3)   return result  This is my least favorite method though. I suppose I'm tainted by exposure to Haskell, but the idea of mixed-type lists has always felt uncomfortable to me. In this particular example the list is -not- mixed type, but it conceivably could be. A list used in this way really doesn't gain anything with respect to the tuple as far as I can tell. The only real difference between lists and tuples in Python is that lists are , whereas tuples are not. I personally tend to carry over the conventions from functional programming: use lists for any number of elements of the same type, and tuples for a fixed number of elements of predetermined types. Question After the lengthy preamble, comes the inevitable question. Which method (do you think) is best? Does the sequence $\{\sin^n(n)\}$ converge?   Does the series $\sum\limits_{n=1}^\infty \sin^n(n)$ converge? What is the limit of:  $$\lim_{n\to \infty} \frac{n^1+\dots+n^n}{1^n+\dots+n^n} = ?$$  I did some computation with big numbers, I guess it is in the interval $\left(\frac{1}{2},1\right)$. FireFox 66 Quantum disabled all my extensions at midnight! This morning I woke up to:    and the FireFox help page doesn't really help...  Help!  What should I do now??? I need NoScript and AdBlock Plus to improve my surfing speed!!! 0:-) Texstudio + Biber + build folder I used  to export my auxiliary files into a different directory. Basically i just add -aux-directory=build in Options -&gt; Configure -&gt; Commands and added the build folder into Options -&gt; Configure -&gt; Build -&gt; Build Options -&gt; Additional Search Paths -&gt; Log. This succesfully generates all the auxilliary files in the build folder and it's also possible to generate the pdf. Unfortunately biber has a problem with this setup:  Prozess gestartet: biber.exe &quot;MyFile&quot; INFO - This is Biber 1.7 INFO - Logfile is 'MyFile.blg' ERROR - Cannot find control file 'MyFile.bcf'! - did you pass the &quot;backend=biber&quot; option to BibLaTeX? INFO - ERRORS: 1  I guess i have to specify the correct path for biber somewhere in Texstudio. Does anyone know where i have to update the path?  someone had similar problems. Also i'm not sure if the solution of   applies to my situation. I recently renewed my passport. I also have an expired passport which has my Canada visa (visitor's) valid for another three years. I have already used my Canadian visa which is multiple entry. I am planning to visit Canada this summer.  Since my valid Canadian visa is in my old/expired passport, do I need to renew/transfer my Canada visa or can I simply travel with valid visa in old passport? How do I add "citations" at the end of the document as done here? ActiveResource timeout not functioning Ok, after seeing , I have decided to skip to the end and go with .  So what I need is a beginner's practical guide to Git.  "Beginner" being defined as someone who knows how to handle their compiler, understands to some level what a  is, and has touched source control without understanding it very well.  "Practical" being defined as this person doesn't want to get into great detail regarding what Git is doing in the background, and doesn't even care (or know) that it's distributed.  Your answers might hint at the possibilities, but try to aim for the beginner that wants to keep a 'main' repository on a 'server' which is backed up and secure, and treat their local repository as merely a 'client' resource.  So:  Installation/Setup    How do you set up Git?  Try to cover Linux, Windows, Mac, think 'client/server' mindset.         Working with the code          How do you handle binary files (visio docs, for instance, or compiler environments)? How do you merge files changed at the "same time"?    Tagging, branching, releases, baselines    How do you pull a particular 'release'?   How do you resolve conflicts and complete the merge? How do you merge parts of one branch into another branch?        Other   Describe and link to a good GUI, IDE plugin, etc. that makes Git a non-command line resource, but please list its limitations as well as its good.    - Cross platform, included with Git  - Cross platform history viewer, included with Git  - Mac OS X  - Mac OS X history viewer  - Cross platform, commercial, beta  - console GUI for Linux  - GUI for Windows, Linux  - package for Windows, includes friendly GUI  Any other common tasks a beginner should know?     How do I work effectively with a subversion repository set as my source control source?   Other Git beginner's references                 Delving into Git     (and )    I will go through the entries from time to time and 'tidy' them up so they have a consistent look/feel and it's easy to scan the list - feel free to follow a simple "header - brief explanation - list of instructions - gotchas and extra info" template.  I'll also link to the entries from the bullet list above so it's easy to find them later. When entering the US on an international flight, and then on to a connecting domestic flight, what is the exact order of the process that will take place? In other words, what happens first, second, third, etc.? How to flatten a non-planar face to a targeted plane? Let's take a non-planar quad here for a simple example, how to only move one vertex on it, to finally make it planar while keeping the other three vertices still? Template Hierarchy: confused with index.php, front-page.php, home.php I'm really confused with index.php, home.php and front-page.php. In many cases even though I had an index.php, I overwrite it with front-page.php. But recently, I became aware about home.php.   What's the difference between the home.php and index.php? What's the ideal condition to use a home.php than an index.php? What's the ideal condition to use a front-page.php? When I'm using a front-page.php then what specific task an index.php is doing for me then?   I've read the  in Codex. Please don't mix my question with Page Templates, I understand 'em, alHamduLILLAH. iOS 11-13 - unable to paste into comments The topological space $X=\omega_1\cup \{\omega_1\}$ is not first countable but $\omega_1$ is. Here $\omega_1$ denotes the set of all countable ordinals and $\{\omega_1\}$ is the first uncountable ordinal. Cardinality of $\omega_1$ is $\aleph_1.$And also $\omega_1$ is called the limit ordinal meaning it is the limit point of the set $\omega_1.$  Here I want to prove two things. $1)$ $\omega_1$ is first countable. and $2)$ $\{\omega_1\}$ is the limit point of $\omega_1$. But since no sequence converges to $\{\omega_1\}$, using this I could say that our space $X$ is not first countable.  $1)$ The proof of this I got from  with just one question: it says we need to prove that such an $S(y)$ exists,and I'm thinking $S(y)=\cap\{u\in \omega_1:u\gt y\}.$ This is correct$?$ But here is a chance that the countable base around $y$ may be finite and not countably infinite.  $2)$ If possible let us assume that $\omega_1$ is not a limit point of the set $\omega_1.$ $U$ be a nbd of $\omega_1$ that does not intersect $\omega_1.$ Then what are the elements of $U$ like? The ones coming before $\omega_1$  cannot be uncountable because $\omega_1$  is the first. Then they must be countable. This is absurd so no such $U$ exists. Thus $\{\omega_1\}$ is a limit point.  Are my proofs correct? Thank you. Here is my problem: I've got a dialog with some parameters that the user can change (via a spinner for example). Each time one of these parameters is changed, I launch a thread to update a 3D view according to the new parameter value.  If the user changes another value (or the same value again by clicking many times on the spinner arrow) while the first thread is working, I would like to abort the first thread (and the update of the 3D view) and launch a new one with the latest parameter value.  How can I do something like that?  PS: There is no loop in the run() method of my thread, so checking for a flag is not an option: the thread updating the 3D view basically only calls a single method that is very long to execute. I can't add any flag in this method asking to abort either as I do not have access to its code. Using a transistor as a switch I am attaching a motor to an ATmega32 chip. I want to build an H-bridge but before doing that, I want to control the motor using the chip. I bought few NPN Transistors from RadioShack. I have 5V running though the breadboard. I attached Vcc to the Collector, Base to the Pin, and Emitter to the motor. And other wire of motor is hooked up to Ground. Unfortunately, the power coming out of the transistor is too low, the motor is barely moving (As opposed to when I hook up my motor straight to 5V). What is wrong? Do I need a different transistor or is my setup wrong? If it is the transistor, can you please recommend the right one, I am not too good at those. The question I am working on is, &quot;Consider the following. (a) Find the angular speed of Earth's rotation about its axis. rad/s (b) How does this rotation affect the shape of Earth?&quot;  I am fully capable of solving part (a); however, I am not sure how to describe the effect earth's rotation on its shape. I tried to search my textbook for the answer, but could not find anything. Is there an actual effect on the shape? Boggle: What is the dice configuration for Boggle in various languages? This is the dice configuration for the English Boggle:  Other variants and discussions concerning letter distributions for English can be found here:  , , ,  (Wikipedia).  I am interested in the 16 dice configurations for also other languages (Spanish in particular) and I am unable to find it anywhere online.  Versions I have managed to find so far:  ,  English 25 dice version:   Spanish 25 dice version:   Italian 25 dice version: Why do some badges appear white in color and others are dark? Suppose $m_1, m_2, m_3,\ldots, m_k &gt; 1$ and not necessarily pairwise relatively prime. Also $a_1, a_2,\ldots, a_k\in\Bbb Z$. What can we say about the solutions of the following congruence equations: $\begin{align*} x&amp;=a_1\mod m_1\\ x&amp;=a_2\mod m_2\\  &amp;\phantom{1}\vdots\\ x&amp;=a_k\mod m_k \end{align*}$