Is there a way to load a json file along with all the other js files?
HTML/Javascript: how to access JSON data loaded in a script tag with src set
Any Set with Associativity, Left Identity, Left Inverse is a Group Recently I answered two questions on SO: The  is a completely trivial answer to a really basic question (kind of "read the manual and follow the one liner example there"). On the other hand, my  is a much more complicated answer that requires much more specialized knowledge of a very specific domain (happens to be related to my PhD research).  Clearly, the first answer could have been given by many SO users - I just happened to be the first to pick up the glove on this question. However, this is not the case for the second answer.  In contrast, when it comes to reputation - the first answer instantly got upvoted (everyone can relate to a simple question/answer), while the second one - I don't believe it will get much upvotes...  So, life isn't fair: for the one answer that really very few people could provide (the second answer) and is much harder to find and get -- is not rewarded, while the trivial answer is rewarded fast and strong...  How can we amend this? How can we encourage rare and specialized answers for difficult and deep questions?  Do we want SO to turn into a pool of trivial and superficial questions?    Update: Thanks to many meta-users who took the time to read through this question and ponder its implication, both answers I used as examples got exposed far beyond their fair-share. So, despite the fact that my original claim that the specialized answer get less reps is no longer valid, this does not change fact that in general my claim is stil valid: specialized answers requiring expert knowledge will recieve less attention at first.    Bottom line: (following my wish to have some sort of ). Indeed it sometimes seems like life isn't fair, but this is only in the short term. In the long run high quality answers do get their proper credit and exposure and their fair share of reputation. The reputation system of SO works quite well balancing and accounting for many factors and parameters. It would require a really strong argument backed up with serious research to change this mechanism.   Thank you all for the lively discussion and for showing me that life is fair after all. According to HTML specs, the select tag in HTML doesn't have a readonly attribute, only a disabled attribute. So if you want to keep the user from changing the dropdown, you have to use disabled.  The only problem is that disabled HTML form inputs don't get included in the POST / GET data.  What's the best way to emulate the readonly attribute for a select tag, and still get the POST data? Definition of autocorrelation time (for effective sample size) I've found two definitions in the literature for the autocorrelation time of a weakly stationary time series:  $$ \tau_a = 1+2\sum_{k=1}^\infty \rho_k \quad \text{versus} \quad \tau_b = 1+2\sum_{k=1}^\infty \left|\rho_k\right| $$  where $\rho_k = \frac{\text{Cov}[X_t,X_{t+h}]}{\text{Var}[X_t]}$ is the autocorrelation at lag $k$.    One application of the autocorrelation time is to find the "effective sample size": if you have $n$ observations of a time series, and you know its autocorrelation time $\tau$, then you can pretend that you have  $$ n_\text{eff} = \frac{n}{\tau} $$  independent samples instead of $n$ correlated ones for the purposes of finding the mean.  Estimating $\tau$ from data is non-trivial, but there are a few ways of doing it (see ).  The definition without absolute values, $\tau_a$, seems more common in the literature; but it admits the possibility of $\tau_a&lt;1$.  Using R and the "coda" package:  require(coda) ts.uncorr &lt;- arima.sim(model=list(),n=10000)         # white noise  ts.corr &lt;- arima.sim(model=list(ar=-0.5),n=10000)    # AR(1) effectiveSize(ts.uncorr)                             # Sanity check     # result should be close to 10000 effectiveSize(ts.corr)     # result is in the neighborhood of 30000... ???   The "effectiveSize" function in "coda" uses a definition of the autocorrelation time equivalent to $\tau_a$, above.  There are some other R packages out there that compute effective sample size or autocorrelation time, and all the ones I've tried give results consistent with this:  that an AR(1) process with a negative AR coefficient has more effective samples than the correlated time series.  This seems strange.    Obviously, this can never happen in the $\tau_b$ definition of autocorrelation time.  What is the correct definition of autocorrelation time?  Is there something wrong with my understanding of effective sample sizes?  The $n_\text{eff} &gt; n$ result shown above seems like it must be wrong... what's going on? According to some grammars[1][2] and CMS...  "Interjections and vocative should be separated from the rest of the sentence by commas".  The vocative case [1] is used to indicate direct address (i.e., to show when you are talking to somebody or something directly). Nouns in the vocative case are set off using commas. CMS 6.38  As direct address (i.e. vocative case), the parenthetical element should be set off using commas (CMS 6.30). An absolute phrase is always treated as a parenthetical element, as is an interjection.  So,      Hello, world!   That is a very classical way to hello the world.  But, languages change. I am not sure, but today, I feel that it is very uncommon helloing someone with an interjection, providing a small pause and clarifying who is helloed. I have an impression that usually people use hello as a ("kind of") verb, not an interjection.   Question: Is that just a personal (bad) impression or some linguistic has already studied that phenomenon?     [1] - Nelson, Gerald C., Director Survey of English Usage Sidney Greenbaum, and Sidney Greenbaum. An Introduction to English Grammar. Routledge, 2013. [2] - Advanced Grammar in Use with Answers: A Self-Study Reference and Practice Book for Advanced Learners of English. 3 edition. Cambridge University Press, 2013. CMS - Chicago Manual of Style "invalid use of incomplete type" error with partial template specialization The following code:  template &lt;typename S, typename T&gt; struct foo {    void bar(); };  template &lt;typename T&gt; void foo &lt;int, T&gt;::bar() { }   gives me the error  invalid use of incomplete type 'struct foo&lt;int, T&gt;' declaration of 'struct foo&lt;int, T&gt;'   (I'm using gcc.) Is my syntax for partial specialization wrong? Note that if I remove the second argument:  template &lt;typename S&gt; struct foo {    void bar(); };  template &lt;&gt; void foo &lt;int&gt;::bar() { }   then it compiles correctly. Here is a DOM-based XSS flaw reported by SalesForce Security Review team in our code:   RootComponent  &lt;aura:component extensible="true" abstract="true" access="global"                 description="Root template component"&gt;     &lt;!-- ... lot of other code ... --&gt;     &lt;aura:attribute name="label"                     type="String"                     access="global"                     description="Label of the form input element" /&gt;     &lt;!-- ... lot of other code ... --&gt;  &lt;/aura:component&gt;   SubComponent  &lt;aura:component access="global" extends="c:RootComponent"                  description="Child extension of RootComponent"&gt;     &lt;!-- ... lot of other code ... --&gt;     &lt;label&gt;{!v.label}&lt;/label&gt;     &lt;!-- ... lot of other code --&gt;  &lt;/aura:component&gt;   According to SFDC, "any app can extend SubComponent component and pass in  as a label and trigger a DOM-based XSS attack." The solution would be to "sanitize" label global attribute to avoid such attack. What is meant by sanitization of global attribute?  I tried to reproduce the so-called security flaw , but as label attribute is of type "String" , when we send it HTML, it is displayed as a string, not as interpreted HTML ... so I don't see where the security flaw could be :/  &lt;aura:application &gt;     &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}" /&gt;      &lt;c:SubComponent aura:id="TestXSS" label="DOM-based XSS attacks" /&gt;  &lt;/aura:application &gt;   JS Controller  ({     doInit: function(component, event, helper) {         var XssAttack = '&lt;img src=x onerror=alert(1) /&gt;';        component.find('TestXSS').set('v.label',XssAttack);     } })   Output    We have global attributes everywhere. Our components are packaged and meant to be extended by client implementation. Do we actually need to sanitize them? What's the function of the "|" (pipe) operator? How to change inside background color of UISearchBar component on iOS How to animate morphing a rectangular plane into a sphere Regular expression to match balanced parentheses Let the function $f(x)$ be differentiable  and $f'(x)$ be continuous in $\left(-\infty,\infty \right)$ with $f'(2)=14$ then evaluate the limit  $$\lim_{x\to 0}\frac{f(2+\sin x)-f(2+x\cos x)}{x-\sin x}$$  My attempt:  $\lim_{x\to 0}\frac{f(2+\sin x)-f(2+x\cos x)}{x-\sin x}$  $\lim_{x\to 0}\left(\frac{f(2+\sin x)-f(2+x\cos x)}{\sin x-x\cos x}\right)$ $\frac{\sin x-x\cos x}{x-\sin x}$$=\left(f'(2)\right)(2)=28$  Is the method used here correct When did The Doctor start running so much? Thanks to Netflix Streaming, I've been watching some random classic Doctor Who stories.  One thing that strikes me as different between the modern Who and old Who was that in modern Who, they do an awful lot of running.  It's become a sort of running gag that they've referenced in-universe.  In the classic Who I've seen, he tends to drive around quite a bit instead.  In addition, The Doctor in modern Who is incredibly reliant on his sonic screwdriver, which I often don't see at all in classic Who stories.  Did the Doctor running and the sonic screwdriver get introduced over time in classic Who, or were they both added as part of the modern Who revival? How to model the curly cable part of the phone Hello. I am a beginner in Blender. I started modeling this phone and when I got to the curly cable part it was a real challenge. Could someone guide me on this. Take the following C# class:  c1 {  event EventHandler someEvent; }   If there are a lot of subscriptions to c1's someEvent event and I want to clear them all, what is the best way to achieve this? Also consider that subscriptions to this event could be/are lambdas/anonymous delegates.  Currently my solution is to add a ResetSubscriptions() method to c1 that sets someEvent to null. I don't know if this has any unseen consequences. Why would perfectly similar data have 0 mutual information? Do the beacon lighters really live on top of the mountains? Following this image I found online:    Do the beacon lighters really live on top of the mountains?  It seems really cold on top of some of these mountains and there are no villages or whatsoever. I am using cURL to insert data into salesforce. It works with single record but I need to insert multiple records at a time. Is it possible to do so and is it possible via a REST interface? Split string on spaces in Java, except if between quotes (i.e. treat \"hello world\" as one token) why is my careers profile reputation lower than my actual repuation?