Assuming I've a JSON object like this:  var myObj = {     'question1': {         'option1': 'foo',         'option2': 'bar',         'option3': 'baz'     },     'question2': {         ...     },     'question3': {         ...     } };   And since its children always has a number in its keys, I want to do a loop and concatenate the loop's index to the object keys, and get the values in the dot notation method...   So, I guess to get the values, I need to do some thing like this:  myObj.'question'+i   How can I do the concatenation right?
I'm pulling items out of the DOM with jQuery and want to set a property on an object using the id of the DOM element.   Example  const obj = {}  jQuery(itemsFromDom).each(function() {   const element = jQuery(this)   const name = element.attr('id')   const value = element.attr('value')    // Here is the problem   obj.name = value })   If itemsFromDom includes an element with an id of "myId", I want obj to have a property named "myId". The above gives me name.  How do I name a property of an object using a variable using JavaScript?
Give a combinatorial proof to show the following for all integers $n \geq 2$. $$2^{n-2} n (n -1) = \sum\limits_{k=2}^n k (k - 1) \binom{n}{k}.$$  I'm completely stumped. I just have no idea how to do this. What I've tried so far has been simplifying the right hand side slightly to $\sum\limits_{k=2}^n \binom{n}{k - 2}$, and then proving that this somehow is equal to some manipulation of the left hand side. I can't seem to find any breakthroughs that way though.  If anyone could help out or point me in the right direction that would be great.  EDIT: I've actually just realized my simplification of the right hand side is wrong. Now I'm even more stuck. Book series about time travel from future to distant past, psychic powers? How do I flatten this vector logo leaving only the visible black paths? Which gears combinations shouldn't be used? Is there any general rule or recommendation to avoid usage of certain gears combinations (for 2xN and 3xN gears systems)? Do they differ for mtb and road bikes?  I know that it's recommended not to use biggest front chainring with big chainrings on cassette (and opposite) because parts will wear faster and I will loose a bit of pedaling efficiency, but I'm not sure, if I should avoid 2 or 3, or even more biggest (smallest in opposite case) chainrings on cassette. How to dynamically change a web page's title? I have a webpage that implements a set of tabs each showing different content. The tab clicks do not refresh the page but hide/unhide contents at the client side.  Now there is a requirement to change the page title according to the tab selected on the page ( for SEO reasons ). Is this possible? Can someone suggest a solution to dynamically alter the page title via javascript without reloading the page? Sending `time` command into text file I want to get the result of time command into a text file but it's not working it only put blank space in the text file.  I already tried this commands,  A-  $ x=`time` $ echo $x &gt; log.txt $ cat log.txt  $   B-   $ time &gt; log.txt  real    0m0.000s user    0m0.000s sys     0m0.000s $ cat log.txt  $   C-  $ time &gt; log.txt 2&gt;&amp;1  real    0m0.000s user    0m0.000s sys     0m0.000s  $ cat log.txt  $    What I really want is this.   $ time &gt; log.txt $ cat log.txt  real    0m0.000s user    0m0.000s sys     0m0.000s Play audio with Python Subsetting a 2D numpy array After updating to 2.81, my previous works (done in 2.80) doesn't show colors From the man page on git-merge, there are a number of merge strategies you can use.     resolve -  This can only resolve two heads (i.e. the current branch and another branch you pulled from) using 3-way merge algorithm. It tries to carefully detect criss-cross merge ambiguities and is considered generally safe and fast. recursive -  This can only resolve two heads using 3-way merge algorithm. When there are more than one common ancestors that can be used for 3-way merge, it creates a merged tree of the common ancestors and uses that as the reference tree for the 3-way merge. This has been reported to result in fewer merge conflicts without causing mis-merges by tests done on actual merge commits taken from Linux 2.6 kernel development history. Additionally this can detect and handle merges involving renames. This is the default merge strategy when pulling or merging one branch. octopus -  This resolves more than two-head case, but refuses to do complex merge that needs manual resolution. It is primarily meant to be used for bundling topic branch heads together. This is the default merge strategy when pulling or merging more than one branches. ours -  This resolves any number of heads, but the result of the merge is always the current branch head. It is meant to be used to supersede old development history of side branches. subtree -  This is a modified recursive strategy. When merging trees A and B, if B corresponds to a subtree of A, B is first adjusted to match the tree structure of A, instead of reading the trees at the same level. This adjustment is also done to the common ancestor tree.   When should I specify something different than the default?  What scenarios are each best for? I'm currently using an entry-level DSLR with 18-55mm lens and having great trouble trying to creating a blurred background effect in my photos. Now matter what aperture or shutter speed I choose, I'm not able to get it.  There's a general question about , but what specific things can I do to get this effect with an entry-level lens? How do you create grass? Unable to acheive desired effect with ID mask I'm trying to make the render have an effect where the stars (which are exploded fragments) have a glowing glare-like effect and the other objects (i.e. film reel and cubes) are their natural colors.  However, despite having made the star objects all a pass index of 1 and the rest 0 by default, everything seems to render a green glowing effect that's supposed to be only for the objects with a pass index of 1.  To illustrate:  This is the render of the image naturally (I rendered at very low quality but it's just for demonstration purposes):    And this is with the composite nodes:    So in essence I want the objects in the the first render I showed to keep those colors, but the stars to have the colors of the green glowing effect.  As you can see from the 2nd picture everything has the green effect.  My node setup is pretty big so I will provide a link to download the  so you can see the nodes more clearly. How to replace the first occurence in an expression instead of replacing all? I would like to set my monitor's scale under 100%, but Win10 only lets me set it to 100% or higher. Why won't Windows let me do that? Is there any workaround to do that? I am aware of the fact that scaling below 100% will result in merged pixels. Possible to draw an Item in a Grid with only 3 sides of a Frame? Unknown apps/processes with number only are shown in data usage A mysterious app named &quot;10102&quot; shows up in my data usage. It bears only the standard Android app icon (the Bugdroid logo with a cube on its torso). From what the graph tells me, it has used 36 megabytes of data in the background and zero on the foreground. I think I haven't uninstalled anything for months. Is it malware? I haven't sideloaded anything and only authorized my laptop as a USB debugger. If it's malware, how do I remove it? I have no idea how to find its package name and 10102 isn't in the list of downloaded apps in settings. I'm running stock &amp; never-been-rooted Android 4.4.4 on Nexus 4. Where does matter go after reaching singularity in uncharged black holes? I am a layman in physics and just read about black holes on the internet. I read that matter encounters geodesic incompleteness in the singularity in an uncharged black hole.  I heard an analogy of geodesic incompleteness as a straight line on a paper reach a hole on the paper, so it cannot continue. But in this analogy, isn't the straight line possible to continue into 3D (continue down the paper)? So, if matter reaches the singularity, is it possible too (to reach another dimension)?   I also heard that the matter is annihilated when reaching the singularity, does it mean it disappear from this world, and violates conservation of energy? I'm trying to have a surface with soft body hold obects that are falling on it with rigid body physics, but for some reason, no what matter what mass I give it, the objects just fall trough the softbody enabled surface.  Is there a toggle or a value I need to change to make them stay there? What is charge? I know this isn't the right place for asking this question, but in other places the answers are so awfull.. I'm studying eletricity, so, I start seeing things like "charges", "electrons has negative charges",etc. But I didn't quite understand what charge is. I search a little bit on the internet and found it related to electromagnetic fields, then I thought "negative and positive may be associeted with the behaviour of the particle in the field, great!", but the articles about e.m. fields already presuppose "negative" and "positive" charges. In other places, I see answers relating charges to the amount of electrons/protons in an atom, but if that's right, the "negative" electron is an atom without any protons? What about the neutron? So, my questions are (1) What are charges; and (2) How a particle can "be" electrically charged. What does that really mean? Thanks for your time.