How to implement One-in-a-Million chance?
How do I generate random integers within a specific range in Java?
Why is the de-facto standard sigmoid function, $\frac{1}{1+e^{-x}}$, so popular in (non-deep) neural-networks and logistic regression?   Why don't we use many of the other derivable functions, with faster computation time or slower decay (so vanishing gradient occurs less). Few examples are . One of my favorites with slow decay and fast calculation is $\frac{x}{1+|x|}$.  EDIT  The question is different to  as I'm only interested in the 'why' and only for the sigmoid. Rank correlation statistics comparison I am trying to understand the relative behavior of the following rank correlation statistics:   Spearman coefficient Kendall Tau / Concordance percentage Normalized Gini coefficient (area under curve of percentage captured versus percentage observations) Normalized Area under ROC curve (for binary classifiers)   I don't believe any of these are functionally related to the others.  The accepted answer  references  and Spearman and Kendall are highly correlated (as one would expect).  Are there good intuitions behind/discussions of relative (across datasets) or absolute (for a given dataset) differences for (any pair of) these measures? What is approximate error of Pythagorean Theorem vs. Haversine Formula in measuring distances on sphere at various scales? Many people when first trying to calculate distances between two longitude / latitude pairs  ask if Pythagorean theorem works as an appropriate distance function.  Most often people answer "no, the Pythagorean theorem only works on a 2D Euclidean plane." Rarely, however, do people mention the effect of scale and location on the sphere on how inaccurate the Pythagorean theorem is.  The basic idea being at very small scales, the surface of a sphere looks very much like a plane. At very large scales, it distances along the surface are more curved and therefore the difference between the incorrect Pythagorean Theorem and the correct Haversine Formula is greater.  Does anyone know a formula or rule of thumb that tells you the difference between the two distance measures based on the scale of the distance you are trying to measure?   I think having this explicitly would help in:   explaining why the Pythagorean Theorem isn't perfect; and in letting people who are looking for more "rough" distances know when Pythagoras actually will serve their purposes. Picklist dependent on 2 controlling picklist Is there a way to output for Print. I want to save in a higher DPI than the default 72dpi say 300dpi that's a good quality for printed pieces. I tried downloading an add-on but don't know if I am installing it correctly it isn't showing up but the bar in python is green. I'm using the 2.69 version of Blender. If no such feature exists what size have any of you found best for print quality. Thank you How to insert text into a root-owned file using sudo? Considering an ideal case(neglecting drag of air, damping etc.), a pendulum follows SHM if the angular displacement is small (upto 10 degrees). But, for large angular displacement(more than 10 degree), it does not follow SHM. Why? What force cause the pendulum not to follow SHM? Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me. "Calling dibs" - what does it imply? The term "to have dibs on something" or "to call dibs on something" plays a recurring role in American film and television (e.g. ), so it gets exported a lot.   describes "dibs" as     [...] a common, "informal" convention to reserve or declare full or partial ownership of a community resource, such as a chair [...]   From the usages in the media I have seen, this convention also seems to contain some moral concept which is not described in dictionaries. For me, it looks like by calling dibs (or ), the caller actually receives the (implicit, moral) right to that resource, and this typically goes undisputed by their rivals.  Can you confirm the existence of this concept? Is this something that varies between groups of people (or maybe between regions), or is there a concensus on how to respond to this? Is it possible to create .stp 3D model from Graphics3D ？ Packed images used as background don't show up when reopening the file I have seen a single (1) mention of View port background images disappearing when the .blend file is saved and reopened.  However...the answers are not relative to what I am experiencing.  I go through the trouble of setting up four images (top, side, front, back) and then pack these images using External Data &gt; Pack all into .blend and then I save the .blend.  I save the file, open it back up, and the background images are all gone. Open up properties panel, look to see background images check box is unchecked, click add image, and choosing the open drop-down arrow...the data paths still show the list of images (packed into a specific folder textures).  They are still there, the data set is intact.  Why is It that I have to set this up each and every time I open the file.  It seems like earlier versions &lt;2.76B saved the images and saved the file with the background images check box checked without the need to set this up each time the file is reopened.  This is getting very frustrating due to the fact that a few of the background images mus be set up using Blender's rotate, scale and move tools to align the background image up with the model I have already fabricated.  Thanks! How do I delete/remove a shell function? I have done this:  $ z() { echo 'hello world'; }   How do I get rid of it? How do you make a deep copy of an object? Adding 2 favorite tags at one time combines tag after page refresh I was adding some tags to my favorite tags today and noticed tags being joined together when the page is refreshed.  Steps to reproduce:   Click edit on Favorite Tags Create the first tag and click add [I added django in this case] Add a second tag and click add [I added python in this case] Refresh page  Favorite tags now show previous tags + djangopython   In the edit section, it appears as if the tags are added separately, but when I refresh the page they get joined  OS: MacOSX-10.8  Browser: Chrome, Firefox Cam I have two GFCIs connected to one double gang box in my laundry room and if so can I do a single line connection so that they both can work independently?  I have a 12/2 going from the panel through conduit (copper wire) to the double gang box. I want to have each GFCI to run independently without using the load. Why, in case one shuts off the other isn't affected. the double gang box is standard. the device is a Leviton 20 amps. I was told that you can run 12/2 from the panel to the first GFCI black and white. Then connect the second GFCI using a jumper and attaching it to he second GFCI. Is this acceptable by code. we use a washer,dryer in the laundry and the garage heavy machinery. so why should this be a problem running two independent? I'm trying to test a page that has an input but really its a drop down list. The user enters text and then a dropdown appears based on what the user inputted. They are groups that are in the database. If I look for these elements before typing anything they dont exist but once I start typing they do exist.  The problem is I cant just type the whole name and then press enter or return because an option has to be selected from the list.  I can press arrow down to get the focus on the item from the list but then if I say enter it doesnt select, it sends that enter to the original element and nothing gets selected.  I can find the select element:  var ddList = driver.FindElement(By.CssSelector(".ui-autocomplete-input")); ddList.SendKeys("Admins");   This is the first time the list appears in the html.  It looks like this:  &lt;li class="ui-menu-item" role="presentation"&gt; Book series about aliens who put "caps" on people to control them I remember reading a series when I was around 7th or 8th grade about aliens who had taken over Earth by putting metal caps on people when they were "entering adulthood" to control them (not direct control, but it would keep them from rebelling). There was a faction of people who able to escape and had fake caps and would save teens who were about to be capped.  The main protagonist was a teen boy who was a boxer (or training to be a boxer or something). The aliens would hold tournaments for the humans and whoever won would be "worthy" to serve as personal slaves to the aliens.     The protagonist won and was able to get inside to try and learn more about the aliens from the inside. So I am asked to find all the isomorphisms between $G = (\mathbb Z_4,+)$ and $H = (U_5,*)$.  I solved it as follows: we will have two isomorphism corresponding to the two generators of $U_5$.  The first isomorphism : $\phi([x]_4)$ = $[2]_5^x$   The second isomorphism is: $\phi([x]_4)$ = $[3]_5^x$   Notice that [2] and [3] are the only generators of $U_5$ one can check it systematically or use the fact that $a^m$ is a generator iff gcd(m,4) = 1.  So I just wanted a verification of my work I showed that they are bijective, well defined, and is a homomorphism. Why are Bitmap-Fonts used automatically? I have the following LaTeX-document:  \documentclass[a4paper,11pt]{article} \usepackage[utf8x]{inputenc} \usepackage[ngerman]{babel}  \usepackage[T1]{fontenc}  \title{Sample} \author{Litb}  \begin{document}  \maketitle  \begin{abstract}  This is a report about my praxis phase at the company foo bar which I enjoyed. \end{abstract}  \end{document}   Much to my frustration, compiling with pdflatex creates a document with Bitmap-fonts. The reader's font-list shows that it uses Type3 fonts.  If I remove the fontenc loading, then I get a PDF using vector-fonts, but I heard that I should keep it, for having native German Umlauts working.  Does anyone know how I can get vector fonts with T1, and why it keeps using bitmap fonts if I have that package-load line in it? Living forever in D&D (via spells)? I was thinking of a way for a humanoid (PC or NPC) to live forever in a D&amp;D setting, but through rather "common" and reproducible means, such that they will be available to many. By this logic I exclude cases such as a god giving immortality (or some other intervention) or a unique item granting an endless lifespan etc.  To cover all bases I will note that miracle and wish cannot do this directly, nor can true resurrection (and its lesser brethren) "restore to life a creature who has died of old age".  I had came up with the following ruse:   Reach your deathbed with at least 2 HD (or levels). Have someone kill you so that the cause of death will not be "old age". Have a druid cast reincarnate on you into a young body. You "recall the majority of your former life". I assume your memories, personality/identity and experiences are preserved.   Rinse and repeat. It's not that difficult to recover the 1 HD lost through the course of almost a lifetime. The material components are worth 1,000 gp - might not be easy to get, but surely possible.  Furthermore, it is stated that "A wish or a miracle spell can restore a reincarnated character to his or her original form.". I assume the "original form" is the aged humanoid at his or her deathbed - not the direction we are looking for, unless it means that the humanoid restores his race only.  Is there a flaw in this plan? Is there another way of doing it?