Removing unwanted characters from folder names I'm creating bunch of folders using a C# console application. An XML file is parsed for different nodes and based on the values the folders are created with the same name.  One of the XML node had the following value with some unknown special character in it (ASCII code 127)    There is a special character after Foldername. I tried using String.Trim() to trim the value but had no luck. I also tried to compare the character with the list of  System.IO.Path.GetInvalidFileNameChars()   and remove it. But still no luck. How can I try to eliminate these characters before I create a folder name. The folder name will be always alpha numeric in my case.
How to remove illegal characters from path and filenames? I need a robust and simple way to remove illegal path and file characters from a simple string. I've used the below code but it doesn't seem to do anything, what am I missing?  using System; using System.IO;  namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             string illegal = "\"M&lt;&gt;\"\\a/ry/ h**ad:&gt;&gt; a\\/:*?\"&lt;&gt;| li*tt|le|| la\"mb.?";              illegal = illegal.Trim(Path.GetInvalidFileNameChars());             illegal = illegal.Trim(Path.GetInvalidPathChars());              Console.WriteLine(illegal);             Console.ReadLine();         }     } }
How to read the content of a file to a string in C? "May I have a glass of water" vs. "Can I have a glass of water": which is better, "may I" or "can I", when asking for something? What is the correct sentence when asking for something like while flying asking for a glass of water :     May I have a glass of water     or      Can I have a glass of water I have a computer with Windows XP installed.  My user does not have a password.  When Windows starts, it goes to the login screen. Because my user has no password, is there any way to bypass this screen, and log in automatically? I know that : $\mathbf{Q}(\sqrt{2}) = \mathbf{Q}+ \sqrt{2} \mathbf{Q}$ , but then what is $\mathbf{Q}(\sqrt{2},\sqrt{3})$? I often read that in case of Deep Learning models the usual practice is to apply mini batches (generally a small one, 32/64) over several training epochs. I cannot really fathom the reason behind this.  Unless I'm mistaken, the batch size is the number of training instances let seen by the model during a training iteration; and epoch is a full turn when each of the training instances have been seen by the model. If so, I cannot see the advantage of iterate over an almost insignificant subset of the training instances several times in contrast with applying a "max batch" by expose all the available training instances in each turn to the model (assuming, of course, enough the memory). What is the advantage of this approach? "Naturally occurring" non-Hausdorff spaces? It is not difficult for a beginning point-set topology student to cook up an example of a non-Hausdorff space; perhaps the simplest example is the line with two origins. It is impossible to separate the two origins with disjoint open sets. It is also easy for a beginning algebraic geometry student to give a less artificial example of a non-Hausdorff space: the Zariski topology on affine $n$-space over an infinite field $k$, $\mathbf{A}_{k}^{n}$, is not Hausdorff, due to the fact that polynomials are determined by their local behavior. Open sets here are in fact dense. I am interested in examples of the latter form. The Zariski topology on $\mathbf{A}_{k}^{n}$ exists as a tool in its own right, and happens to be non-Hausdorff. As far as I'm aware, the line with two origins doesn't serve this purpose. What are some non-Hausdorff topological spaces that aren't merely pathological curiosities? Fourier transform of a radial function Consider a function $f \in L^2(\mathbb{R}^n)$ such that $f$ is radial. My question is, is the Fourier transform $\hat{f}(\xi)$ automatically radial (I can see it is even in each variable $x_i$), or we need some conditions on $f$? Thanks for your help. Evaluating: $\lim\limits_{x\to0}\left(\frac{\sin x}{x}\right)^{{6}/{x^{2}}}$ I am trying to evaluate the following but without result.  $$\lim_{x\to0}\left(\frac{\sin x}{x}\right)^{{6}/{x^{2}}}$$  Can you please give me some hints? I have tried to put log to both sides but it hasn't lead me somewhere... Thanks a lot Continuous at exactly two points and differentiable at exactly one of them Give an example of a function which is continuous at exactly two points and differentiable at exactly one of them. Justify your answer.  This question is from a competitive examination. I have of thinked a solution but I didn't get it I don't know about anyone else, but I have a reasonable list of favourites now, and it can be rather difficult to find the relevant ones at any given time. Sometimes, I have a specific one in mind, others I just want to see all favourites relating to a specific topic. It would be nice if there were a way to organise my favourites by tag, or OP, or possibly just search them.  How can we improve the favourites feature?  Please post your ideas on how we might improve the favourites feature of the Stack&nbsp;Exchange sites. Try to keep each answer to one idea so that the votes reflect the popularity of a single idea. Gapless superconductivity I don't understand what is meant by &quot;gapless superconductors&quot;. As far as I know, the superconducting gap is necessairy for both zero resistance and the Meissner effect, the two hallmarks of superconductivity. So, what does it mean to have gapless superconductivity and how does it work? Thanks in advance, Greetings What is the rigor behind U subsitution? $ \int f(g(x)) dx = \int \frac {f(u)}{u'} du$  requires that  $ \int f(x) dx = \int f(x) \cdot dx$  but dx just represents the variable that F(x) +c is a function of. So why is it legal for dx to be treated algebriacally?  I tried investigating this property by using riemann summation:  $\lim\limits_{n \to \infty}(\sum_{k=1}^n f(\frac{kx}{n} )\frac{x}{n}) = \int_0^x f(t)dt= (F(x)+c)-(F(0)+c)$  and so you can define   $ \lim\limits_{n \to \infty} (\sum_{k=1}^n f(\frac{kx}{n} )\frac{x}{n})+F(0)+c)  = \int f(x) dx$  you can write $\frac{x}{n} = dx$ and $k\frac{x}{n}=kdx= x_k$  then you have  $ \lim\limits_{n \to \infty} (\sum_{k=1}^n f(x_k)dx)+F(0)+c) = \int f(x) dx$  since  dx is being written to be multiplied by the series, then you can define dx in different terms to aquire an integral in terms of other variables.   but that exists only in abstraction. I can't quite sufficiently complete the task of doing so. How to float until on left (or right) page? I have two sideways tables that I want on two facing pages so the reader can turn the entire book and read them both in one turn. For the moment I keep moving them around to keep them on facing pages. Is there a way I can make the first one float until it's on a left page and then place the other one right after? Or perhaps some similar way to automatically get them on the same spread? I tried to install OracleJDK 8 using   sudo add-apt-repository ppa:webupd8team/java   But it's not working.   I searched the problem and found that      "The Oracle JDK License has changed for releases starting April 16, 2019." And  "Oracle Java (JDK) 8 Installer PPA (DISCONTINUED)"   So I installed the OpenJDK8 .   But why oracle cancelled the license of oracle 8 installer? Why can I not access a file named `-` when quoting? I have a file called -.  I want to display its contents.  One way is to do  cat ./-   since cat - reads from standard input. However, why are cat "-" and cat '-' also interpreted by the shell as cat -? Should not we apply pseudo-forces all the time as the Earth is a non-inertial frame of reference? Can Conjure Animals beasts be used as mounts? Is it possible to use the animals that are summoned using Conjure Animals as mounts?  As an example: Summoning Giant Eagles to carry a group up the mountain or over a wall. How to set identity_insert to on in SQL Server Jumping in an elevator? I'm going to encrypt the characters Zhu, and decrypt them using RSA. I'm using the public key $\{e, n\}$ and private key $\{d, n\}$. The values of $e$, $d$ and $p$ I get from my textbook: $e = 17$, $d = 53$, $n = 77$.  It works fine when the number is smaller than 76, but in my example below, it doesn't work:  z = 90  h = 104  u = 107  e = 17 d = 53 n = 77  print z,h,u  c_z = z ** e % n c_h = h ** e % n c_u = u ** e % n  print c_z, c_h, c_u  p_z = c_z ** d % n p_h = c_h ** d % n p_u = c_u ** d % n  print p_z, p_h, p_u   The outputs are:  90 104 107 62 69 46 13 27 30     Do you have any idea what's going wrong?