Ran into the following exception parsing XML generated from inputs: org.xml.sax.SAXParseException: Zeichenreferenz &quot;&amp;# at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)  I traced the problem down to an input string containing the character 0x1f, an invisible &quot;UNIT SEPARATOR&quot; character:  I had to copy the input into a text file to make it visible:  Tested the input-string in other places and also ran into problems like: Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: XML parsing: line 1, character 149, illegal xml character at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1632) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:602) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:524) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7418)  What would be the best way to strip such characters from an input string, are there other problematic characters for XML which should be removed?
There are a variety of characters that are not legally encodeable in XML 1.0, e.g. U+0007 ('bell') and U+001B ('escape'). Most of the interesting ones are non-whitespace 'control' characters.    It's clear from (e.g.)  and others that it's  -- but can anyone illuminate me as to why the XML spec forbids these characters?   It seems like it could have been required that they be encoded in escapes, e.g. as &amp;#x0007; and &amp;#x001B; respectively, but perhaps there's a practical reason that the characters were forbidden rather than required to be escaped?  Answerers have suggested that there is some motivation towards avoiding transmission control characters, but Unicode includes many other control-like characters (consider U+200C "zero width non joiner"). I recognize there may be no good reason for this behavior, but I would still like to understand it better.  It's particularly frustrating because when those character values appear in other encodings data formats, I end up "double-escaping" new XML documents that need to encode this.
'setenv' command not working on tcsh shell when called explicitly I can run setenv command just fine in my tcsh shell like this:  echo $0 /usr/bin/tcsh echo $SHELL /usr/bin/tcsh setenv START_TIME `date +%s` echo $START_TIME 1499355967   But, whenever I run it explicitly like shown below, it doesn't work. I need to do this because I have to specify shell when executing it via python subprocess call, otherwise it will call a sh shell as default.  /usr/bin/tcsh -i -f -c 'setenv START_TIME `date +%s`' echo $START_TIME START_TIME: Undefined variable.   What's the problem here? I searched for this issue online, but couldn't find any issue similar to this. This is extremely frustrating. What are the differences between Factor Analysis and Principal Component Analysis? Are ores replenished over time? Dynamic Symlinks I have built my app for different architectures and would like to create a "dynamic symlink" which takes me to the right version based on a variable.   If the machine I am currently logged in to, is x86, then the symlink should take me to that build.  A mocked example of what I want to do:  $ uname -i x86_64  $ ls -ltr  lrwxr-xr-x  1 dogbane gg     4 Feb 16 15:40 mylink -&gt; @sys/ drwxrwxr-x  2 dogbane gg  2048 Feb 16 15:40 x86_64/ drwxrwxr-x  2 dogbane gg  2048 Feb 16 15:40 i386/  $ cd mylink  $ pwd -P ~/x86_64   Is this possible?   I know I can use cd $(uname -i), but want something simpler. When should I use an em-dash, an en-dash, and a hyphen? Spivak Chapter 2, problems 27 (and 28) To be honest, I have no idea how to even start this problem. I'm sorry I don't have any work to show, but I'm just at a blank. Help?  Chapter 2: Problem 27:  University B, once boasted $17$ tenured professors of mathematics. Tradition prescribed that at their weekly luncheon meeting, faithfully attended by all $17$, any members who had discovered an error in their published work should make an announcement of this fact, and promptly resign. Such an announcement had never actually been made, because no professor was aware of any errors in her or his work. This is not to say that no errors existed, however. In fact, over the years, in the work of every member of the department at least one error had been found, by some other member of the department. This error had been mentioned to all other members of the department, but the actual author of the error had been kept ignorant of the fact, to forestall any resignations. One fateful year, the department was augmented by a visitor from another university, one Prof. X, who had come with hopes of being offered a permanent position at the end of the academic year. Naturally, he was apprised, by various members of the department, of the published errors which had been discovered. When the hoped-for appointment failed to materialize, Prof. X obtained his revenge at the last luncheon of the year. &quot;I have enjoyed my visit here very much&quot;, he said, &quot;but I feel that there is one thing that I have to tell you. At least one of you has published an incorrect result, which has been discovered by others in the department.&quot; What happened the next year?&quot;   Chapter 2: Problem 28:  After figuring out, or looking up, the answer to Problem 27, consider the following: Each member of the department already knew that Prof.X asserted, so how could his saying it change anything? Expected Value of a Hypergeometric Random Variable How to make sure that Qt5.4.2 is installed properly I installed qt5.4 from  in Ubuntu 14.04, but when I run:   qmake -v   I always get the old version Qt5.2.1, although I think it is installed here Qt version 5.4.2 in /opt/qt54/lib. Can anyone tell me how to make sure that Qt5.4.2 is installed properly?   Thanks Extreme Points of a Convex Hull How do I create a Windows 7 USB installer with preinstalled software? I was wondering if it was possible to make a bootlable image of a Windows 7 Pro OEM Installation CD that I have and put it on an USB stick for faster/easier installation. I am asking because we have a couple of PC´s where I´d have to install the OS using the same key (MAK).  Also is it possible to kind of populate that image with software that would have to be installed anyways on all machines (like Chrome, Outlook, etc)?  It would be really helpful to just install a Windows 7 image with customized software already installed. I would just make an image of an OS and use that, but the hardware of the machines differ. The summer training or (just) summer training Should we use the summer training or just summer training in the paragraph. As per me training is a noun and before singular noun we have to use an article and I am using the because I am talking about a specific training for engineers, I also know that before very common nouns we avoid articles, like bed, school, bus, university, so if you say we should use summer training then please give me a valid reason.     Company(name) has been providing the summer training for engineers   since 2010. We have been giving completely professional atmosphere for   engineers to complete the summer training with practical knowledge.   Our each faculty has a great experience in the education field. We   make sure you get all the important resources to make your summer   training a learning and an enjoyable summer training. You may call or   email us to get your confirmation about the training.   Thanks in advance. My current understanding:  $\vdash$ is "syntactic consequence", e.g. if we have $a \vdash b$ it means if we've written down $a$ as something we know, we can immediately write down $b$ as something we know. This is saying nothing about whether any of these pieces are true, false, something else, etc, it's just saying that we can say something about $b$ by virtue of being able to say something about $a$.  $\vDash$ is "semantic consequence", e.g. if we have $a \vDash b$, then it (usually) means if $a$ is always true in every interpretation (i.e. no matter how we mess with any of the underlying variables driving $a$'s valuation), then $b$ is true as well. However I don't know if this is necessarily just a "true"-only thing. It seems conceivable that we could make one for falsehoods too, i.e. if $a \vDash b$ might mean if $a$ is always false then $b$ is always false, of if $a$ is always "dog" then $b$ is always "dog", etc. But I am unsure of this one.  $\to$ is material implication, which exists solely within the logic system (as opposed to the previous two metalogical relations) and has a specific semantic meaning / definition in terms of a truth table in something like prepositional logic ($a \to b$ is always true unless $a$ is true and $b$ is false). It's defined this way simply because it is a helpful / useful model to describe things like "whenever $a$ is true, $b$ is true".  Do I have the right idea so far? Use chown to set the ownership of all a folder's subfolders and files? How to modify the page at admin/structure/types? How does one restrict number of allowed types in Java generic type Can abilities with a [Click] cost be used during a run? Some abilities have a [Click] cost to them, such as Crypsis' ability to add a virus counter to it.  Does it count as a "paid ability" for the purposes of the ? I.e. could I, mid-run, add a virus counter to Crypsis for the cost of one [Click]? What is the advantage to crushed garlic over minced garlic beyond texture? I use a lot of garlic in my cooking, especially minced garlic.  But lately I've been doing some more recipes with crushed garlic and while I love the texture of cooked garlic, I can't see how it could be better than minced garlic for the overall taste.  Is there an advantage to crushed garlic over minced garlic, beyond texture? Why does water pouring from a glass sometimes travel down the side of the glass? I am a Chinese citizen married to a US citizen last year. I am going to apply for a UK tourist visa. The name shows on my passport is my maiden name, while any other documents the UK visa needed, such as bank statement, is with my married name. I can provide my marriage license to prove the link between my maiden name and married mane.   Can I apply for this UK visa with my situation? How much electronics and other valuables can I bring duty-free when going to India?