How to check the value of a dictionary key is string or integer
What's the canonical way to check for type in Python?
Is the set $S=\left\{\left(z_1,z_2\right)\in \mathbb C\times \mathbb C:z_1^2+z_2^2=1\right\}.$ compact? Consider the set $$S=\left\{\left(z_1,z_2\right)\in \mathbb C\times \mathbb C:z_1^2+z_2^2=1\right\}.$$  Is this set compact in $\mathbb C^2$ ?  As $\mathbb C^2$ is a finite dimensional space so a subset of it is compact if and only if it is closed and bounded.  But $z_1^2+z_2^2=1$ gives $(x_1^2+x_2^2)-(y_1^2+y_2^2)=1$ and $x_1y_1+x_2y_2=0$ , where $z_1=x_1+iy_1$ and $z_2=x_2+iy_2$.  But from here how I can show that the set is closed and bounded ? How can I have a different input method for each app window on windows 8. When I change input language to ENG all app window also uses this method and I don't want that. Like windows 7 that has a different input method for this purpose. thanks Evaluation of $\lim_{n\rightarrow \infty}\frac{n!\cdot e^n}{\sqrt{n}n^n}$ without stirling approximation Evaluation of $\displaystyle \lim_{n\rightarrow \infty}\frac{n!\cdot e^n}{\sqrt{n}\cdot n^n}$   $\bf{My\; Try::}$we can write it as $$l=\lim_{n\rightarrow \infty}\frac{e^n}{\sqrt{n}}\cdot \left(\frac{1}{n}\cdot \frac{2}{n}\cdot \frac{3}{n}\cdots \cdots \frac{n}{n}\right)$$  $$\ln (l) = \lim_{n\rightarrow \infty}\bigg[n-\frac{1}{2}n+\sum^{n}_{r=1}\ln\left(\frac{r}{n}\right)\bigg]$$  Now how can i solve it, Help required, Thanks This question relates to a discussion on . Euclid's proof of the infinitude of primes is an indirect proof (a.k.a. proof by contradiction, reductio ad absurdum, modus tollens). My understanding is that Intuitionists reject such proofs because they rely on the Law of the Excluded Middle, which they don't accept. Does there exist a direct and constructive proof of the infinitude of primes? I'm no expert in darkroom photography, but it seems a little odd that there is a type of light that doesn't affect film or developing paper etc. The only way that I could think to explain it is:   The low frequency red photons don't have enough energy to raise electron states in the film/paper, or Magic   either way, I'm curious to know how this handy tool is, as per title, safe. How do I install the latest stable version of Firefox? I want to install the latest Firefox on my Ubuntu (64bit) box.  What is the best way to do this? Is there a specific update site or should I download the binaries manually? If doing manually, in which directory should I put the files? In my home directory, or is there a better place? Redshift and conformal time What is the relationship between redshift and conformal time ?   For example in a paper i found:   taking $z_e = 3234 $ at the time of radiaton-matter equality yields the conformal time $\frac{\eta_e}{\eta_0} = 0.007$ and taking $z_E=0.39$ at matter-$\Lambda$ equality yields $\frac{\eta_E}{\eta_0}=0.894$ and setting redshift at decoupling $z_d=1089$ yields $\frac{\eta_d}{\eta_0} = 0.0195$  where $\eta_0$ is the present decoupling time.  Further some cosmological parameters are given as :  $\Omega_r = 8.36 \times 10^{-5}, \Omega_m = \Omega_b + \Omega_{dm} = 0.044 +0.226, \Omega_\Lambda = 0.73,  H_0=0.72$  Now how can i calculate all those $\eta_e, \eta_E, \eta_d, \eta_0$ from given redshift values and/or above parameters ? I searched whole of my text books trying to find an explicit relation for conformal time $\eta$ but all i got was $ \mathrm{d}t=a(t)\mathrm{d}\eta$. Any help would be very helpful. I accidentally issued some commands I thought were safe in the terminal, and I ended up with no System Settings and lots of other missing functionality, but the OS still boots normally. I've decided I want to install Lubuntu instead of fixing Ubuntu for a fresh start and since my laptop is running on a 1GHz dual core AMD CPU.  I created a bootable USB as I usually do and placed Lubuntu 17.10 amd64 using Rufus 2.14.1086. I have GRUB that was installed with Ubuntu upon first install I still have Win8.1 which I still want to keep.  PS: I also tried creating a startup disk from Ubuntu  The question is: How can I boot from USB with GRUB2 so I can overwrite Ubuntu? Joining lots of small polygons to form larger polygon using PostGIS? Given the following code (that doesn't work):  while True:     #snip: print out current state     while True:         ok = get_input("Is this ok? (y/n)")         if ok.lower() == "y": break 2 #this doesn't work :(         if ok.lower() == "n": break     #do more processing with menus and stuff   Is there a way to make this work? Or do I have do one check to break out of the input loop, then another, more limited, check in the outside loop to break out all together if the user is satisfied? Optimal estimation of a single parameter given data at different scales Let $A,B,C,D$ be independent normal random variables distributed according to $\mathcal{N}(0,\sigma^2)$ and $E = A+B+C+D$.  The goal is to provide an optimal estimate of $\sigma^2$ given samples of $A,B,E$ but not $C,D$.  In this case optimal refers to minimising the root-mean square deviation of the estimate $\hat{\sigma}^2$:  $$RMSD(\hat{\sigma}^2) = \sqrt{\mathbb{E}\left[\left(\hat{\sigma}^2-\sigma^2\right)^2\right]}$$  I can think of a simple approach to estimate $\sigma^2$ given samples of $A,B$ which is to simply compute the sample variance. Also I know that the variance of $E$ is $4\sigma^2$ so I could compute the sample variance of $E$ and divide it by 4 to get an estimate of $\sigma^2$. However it should be possible to combine the information from both $E$ and $A,B$ to improve estimation $\sigma^2$. Could you outline the approach to use both sets of information? Characterizing non-constant entire functions with modulus $1$ on the unit circle Desktop link to Eclipse I was tring to install eclipse on ubuntu. What I did: I unzipped the tar archive of eclipse. I tried to start eclipse from the command line - like this - ./eclipse. It works. But then I tried to create a desktop icon with: gnome-desktop-item-edit ~/Desktop --create-new. In a new icon I showed the path to the eclipse executable which I could launch from the command line. But then eclipse does not start stating:  A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: /home/artem/eclipse/jre/bin/java java in your current PATH   The same message appears if I try to launch eclipse by double-clicking its original launcher. So it starts from the terminal but not from the desktop (it does not start when double-clicked) And also I get a message in the terminal (at some stage it appeared):  (gnome-desktop-item-edit:8998): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.DSV8LW': No such file or directory   I am using Ubuntu 12.04 x32 and eclipse Juno.  PS. PATH variable points at jdk/bin and JAVA_HOME - to the jdk folder PSS. I actually set the environment variables through .bashrc file(JAVA_HOME and PATH) What are "electron holes" in semiconductors? I'm tutoring senior high school students. So far I've explained them the concepts of atomic structure (Bohr's model &amp; Quantum mechanical model) very clearly. Now the next topic to be taught is semiconductors.  I myself am not conviced with the concept of electron holes. If there is no electron then there is no electron. How can it be a hole. We define a hole when there is some thing every where except at a place. But inside an atom how can we define a HOLE.  Kindly explain it with the help of Bohr's model. What was the need of introducing such abstract concept in semi conductors? I've asked this question towards a developer for Minecraft and I thought I'd ask here too since they might not see the question.  How do I select all but two types of entities in Minecraft?  For example, something like: /say @e[type=![Player,Item],r=50] (to clarify I also tried type=Item,Player, type=Item,type=Player etc)  Should select any entity that does not match players or items, so things like Creepers, Ghasts, XPOrbs, PrimedTNT and so on within a radius of 50 blocks and print them to the chat.  Instead it ignores one of the flags, and works with the other instead. Under what conditions does loot despawn? I'm working on a fairly big document that has a lot of graphs of functions- so far it has around 200, by the end it will have around 1500. I use pgfplots for each graphic, and the functions are pretty basic: exponential, rational, polynomial, and trigonometric.  Once I am happy with each graph, I don't necessarily need to see it every time I compile, and would like to minimize compilation time for future drafts. Naturally, the document is already chopped up into chapter files, but each chapter contains around 100 figures.  Having studied the pgfplots documentation, I haven't found a draft mode, but I'm interested in knowing if one could be created.    I'm envisaging something similar to the draft mode of the graphicx package, in which graphics are not included, and blank boxes are put in their place.  Some things I've considered:   the  documentclass; but with about 1500 figures, wouldn't this mean over-modulization?  tikzexternalize, but this still requires an initial 'monster' compilation to get the images externalized before the draft option could be invoked   Here's a MWE to play with  \documentclass{article} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}     \begin{axis}         \addplot {x^2};     \end{axis} \end{tikzpicture}  \end{document} OneDrive for Windows 10 - Remove logged out account How do you end with a single quote followed by a double quote? Finding package name of installed software Since I have not been able to open Dash Home in 12.04.4 see , I am hoping for a work-around. Is there another convenient way to open apps/programs without having to search through folders? Is this question clear enough? For example, I just installed Kile (publishing program) from the Software Center, but I can't find a link/tile/icon/shortcut to open it. Thanks, to whomever can help.