JS - How to deal with space in file names? Adding a space to a filename breaks the code. This works: &lt;html&gt; &lt;img id=&quot;window-1&quot; src=&quot;http://url.net/demo1.png&quot;&gt; &lt;img id=&quot;window-2&quot; src=&quot;http://url.net/demo2.png&quot;&gt;  &lt;script&gt;     const content = { uid: 'image-1', uri: 'http://url.net/demo1.png' };     const mediaWindows = [document.getElementById('window-1'), document.getElementById('window-2')];      function getPlayedWindow(playedContent) {         return mediaWindows.find((window) =&gt; window.src === playedContent)     }      console.log(getPlayedWindow(content.uri));                      &lt;/script&gt;   This doesn't, the function returns undefined: &lt;html&gt; &lt;img id=&quot;window-1&quot; src=&quot;http://url.net/demo 1.png&quot;&gt; &lt;img id=&quot;window-2&quot; src=&quot;http://url.net/demo 2.png&quot;&gt;  &lt;script&gt;     const content = { uid: 'image-1', uri: 'http://url.net/demo 1.png' };     const mediaWindows = [document.getElementById('window-1'), document.getElementById('window-2')];      function getPlayedWindow(playedContent) {         return mediaWindows.find((window) =&gt; window.src === playedContent)     }      console.log(getPlayedWindow(content.uri));                      &lt;/script&gt;   I tried playing with JSON.stringify, no luck. What am I missing? EDIT: Not a duplicate, the question is about spaces. pointing to the possible duplication actually provides an answer, but one can't know that without asking first.
Encode URL in JavaScript? How do you safely encode a URL using JavaScript such that it can be put into a GET string?  var myUrl = "http://example.com/index.html?param=1&amp;anotherParam=2"; var myOtherUrl = "http://example.com/index.html?url=" + myUrl;   I assume that you need to encode the myUrl variable on that second line?
This book came out of the 1970s (early 1980's) at the latest. In it the protagonist, a not so diligent student, gets turned on to computer programming and creates (I think..) a weather program.   Eventually he moves on and years later the program contacts him. It has become an AI and he is its creator.  I forget what the setup is post contact which is not helpful at all.. An unfair three-sided die. An unfair three-sided die. Side $1$ will be rolled with probability $p_1$ , Side $2$ with probability $p_ 2$ and Side $3$ with probability $p_ 3$ . Find a formula for the probability that the $8^{th}$ $3$ will be rolled on the $10^{th}$ roll.  Attempt:  First 9 rolls there are 7 three's.  $$[\binom{9}{7}(p_3)^7(p_1+p_2)^2]\cdot p_3$$ $$=[84\cdot(p_3)^7(p_1+p_2)^2]\cdot p_3$$  any thoughts of this solution? Mortarboard badge not awarded Adding curved features to map with ArcGIS API for JavaScript? I've tried without much success to add a curved line feature to the ArcGIS JavaScript map.    I created a polygon with a curved edge in ArcMap:   However, when I load this same feature in the web API, it becomes segmented:   The problem started when I tried to create a curved feature from the JavaScript API itself, which only seems to allow full circle features (not circular arcs).  This makes me think that curves are still unsupported in the JavaScript API. Do you know any way around this? Do you have any other ideas on alternatives I can use to create and correctly view curved features? How do you debug through a compressed JavaScript file? Partition on sublists beginning with a certain marker elements How is voltage always able to increase, if electrons move at the speed of light? Usage and origin of "sister" in expressions like "sister company, sister ship, sister site" etc Proof of $a^{\phi (n) +1} \equiv a \pmod{\! n} $ Carmichael generalization of Fermat-Euler's theorem. Could anybody clear it to me whether these two sentence are grammatically equal? If not, what is the difference?     1) They must use some methods...    2) They are to use some methods... Layers with same coordinates not lining up I have a project where I have a few layers (State of Texas, cities, roads, etc.). They are all resaved and projected to NAD83 / UTM zone 14N EPSG: 26914. The project CRS is also NAD83 / UTM zone 14N EPSG: 26914 and on the fly projection is enabled. I added a text delimited file and cannot get them to line up. I checked the attribute table of the delimited file and the coordinates are correct. I cross-checked this with a point close to where a few of the points from the delimited file are and they are very close so in theory they should be lining up. I tried to save the delimited file and save it with the same projection and add the shp file back in and that did not work. Anyone have any ideas? I can't think of anything else to try. Is $x^3+y^3+z^3-1$ irreducible over a field $k$ of characteristic $\neq 3$? Is $x^3+y^3+z^3-1$ irreducible over a field $k$ of characteristic $\neq 3$?   If I can show that $y^3+z^3-1$ is irreducible, I believe I can use Eisenstein's criterion. But I don't see how to show even this.  The other approach on my mind is to show that $k[x,y,z]/(x^3+y^3+z^3-1)$ is an integral domain, but this doesn't seem particularly promising either. How to disable notifications for a single mailbox in Mail? When managing multiple mailboxes, is it possible to disable the notifications for certain mailboxes? How to disable requiretty for a single command in sudoers? I want to disable requiretty so that I can sudo within scripts, but I'd rather only disable it for a single command rather than everything. Is that possible within the sudoers config? My ESTA approval if I have previously had a B1 refusal I applied for a B1 visa to attend a conference in the USA in 2013. I had another nationality (Non- VWP) at the time and my B1 application rejected under section 306 of border security. I now can apply for ESTA under my new nationality. Can my ESTA application get approved? If not and I need to apply for visa is it every time I need to travel to stated or is it just the first time? Should I let potential employers know I have a job offer? I've interviewed for a few positions, one of which has made me an offer.  I'm very pleased with the offer, but I prefer some of the other positions.  I have the luxury of being able to take a lot of time to decide whether or not I accept this offer, so I'm certain I will hear back (either positively or negatively) from the other positions before a decision is required for the offer I've received.  I'm trying to decide between two courses of action, and I want to choose the one that will best help my candidacy with the positions I've yet to hear from.  Plan 1 is to do nothing and simply wait to hear back from the other positions for which I've already interviewed.  Plan 2 is to be in touch with the other positions to let them know I have an offer, and ask where I stand with them.  Would Plan 2 make me a more desirable candidate with the other positions, as they might see my offer as further validation of my credentials?  Or, might initiating with the interviewers in this way be detrimental to my candidacy, perhaps making me seem pushy or self-centered?  If so, I would rather just wait for them to run their course of action (Plan 1).  As I've said, I have plenty of time, so I don't want impatience to hurt me.  If there is a good chance that my meddling will be detrimental, then I'd rather be hands-off here.  However, if it's more likely that informing the other interviewers of my offer will give me a boost, then I'd want to do so.  Thanks for any clarity you can provide!  Edit: For a bit more information and context, the position I've been offered is a non-academic research position that my advisor has described as "prestigious."  The other positions for which I've interviewed (and which I prefer) are mostly academic teaching-centered positions (visiting assistant professors, tenure-track at smaller four year institutions). Let $A$ be an $n\times n$ complex nilpotent matrix. Then we know that because all eigenvalues of $A$ must be $0$, it follows that $\text{tr}(A^n)=0$ for all positive integers $n$.  What I would like to show is the converse, that is,      if $\text{tr}(A^n)=0$ for all positive integers $n$, then $A$ is nilpotent.   I tried to show that $0$ must be an eigenvalue of $A$, then try to show that all other eigenvalues must be equal to 0. However, I am stuck at the point where I need to show that $\det(A)=0$.  May I know of the approach to show that $A$ is nilpotent? Is there any practical difference between saving at 300ppi or 72ppi? I often see statements in discussions about web displayed image quality that go something like this: "I only upload pictures at 72 dpi and 1200 pixels on the long edge, so if someone copies and prints the image it won't look as good as if it were 300 dpi."  What? Have I missed something here?  Does an image edited and saved/exported with 1200x800 pixels at 300 ppi look any different online than the same image saved/exported with 1200x800 pixels at 72 ppi? Other than the metadata regarding ppi, is there any difference in the two images at all? If so, what is the difference? If I tell my printer to print the images at 4R (4X6 inches) will there be any difference at all in how the printer creates a print from the 1200x800 @ 300 dpi image versus the 1200x800 @ 72 dpi image? Ever since Everything That Happened with Stack Exchange, it's understandable that many users are hesitant to get re-involved on SE.  It's understandable that  are deleting their own accounts, out of protest, or out of frustration, or for many other reasons.  But I have noticed that, at the very least on , where I spend most of my time, questions are getting fewer views and fewer answers, fewer votes are being cast, and fewer questions themselves are being asked.  I've also noticed that flags are taking a long time to be processed, probably because of the fact that Writing.SE .    Are other sites also experiencing inactivity?  Is this in direct correlation with Everything That Happened?  Is it just this site, or are other sites experiencing the same patterns as well? JavaScript for...in vs for Do you think there is a big difference in for...in and for loops? What kind of "for" do you prefer to use and why?  Let's say we have an array of associative arrays:  var myArray = [{'key': 'value'}, {'key': 'value1'}];   So we can iterate:  for (var i = 0; i &lt; myArray.length; i++)   And:  for (var i in myArray)   I don't see a big difference. Are there any performance issues?