function makeTitle(str) { let arr = str.split(' ');    for(let i=0; i&lt;arr.length; i++) {     arr[i][0] = arr[i][0].toUpperCase();   }   return arr; }  makeTitle(&quot;This is a title&quot;)    //➞ &quot;This Is A Title&quot;  Hey guys, why isn't this changing the first letter of every word in the array? When I console.log it, I can see it selects 'T' 'i' 'a' and 't' like its supposed to. So why doesn't it change their values?
Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.
Should training data in each batch size be resample only one time or at each epoch when using mini-batch I saw some related question regarding to the fact is one should use sampling with resampling or without when using minibatch.  However my question is different.  Let's assume that I use sampling witouth replacement. Meaning that for each epoch one training example can only belong one 'batch size' group.  I want to know if one should only resample the training data (into the different batch size) only 1 time or before to start to update the parameters before each epoch.  For instance suppose I have 20 'batch size' group. Suppose at the first iteration I have sampled picture A in group 2 and picture B in group 4.  If so should picture A always stay in group 2 and picture B in group 4. Or should I resample it before to start a new epoch (e.g. at epoch 2 put picture B in group 6 and picture B in group 20). Installing ArcView 3 on 64-bit Windows? How do I install ArcView 3 on 64bit Windows?   There are numerous threads on the Esri forums for how to accomplish this, but the solutions are scattered, inconsistent and disjointed.   This is a request to post integrated and "cleaned-up" solutions, don't just copy and paste. Please indicate if the method is specific to x64 XP, Vista, or 7 (and post seperately, e.g. win7 method in one answer, vista in another). After T-2, why not send back another T-800? Automatically Locate Included Images Do you think it's possible to include images into LaTeX without specifying the exact path to them. So instead of:  \includegraphics{path/to/image/myfig.pdf}   It would be:  \includegraphics{myfig.pdf}   While the image would still reside in the path/to/image/ directory. Basically, I'm asking if there is a macro that can recursively search for the image.  An alternative for me is to write a script outside of LaTeX that determines all the images that are included, performs the recursive search and copies those files temporarily in the same directory as the .tex file. How to reconcile the cashless human/Federation society with human traders and merchants From a variety of sources, including , we know that the Federation (or at least the humans) don't use money. This raises the problem that humans frequently visit worlds where there is currency, and, in the case of DS9, operate a station that has currency frequently in use (for example, Federation personnel frequently attend Quark's bar). Additionally, we see human traders.   My question is, how do humans get "money" (credits, latinum, etc.)? How would a human even get the resources to purchase their own merchant ship or the resources to fill its cargo holds with merchandise? If Federation personnel can simply be given money for the asking, why haven't they poured so much money down Quark's throat that he chokes on it? Is energy content of a system different depending on the observer? For the sake of simplicity, let's imagine that the entire universe is empty except for a single lump of (classical) matter with mass $m$. In its center of momentum frame, it is clear that the total energy is simply $E_\text{CoM}=mc^2$. However, in a frame moving relative to it with speed $v$, we have $E_\text{moving}=\sqrt{m^2c^4+p^2c^2}&gt; mc^2$ for all nonzero $v$.  Are we to infer that the energy content of a system can be different relative to the observer? Does this not violate the first law of thermodynamics? My problem is how to somehow relate the the gcd and congruence. I know that $(a,b) = ax + by$. I also know that $a \equiv b \pmod n$ means $n\mid a-b$. Any hints?  Thanks! How do I get all 3 characters together for the "Three man army" trophy? Over the course of my entire game I have been trying to phone each of the protagonists in order to get this trophy. Each time I successfully 'Hang Out' with one of the characters the other one is always unreachable (busy tone on their cell) or not interested.   What is the easiest way to get all three characters together in order to get this trophy/achievement?   Secondly, there are obviously points in the story where this is not possible due to certain characters being otherwise occupied. Is there a best or easiest time to get the characters together?  Specifically:(End game spoiler)      I want to know if it is still possible to get this trophy in post game. I choose option C: Deathwish which resulted in all three characters surviving (and becoming friends again) but I still can't get them all together? Q1. Find the general solution to the difference equation  $$ a_{n} - 4a_{n-1} + 3a_{n-2} = 6 $$    Q2. Solve the difference equation   $$ a_{n} - a_{n-1} - 2a_{n-2} = 0, a_0 = 2, a_1 = 4 $$    I am completely lost in solving recurrence relation questions. Can anyone guide me in steps to solve the following 2 questions? Proving $\sqrt2$ is irrational I used the method of contradiction by assuming that $\sqrt 2$ is a rational number. Then, by the definition of rational number, there exist two integers $p$ and $q$ whose ratio equals $\sqrt 2$. Thus, $$\frac pq = \sqrt2\tag{x}$$  Squaring both sides, $$p^2/q^2 = 2\tag{a}$$  or $$p^2 = 2q^2\tag{b}$$ This means that $p^2$ is an even number, implying that $p$ is even.  Now, any even integer can be written as $2^kf$ where $f$ is any odd integer and $k$ is some positive integer (the minimum value of $k$ and $f$ is $1$ since even numbers start from $2 = 2^1\cdot1$). For odd numbers, $k=0$.  For example, $8 = 2^3 \cdot 1$, $4= 2^2 \cdot 1$, $18= 2^1 \cdot 9$, $24 = 2^3 \cdot 3$, $-12= 2^2 \cdot(-3)$, etc.  Now, from $(b)$, $q^2$ can be even or odd.  Case 1: $q^2$ is even (thus meaning $q$ is even). Then $p= 2^{k_1} \cdot f_1$ (say) and $q = 2^{k_2} * f_2$ (say). Note here in this case, both conditions $k_1=k_2$ and $f_1=f_2$ can't hold simultaneously since that would mean $p/q =1$ and here $p/q =\sqrt2$ (from $(x)$)). Let's consider the condition when $k_1=k_2=k$ but $f_1\ne f_2$. Then $$\frac{p^2}{q^2}=\frac{(2^kf_1)^2}{(2^kf_2)^2} = \frac{f_1^2}{f_2^2} =2$$ (from $(a)$), i.e.: odd/odd ($f_1$ and $f_2$ are odd) can never equal $2$.  Now lets consider $f_1=f_2=f$ but $k_1\ne k_2$, thus $(2^{k_1}f)^2/(2^{k_2}f)^2= 2^{2(k_1-k_2)}= 2$ meaning $k_1 - k_2 = 0.5$ but $k_1,k_2$ are integers, so their difference can't be $0.5$. (Also here, $k_1-k_2$ must be greater or equal to $1$ since $2^{k_1-k_2}=\sqrt 2$, $k_1-k_2$ can't be negative since $\sqrt 2&gt;1$, but $k_1-k_2\ge1$ can't satisfy $(a)$ since the minimum value of $p/q$ in this case will be $2$ which is surely greater than $\sqrt2$.)  Now lets consider $f_1\ne f_2$ and $k_1\ne k_2$, thus $\frac{(2^{k_1} f_1)^2}{(2^{k_2} f_2)^2}= 2^{2(k_1-k_2)}\frac{f_1^2}{f_2^2}$ can never equal $2$ since $\frac{f_1^2}{f_2^2}$ is either odd or "odd/odd" ie: it doesn't contain 2 as a factor and $2^{2(k_1-k_2)}$ is a power of $2$. So in $2^{2(k_1-k_2)}\frac{f_1^2}{f_2^2}$, there's no chance of cancellation of the odd factor $\frac{f_1^2}{f_2^2}$.  Case 2: $q^2$ is odd (thus meaning $q$ is odd). $q=f'$ (say, here $k=0$ for $q$ but not for $p$), thus from $(a)$ $2^{2k}\frac{f^2}{f'^2} = 2$ but this isn't possible since a power of $2$ multiplied with odd factor can't equal $2$.  Thus, both case 1 and 2 suggest that for any possible combination of $k_1,k_2,f_1$ and $f_2$, $p/q\ne\sqrt2$, i.e.: for no value of integers $p$ and $q$, $p/q = \sqrt2$. Thus, this contradicts our assumption that $\sqrt2$ is rational. Therefore it must be irrational.  PLS NOTE that i would like to clarify that $f_1^2$/$f_2^2$ is either an odd integer or a fraction of odd/odd or 1/odd form, thus not containing  2 as a factor,for any $2^n$, if it has to be reduced to 2 , must be multiplied with $1/ 2^(n-1)$ but $f_1^2$/$f_2^2$ can't be of $1/2^[n-1]$ form since for odd nos, in $2^k$*f notation, k is 0 , so 2 vanishes as $2^k$ becomes 1 in this case thus f1/f2 can't be represented as  1/ $2^(n-1)$ in which n has to be existent.  therefore $2^{2(k_1-k_2)}\frac{f_1^2}{f_2^2}$ can never equal 2 as to further explain the 3rd condition of case 1  Difficulty: is my approach correct? This proof which I thought is different from proofs found on the internet or books since I have used $p$ and $q$ as any integers, which may have a common factor. So I am not sure if I am on right track. Will someone please check this out and make kind comments? Cannot find Underground Jungle Temple On my 1.2 Terraria Map I have been mining from left to right in my large underground jungle using my rocket launcher. Despite this, I have had no luck on finding the Underground Jungle Lihzahrd Temple. I have been searching the layer above where lava constantly spawns. Have I simply spawned in a world without one or am I searching in the wrong place? I have also considered using the clentimator with Dark Blue ammo to provide light, should I do that? Outcast boy meets girl underwater What is the formal definition of polynomial ring of several variables? Let's consider a polynomial ring of single variable. One can define them informally by saying $P(X)=\sum_{i=1}^n a_n X^n$ while $X$ is an indeterminate variable. However, since mathematics is based on first-order logic, one can only talk about something that actually exists (as a set). So as its name says, indeterminate variable is not a sentence in $ZFC$. Nevertheless, we can formally define a polynomial ring $R[X]$ as a subset of $R^\omega$ whose support is finite. ($R$ is a commutative ring with unity) Just like a single variable, I want to know what would be the formal definition of a polynomial ring of several variables. What would be a formal definition? === I have figured out a candidate. That is,  Candidate for a &quot;Definition of a polynomial ring $R[X_1,...,X_n]$&quot;. ($R$ is a commutative ring with unity) Let $R[X_1,...,X_n]$ be the set of all functions $f:\omega^n \rightarrow R$ whose support is finite. Define $(f+g)(a,b,c)=f(a,b,c)+g(a,b,c)$ and $(f•g)(a'',b'',c'')=\sum_{a+a'=a''} f(a,b,c)•g(a',b',c')$ (Note that in this way, $+,•$ are well defined.) Then, it can be checked that $(R[X_1,...,X_n],+,•)$ is a ring.  Is this a formal definition of a polynomial ring? What is a reasonable sample size for correlation analysis for both overall and sub-group analyses? I am running Pearson's correlation on an overall sample of 400 respondents.   When I isolate male and female responses, my sample becomes 220 male responses and 180 female responses.   If I further isolate male and female responses by (say) age groups, some sample sizes become as low as 35 responses (for example, for females over the age of 65).  My question: How good are these sample sizes for correlation analysis? (I am looking at the relationship between income levels and overseas travel.)   (I think this has something to do with margin of error but how does this apply to inferential analysis which is based on probability. I can understand its role in descriptive statistics such as results of a political poll). I am creating backup and after completion I got this..  Could not back up the following files. Please make sure you are able to open them.      /home/vinay/.cache/dconf     /home/vinay/.gvfs   I through terminal to open these file using  cd /home/vinay/.cache/dconf   It shows  bash: cd: /home/vinay/.cache/dconf: Permission denied   How can I get access to these files?  Is it fine to get permissions or leave as it is and not creating any backup for these files? How to set the default program for opening files without an extension in Windows? How to set the default program for opening files without an extension in Windows? Short Story about interminable rain on Venus Android and setting width and height programmatically in dp units I was reading a textbook. I found that it was mentioned the speed of sound increases with increase in temperature. But sound is a mechanical wave, and it travels faster when molecules are closer.   But an increase in temperature will draw molecules away from each other, and then accordingly the speed of sound should be slower. How is it possible that the speed of sound increases if temperature increases? What is the relation of speed of sound and temperature? I recently submitted an application to the AppExchange, only to have it not pass the security check due to "Insecure Storage of Sensitive Data Vulnerability." The problem is that my app accesses an external API, for which it has its own API Secret and API Key. These are static, and specific to the Salesforce App- they will be the same for all users, all installations, etc.  Perhaps stupidly, I stored them as private properties of the class that uses them.  private static String apiSecret = 'superS3|&lt;R37'; private static String apiKey = 'sameHerebutdifferent';   It is a Managed app, so users cannot see them. As such, I am puzzled as to 1. why this is insecure and 2. how better to store these values, given that we are apparently operating under the assumption that having them in the text of the class itself is insecure.