Forcing page download in PHP
How to force file download with PHP
Bash - Integer expression expected Why is it considered good practice to mark method parameters as final? Should import statements always be at the top of a module? states:  Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.  However if the class/method/function that I am importing is only used in rare cases, surely it is more efficient to do the import when it is needed? Isn't this: class SomeClass(object):      def not_often_called(self)         from datetime import datetime         self.datetime = datetime.now()  more efficient than this? from datetime import datetime  class SomeClass(object):      def not_often_called(self)         self.datetime = datetime.now() Prove the inequality $\frac{a}{c+a-b}+\frac{b}{a+b-c}+\frac{c}{b+c-a}\ge{3}$ Sounds simple but I seem to fail every time, that is it turns into scrambled eggs instead. How do you make it so that you can flip it over both without it breaking and before it burns? Using Label Expression with Text Formatting Tags and Ampersand Books about matroids Could you recommend any approachable books/papers/texts about matroids (maybe a chapter from somewhere)? The ideal reference would contain multiple examples, present some intuitions and keep formalism to a necessary minimum.  I would appreciate any hints or appropriate sources. Possibilities for Python classes organized across files? I'm used to the Java model where you can have one public class per file.  Python doesn't have this restriction, and I'm wondering what's the best practice for organizing classes. Lets say I have a domain already, for example www.automobile4u.com (not mine), with a website fully running and all.  The title of my "Website" says:    &lt;title&gt;Used cars - buy and sell your used cars here&lt;/title&gt;   Also, lets say I have fully SEO the website so when people searching for the term buy used cars, I end up on the second or first page.  Now, I want to end up higher, so I go to the google adwords page where you can check how many searches are made on specific terms.  Lets say the term "used cars" has 20 million searches each month.  Here comes the question, could I just go and buy that domain with the search terms adress, in this case www.usedcars.com and make a redirect to my original page, and this way when people search for "used cars", my newly bought domain name comes up redirecting people to my original website (www.automobile4u.com)?  The reason I believe this benefits me is because it seems search engines first of all check website adresses matching the search, so the query "used cars" would automatically bring www.usedcars.com to the first result right?  What are the downsides for this?  I already know about google spiders not liking redirects, but there are many methods of redirecting...  Is this a good idea generally? What happens to the semiconductor in an LED when it is given voltage that it cannot handle? Dr. StrangeNumbers or: How I Learned to Stop Worrying and Love Floating Point Arithmetic One who has potential, but never gives the effort to show it.   What would be the best word or words that match this description? I am running Ubuntu 20.04 an  with an NVIDIA GeForce GTX 1660TI GPU. According to , the driver version for this GPU is 430. When I first installed Ubuntu, I installed 440. I'm now trying to correct that and install 430. I ran sudo apt-get install nvidia-driver-430, and then did a reboot. When I examined nvidia-smi, though, it still showed the 440: +-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |===============================+======================+======================| |   0  GeForce GTX 166...  Off  | 00000000:01:00.0 Off |                  N/A | | N/A   55C    P0     9W /  N/A |      0MiB /  5944MiB |      0%      Default | +-------------------------------+----------------------+----------------------+  What is the appropriate way of updating this driver? Doing a little reading over the break (The Probabilistic Method by Alon and Spencer); can't come up with the solution for this seemingly simple (and perhaps even a little surprising?) result:     (A-S 1.6.3) Prove that for every two independent identically distributed real random variables $X$ and $Y$,   $$Pr[|X-Y| \leq 2] \leq 3 Pr[|X-Y| \leq 1].$$ How do I install applications in Ubuntu? How can I visualize which folders and files are taking up all of the space on my hard drive?  I'm getting some conflicting reports on the size of hard drive contents. Namely what is and isn't there and what folders are actually using the space.   I need to know which of the files or folders the culprits behind all this hidden bloat. Also there should be a print option to get it on paper. How to filter features in a layer? I am trying to display certain features in a shapefile-based layer using QGIS. I have found the subset function in the properties panel, which does exactly what i want, but is too tedious given that I have to manually sift through a large number of features. Is there a quicker way to do this?  I am using both shapefiles and postGIS best,  dietmar Python HTTPS requests (urllib2) to some sites fail on Ubuntu 12.04 without proxy I have an little app I wrote in Python and it used to work... until yesterday, when it suddenly started giving me an error in a HTTPS connection. I don't remember if there was an update, but both Python 2.7.3rc2 and Python 3.2 are failing just the same.  I googled it and found out that this happens when people are behind a proxy, but I'm not (and nothing have changed in my network since the last time it worked). My syster's computer running windows and Python 2.7.2 has no problems (in the same network).  &gt;&gt;&gt; url = 'https://www.mediafire.com/api/user/get_session_token.php' &gt;&gt;&gt; response = urllib2.urlopen(url).read()   File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen     return _opener.open(url, data, timeout)   File "/usr/lib/python2.7/urllib2.py", line 400, in open     response = self._open(req, data)   File "/usr/lib/python2.7/urllib2.py", line 418, in _open     '_open', req)   File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain     result = func(*args)   File "/usr/lib/python2.7/urllib2.py", line 1215, in https_open     return self.do_open(httplib.HTTPSConnection, req)   File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open     raise URLError(err) urllib2.URLError: &lt;urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol&gt;   What's wrong? Any help is appreciated.  PS.: Older python versions don't work either, not in my system and not in a live session from USB, but DO work in a Ubuntu 11.10 live session. Is there a documentclass that produces 'endless' pages? Does anybody know of a documentclass that produces a page that has a fixed width and a variable length, depending on the actual content that needs to fit on the sheet? I'm trying to get something like a kind of scroll if possible. How do I hide the GRUB menu showing up at the beginning of boot? I stopped dual booting and I don't want to have to choose the OS any more. I want to boot into Ubuntu 12.04 directly without seeing the GRUB menu.  How can I achieve that?