The function Celsius2Fahrenheit will convert Celsius to Fahrenheit to be used later, and the range is supposed to go up each time by .5, and stop at 101, but you cant use a float value in range, (I am a beginner at python), can someone please help.   def Celsius2Fahrenheit(c): """ This will Convert c Celsius to its Fahrenheit equivalent""" return c * 9 / 5 + 32   for x in range(0,101,.5): # This will print the values using new style formatting     e = Celsius2Fahrenheit(x)     if (e &gt; 0):         print(" {:3.1f} (C) | {:6.2f} (F) ".format(x,e))     else:         print(" {:3.1f} (C) | {:6.2f} (F) ".format(x,e))
Is there a way to step between 0 and 1 by 0.1?   I thought I could do it like the following, but it failed:  for i in range(0, 1, 0.1):     print i   Instead, it says that the step argument cannot be zero, which I did not expect.
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'; Integral $\int\csc^3{x} \ dx$ iPhone Storage Space Inaccuracy (No Storage Space) Birthday Problem applied to collisions I'm trying to extend the birthday problem to detect collision probability in a hashing scheme. Here is my problem. I use the letters and numbers [A-Z][a-z][0-9] to make a set of keys by randomly choosing from that set 10 times and concatenating them all together. So A24cv30kf2 could be one key for example. This implies that the base set has $62^{10}$ possible keys. Next, I want to compute the probability that I would see a collision if I picked a key from that set and issued it to $n$ users. If $M$ represents the size of the set (= $62^{10}$) and $P(M,n)$ the probability then  $$P(M,n) = \frac{M!}{M^{n}(M-n)!}$$  This follows by replacing 365 in the well known birthday problem shown   What I want to understand is the following: I want to check and see if my choice of concatenating 10 is right, when I know that my $n$ is of the order of a few millions and my $1 - P(M,n)$ needs to be less than 0.0001 or some small number. The large values of M &amp; n make the above intractable to compute. Is there an easier way to compute this? Double and triple substitution in bash and zsh Follow-up to the background part in .  In bash I can use ${!FOO} for double substitution, in zsh ${(P)FOO}. In both, the old-school (hack-y) eval \$$FOO works.  So, the smartest and most logical thing for me would be ${${FOO}}, ${${${FOO}}}… for double/triple/n substitution. Why doesn’t this work as expected?  Second: What does the \ do in the eval statement? I reckon it’s an escape, making something like eval \$$$FOO impossible. How to do a triple/n substitution with that that works in every shell? When flagging, there are two special case options: spam and rude or abusive.   What is spam, and when should I flag content as such? What is considered offensive, rude or abusive content? How does the spam flag differ from the rude or abusive flag? What is the effect of these special flags? When are these flags removed? @future method: Unsupported parameter type I was trying to look for an answer of mine earlier and did a search like this:  user:me SQLite RunInTransaction   The above found nothing. So I changed it to  user:me SQLite   Which found a bunch of things. I dug through the results and saw this snippet for :     From my experience, wrapping as many database calls as possible into a transaction speeds things up quite a bit: using (var db = new SQLiteConnection(dbPath)) { db.RunInTransaction(() => { …    Notice that the snippet contains both "SQLite" and "RunInTransaction". In looking at the post itself I noticed "SQLite" was in the question title and in my answer as code. I also noticed that "RunInTransaction" is only in my answer in code.  I looked at meta and saw , which says I need to prefix any code with code:, so I tried:  user:me SQLite code:RunInTransaction user:me code:SQLite code:RunInTransaction   None of the above returned any results.  I also found  on meta which says I can search for code like this (without the code: prefix):        So I tried:  SQLite RunInTransaction "SQLite RunInTransaction"   The first did not return my answer. The second did not return any results.  So my question:  How do I properly search for , that has both "SQLite" and "RunInTransaction" in the post? I have a Dell Studio 17. It's a few years old, and I wanted to upgrade the processor. It currently has an Intel Core 2 Duo T5750 @ 2.00GHz  My question is how can I find out which processors are compatible? Travelling in Schengen area while waiting for permit of stay renewal in Italy Imagine I have tons of RAM. Let's say 64GB. That's a lot for even gaming PCs. Now the default location of a pagefile in Windows is on the main OS drive, be it HDD or SSD, which are faster in general, but still not as fast as RAM.  Something tells me that disabling the pagefile on the hard drive or creating a virtual RAM drive and letting the pagefile be there could make Windows move all its virtual memory to RAM, and so increase the system's performance, but I'm not very knowledgeable in that area, so that might not be true at all.  I tried both, but I couldn't analyze the results to reach a definite conclusion with my knowledge level in memory things.  Would this work? If not, why? biblatex and autonum don't work together Remote Linux server to remote linux server dir copy. How? What is the best way to copy a directory (with sub-dirs and files) from one remote Linux server to another remote Linux server? I have connected to both using SSH client (like Putty). I have root access to both. I saw several bugs and error messages when I was looking by chance into the tool called "logs".  Being a newbie in Ubuntu I have no idea how to deal with these bugs, where to report them or how to fix them.  Any help to guide me here?  The bug I have (which is listed under important) reads:  [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0x52 (or later) Titles of articles I'm about to cite contain upper case letters and when using BibTeX it converts them to lower case ones. This happens only in the title and only the first letter conserves its case. For example, when I cite an article about HF, the reader won't know if it is about Hafnium (Hf) or fluorine acid (HF).  I know that I can fix it manually in the .bbl file but I would like to avoid it, or fix it automatically. Will I still receive OTA updates after rooting my Nexus 5? I just wanna ask that after rooting Nexus 5 will I be receiving OTA updates by Google ? Or I'll have to install a custom ROM ? How do I enable or disable Apport? DNS Resolution for example.com - Can you explain? I want to upgrade my Ubuntu 13.04 to Ubuntu 13.10. I'm unable to do via GUI.   [ The reason why I'm unable to do so:  Via software updater, I proceed ahead and click upgrade (for upgrading my OS). I authenticate by providing my password. Then it proceeds and downloads upgrade tool. That time only (while downloading the tool) error message comes "system program problem detected". It then doesn't proceed ahead and I click to report the problem ]  So, I tried via command line but here also I couldn't succeed upgrading my OS.  For the same I ran   $ sudo apt-get update   Then I ran  $ sudo apt-get dist-upgrade   And then:  ravbholua@ravbholua-Aspire-5315:~$ sudo do-release-upgrade Checking for a new Ubuntu release Get:1 Upgrade tool signature [198 B]                                                                                                  Get:2 Upgrade tool [1,135 kB]                                                                                                         Fetched 1,135 kB in 6s (32.9 kB/s)                                                                                                    authenticate 'saucy.tar.gz' against 'saucy.tar.gz.gpg'  gpg exited 2 Debug information:    gpg: Signature made Friday 01 November 2013 10:34:27 AM IST using DSA key ID 437D05B5 gpg: Can't check signature: public key not found  Authentication failed Authenticating the upgrade failed. There may be a problem with the network or with the server.  ravbholua@ravbholua-Aspire-5315:~$    Please suggest how to go ahead and upgrade my OS. This is an old problem that deserves a bugfix, but it's getting beyond a joke now and I can't seem to work around it.  I keep getting the dreaded failed To download extra data files error in relation to ttf-mscorefonts-installer:    Repeatedly asking it to try again doesn't help, additionally, repeatedly trying-  sudo rm -rf /var/lib/update-notifier/package-data-downloads/partial/* sudo apt-get --purge --reinstall install ttf-mscorefonts-installer   Isn't working either.  I just get at least one 404 error from one of the sourceforge links that stops it working-  Reading package lists... Done Building dependency tree        Reading state information... Done 0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 20 not to upgrade. Need to get 0 B/29.5 kB of archives. After this operation, 0 B of additional disk space will be used. Preconfiguring packages ... (Reading database ... 352049 files and directories currently installed.) Preparing to unpack .../ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ... mscorefonts-eula license has already been accepted Unpacking ttf-mscorefonts-installer (3.4+nmu1ubuntu2) over (3.4+nmu1ubuntu2) ... Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ... Processing triggers for update-notifier-common (3.168.2) ... ttf-mscorefonts-installer: processing... ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe Get:1 http://downloads.sourceforge.net/corefonts/andale32.exe [198 kB] Fetched 198 kB in 0s (339 kB/s)                                                 W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/andale32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arial32.exe Get:1 http://downloads.sourceforge.net/corefonts/arial32.exe [554 kB] Fetched 554 kB in 0s (575 kB/s)                                                 W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arial32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arialb32.exe Get:1 http://downloads.sourceforge.net/corefonts/arialb32.exe [168 kB] Fetched 168 kB in 0s (306 kB/s)                                                 W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arialb32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/comic32.exe Err:1 http://downloads.sourceforge.net/corefonts/comic32.exe   404  Not Found W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/comic32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) E: Failed to fetch https://netix.dl.sourceforge.net/project/corefonts/the fonts/final/comic32.exe  404  Not Found  E: Download Failed Setting up ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...   The specific point at which it fails to download changed - it seems to be a sourceforge reliability problem, but this has now been going on weeks and results in annoying popups as above all the time.  How do we get this fixed and/or how can I work around it for now.