Все вопросы: [whitespace]

123 вопросов

похожие теги: removing-whitespace
8
голосов
7ответов
23482 просмотров

How to Take whitespace in Input in C

I wanted to take character array from console and it also include white spaces, the only method i know in C is scanf, but it miss stop taking input once it hit with white space. What i should do? Here is what i am doing. char address[100]; scanf("%s", address);

7
голосов
6ответов
17168 просмотров

Preserving whitespaces in a string as a command line argument

I'm facing a small problem here, I want to pass a string containing whitespaces , to another program such that the whole string is treated as a command line argument. In short I want to execute a command of the following structure through a bash shell script: command_name -a arg1 -b arg2 -c "arg...

0
голосов
4ответов
2553 просмотров

How to call WSDL2JAVA from ant with whitespaces in my path

HI guys! I try to call Axis2 WSDL2JAVA in my ant file to create a WSDL client. But it's broken because I have whitespaces in my path (I'm on Windows...). This is my ant <property name="wsdl.file" location="C:\path with whitespaces\project\subdir\my.wsdl"/> ... <target name="generate.cl...

8
голосов
1ответов
1324 просмотров

JavaScript Whitespace Syntax Error

Why does this cause a syntax error for the return statement: var FOO = (function($) { return { init: function() { } } })(jQuery); Whereas this doesn't: var FOO = (function($) { return { init: function() { } } })...

0
голосов
3ответов
533 просмотров

How to reformat space delimited lines of text into separate <div> tags in C language?</div>

I need to be able to (in C language) loop over a few lines of text where each line has some text in it where words are delimited by a variable number of white spaces. How can I detect the spaces and split each line into some kind of array so that I can put each word in a separate word tag in each...

6
голосов
3ответов
18882 просмотров

How do I insert a lot of whitespace in Perl?

I need to buff out a line of text with a varying but large number of whitespace. I can figure out a janky way of doing a loop and adding whitespace to $foo, then splicing that into the text, but it is not an elegant solution.

0
голосов
11ответов
482 просмотров

Compiler Design

Is newline and whitespaces the same in compiler design? what if you write a macro to replace newlines by whitespaces, is this correct or would it cause some form of problems?

2
голосов
1ответов
679 просмотров

Comparing two files

I am comparing two files by reading them into filestream and comparing byte by byte. How can I skip whitespaces while comparing? I am using C#.net

4
голосов
19ответов
1045 просмотров

What makes a language readable or not readable?

I heard people say they can understand their python code a year later but not their XYZ code. Why? I dont know what is good about python syntax or what is bad about another. I like C# but i have a feeling VB.NET code is easier to read. I am doing language design so what do you find makes code/syn...

0
голосов
5ответов
4884 просмотров

How can I get the first non-white space character of a line using php

I have a line that typically starts with a few spaces as the lines are in columns and use a monospace font to make things line up. I want to check if the first non-white space character (or even just the first thing that isn't a space) and see if that is a number. What is the least server inten...

4
голосов
9ответов
20642 просмотров

Remove extra white space from inside a C string?

I have read a few lines of text into an array of C-strings. The lines have an arbitrary number of tab or space-delimited columns, and I am trying to figure out how to remove all the extra whitespace between them. The end goal is to use strtok to break up the columns. This is a good example of the...

0
голосов
4ответов
6265 просмотров

Remove Whitespace From XML Nodes

How can I remove whitespace on every instance of a particular node which I specify in C#? For example let's say that I have the following XML document: &lt;XML_Doc&gt; &lt;Record_1&gt; &lt;Name&gt;Bob&lt;/Name&gt; &lt;ID_Number&gt;12345&lt;/ID_Number&gt; &lt;Sample&gt; &lt...

56
голосов
7ответов
41065 просмотров

How to show/reveal hidden or invisible characters in NetBeans?

How can you show/reveal hidden characters in NetBeans? In other editors, if this feature is turned on, a space might be shown as a small centered dot, and a tab as a right arrow. (This feature is useful to see if a file uses tabs or spaces for indentation, among other things.)

3
голосов
3ответов
6675 просмотров

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 &lt; x &lt; c} (c - x) \ dP(x) you are left with a large amount of space to the left and right of the integ...

8
голосов
4ответов
3354 просмотров

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. Cu...

99
голосов
10ответов
117500 просмотров

Replace whitespaces with tabs in linux

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

12
голосов
2ответов
2195 просмотров

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 ...

2
голосов
3ответов
373 просмотров

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 an...

1
голосов
2ответов
389 просмотров

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 ...

3
голосов
3ответов
7052 просмотров

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 symbol...

5
голосов
2ответов
24595 просмотров

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?

34
голосов
2ответов
20671 просмотров

git whitespace woes

Conflicts on whitespace suck Whitespace 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 the...

9
голосов
2ответов
50090 просмотров

Manipulating line spacing in LaTeX

I have a block of text in a quotation. Some of that text will be in a 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 ...

109
голосов
15ответов
104650 просмотров

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(" ",...

78
голосов
14ответов
119804 просмотров

How can 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 = preg_...

1
голосов
3ответов
1369 просмотров

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 &amp;emsp;, 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 ...

131
голосов
11ответов
341801 просмотров

How do you allow spaces to be entered using scanf?

Using the following code: char *name = malloc(sizeof(char) + 256); printf("What is your name? "); scanf("%s", name); printf("Hello %s. Nice to meet you.\n", name); A user can enter their name but when they enter a name with a space like Lucas Aardvark, scanf() just cuts off everything after...

1
голосов
3ответов
109 просмотров

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 ap...

8
голосов
7ответов
22596 просмотров

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 t...

9
голосов
12ответов
125122 просмотров

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 ___ ____ ...