whitespace

Is there a way to automatically strip out trailing whitespace in code on commit to CVS?

Hi! We're using CVS, on every release we have to synchronise two different branches of code, and in every release cycle it's the same story, whitespace problems causing errors and wasting time. I'm looking for a way to automatically strip out trailing whitespace upon committing a file to CVS, unless explicitly forbidden, say by a comma...

Using Perl, how can I replace all whitespace in a file with newlines?

For example text file: Speak friend and enter using a Perl script to remove whitespace and replace with carriage-return Speak friend and enter ...

Oracle - how to remove white spaces?

I am running this statement: select trim(a),trim(b) from table x; Even though I used the trim() statement, my output looks like this: A B ___ ____ kunjramansingh ...

problem with oracle sqlplus with whitespace in the path of the @ command

I'm running Oracle 11g on Linux and I'm trying to run a script which will create my database. This script runs fine on windows, but when I test it on Linux, I get the following error: SP2-0556: Invalid File Name The problem may be that the path to the file name has a space in it. I'm going to simplify the problem down to one of the ...

White bar at the bottom of root view!

Hi, I have two view controllers in the app. When the app starts, the layout of the root view controller's view is just fine. When a button is clicked, the view controller switches to the other one - which shows fine too. However, when the view is switched back to the root view, the contents are shifted UP by about 20 pixels, leaving a ...

Sharepoint GetListItems preserve whitespace?

I am using the Sharepoint Lists.asmx web service to read some data from a list, with the GetListItems method. This is all working fine and as expected, but when you retrieve a field with a large amount of text, the whitespace and linebreaks are not included in the XML node. Is there an option to include this whitespace in the return XM...

GUI border dilemma

I have this dilemma about designing/programming border or gap widths in an application of mine. I'm using Swing but this is sort of implementation-agnostic. I have a splitter pane (JXMultiSplitPane) dividing two subpanes, shown below outlined in black; the black border will be gone in the real application and is just here for debugging. ...

Using an emsp; in Internet Explorer 6

As I have a background in the publishing industry, I prefer to use fixed-width spaces like em spaces. However, IE6 displays a box when I use  , which really bugs me. Can I do a javascript replace just for IE6, or should I just not use em spaces? Edit Just to prove that it's not just my computer, MercerTraieste usefully linked to th...

To strip whitespaces inside a variable in PHP

How can you strip whitespaces in PHP's variable? I know this comment PHP.net. I would like to have a similar tool like tr for PHP such that I can run simply tr -d " " "" I run unsuccessfully the function php_strip_whitespace by $tags_trimmed = php_strip_whitespace($tags); I run the regex function also unsuccessfully $tags_trimmed...

How to replace multiple white spaces with one white space

Let's say I have a string such as: "Hello how are you doing?" I would like a function that turns multiple spaces into one space. So i would get: "Hello how are you doing?" I know I could use regex or call string s = "Hello how are you doing?".replace(" "," "); But I would have to call it multiple...

Manipulating line spacing in LaTeX

Hello everyone, I have a block of text in a quotation. Some of that text will be in very small font (\scriptsize) and some much bigger (\Large). My problem is that the letters in the big font push right up against the letters in the line above. This effect is unacceptably distracting to the reader. (Trust me; for my use, it is.) My...

git whitespace woes

Whitespace, it turns out, has ended up being a horrible pain for me while using git. git config apply.whitespace=strip seems to highten your chances of getting conflicts (as you strip unneeded whitespace and then other collaborators see the stripped whitespace as a change to their commits?) I've tried a few other configurations for app...

How do I change the amount of whitespace between sections in Latex?

How do I modify the distance between the end of a section and the header of the next section in a Latex document? ...

Bash script to automatically create symlinks to subdirectories in a tree

Ok, this is my third try posting this, maybe I'm asking the wrong question!! It's been a few years since I've done any shell programming so I'm a bit rusty... I'm trying to create a simple shell script that finds all subdirectories under a certain named subdirectory in a tree and creates symbolic links to those directories (sounds more...

Whitespace woes in Regex

I am using a simple Perl script to parse XML and convert it to usable SQL. My current SQL lines go something like this: INSERT INTO table VALUES ('data1', 'data2', 'data3', ); Obviously I need to remove the comma at the end there. Sounds simple but I just can't get regex to find it. I tried s/,\s+)/)/ but that doesn't change anything...

Why doesn't this Regular Expression match a space?

I have the following regular expression: ([0-9]+),'(.)':([0-9]+),(L|R|'.') It matches this just fine: 1,'a':1,R However, if I replace a with a space, it fails: 1,' ':1,R Why doesn't . match it? Is a space not classified as a character? I can't use \s because I don't want to match tabs and line breaks. I also tried: ([0-9]+),'(....

Show trailing whitespace on emacs only on non-empty lines

Right now I'm using: (setq show-trailing-whitespace t) In my .emacs to show trailing whitespace for my CC mode. I can't seem to figure out how to have it not show the whitespace font for whitespace only lines. Empty lines separating indenting code are sometimes indented at the code level and sometimes not indented at all, and I don't...

Replace whitespaces with tabs in linux

How do I replace whitespaces with tabs in linux in a given text file? ...

Definition of HTML whitespace rules?

I'm looking for this definition to make my HTML renderer conform a bit better. Currently it's guessing which whitespace to keep, which to collapse and what to throw. The SGML standard is hard to find and the HTML standard doesn't seem to treat the subject with the required depth for my needs. Currently my renderer parses the HTML into a...

LaTeX puts too much space next to integrals

Integrals with limits take up width horizontally that includes their limits. In other words, if you have an integral with large limits below (or above) the integral \int\limits_{-\infty < x < c} (c - x) \ dP(x) you are left with a large amount of space to the left and right of the integral before the integrand (c - x) starts. This i...