Proving $\gcd(a_1,\ldots,a_m)\gcd(b_1,\ldots,b_n)=\gcd(\text{all products $a_ib_j$})$
Expanding GCDs Reasoning: $\gcd(a,c) \cdot \gcd(b,c) = \gcd(ab,bc,ac,cc)$
How can I combine two or more querysets in a Django view? I am trying to build the search for a Django site I am building, and in that search, I am searching in three different models. And to get pagination on the search result list, I would like to use a generic object_list view to display the results. But to do that, I have to merge three querysets into one. How can I do that? I've tried this: result_list = [] page_list = Page.objects.filter(     Q(title__icontains=cleaned_search_term) |     Q(body__icontains=cleaned_search_term)) article_list = Article.objects.filter(     Q(title__icontains=cleaned_search_term) |     Q(body__icontains=cleaned_search_term) |     Q(tags__icontains=cleaned_search_term)) post_list = Post.objects.filter(     Q(title__icontains=cleaned_search_term) |     Q(body__icontains=cleaned_search_term) |     Q(tags__icontains=cleaned_search_term))  for x in page_list:     result_list.append(x) for x in article_list:     result_list.append(x) for x in post_list:     result_list.append(x)  return object_list(     request,     queryset=result_list,     template_object_name='result',     paginate_by=10,     extra_context={         'search_term': search_term},     template_name=&quot;search/result_list.html&quot;)  But this doesn't work. I get an error when I try to use that list in the generic view. The list is missing the clone attribute. How can I merge the three lists, page_list, article_list and post_list? Just a curiosity. I just saw a video where pi was being calculated by the series  $$1-(1/3)+(1/5)-(1/7)+...$$  My question is how can $\pi$ be irrational if we can calculate it using rational numbers? How can I combine hashes in Perl? What is the best way to combine both hashes into %hash1?  I always know that %hash2 and %hash1 always have unique keys.  I would also prefer a single line of code if possible.    $hash1{'1'} = 'red'; $hash1{'2'} = 'blue'; $hash2{'3'} = 'green'; $hash2{'4'} = 'yellow'; PHP errors NOT being displayed in the browser [Ubuntu 10.10] Proper display of fractions What is the difference between display: inline and display: inline-block? How to reset postgres' primary key sequence when it falls out of sync? I ran into the problem that my primary key sequence is not in sync with my table rows.   That is, when I insert a new row I get a duplicate key error because the sequence implied in the serial datatype returns a number that already exists.  It seems to be caused by import/restores not maintaining the sequence properly. My adoptable storage is full. How can I move the data to a bigger MicroSD card? I've got a Moto G 2014 LTE running CM13. When I found out about the whole 'adopt SD card as internal storage' thing, I was quite excited, as the actual internal storage on this phone is tiny. I set up a 16gb micro SD, the biggest I had at the time, and have been using it with minimal problems.  Fast-forward to this day, and I now have a 64gb micro SD that I want to use instead of the 16gb one. However, I'm at a loss as to the best way to copy the data over onto the new one, or if it's even possible. The ideas I've got so far include:   Titanium Backup all [system] apps, factory reset, format new SD and then restore (should work, but a massive pain) NANDroid the SD card onto a USB OTG stick, then restore to the new one (pretty sure this is a bad idea and won't work, but...) Copy all the stuff onto my computer via my phone through a file manager of some sort (I have a linux/linux/windows triple boot, so file format isn't a problem), format the new SD into phone, and copy back (can't be that simple, can it? Hidden/inaccessible files?) Copy the files onto USB OTG with a root file explorer app, reformat the SD as portable, format the new one as adopted, and then copy them back (could work, except for the point below)  with the command adb shell sm set-force-adoptable true, use a root browser to copy all the data over from the old SD, format the old SD as external and remove it, and take the new SD and put it in the SD card slot (seems overly complicated, and also suffers the below pitfall)   The other thing that worries me is mount points: will the apps with externally-stored data know to look at the new SD card for it? Will I have to remount it in a specific location with the shell each boot (or use an init.d script perhaps)? I suppose that it can always be accessed through /sdcard or /storage/emulated/0, but I'm not 100% sure what goes on behind the scenes.  I've got recent NANDroid backups, so if anyone can eliminate the options that definitely won't work (or say which one[s] probably will), I can try them and report back in case someone stumbles across this question in the future.  EDIT: So, my phone further bit the dust and got to the point where it got into a pretty major bootloop. Ended up having to flash a whole new ROM. As such, I probably won't be able to test the full image/decryption/etc. method that I was originally planning. However, I will write up what I've discovered so far in case anyone wants to take up this particular method in the future:   Image the old SD with dd as follows: sudo dd if=/dev/mmcblk0 of=~/SDCardBackup.img, where /dev/mmcblk0 is the location of the sd card as obtainable through lsblk Restore the image you just made to the NEW sd card : sudo dd bs=4M if=~/SDCardBackup.img of=/dev/mmcblk0 (you may have to unmount it first) From here on in, I was following  (thanks @beeshyams!) tutorial, which explains the next steps way better than I ever could have done. The plan was to decrypt the storage and resize the main partition with gparted. I had no idea whether it would work or not, but I felt it was worth a try. However, when I came to run the actual decryption command using the key I'd extracted, I got an error (which I believe was my shoddy linux skills more than anything).   As I say, I have no idea if the above method would work or not even if everything did go to plan. Also, feel free to correct any of my commands above if I mis-typed them (I'm on Windows currently, so this is all from memory.) If this info helps anyone, then good. But until then,  should work fine.  Thanks, Jackdafish What was the joke that Geordi told Data in TNG: "Encounter at Farpoint"? states:     Apparently at some point during this mission, Geordi La Forge told Data a joke, which the humorless android did not "get" until years later, when he activated his emotion chip during the events of Star Trek: Generations.    Is it known what the joke is? How does the Doctor know how old he is? I've often wondered, how does the Doctor know how old he is? He not only travels through time, but also through space, and visits planets where days can be shorter or longer than 24 hours. How does he 'keep score'?  Also, does he count his age in Earth years or Gallifrey years? They might be completely different in length. What's a better way to define individual link colours for a url in a macro? I've got a document where I'd like two colours of links - cyan for links in headers that since it's brighter, and navy blue for links in the main body which is more subtle/less distracting. I already tried using the xcolor package and changing the text colour with textcolor, like \textcolor{cyan}{\href{url.com}{link name}}, but it doesn't override whatever link or url colour I have defined in hypersetup.   So this is what I've done:   I've defined the colour navy:   \definecolor{navy}{HTML}{2F729C}    And also imported the hyperref package and defined commands to set the global link/url colours to cyan / navy.   \usepackage{hyperref}                         \hypersetup{colorlinks=true,linkcolor=navy,urlcolor=navy}                        \newcommand{\navylinks}{\hypersetup{linkcolor=navy,urlcolor=navy}}               \newcommand{\bluelinks}{\hypersetup{linkcolor=cyan,urlcolor=cyan}}     Then I've defined another command specifically for the header links, where I turn on cyan links globally, include the header text and link, and then turn on navy links again:   \newcommand{\headerlink}[1]{\bluelinks\href{#2}{#1}\navylinks}   My issue with this is that I feel like there could be a better way to do it than to set the global link colour every time I use a link macro; is there a way to define the link colour just for one link, like one would do with \textcolor{...}, that would be able to override hypersetup? No secondary button (right click) on touchpad I'm experiencing a serious problem with the new Ubuntu 18.04:  System Dell XPS 13 with a freshly installed Ubuntu 18.04 LTS.  Problem description The touchpad provides only primary button (single click and double click), but no secondary button. In particular, when using the "test Your Settings" option in Settings -> Devices -> Mouse &amp; Touchpad, any click on the touchpad is signaled as primary button, no matter where I click (left or right side of the touchpad). This remains the case even after I change the Primary Button from Left to Right (in Settings -> Devices -> Mouse &amp; Touchpad -> General).  In comparison, an external mouse connected to my laptop (via usb) works fine: it provides both primary and secondary buttons with sides corresponding to the choice of Primary Button (in Settings -> Devices -> Mouse &amp; Touchpad -> General).  This may be related to   Any ideas?  Update: Meanwhile, I found out that in addition to the solution proposed by EntropyWins, one can also control this touchpad behavior via the Tweaks tool (a.k.a. gnome-tweaks) under Keyboard &amp; Mouse -> Touchpad -> Mouse Click Emulation. In any case, as EntropyWins explains in his answer, this is not a bug. I've been trying to solve the following problem:  Suppose that $f$ and $f&#39;$ are continuous functions on $\mathbb{R}$, and that $\displaystyle\lim_{x\to\infty}f(x)$ and $\displaystyle\lim_{x\to\infty}f&#39;(x)$ exist. Show that $\displaystyle\lim_{x\to\infty}f&#39;(x) = 0$.  I'm not entirely sure what to do. Since there's not a lot of information given, I guess there isn't very much one can do. I tried using the definition of the derivative and showing that it went to $0$ as $x$ went to $\infty$ but that didn't really work out. Now I'm thinking I should assume $\displaystyle\lim_{x\to\infty}f&#39;(x) = L \neq 0$ and try to get a contradiction, but I'm not sure where the contradiction would come from.   Could somebody point me in the right direction (e.g. a certain theorem or property I have to use?) Thanks Show  $$\int_0^\infty \frac{\ln(x)}{e^x} = -\gamma$$ (gamma is Euler-Mascheroni constant).  Can anyone please prove this result?  Also  $$ \int_0^\infty \frac{\left( \ln(x) \right)^2}{e^x}\mathrm dx. $$ How to make a bootable ISO image from a bootable DVD? Let $\gamma:[0,1] \to \mathbb R^n$ be a smooth closed curve, such that $\gamma(0)=\gamma(1), \gamma'(0)=\gamma'(1), |\gamma'(a)|=1$ and let $B_r=\{x| \exists t, |\gamma(t)-x|&lt;r\}$. How can i show that the volume of $B_r$ is equal to $br^{(n-1)}$ for $r &lt;\varepsilon$ for some $\varepsilon&gt;0$. And how can I find $b$? It is intuitively obvious. But how can one prove it? I have no idea. How do I remove a malformed line from my sources.list? I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software. I have a Alcatel onetouch model 50540 running android 5.1.1 as in the title. it is rooted and began uninstalling pre-installed bloatware on my device. I do not have a complete list of uninstalled apps because I had only kept track after the first few, but ill list the ones I do know about    Download Manager Downloads Talkback Hangouts Cricket Wi-Fi Manager Camera Email Onetouch Launcher   That is the essence of what I did. I do have an edited hosts file as a makeshift adblock.  Play store gives me an error code 0 to which I removed app data and tried again, same problem.  I have tried installing local apps which brings up an "app not installed" box.  Lastly I have tried do directly extract the app into /data/app and rebooting which didn't work. Pumping Lemma for $L=\left\{0^i 1^{j} \mid \gcd(i,j) = 1\right\}$ Let $L=\left\{0^i 1^{j} \mid \gcd(i,j) = 1\right\}$ I want to prove that this is not a regular language, but I am having trouble finding a string I can pump resulting in the string not being in the language. Ideally, rather than a full solution, I'd like suggestions for a string that I could use in this proof. I've played with the idea of setting $j = 2$ and $i = 2n+1$, but I don't think that would work. Punctuation of a Direct Quote Is any particular punctuation necessary when a quotation is the subject of a sentence? For example, in the sentence below, should there be a comma after export? Or anything else?     "Laughter is America's most important export" is a well-known quote of Walt Disney's.