adding commas to integers in C#
.NET String.Format() to add commas in thousands place for a number
Experience using dropdowns in-line of sentence "mad lib" style Do you have experience implementing text inputs or drop-downs in-line with other text or forms? Is this approach any better than just creating a separate field/label?  In the example below the user has the option to indicate when to be reminded again (in one, two, or three days). When they are reminded of an assignment, they simply get an email or text message. Pluralizing Numbered Items Etymology of "dong" and "dongle" Dong as in ding-dong is clearly onomatopoetic as confirmed by :     ding dong        imitative of the sound of a bell, c.1560.   and similarly for :     ding (v.)       1819, "to sound as metal when struck," possibly abstracted from ding-dong, of imitative origin. The meaning "to deal heavy blows" is c.1300, probably from Old Norse dengja "to hammer," perhaps also imitative. Meaning "dent" is 1960s. Related: Dinged; dinging.   What, then, is the origin of dong to mean penis? Etymonline.com is  here:     dong (n.)        "penis," 1891, of unknown origin.   We also have a much more recent word, dongle, which has no entry at etymonline.com but  claims it is:     Apparently from dangle.   This leads me to the theory that the anatomical and onomatopoetic dongs  are not related and that the former usage, like dongle, derives from dangle. So, my questions are:   Is that so? Does dong (penis) derive from dangle? Sounds reasonable enough but I have found no definitive sources for it. Does dongle derive from dangle? It makes perfect descriptive sense for dong but the USB devices called dongles do not dangle but instead protrude quite rigidly, so I feel that dongle being derived from the cruder meaning of dong makes more sense. First, I'll state some background that lead me to the question.  I was thinking about quantization of space-time on and off for a long time but I never really looked into it any deeper (mainly because I am not yet quite fluent in string theory). But the recent discussion about  got me thinking about the topic again. Combined with the fact that it has been more or less decided that , I decided I should give it a go.    So, first some of my (certainly very naive) thoughts.  It's no problem to quantize gravitational waves on a curved background. They don't differ much from any other particles we know. But what if we want the background itself to change in response to movement of the matter and quantize these processes? Then I would imagine that space-time itself is built from tiny particles (call them space-timeons) that interact by means of exchanging gravitons. I drawed this conclusion from an analogy with how solid matter is built from atoms in a lattice and interact by means of exchanging phonons.  Now, I am aware that the above picture is completely naive but I think it must in some sense also be correct. That is, if there exists any reasonable notion of quantum gravity, it has to look something like that (at least on the level of QFT).  So, having come this far I decided I should not stop. So let's move one step further and assume string theory is correct description of the nature. Then all the particles above are actually strings. So I decided that space-time must probably arise as condensation of huge number of strings. Now does this make any sense at all? To make it more precise (and also to ask something in case it doesn't make a sense), I have two questions:        In what way does the classical space-time arise as a limit in the string theory? Try to give a clear, conceptual description of this process. I don't mind some equations, but I want mainly ideas.   Is there a good introduction into this subject? If so, what is it? If not, where else can I learn about this stuff?      Regarding 2., I would prefer something not too advanced. But to give you an idea of what kind of literature might be appropriate for my level: I already now something about classical strings, how to quantize them (in different quantization schemes) and some bits about the role of CFT on the worldsheets. Also I have a qualitative overview of different types of string theories and also a little quantitative knowledge about moduli spaces of Calabi-Yau manifolds and their properties. Maps from subsets of $\mathbb{R}^2$ that are either open/closed/continuous I'm self studying J. Lee's Introduction to Topological Manifolds, and after doing all other exercises on chapter 2, I can't seem to come with the proper counterexamples for this one.      For each of the following properties, give an example consisting of two subsets $X, Y \subset \mathbb{R}^2 $, both considered as topological spaces with their Euclidean topologies, together with a map $f: X \rightarrow Y$ that has the indicated property.         Open but not closed/continuous   Closed but not open/continuous    Continuous but not open/closed         etc... (all cases)   I think the reason for my difficulty is a lack of geometric intuition of what open, closed and continuous maps look like as deformations of shapes in $\mathbb{R}^2$ (I can construct counterexamples from artificial made up spaces).   I tried squashing balls and 'pumping space' into lines, as well as joining strips in annulus shapes, but all the examples I seem to come up with are either too well behaved (i.e. all 3) or too misbehaved.   Instead of a case by case answered I would prefer a couple worked out cases and some intuition on how to visualise open / closed maps in this context. Custom kernel: fails to load firmware when module built-in I'd like to have all my modules built-in, but this fails with iwlagn:  iwlagn 0000:03:00.0: request for firmware file 'iwlwifi-6000-4.ucode' failed. iwlagn 0000:03:00.0: no suitable firmware found!   The microcode file exists in /lib/firmware and the whole thing works just fine if I compile iwlagn as module. I have no idea where it's looking for the file or what's wrong - any ideas? Manually calculated $R^2$ doesn't match up with randomForest() $R^2$ for testing new data I know this is a fairly specific R question, but I may be thinking about proportion variance explained, $R^2$, incorrectly. Here goes.  I'm trying to use the R package randomForest. I have some training data and testing data. When I fit a random forest model, the randomForest function allows you to input new testing data to test. It then tells you the percentage of variance explained in this new data. When I look at this, I get one number.  When I use the predict() function to predict the outcome value of the testing data based on the model fit from the training data, and I take the squared correlation coefficient between these values and the actual outcome values for the testing data, I get a different number. These values don't match up.   Here's some R code to demonstrate the problem.  # use the built in iris data data(iris)  #load the randomForest library library(randomForest)  # split the data into training and testing sets index &lt;- 1:nrow(iris) trainindex &lt;- sample(index, trunc(length(index)/2)) trainset &lt;- iris[trainindex, ] testset &lt;- iris[-trainindex, ]  # fit a model to the training set (column 1, Sepal.Length, will be the outcome) set.seed(42) model &lt;- randomForest(x=trainset[ ,-1],y=trainset[ ,1])  # predict values for the testing set (the first column is the outcome, leave it out) predicted &lt;- predict(model, testset[ ,-1])  # what's the squared correlation coefficient between predicted and actual values? cor(predicted, testset[, 1])^2  # now, refit the model using built-in x.test and y.test set.seed(42) randomForest(x=trainset[ ,-1], y=trainset[ ,1], xtest=testset[ ,-1], ytest=testset[ ,1]) A complete picture of the lattice of subfields for a cyclotomic extension over $\mathbb{Q}$. Is there a good general purpose algorithm (batch of theorems) allowing one to determine the intermediate fields between $\mathbb{Q}(\zeta)$ and $\mathbb{Q}$, where $\zeta$ is some primitive root of unity?  Let $p$ be a prime. Consider the case where $\zeta=\zeta_{p}$ is a primitive $p$-th root of unity. Then the Galois extension is cyclic of order $p-1$ and $1,\zeta,\dots,\zeta^{p-1}$ is a $\mathbb{Q}$-basis for the extension. In this case for any subgroup $H$ of $G=\mathbb{Z}/(p-1)$, by considering the sum $$\alpha_H=\sum_{\sigma\in H}\sigma\zeta,$$ we can observe that $\alpha_H$ lies in the fixed field for $H$, and any automorphism $\tau$ not in $H$ (note automorphisms are identified with subgroups of $\mathbb{Z}/(p-1)$ in the natural way), $\tau$ does not fix $\alpha_H$. Therefore we can conclude that $\mathbb{Q}(\alpha_H)$ is the fixed field of $H$.  In this way we can get all of the intermediate fields of $\zeta_p$ for all odd primes $p$.  We also have a theorem that says if we have $n=p^sq^t$, then $$\text{Gal}(\mathbb{Q}(\zeta_n)/\mathbb{Q})\simeq \text{Gal}(\mathbb{Q}(\zeta_{p^s})/\mathbb{Q})\times\text{Gal}(\mathbb{Q}(\zeta_{q^t})/\mathbb{Q}).$$  So what I have yet to understand is  How can one generally find the intermediate fields between $\mathbb{Q}(\zeta_{p^s})$ and $\mathbb{Q}$ for $s\ge 1$? I would like to also understand the case where $p=2, s&gt;1$ though this might turn out to be a separate case.  EDIT: Even the case $n=pq$ is a little murky to me. Even given the isomorphism given by the Chinese Remainder Theorem I don't see a priori how to get all the "product" subfields. My idea is that you can consider the separate subfields under $\text{Gal}(\mathbb{Q}(\zeta_{p})/\mathbb{Q})$ and $\text{Gal}(\mathbb{Q}(\zeta_{q})/\mathbb{Q})$ separately and then consider the pairwise product of the generators of various subfields to see if you get anything new, but my idea is too inchoate. When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed.    Does anyone care to offer an efficient algorithm on how best to do this? How do I install drivers for an Intel HD Graphics? In System Info in 11.10, the graphics driver wasn't detected. I use ACER Aspire 4750 with Intel Core i3-2340M and Intel HD Graphics 3000 graphic card  How to install the driver for my Ubuntu? My port of entry and exit is Frankfurt, Germany. However i will only be spending a day or two there. I am visiting Spain and Portugal for a week each. So should I be applying to Spain embassy or German embassy? I am an Indian citizen. How to fix "404 Not Found" crawl errors reported by Google in Search Console I was checking on Google webmaster tools for my blog site to see if there's any indication on why my blog traffic decreased to half in one day and i saw 43 Not Found crawl errors and 5 in Sitemap Not Found errors.   The 5 Not Found errors in Sitemap were the links to categories. I guess I renamed categories that's why Google can't find the links.   As for the 43 other Not Found errors, I see blog post titles that contain ' or . For example "McDonald's" or "O.N.E."  They weren't found by Google crawler.   There is also a blog post with /CachedYou at the end and a blog post with /www.example.com attached at the end.  They weren't found by Google crawlers either.   How do I correct those Not Found Errors? why could a check if (document.addEventListener) returns false I do not know how to prove this question: $m^{\phi(n)}+n^{\phi(m)}\equiv 1 \pmod {mn}$ where $m$ and $n$ are relatively prime.  Can anyone help? When a divination wizard character uses their Portent ability:     Starting at 2nd level when you choose this school, glimpses of the   future begin to press in on your awareness. When you finish a long   rest, roll two d20s and record the numbers rolled. You can replace any   attack roll, saving throw, or ability check made by you or a creature   that you can see with one of these foretelling rolls. You must choose   to do so before the roll, and you can replace a roll in this way only   once per turn.   ... to replace a roll, can a player with the Lucky Feat:     Whenever you make an attack roll. an ability check, or a saving throw,   you can spend one luck point to roll an additional d20. You can choose   to spend one of your luck points after you roll the die, but before   the outcome is determined. You choose which of the d20s is used for   the attack roll, ability check, or saving throw.      You can also spend one luck point when an attack roll is made against   you. Roll a d20, and then choose whether the attack uses the attackers   roll or yours.      If more than one creature spends a luck point to influence the outcome   of a roll, the points cancel each other out; no additional dice are   rolled.   ... use the Luck Roll to replace the result? Or does the Portent trump all rolls and simply give you the final outcome?  This question spun off from  on .  Some relevant points:  .  Mike Mearls tends to believe that luck can triumph in some cases, but admits this is , and further seems to conflate the question with .  I would suggest reading the linked discussion before formulating an answer. There's some good thought there. Justifying the Normal Approx to the Binomial Distribution through MGFs Would absolutely love if someone could help me with this question, in a step by step way to help those who are uninitiated to Statistics and Mathematics.   So, I am trying to "prove/justify" through MGFs how as n(the sample size) increases and goes to infinity, a standardized binomial distribution converges to the Standard Normal Distribution. So in the beginning we have $X_n $~$ Bin(n,p)$ then we standardize this $R.V.$ by subtracting the mean $E(X_n)=np$ and dividing by the $SD$ which is $np(1-p)$. After doing this, we get a new $R.V.$ with $mean=1$ and $variance=SD=1$. It is the distribution of this standardized quantity that converges to a fixed distribution, correct? Namely the Standard Normal Distribution. Let's call the standardized version of $X_n$, $Z_n$.   I think what we need to do is to find the MGF of $Z_n$ and show that this MGF becomes the Standard Normal Distribution's MGF as the sample size $(n)$ heads toward infinity. Now $Z_n$ is a function of $X_n$ which we know the MGF of which is $(1-p+pe^t)^n$.   Now I know that $Z_n$ is a linear transform and that we should be able to use this to simply the MGF but I don't understand how the course notes do it, mostly because they skip a lot of steps and it is difficult to follow. There is also a Taylor Series Expansion for the exponential that I am confused about although I do understand the concept of the series expansion.  Help would be greatly appreciated! I would love assistant in exactly how we can prove this via MGF.   Thanks so much in advance :) Reputation changes not visible in the achievement box (again) Just like , which was marked as . But today, it's not working again. I'm still notified of new badges:      Update: it looks like new events are now updated; reputation events from earlier this UTC afternoon are still missing: Kill process after it's been allowed to run for some time I want to limit the time a grep process command is allowed to run or be alive.  For example. I want to perform the following:  grep -qsRw -m1 "parameter" /var   But before running the grep command I want to limit how long the grep process is to live, say no longer than 30 seconds.  How do I do this?  And if it can, how do I return or reset to have no time limit afterwards. Search results on https://stackexchange.com are broken because of "insecure content" The search results on  are blocked because of:     [blocked] The page at  ran   insecure content from .   I am using Chrome. External monitors show blank screen until restart MacBook Pro (15-inch, 2016) with 2 USB-C to HDMI adapters. The setup works great if I start up in that configuration.   If I connect the adapters while the machine is running or simply sleeping, one of the monitors will never get a signal and stay in low power mode. The OS sees the monitor, it shows in the display arrangement settings and I can move the mouse into it, but until I restart, I can't see anything on it.  Once I have restarted I can let the machine sleep or whatever, and the display still works unless I disconnect the adapter. As soon as I do that a restart is required to use it again.   Using MacOS Sierra (10.12.4)  Using this adapter: