How to suppress scientific notation from a float value in python. Here I tried the following code but it's not working  r_val[v].append('%.2f' % val.get("closing_balance"))   Thanks in advance
Here's my code:  x = 1.0 y = 100000.0     print x/y   My quotient displays as 1.00000e-05.  Is there any way to suppress scientific notation and make it display as 0.00001? I'm going to use the result as a string.
I have already dual systems : Windows 7 and Ubuntu installed on my laptop. The Windows 7 had been installed when I bought this laptop, and I don't have a CD.  I just installed VitrualBox under Ubuntu, hoping that I could install another Windows in this virtual machine, so that I could run some applications of Windows even under Ubuntu.  But it seems that I need a CD or ISO of Windows to boot inside this virtual machine. Otherwise, there is an error: FATAL: No bootable medium found! System halted. My question is where I could find a CD or ISO?  At the moment, I am downloading ISO from this , but do not know if it will work. By the way, I am not sure if I should pick the 32-bit or 64-bit? As my CPU is 64-bit but my Ubuntu is i386.  Could anyone help? Thank you very much. Why does the series $\sum_{n=1}^\infty\frac1n$ not converge? Can someone give a simple explanation as to why the       $$\sum_{n=1}^\infty\frac1n=\frac 1 1 + \frac 12 + \frac 13 + \cdots $$   doesn't converge, on the other hand it grows very slowly?   I'd prefer an easily comprehensible explanation rather than a rigorous proof regularly found in undergraduate textbooks. Is "You are correct" correct? It seems to me that "You are correct" means that the person in question is supposedly "correct" in their quiddity. "That is correct" or "You are right" seems a lot better.  I also would like to know if someone is using correct(ly) correctly, as to correct someone who is potentially using correctly incorrectly. iOS App stuck in 'Loading...' I tried downloading Tumblr yesterday but it never completed. At the moment I have an App icon stuck at 'Loading...'.  I have tried restarting the iPhone (holding down both home and side buttons at the same time) and I have also tried shutting down the iPhone (holding the side button and swiping).  I have also tried deleting it as usual (holding the icon down and choosing delete but it doesn't go away).  Any ideas on what I can do to get rid of this icon? Fastest method to determine my PC's IP address (Windows) This may seem trivial but I'm looking for the quickest method to determine my PC's IP address within my network.   This changes regularly as I connect from one network to the next via DHCP The connection changes from wired to wireless Windows 7 PC (although ideally the perfect solution would work on all versions of Windows) Various adapters installed (e.g. VMWare, Tunnels, etc.)   I need to know this as I often run a local web server where I need to access files over the local network... and since it changes regularly I want the fastest method to retrieve the address.  My current flow is:   WindowsKey + R to open the Run dialog "cmd" + Enter to open a command prompt "ipconfig" + Enter to get the diagnostics info Scroll to or resize the window so that I can see the line in my Ethernet adapter Local Area Connection for my ipv4 Address Remember it to type elsewhere... or  Right click > select Mark > highlight the address > press Enter to copy it to the clipboard   This wasn't so bad with Windows XP when I had no additional adapters, tunnels, wireless connections etc. but the amount of data returned with this command makes it hard to pluck out.  Surely there must be a better, faster way! (bonus points if adding it to the clipboard is easily accomplished) poll() failed, context incorrect? - Example: bpy.ops.view3d.background_image_add() A friend's visa has expired in Thailand. How does he get back to the UK? The limit of a sum $\sum_{k=1}^n \frac{n}{n^2+k^2}$ as $n\rightarrow\infty$ How to compute this limit:  $$\lim_{n\to\infty}\left(\frac{n}{n^2+1^2}+\frac{n}{n^2+2^2}+\cdots+\frac{n}{n^2+n^2}\right)$$  Please give me some hint. A set $A \subset l_1$ is compact if and only if closed, bounded, and one other condition A set $A \subset \ell_1$ is compact if and only if $A$ is closed and bounded and given any $\epsilon &gt;0$, there exists $n_0$ such that $\sum_{k=n}^{\infty} |x_k| &lt; \epsilon$ for all $n&gt; n_0$ and $x \in A$.   It's easy to prove the part assuming that $A \subset l_1$ is compact, but I am finding difficulty to prove the other part. Strange issue with the right side margin Google Chrome is not starting I've just installed Ubuntu 16.04 LTS on dual boot. I've looked for many solutions and tried them all but Chrome never starts; the logo appears on the left but no window opens.  I downloaded the deb file on google chrome website and installed it through Ubuntu Software, but it doesn't start.   I have tried installing it through the command line with   sudo dpkg -i --force-depends google-chrome-stable_current_amd64.deb sudo apt-get install -f   I have checked with uname -a and my system is 64 bit. I have also tried gdebi with the same result.   My repository universe is up to date.  I only have one display in settings>displays> so I can't turn off built-in display nor check the mirror display (I read it could be the problem as I also have a graphic card but it seems it is not in my case).  Here is what I get in the command line when I try to run Chrome from it ( the message is the same, whatever the method I used to install Chrome):  ~$ google-chrome [11831:11831:1122/114854.195473:ERROR:process_singleton_posix.cc(433)] readlink failed: Permission denied (13) [11831:11831:1122/114854.195493:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195508:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195515:ERROR:process_singleton_posix.cc(280)] Failed to create /home/basil/.config/google-chrome/SingletonLock: Permission denied (13) [11831:11831:1122/114854.195538:ERROR:process_singleton_posix.cc(433)] readlink failed: Permission denied (13) [11831:11831:1122/114854.195564:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195622:ERROR:chrome_browser_main.cc(1498)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption. [11831:11868:1122/114854.209297:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process.   Any new approach will be much appreciated How to use wc and piping to find how many files and directories are in a certain directory? How can I use word counter (wc) and piping to count how many files or directories are in the /usr/bin directory? What is the importance of eigenvalues/eigenvectors? What is the importance of eigenvalues/eigenvectors? Evaluating $\int_{0}^{\infty}\frac{\sin^{2n+1}x}{x}\mathrm{d}x$ Flex HTTPservice and POST, Sending Files? I use a basic Post to send data to a Django server.  The data consists of a base64 encoded 640*380 PNG image dynamically created by the flex component.  &lt;mx:HTTPService id="formSend" showBusyCursor="true"      useProxy="false" url="http://127.0.0.1/form/"      method="POST" result="formSentConfirmation(event)"    fault="formSendingFailed(event)"/&gt;    private function sendForm(url:String, message:String, meteo:Number):void {     formSend.url = url;     var params:Object = { message: message, image_data: getEncodedImage() };      snapButton.label = "sending ...";     formSend.send(params); }   On the server side i can see that the data is in the request.POST not in request.FILES. That means the image is not send as a File with multiencode HTTP.   Will i get into trouble on a real server ? since the limit is 200k for urlencoded POST var. How to make HTTPservice send the data as a file? Any other solutions?   Thanks recursion-consecutive numbers what is the number of subsets of the set {k∈N|1≤k≤n} with no two consecutive numbers? The answer says: $$a_n=a_{n-1}+a_{n-2}$$ with the starting conditions: $$a_0=1, a_1=2$$1. why does $a_1=2$? $$$$ 2. How does this recursion was created, I understand that if $a_n$ mean all the places with no consecutive numbers so, $a_{n-1}$ come from the fact that after the first place all those places satisfy this condition, but why there is need to "look" at what happen after the two places? Is there a word to describe words that can be spelled different ways? Is there a word in English to describe words that can be spelled more than one way?  For example:   colour and color favourite and favorite   However, this shouldn't be limited to words spelled differently in different dialects, though I'm not sure what other case there would be. I have an application which is a relatively old. Through some minor changes, it builds nearly perfectly with Visual C++ 2008. One thing that I've noticed is that my "debug console" isn't quite working right. Basically in the past, I've use AllocConsole() to create a console for my debug output to go to. Then I would use freopen to redirect stdout to it. This worked perfectly with both C and C++ style IO.  Now, it seems that it will only work with C style IO. What is the proper way to redirect things like cout to a console allocated with AllocConsole()?  Here's the code which used to work:  if(AllocConsole()) {     freopen("CONOUT$", "wt", stdout);     SetConsoleTitle("Debug Console");     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED); }   EDIT: one thing which occurred to me is that I could make a custom streambuf whose overflow method writes using C style IO and replace std::cout's default stream buffer with it. But that seems like a cop-out. Is there a proper way to do this in 2008? Or is this perhaps something that MS overlooked?  EDIT2: OK, so I've made an implementaiton of the idea I spelled out above. Basically it looks like this:  class outbuf : public std::streambuf { public:     outbuf() {         setp(0, 0);     }      virtual int_type overflow(int_type c = traits_type::eof()) {         return fputc(c, stdout) == EOF ? traits_type::eof() : c;     } };  int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {     // create the console     if(AllocConsole()) {         freopen("CONOUT$", "w", stdout);         SetConsoleTitle("Debug Console");         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);       }      // set std::cout to use my custom streambuf     outbuf ob;     std::streambuf *sb = std::cout.rdbuf(&amp;ob);      // do some work here      // make sure to restore the original so we don't get a crash on close!     std::cout.rdbuf(sb);     return 0; }   Anyone have a better/cleaner solution than just forcing std::cout to be a glorified fputc? How do I avoid the "S to Skip" message on boot? After upgrading my laptop from karmic to lucid, my fat32 partition won't mount automatically. I get the message:  The disk drive for /osshare is not ready yet or not present Continue to wait; or Press S to skip mounting or M for manual recovery   Funny thing is, if I skip, then /osshare/ is mounted once I log in.   I've a similar setup on my desktop, and it works fine. Fstab on desktop:  UUID=4663-6853  /osshare        vfat    utf8,umask=007,gid=46 0       1   /etc/fstab on laptop:  UUID=1234-5678 /osshare vfat utf8,auto,rw,user 0 0 I am doing , and am having a few problems with function notation. I understand the form f(x).  What does the form f: x ↦ y mean? Could you also give one or two examples?  And, if possible, state your source. Thank you.