whitespace

XML Parsing: how to ignore whitespace or enter/return space

hi guys, i have an online xml file filled with items. At startup i check my internet connection, if so, i parse the xml and compare the item objects to those in my sqlite database. One of the item values is 'lastupdated', whichs is a php generated string. if the lastupdated value from the xml item is different from the value of the on...

Suggestions for displaying code on webpages, MUST use <br> for newline

Hi, I want to post code snippets online (wordpress.com blog) - and have its whitespace formatted nicely. See the answers suggested by this other SO question: Those would be OK, except that I like to copy code to clip board or clip entire pages using Evernote - and they use either the <pre> tag or <table> (or both) to format the code. ...

postgres - regex_replace in distinct clause?

Ok... changing the question here... I'm getting an error when I try this: SELECT COUNT ( DISTINCT mid, regexp_replace(na_fname, '\\s*', '', 'g'), regexp_replace(na_lname, '\\s*', '', 'g')) FROM masterfile; Is it possible to use regexp in a distinct clause like this? The error is this: WARNING: nonstandard use of \\ in a string lit...

problem in Latex

Hellom I have a problem in Latex: if i have: \begin{enumerate} \item Alert - Mesaje de avertizare, erori, etc. \item Form - Permite crearea de ecrane compuse din alte componente, cum ar fi imagini (Image) sau articole derivate din Item (ChoiceGroup, CustomItem, DateField, Gauge, ImageItem, Spacer, StringItem, TextField). \item List...

sed Removing whitespace around certain character

Hi, what would be the best way to remove whitespace only around certain character. Let's say a dash - Some- String- 12345- Here would become Some-String-12345-Here. Something like sed 's/\ -/-/g;s/-\ /-/g' but I am sure there must be a better way. Thanks! ...

White space on top of flash movie within table cell

I have a flash movie, height = 151px width = 228, this is placed within a table cell ( cellpadding = 0 cellspacing = 0 vertical-align = top), but when it displays within the explorer windows there is a white space about 20px above the flash movie. I want the flash movie to appear directly under the grey lines. Here is a screen shot of t...

Count white spaces to the left of a line in a text file using C++

Hi all, I am just trying to count the number of white spaces to the LEFT of a line from a text file. I have been using count( line.begin(), line.end(), ' ' ); but obviously that includes ALL white spaces to the left, in between words and to the right. So basically what I'm wanting it to do is once it hits a non-space character stop i...

pie chart DynamicHeight property causing huge white space issue in SSRS 2008

I can successfully get the dynamicheight property of a pie chart to match the size of a table it appears adjacent to in the report. The problem is that by using this property, RS is now inserting huge amounts of white space beneath the pie chart. Why is this occuring and how can I make it stop? ...

Best way to get ints from a string with whitespace?

Hey all, I know this is simple, I just can't recall the best way to do this. I have an input like " 5 15 " that defines the x and y of a 2D vector array. I simply need those two numbers into int col and int row. What's the best way to do this? I was attemping stringstreams, but can't figure out the correct code. Thanks for any help! ...

Ignore whitespace in HTML

Is there anything in HTML/CSS that tells the browser to ignore whitespace completely? So many times when you want to put, say, two images next to each other - you try desperately to keep the HTML readable, but the browser puts a space between them. So instead of something like this: <img src="images/minithing.jpg" alt="my mini thing" ...

Custom whiteSpace using Haskell Parsec

I would like to use Parsec's makeTokenParser to build my parser, but I want to use my own definition of whiteSpace. Doing the following replaces whiteSpace with my definition, but all the lexeme parsers still use the old definition (e.g. P.identifier lexer will use the old whiteSpace). ... lexer :: P.TokenParser () lexer = l { P.w...

regex to match trailing whitespace, but not lines which are entirely whitespace (indent placeholders)

I've been trying to construct a ruby regex which matches trailing spaces - but not indentation placeholders - so I can gsub them out. I had this /\b[\t ]+$/ and it was working a treat until I realised it only works when the line ends are [a-zA-Z]. :-( So I evolved it into this /(?!^[\t ]+)[\t ]+$/ and it seems like it's getting better,...

extra whitespace on top of image in form in IE

I have a test form with whitespace above the top image that shouldn't be there... The image is a background-image attached to the h1 tag. It looks like there's space between the .wufoo div, and the #main_form form. Css: <link rel="stylesheet" href="https://system.netsuite.com/c.659197/oboe/integrate/wufoo/css/structure.css" type="text/...

Bash script to replace spaces in file names

Can anyone recommend a safe solution to recursively replace spaces with underscores in file and directory names starting from a given root directory? For example, $ tree . |-- a dir | `-- file with spaces.txt `-- b dir |-- another file with spaces.txt `-- yet another file with spaces.pdf becomes $ tree . |-- a_dir | `--...

XSL ignores my whitespace even with the <xsl:text> tag

I'm making a header in my XSL code that includes multiple fields of information, i.e. "Name: Bob Birthdate: January 1 1900," etc. I enclosed them in tags as such: <xsl:text> Gender: Male </xsl:text> But on the page, the whitespace around Gender/Male is being ignored. Is there something I'm missing? Thanks in advance. ...

Java doesn't work with regex \s, says: invalid escape sequence

hi, I want to replace all whitespace characters in a string with a "+" and all "ß" with "ss"... it works well for "ß", but somehow eclipse won't let me use \s for a whitespace.. I tried "\t" instead, but it doesn't work either.. I get the following error: Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ ) this is my...

C++ cin whitespace question

Programming novice here. I'm trying to allow a user to enter their name, firstName middleName lastName on one line in the console (ex. "John Jane Doe"). I want to make the middleName optional. So if the user enters "John Doe" it only saves the first and last name strings. If the user enters "John Jane Doe" it will save all three. I was ...

Is there any way to view whitespace in the query editor for SQL Server Management Studio Express 2005?

I have it enabled in Visual Studio 2008, but I'd really like to enable this feature in SQL Server Management Studio 2005 Express. Does anyone know if its possible? Maybe in a later version? EDIT: Sorry, I meant specifically in the text/query editor. ...

Xml with spaces as InnerText

I'm parsing Xml data which has entries like this: <item name="UserText" type_name="gh_string" type_code="10"> </item> I'm supposed to read the 6 spaces as a String, but both the InnerText and InnerXml values of the System.Xml.XmlNode are zero length Strings. Is there any way I can get at this whitespace data in existing files an...

In Visual Studio is there a way to change the whitespace tab character?

I prefer to code with white space visible and I use tabs. (no holy wars here please) Is there a way to change the tab representation from an arrow to a bar or some other character? I already have the color set on a dark gray color on a black background so it doesn't "intrude" when I'm not looking for them, but the default arrow represe...