Line Break in C# String
Replace Line Breaks in a String C#
Every Function in a Finite Field is a Polynomial Function From a bank of past master's exams I am going through:     Let $F$ be a finite field. Show that any function from $F$ to $F$ is a polynomial function.   I know that finite fields are fields of $p$ elements for $p$ prime [EDIT: It's actually $p^n$ for $p$ prime; see comment below]. Since I have $p$ choices for the $p$ elements to map to, then I have $p^p$ distinct functions. I think every function can be written in the form $f(x) = a_{p-1}x^{p-1} + \dots + a_0x^0$. For then given the values $f(0), f(1), \ldots f(p-1)$, I can solve for the coefficents by the linear system of equations  $$ a_0 + \sum_{i=1}^{p-1} n^i a_i = f(n).$$  This then gives me a $p-1 \times p-1$ square matrix over the field $\mathbb{F}_p$:  $$\left( \begin{array}{ccccc} 1&amp; 0 &amp; 0 &amp; \ldots &amp; 0 \\ 1&amp; 1 &amp; 1 &amp; \dots &amp; 1 \\ 1&amp; 2 &amp; 4 &amp; \dots &amp; 2^{p-1} \\ \vdots &amp; \vdots &amp; \vdots &amp; &amp; \vdots \\ 1 &amp; p-1 &amp; (p-1)^2 &amp; \dots &amp; (p-1)^{p-1} \end{array} \right) \left( \begin{array}{c} a_0 \\ a_1 \\ a_2 \\ \vdots \\ a_{p-1} \end{array}\right)  = \left( \begin{array}{c} f(0) \\ f(1) \\ f(2) \\ \vdots \\ f(p-1) \end{array} \right)$$  If I can show this matrix is invertible, then I can always find the $a_i$. But I am a bit stumped on how to show this (partially because I don't think I've ever done linear algebra in a vector space over a finite field). It does not seem easy to show linear independence, or nonzero determinant, or full row rank.    Alternatively (I just thought of this), can I show this is true by arguing that the map between the two sets (the set of polynomials of degree $p-1$; and the set of functions $F \to F$) is injective, and that it must be a bijection because the sets have the same cardinality $p^p$? When using the Stack Exchange App for Android, I encountered a problem when uploading multiple images to the same post.  After uploading a single image, the image Markdown is inserted normally, e.g.:  ![enter image description here][1]     [1]: http://i.stack.imgur.com/Cbh1m.jpg   As I upload more images, the list of URLs at the bottom of the post should be appended to. After uploading the above in a new post, I tap to place the cursor at the end of the first line, enter a newline and the toolbar reappears. I then upload a second image with this result:  ![enter image description here][1] ![enter image description here][2]     [1]: http://i.stack.imgur.com/Cbh1m.jpg   [2]: http://i.stack.imgur.com/V5nXV.jpg   Now I edit the image descriptions, to make sure I can keep track of all my images, place the cursor at the end of the second line and enter a newline. The edit box contains:  ![a black circle of utter blackness][1] ![the best planet earth clip art ever][2]      [1]: http://i.stack.imgur.com/Cbh1m.jpg   [2]: http://i.stack.imgur.com/V5nXV.jpg   I then upload a third image. What's interesting is that as the screen reloads, for an instant I see the best planet earth clip art ever replaced by more image markup, so the second line is this:  ![![enter image description here][2]][2]   But only for a moment. Then the screen updates, and the edit window is left in this state:  ![the best planet earth clip art ever][2] ![the best planet earth clip art ever][2] ![enter image description here][3]     [1]: http://i.stack.imgur.com/Cbh1m.jpg   [2]: http://i.stack.imgur.com/V5nXV.jpg   [3]: http://i.stack.imgur.com/6Ra5w.jpg   I correct the first line and insert a line break after the third line in preparation to upload the first image again (I really love blackness). Before uploading, the edit window looks like this:  ![a black circle of utter blackness][1] ![the best planet earth clip art ever][2] ![a fast computer][3]      [1]: http://i.stack.imgur.com/Cbh1m.jpg   [2]: http://i.stack.imgur.com/V5nXV.jpg   [3]: http://i.stack.imgur.com/6Ra5w.jpg   After uploading:  ![a fast computer][3] ![the best planet earth clip art ever][2] ![a fast computer][3] ![enter image description here][4]      [1]: http://i.stack.imgur.com/Cbh1m.jpg   [2]: http://i.stack.imgur.com/V5nXV.jpg   [3]: http://i.stack.imgur.com/6Ra5w.jpg   [4]: http://i.stack.imgur.com/ILUCC.jpg   Now, instead of adding a newline, I position my cursor at the end of the third line. The toolbar isn't visible so I insert a space and then delete it. I upload another copy of the third image from this position adjacent to other image markdown, and now the result is:  ![a fast computer][3] ![the best planet earth clip art ever][2] ![a fast computer][3]![enter image description here][4] ![enter image description here][4]      [1]: http://i.stack.imgur.com/6Ra5w.jpg   [2]: http://i.stack.imgur.com/V5nXV.jpg   [3]: http://i.stack.imgur.com/6Ra5w.jpg   [4]: http://i.stack.imgur.com/jG0fk.jpg   [5]: http://i.stack.imgur.com/ILUCC.jpg   Notice:   The new image, the fifth I have uploaded, goes in as image [4]. Not a problem, so far, but: The previous image description is still linked to image [4], now a different URL; and The first URL in the list has been overwritten by the URL of the third image, which happens to be immediately adjacent on the line where I inserted the most recently-uploaded image.   Reproduced at the time of this question revision, with the following specs:   Device: Moto G 2013 OS version: 4.4.4 App version: 1.0.57 ParametricPlot3D and Sphere Graphics Is it possible to 'fly to location' in Leaflet in the same way as  example? Almost sure convergence of the Poisson process Let $N = \{N(t) \}_{t\geq 0 }$ be a Poisson process. I already know that $N(t)- \lambda t$ is a martingale where $\mathbb{E} [ N(t) ] = \lambda t$.   I want to prove that $$ \frac{N(t)}{t} \rightarrow \lambda, \quad t \rightarrow \infty \quad \text{ a.s.}. $$  To prove this I received a hint that I should use the martingale law of large numbers which states that:  Theorem: (Martingale LLN)  Let $S= (S_n = \sum_{k=1}^n X_k)_{n=1,2,\ldots}$ be a martingale with respect to the filtration $(\mathcal{F}_n)_{n=1,2,\ldots}$. Then $\sum_{k=1}^n X_k/k$ converges almost surely on the set $\left\{ \sum_{k=1}^\infty k^{-2} \mathbb{E}\left[ X_k^2 \mid \mathcal{F}_{k-1} \right] &lt; \infty \right\}$. Hence $S_n/n \rightarrow 0$ a.s. on the same set.  Now to use this theorem I think I need to use Doob-Meyer to decompose $N(t)$ as the sum of a martingale and an increasing process. Which would be the martingale $M(t) = N(t) - \lambda t$ and increasing process $A(t) = \lambda t$. But how is $M(t)$ the sum of a martingale? And I do not know how this exactly relates to the thing I have to prove. Thanks for any help. NetworkOnMainThreadException on higher API Biblatex + Xelatex does not display accents I am looking for idioms or informal/slang/colloquial expression for some people that make you think that they are able of building a skyscraper, constructing a spaceship, playing the piano better than Mozart or something very fancy that requires remarkable skills, but when it comes to practice they prove to be completely inadequate. Coffeescript existential operator sometimes checks against undefined, but not always Convert bytes to a string Exporting video to .mov in Blender 2.79 In the past, Blender (at least the Mac version) has had the ability to encode video files as .mov, the format used by Quicktime Player. However, with Blender 2.79 this feature seems to have vanished, for both the Internal and Cycles render engines. The release log happens to have the entry "Video encoding settings have been simplified, along with the addition of a Constant Rate Factor (CRF) mode" which I suppose could be the cause.  Does anyone know what happened—whether it is the aformentioned reason or something else—and how to export videos as Quicktime .mov in Blender 2.79? The Half-Elven and their choices Earendil and Elwing were given the choice of kindreds after their journey to Valinor, This choice was extended to their sons (specifically sons, not daughters or grandchildren)  Elrond chose the race of the Eldar and his brother Elros chose to be counted amongst the Edain. Thus far Manwë's proclamation has been fulfilled.  There are some inconsistencies here:   Arwen was given the choice, but Elladan and Elrohir remained as Eldar in Imladris Tar-Vardamir was not given the choice The offspring of Imrazor and Mithrelas in Dol Amroth dont seem to have been given a choice   I can think of only one explanation, that the Mannish blood is dominant over the blood of the Eldar, thus, As Vardamir was the offspring of two mortals he did not fall under Manwë's proclamation despite being the son of a half elven.  However this does not seem to explain the other inconsistencies, Is it possible that Elladan and Elrohir and also the princes of Dol Amroth weren't considered important enough by Manwë or Eru to give them the choice.  Also as a side note Tolkien states there were only three unions between man and elf, but this seems to ignore Turin/Finduilas and Imrazor/Mithrelas  My question is, Why was Arwen given the choice and not the sons of Elros? This fire image:    As you can see, it has a black background, which I can't delete (because it would probably destroy the smooth-looking fire effect). I want to place some fire in a photo.  However, I remember it was possible to take such images and do something in photoshop so that when you place them over a photo, the black is gone and the fire is perfectly blended there. But I can't remember what feature or option was it. Any ideas?  Photoshop CS5. I would like to solve the beginner's standard exercise which claims that a point of $\mathrm{Spec} \ R$ is closed iff it is a maximal ideal.  The reverse implication is easy. The direct one seems much subtler. If $P = V(I)$ then, since there exist a maximal ideal $M$ containing $P$, it would follow that $\{P, M\} \subseteq V(I) = P$, whence $P=M$. In order to show the existence of $M$ I applied Zorn's lemma to the set of ideals containing $P$.  The question is the following: is there any other proof of the above implication that does not (indirectly) use the axiom of choice? My concern is that I may be using a cannon to shoot a fly. Also, it would be the first time that I see closedness of points to require the axiom of choice. If the axiom is indeed needed in general, are there "nice" classes of rings for which we could get away without it? I read a collection of Sci-Fi short stories back in the 1970's or early 80's that had one about a couple in love who kept losing each other. The book was my dad's so the story itself could be much older than that. I am very fuzzy on the details as I was young when I read it and it was so long ago. I believe the woman/girlfriend was "taken" (by some bad guy aliens??) while she was sleeping. I think it involved time travel and the man had to search through time to find her. After he found her, when he was asleep one time, he somehow was then "taken" and I think transported through time and had to fight his way back to her again. He may have been some sort of police officer. I just remember in the end, at night when they went to bed, the couple always wore handcuffs so they were never separated when they went to sleep ever again. Does this ring a bell with anyone?  (There is a possibility it is in a short story collection that also contained " The Twonky " by Lewis Padgett (1942), as I remember reading that story around the same time) Drawing users' attention to unrecoverable actions? I had recently faced a problem:     Solve the Diophantine Equation $x^2 - y! = 2001$.   Solving it was quite easy. You show how $\forall y \ge 6$, $9|y!$ and since $3$ divides the RHS, it must divide the LHS and if $3|x^2 \implies 9|x^2$ and so the LHS is divisible by $9$ and the RHS is not. Contradiction. Hence, the only solution is $(45, 4)$.  That made me wonder, how we can solve the Diophantine Equation $x^2 - y! = 2016$. We cannot apply the same logic here. $2016$ is a multiple of $9$ and it is clear that $3|x$ and $9 \nmid x$. How do I proceed from here? There has been quite a few times that I wished I could send a message to another user on SO - not ask a question for everyone to see, but just a short message informing them of something or requesting them to do something.  Are there any plans to allow this to happen in the future?  Related: Remove HTML Tags from an NSString on the iPhone There are a couple of different ways to remove HTML tags from an NSString in Cocoa.   is to render the string into an NSAttributedString and then grab the rendered text.   is to use NSXMLDocument's -objectByApplyingXSLTString method to apply an XSLT transform that does it.  Unfortunately, the iPhone doesn't support NSAttributedString or NSXMLDocument. There are too many edge cases and malformed HTML documents for me to feel comfortable using regex or NSScanner. Does anyone have a solution to this?  One suggestion has been to simply look for opening and closing tag characters, this method won't work except for very trivial cases.   For example these cases (from the Perl Cookbook chapter on the same subject) would break this method:  &lt;IMG SRC = "foo.gif" ALT = "A &gt; B"&gt;  &lt;!-- &lt;A comment&gt; --&gt;  &lt;script&gt;if (a&lt;b &amp;&amp; a&gt;c)&lt;/script&gt;  &lt;![INCLUDE CDATA [ &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ]]&gt; Comma usage with compound sentences {actually compound predicates as per Rob's answer} Rule 101 of compound sentences is that a coordinate conjunction must be accompanied by a comma most of the time when joining independent clauses, yet I stumble across sentences all that time that seem to abuse this rule. Normally, it's a case of the subject not being present in the second clause, as in the following example:      "They usually start out as an abbreviation, but turn into acronyms   when they become well known."   (taken from the Oxford Style Manual)   To me, this comma cannot be correct because the clause after the comma doesn't contain a subject and therefore cannot be independent (right?). As far as I'm concerned, it's not the 'Comma to set off a contrast rule because I can find plenty of other where 'and' is used and the subject's missing in the second clause.  what's the deal here?   Thanks in Advance for any responses I may receive!