Javascript associative array not working
How do I create a dynamic key to be added to a JavaScript object variable
I am trying to evaluate the following:  $\displaystyle \int_{0}^{\infty} \frac{1}{1+x^a}dx$, where $a&gt;1$ and $a \in \mathbb{R}$  Any help will be much appreciated. There was this cool tv show I used to watch as a kid (in the 1990's I think). It was about a world where water was extremely rare and people used to fight over it, however there was this person who had this large 3D polyhedron shaped device (big enough to fit a few people in it) that could synthesise water.  Now, this device was either a time travel device or could just make water (not sure but I remember some time travel aspect as they could either remember the world the way it was where water was plentiful or could travel back to it on occasion).  Anyway, would love to know if this rings any bells?????  It was on in the UK (but maybe the US too, not sure). As a disclaimer, I must admit this may benefit me (I haven't checked), but probably not as significantly as most others. This issue is also something that has prevented me from answering questions by users with 1 rep in the past, especially if they are poorly fashioned. The Problem New users with a programming question find SO from various methods, such as google. They ask a question with haste, hoping for a quick answer -- which they usually receive. Many of these users have no interest in Stack Overflow itself, but are simply interested in getting the solution they require. As a result of this, they'll check the site regularly for the first day or two until a sufficient answer has been posted. Once they get what they need, they bail; without the required rep or understanding that they should up-vote and select a response as the answer. The Result A great many questions on SO are abandoned by users with no intention of ever coming back. The answer they require has been provided, but for one or more reasons they have neglected their duty of contributing back by way of awarding reputation. The Reach (Since Jeff loves Datum) Some queries on the data dump examine the reach of this 'problem'. The query I used is based on extensions of the following base query; SELECT p1.Id, p1.Score, p1.OwnerUserId, p2.OwnerUserId, p2.Score FROM posts p1  INNER JOIN posts p2 ON (p1.Id=p2.ParentId) LEFT JOIN users ON (p1.OwnerUserId=users.Id) WHERE p2.Score &gt;= 2  AND p2.Score = ( SELECT MAX(p3.Score) FROM posts p3 WHERE p3.ParentId=p1.Id ) AND users.Reputation &lt; 15 AND p1.PostTypeId = 1 AND p1.AcceptedAnswerId = 0  Result: 3,288 Questions by users with under 15 rep which have answers with 2+ up votes that have no accepted answer. Adding: AND (users.LastAccessDate-p1.LastActivityDate) &lt; 604800 // 1 week AND p1.CreationDate &lt; 1249084800 // 1249084800 is 1 week before latest dump data  to the where clause further reveals that 877 questions that have answers with 2+ up votes have no accepted answer, and the owner of the question has not returned since the week the question was asked. Modifying there where clause, and removing the left join: AND p1.OwnerUserId = 0    Reveals a staggering 3,675 questions with answers of 2+ votes by deleted users.  These are questions that were probably answered but the users who did the work can never be recognized. Building off the previous and using an even more restrictive WHERE clause WHERE p2.Score &gt;=5  Still 1,178 posts that can never have an accepted answer. How many posts are there with over 5 up votes that don't provide the correct answer? Modifying the where clause for Reputation to AND users.Reputation = 1  Still reveals 388 questions by users with 1 rep have been abandoned. Solution Similar to how bounty questions work, if a user has abandons the site (not active since x time after the question was asked) with a question that has answers with 2+ up votes, force the answer with the most up votes to be the selected answer. This will reduce the amount of questions that are unanswered, and also give users more of an incentive to answer questions by new users without extra hesitation.  Update Added more statistics for deleted users.  Please feel free to add/remove rules to make this a truly practical feature. How do I generate a smooth random horizontal 2D tunnel? I'd like to create a smoother version of the navigable and quite natural-looking random tunnel found in .  It should ideally be...   infinite, so more can be generated as the player progresses; parametrised, allowing control of its thickness over time; made of smooth curves, not rectangles as in the above game; precomputable, as knowing its bounds in advance allows collision detection for e.g. positioning powerups inside the tunnel.   I'm looking for a generic method I could implement myself. Further parameters and optimizations are welcome.  Asking here was suggested . I think this fits in both places, as it's as much about the algorithm as about gamedev. How to count the number of occurrences of each item in an array? What do the words 'RELATED' and 'ESTABLISHED' individually signify in RELATED,ESTABLISHED state in iptables? I'm looking for the antonym of -cide (as in suicide, pesticide, etc.). Essentially the ending to words that would mean "to create or embrace". Exercise $1.8$ of chapter one in Hartshorne. Java Generics (Wildcards) I have a couple of questions about generic wildcards in Java:   What is the difference between List&lt;? extends T&gt; and List&lt;? super T&gt;? What is a bounded wildcard and what is an unbounded wildcard? What does the dot mean On my reelbox (running Ubuntu) I have found a file in /etc/init that contains the following  # frontpanel-pre - check for frontpanel CAPs and adjust time #  description     "check frontpanel caps"  #start on starting mountall #start on tty-device-added DEVNAME=/dev/ttyS0  task  script         (         /sbin/dev_frontpanel.sh         /sbin/reelfpctl -capability         ) &gt; /dev/.frontpanel.caps         initctl emit --no-wait frontpanel-linked end script   I wonder if the dot in /dev/.frontpanel has some special meaning in linux  I thought the output of the commands in the brackets will be written to a file called ".frontpanel.caps" in /dev/ but there is no such file. In /dev/ there is a frontpanel which is a link to /dev/ttyS0  Could it be, that e.g. echo something &gt; /dev/.frontpanel.caps actually sends data (something in this case) to /dev/frontpanel ?  What does .caps do then? Identifying Unused Stored Procedures This next year, I am helping an effort to clean several SQL Server environments.    We have about 10,000 stored procedures and estimate that only about 1000 of them are used on a regular basis, and another 200 or so are used on a rare occasion, meaning we have a lot of work to do.    Since we have multiple departments and teams that can access these databases and procedures, we are not always the ones calling the procedures, meaning that we must determine what procedures are being called.  On top of that, we want to determine this over a few months, not in a few days (which eliminates some possibilities).  One approach to this is to use the SQL Server Profiler and track what procedures are being called and compare them to the list of what procedures we have, while marking whether the procedures are used or not.  From then, we could move the procedures to a different schema in case a department comes screaming.  Is using the Profiler the most effective approach here?  And/Or have any of you done something similar and found another way/better way to do this? How does one know when to use a gerund or an infinitive? Just noticed the "meta user" link under the picture and reputation on the Stack Exchange user's page. It doesn't seem to work for all users. Error is "Page Not Found".   Not working:  /  Working:  /    My guess is this is because they've never logged into the meta site. Continuity of a convex function I'm trying to solve the following problem:  Let $f:K\rightarrow \mathbb{R} $, $f$ convex and $K \subseteq \mathbb{R}^n$ convex. Then $f$ is continuous on $K$.   I have proved the only case $n=1$, but for an arbitrary $n$?? Is there something similar to sprintf() in C#?  I would for instance like to convert an integer to a 2-byte byte-array.  Something like:  int number = 17; byte[] s = sprintf("%2c", number); Convert a line drawing from raster to vector I have a raster image, basically a scanned drawing of the outlines (and some detail) of various objects, and I wish to convert these lines to vectors, using either Illustrator or Inkscape.  My present solution is to have the raster image as a background layer, and in a new layer above it I use the pen to follow the lines as close as possible.  Later I tweak these lines to fit the raster image better. That has worked fine for simple drawings. However for some of my extremely complex drawings, this is very tedious to do.  Is there any tool or filter of some sort that is capable of recognizing the lines in line drawings and creating vector paths from them? Possible to lock focal length on zoom lens? (SELP1650) (This could turn out to be a bone, practical, product-specific query, but this is the internet so the worst that could happen is a 0 rather than a 1.)  Anyhoo: is it possible to lock a zoomable lens to a certain focal length? Is this a typical feature for a lens?  I want to keep my SELP1650 at X mm to help with some creative experiments, but the thing shifts whenever I move my hand against the lens ring. Does SELP1650 (or the body, Sony A6000) specifically have this option?  Or... is there a reasonably non-goofy DIY trick I could pull off, without bricking the thing? (anticipating a sarky 'duct tape' suggestion) Journal vs conference publications when looking for a job in in computer science I'm currently a post doc in theoretical computer science and I have a double digit number of conference publications, about half of which are at so called "tier 1" conferences (SODA,STOC,...). Unfortunately I only have 1 journal publication so far, mainly due to coauthors dragging their feet.   Will the lack of journal publications have a great impact when applying for a faculty job in cs-theory at some point, and is it advisable to try to up this number before applying? Or is this fully compensated by having sufficiently many conference papers? I have an iPhone 5 running iOS 9.1 and a Macbook Pro running Yosemite.  Both devices are set up to sync photos to and from iCloud.  When I take a photo on the iPhone (for further processing on the Macbook), it takes an inordinate amount of time until the photo shows up in the Macbook's photos library - sometimes up to 10-20 minutes. Sometimes it seems to work faster if I quit the Photos app on both devices, and start it again.  I often end up sending myself photos through E-Mail because it's quicker. That seems ridiculous!  Is there a way to force a sync on the iPhone, or to speed up the process some other way? I recently reviewed a paper (general applied mathematics context). During the review, I realized that the fairly general ideas introduced in the paper can potentially be applied to a specific problem in a similar context. The authors did not mention this application in their paper, so I suggested to add a short comment about it in my review.  I later started thinking about the application in more detail and tried out some things, which actually seem to work quite well for this application. Now, the paper is still in the review process and might take some time until it gets published. What is the proper way how to proceed here in order to use the ideas and results which I in my exclusive position as a reviewer saw? How can I refer to the paper that is still under review? How can I best discuss the ideas with my co-workers (and potential co-authors) without disclosing that I reviewed the paper?  The paper under review is not available online on any preprint servers such as arXiv etc