What's the average performance of long term stock investors in terms of % profit per year?  I want to know how I am doing compared to other people.  Is there such a statistic?
I've heard the number 7% thrown around a bunch of times, but I am struggling to find reputable data to back it up.   All I found was a quote from Warren Buffet that I couldn't find an original source for and data assembled by individuals on their personal websites. Is there something from an organization such as Market Watch making a statement about this?  I'm hoping to specifically find what the 10 or 20 year return is for investing in the S&amp;P 500 index fund or another diversified portfolio option.
.NET - How can you split a "caps" delimited string into an array? How do I go from this string: "ThisIsMyCapsDelimitedString"  ...to this string: "This Is My Caps Delimited String"  Fewest lines of code in VB.net is preferred but C# is also welcome.  Cheers! The "Select your next badge" dialog box is not displaying correctly. It looks like this:    Freehand circles, as requested:    It seems to be an issue with box-sizing, because when it's content-box, it looks fine. I think the width and height rules for .popup-badges .all-badge-progress .badge-progress should be increased a little, for example:  .popup-badges .all-badge-progress .badge-progress {   width: 214px;   height: 96px; }   Tested on the latest Chrome and Firefox on Linux Mint. Map not loading when using getLegend and showing error for getView() I was able to run my application on using Legend earlier but now I want to update my Legend when scrolling on the map. So I tried to used this code  . And I got the gist of how he is able to do that but when I am trying the same I keeping getting the error var graphicUrl = wmsSource.getLegendUrl(currentResolution);  I think this is mainly due to the wmsSource not declare. But I tried to initialize  seems wmsSource in TileWMS but does not seems to work. var getExtent = function () {     return map.getView().calculateExtent(); } var getProjectionCode = function () {     return map.getView().getProjection().getCode(); }  var updateLegend = function() {     var currentResolution = map.getView().getResolution();     var graphicUrl = wmsSource.getLegendUrl(currentResolution);        const crs = `&amp;CRS=${getProjectionCode()}`;     const bbox = `&amp;BBOX=${getExtent().join(',')}`;     const height = getHeight(getExtent());     const width = getWidth(getExtent());     const heightAndWidth = `&amp;srcwidth=${height}&amp;srcheight=${width}` ;     const legenOptions = &quot;&amp;legend_options=countMatched:true;fontAntiAliasing:true;hideEmptyRules:true;forceLabels:on&quot; ;        var img = document.getElementById('legend');     img.src = `${graphicUrl}${crs}${bbox}${heightAndWidth}${legenOptions}`; }; //Updated Legend End   //View var myview = new ol.View({     center : [8717490.201868,2788422.791843],     zoom : 4 })  var firstSel = document.getElementById(&quot;City&quot;); var secSel = document.getElementById(&quot;Sector&quot;);  //var LayerArray = [baseLayer, firstLayer]  //Map var map = new ol.Map({       target : 'mymap',       view: myview,       layers: [         new ol.layer.Tile({             source : new ol.source.OSM({                 attributions: 'Surveyor Allpication'             })         }),         new ol.layer.Tile({             source : new ol.source.TileWMS({                url: 'http://localhost:8089/geoserver/India/wms',                params: {'LAYERS': 'India:India', 'TILED': true,'TRANSPARENT':true},                ratio: 1,                serverType: 'geoserver',                transition: 0,             })         })       ] }) updateLegend();   This here is my JS &lt;div class=&quot;innerMap&quot;&gt;     &lt;div class=&quot;map&quot; id=&quot;mymap&quot;&gt;&lt;/div&gt;         Legend:     &lt;div&gt;&lt;img id=&quot;legend&quot;/&gt;&lt;/div&gt;     &lt;!--    &lt;div&gt;&lt;img src=&quot;http://localhost:8089/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=20&amp;HEIGHT=20&amp;LAYER=India%3AIndia&amp;RULE=Agra&quot; /&gt;%Name&lt;/div&gt; --&gt; &lt;!--    &lt;div&gt;&lt;img src=&quot;http://localhost:8089/geoserver/India/wms?SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetLegendGraphic&amp;FORMAT=image/png&amp;WIDTH=20&amp;HEIGHT=20&amp;LAYER=India%3AIndia&amp;SRS=EPSG%3A4326&amp;STYLES=&amp;SRCWIDTH=742&amp;SRCHEIGHT=768&amp;BBOX=75.4541015625%2C14.21630859375%2C91.7578125%2C31.09130859375&amp;LEGEND_OPTIONS=countMatched:true;fontAntiAliasing:true;hideEmptyRules:true&quot; /&gt; &lt;/div&gt;  --&gt;     &lt;/div&gt;  This is my HTML. How do I make this work? OS X computer name not matching what shows on terminal My computer name in System Preferences &gt; Sharing is set to &quot;archos&quot;, but is showing as &quot;iphone&quot; on Terminal. It just started doing this after I loaded Xcode for doing iPhone development: Last login: Mon Nov  7 14:46:55 on ttys001 iphone:~ travis$   Any ideas what could be causing this? Could normal users have an easier way to flag for migration? My textbook explains the proof, which I don't understand:  "Consider two bases $v_1...v_p$ and $w_1...w_q$ of V. Since the vectors $v$ are linearly independent and the vectors $w$ span V..."  How exactly does $w$ span V?   The book then says the same for vectors $v$, that $v$ spans V and hence $p=q$, but I don't really understand how you can assume that given two sets of vectors that are basis, one set must span V. Chirp Transform and Convolution I was reading about the discrete fourier transform from the CLR algorithms book and I came upon an exercise whose hint confuses me. The exercise reads as follows:  The chirp transform of a vector $a=(a_0,a_1,\ldots,a_n)$ is a vector $y=(y_0,y_1,\ldots,y_n)$, where $y_k=\sum_{j=0}^{n-1}a_j (z^{k})^j$ and $z$ is any complex number. The DFT is therefore a special case of the chirp transform, obtained by taking $z=\omega_n$. Prove that the chirp transform can be evaluated in time $O(n\lg n)$ for any complex number $z$. (Hint: use the equation $$y_k = z^{k^2/2}\sum_{j=0}^{n-1}(a_j z^{j^2/2})(z^{-(k-j)^2/2})$$ to view the chirp transform as a convolution.  My question is about what is a convolution. I am familiar with taking two vectors $a=(a_0,a_1,\ldots,a_n)$ and $b=(b_0,b_1,\ldots,b_n)$ and forming the convolution $c=(c_0,c_1,\ldots,c_n)$ where $c_k = \sum_{j=0}^k a_j b_{k-j}$. Here the index of $j$ runs from $0$ to $k$ unlike in the hint given above where the index runs from $0$ to $n-1$. In what sense is the hint above a convolution? Parameter evaluation order before a function calling in C Can it be assumed a evaluation order of the function parameters when calling it in C ? According to the following program, it seems that there is not a particular order when I executed it.   #include &lt;stdio.h&gt;  int main() {    int a[] = {1, 2, 3};    int * pa;      pa = &amp;a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa), *(pa++),*(++pa));    /* Result: a[0] = 3  a[1] = 2    a[2] = 2 */     pa = &amp;a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(pa),*(++pa));    /* Result: a[0] = 2  a[1] = 2     a[2] = 2 */     pa = &amp;a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(++pa), *(pa));    /* a[0] = 2  a[1] = 2 a[2] = 1 */  } How to get old Mapping and Voronoi nodes into Blender 2.82? I noticed that some nodes changed significantly with Blender 2.81 and 2.82. Now I can't follow older tutorials, because some have different options than me.   Voronoi Node is totally different Mapping Node is missing it's maximum / minimum clipping controls   Q: How to get these older nodes back into Blender 2.82? What is hard reset and what is factory reset? It is mentioned at  that one should do Factory reset or hard reset. I'm a bit confused about what is hard reset?  Factory reset I suppose is using the option in settings to reset phone to the factory state i.e. when it was unboxed. What is the advantage to crushed garlic over minced garlic beyond texture? I use a lot of garlic in my cooking, especially minced garlic.  But lately I've been doing some more recipes with crushed garlic and while I love the texture of cooked garlic, I can't see how it could be better than minced garlic for the overall taste.  Is there an advantage to crushed garlic over minced garlic, beyond texture? Take into account all of the reputations from all stackexchange sites Is it possible to take an image from the clipboard and output it to a file (using X)?  I can do this with text easily:  $ xclip -selection c -o &gt; file.text   But when I try the above with an image nothing is written.    The reason I want to do this is I don't have an image editor installed, and it got me thinking whether I could do this without installing one. I've checked  for acute:  an acute illness is one that has quickly become severe and dangerous Compare:CHRONIC  And for chronic:  lasting for a long time Compare:ACUTE  Can a disease be both &quot;acute&quot; and &quot;chronic&quot; simultaneously? For example it could be the case where a certain illness quickly becomes serious and have long term consequences Are there any &quot;obtuse illnesses&quot; ? Prove: $|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$ $$|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$$   I have tried: $$|a\sin x+b \cos x|\leq |a+b|\leq \sqrt{a^2+b^2}$$  enough to prove: $$|a+b|\leq \sqrt{a^2+b^2}$$  But I can find how to continue from here Add air resistance to projectile motion I am given an initial x and y position and initial velocity and I was asked to graph the trajectory in 1 second intervals.  This is what I have so far:  If $x_0 = 1, v_{0x} = 70, y_0 = 0, v_{0y} = 80, a_x = 0, a_y = -9.8$, and time will be 0,1,2,3... and so on.  Using these equations on every second you can find the plot will be a bell shaped with the highest point being ~ 325 m at about 600 seconds:   $$ x = x0 + (v_{0x})t + 1/2((a_x)t^2) $$ $$ y = y0 + (v_{0y})t + 1/2((a_y)t^2) $$  Usually in physics, we are taught in perfect condition with no air resistance. But what if there was air resistance? How would it affect this problem? How can i add it to my calculations and see what the difference is? What is the difference between independent and mutually exclusive events? Two events are mutually exclusive if they can't both happen.  Independent events are events where knowledge of the probability of one doesn't change the probability of the other.  Are these definitions correct? If possible, please give more than one example and counterexample. After reading  and reading the comments on the page, one person was wondering if it would be possible to use the Physical Device Object Names of other hardware such as the microphone to find out the names of processes using that device.  I tried the same approach, but so far it only seems to work for the webcam. Is there any other way I could get this to work in ?      UPDATE:  The Lifehacker post was about finding out which Windows process is currently using your webcam.  is how they went about doing it:        Start Device Manager (WIN+R &rarr; "devmgmt.msc" &rarr; OK)   Find your webcam among the list of devices (check under Imaging Devices)   Open the properties window of the device and switch to the Details tab  (Right click &rarr; Properties &rarr; Details)   In the dropdown menu, select Physical Device Object Name and copy the string(Right click &rarr; Copy)   Download    Make sure you have opened Process Explorer in Administrator Mode(File &rarr; Show Details for All Processes)   Hit CTRL+F and enter the string you copied earlier(it should be something like \Device\000000XX)   Hit the Search button and you should see a list of processes using the webcam(if there are any) I like some of the features provided by the Vim-LaTeX suite, but not all of them.  In particular, I dislike all of the mappings like [[ = \left[ \right] and the automatic placeholder stuff with &lt;++&gt;. I am a very fast typist but with that comes more typing mistakes, which I correct almost instantly by pressing backspace. Unfortunately, if something has automatically added a bunch of place-holders or expanded some expression, I then have to move around the document and remove more characters than necessary. For example, if I accidentally press [ twice, instead of only having to delete one character, I have to delete 10.  Having already looked through the documentation, and some of the source, I have managed to disable some of these "features", but not all of them:  In particular:  let g:Tex_SmartKeyBS = 0 let g:Tex_SmartKeyQuote = 0 let g:Tex_SmartKeyDot = 0   (Turn off maps for backspace, double quote and triple dot.)  let g:Imap_UsePlaceHolders = 0   (Turn off &lt;++&gt; placeholder insertion.)  But I can't seem to find a way of turning off the other stuff. Anyone have any suggestions?  Edit: I was able to "disable" some more things by setting:  let g:Tex_Leader = '`tex' let g:Tex_Leader2 = ',tex'   (Which stops some expansions but still not all. It's not really disabling it but just making it less likely that you're going to type in `texa as opposed to the potentially more common `a, for example.)  PS: Personally, I think it is very poor practice to make an optional package that, when installed, greatly changes the default handling of your system. I don't mind some intelligent source highlighting etc, or some new commands (that don't clobber any old ones), but it seems unhelpful to enable this drastic kind of key remapping by default. How do I alter a language item link? I am looking to modify the default output of Drupal 8 of links in a certain situation, the language switcher. Ideally I want to be able to do that in a twig template and not have to produce a  that overwwrites that whole link generation system and add a BIG if for the cases I need to overwrite.  I think the output layout should be controllable in the twig template similar to  (this answer outputs the same url for every languages)  I am using bootstrap as a base theme so i'd like to use the bootstrap markup for my links (btn btn-primary, dropdown)  Here is my code I am trying to make links--language-block.html.twig  {%- if links|length == 2 -%}     {# show only alternate language button #}     {%- for key, item in links -%}         {%- if not item.attributes['#options']['set_active_class'] -%} {# &lt;--- this is always true!? #}             &lt;a href="{{ item.link['#url'] }}" class="btn btn-primary"&gt;{{ item.link['#title'] }}&lt;/a&gt; {# #url is always the same what ever the language it is pointing to! #}         {%- endif -%}     {%- endfor -%} {%- elseif links|length &gt; 2  -%}     {# show selected language in button and other languages in drop down #}     &lt;button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"&gt;{{ selectedLanguage }}&lt;span class="caret"&gt;&lt;/span&gt;&lt;/button&gt;     &lt;ul class="dropdown-menu"&gt;         {% for key, item in links %}             {%- if not item.attributes['#options']['set_active_class'] -%} {# &lt;--- this is always true!? #}             &lt;li&gt;&lt;a href="{{ item.link['#url'] }}"&gt;{{ item.link['#title'] }}&lt;/a&gt;&lt;/li&gt;             {% endif %}         {% endfor %}     &lt;/ul&gt; {%- endif -%}   Anyone has an idea on how to do this?