spaces

How to setup VIM properly for editing Python files - *.py

I've troubles setting VIM (7.1.xxx) for editing python files. Identing seems broken (optimal 4 spaces). I've followed some tutorials I found via google. Still no effect :/ Please help. ...

How do you recursively unzip archives in a directory and its subdirectories from the Unix command-line?

The unzip command doesn't have an option for recursively unzipping archives. If I have the following directory structure and archives: /Mother/Loving.zip /Scurvy/Sea Dogs.zip /Scurvy/Cures/Limes.zip And I want to unzip all of the archives into directories with the same name as each archive: /Mother/Loving/1.txt /Mother/Loving.zip ...

using fstream to read every character including spaces and newline

I wanted to use fstream to read a txt file. I am using inFile >> characterToConvert, but the problem is that this omits any spaces and newline. I am writing an encryption program so i need to include the spaces and newlines and was wondering what would be the proper way to go about accomplishing this. Thanks in advance, Tomek ...

Tabs versus spaces in Python programming

I have always used tabs for indentation when I do Python programming. But then I came across a question here on SO where someone pointed out that most Python programmers use spaces instead of tabs to minimize editor-to-editor mistakes. How does that make a different? Are there other reasons why you would use spaces instead of tabs for P...

Tab key == 4 spaces and auto-indent after curly braces in VIM.

How do I make Vi-Vim never use tabs (converting spaces to tabs, bad!), makes the tab key == 4 spaces, and automatically indent code after curly brace blocks like emacs does? Also, how do I save these settings so I never have to input them again. I've seen other questions related to this but it always seems to be a little off from what ...

Tab spaced data to padded columns

Looking for a column formatting script, I have a feeling this could be a one line awk. Ideally, a small shell script is all I am after. The data is tab separated, each cell in each row is of variable length, and of course, may have spaces in it. So we have something like this dasj dhsahdwe dhasdhajks ewqhehwq dsajkdhas e dward da...

Show SOME invisible/whitespace characters in Eclipse

A long while back I transitioned to doing all my web application development in Eclipse from BBEdit. But I miss one little feature from BBEdit. I used to be able to show invisible characters like tabs but not show other invisibles like spaces. I know that I can bulk turn all of these on in Eclipse, but I wonder if there is a way to show ...

Why do multiple spaces in an HTML file show up as single spaces in the browser?

I have long recognized that any set of whitespace in an HTML file will only be displayed as a single space. For instance, this: <p>Hello. Hello. Hello. Hello. Hello.</p> displays as: Hello. Hello. Hello. Hello. Hello. This is perfectly fine, as if you need multiple spaces of...

Notepad++ tabs to spaces

Does anyone know how to convert tabs to spaces in Notepad++? I found a webpage that suggests it's possible (http://www.texteditors.info/notepad-replacements-compared.php) but I couldn't find any information about how to do it. I like to be able to do that because some web forms don't respect code with tabs in it. ...

File and space in Python

I have a file like: <space> <space> line1 <space> column 1 column 2 column 3 ... . . . <space> <space> How to remove this extra spaces? I need to extract the heading which will be on line1. Also, I need to extract column 1, column 2, column 3 etc. At the end of last column content there is '\n'.How to get rid of it ??? H...

Selecting a database in mysql with spaces in its name

I want to select my particular database in mysql console, but the problem is that my database name has a space in between and mysql ignores the part after the space. For instance, when i give the command: use 'student registration' I get the message: cannot find database 'student' ...

Echo spaces in bash script

How do I echo one or more tab characters using a bash script? When I run this code res=' 'x # res = "\t\tx" echo '['$res']' # expect [\t\tx] I get this res=[ x] # that is [<space>x] ...

Regular Expression in C# for Last Name that includes internal space

I'd like a Regular Expression for C# that matches "Johnson", "Del Sol", or "Del La Range"; in other words, it should match words with spaces in the middle but no space at the start or at the end. ...

Why would you want trailing spaces in an HTML document?

I've been looking at the source of the A List Apart website, and I've noticed something strange - every line (blank or not) has a trailing space. I work in typesetting, so trailing spaces are something I regularly remove out of course, so why in this case would you want them? I have a lot of respect for ALA so I'm assuming there's a good...

Why is emspace or enspace breaking the CSS font line-height in the HTML?

Confused about how the browser - any browser - because it's happening in all, goes about calculating emspace and enspace. Here's what's happening: I am using a free font called Gentium. font-size is 16px line-height is 19px All looks fine. Non breaking spaces - &nbsp; not a problem - that exists in the font as a character. thinspace &th...

How do I include calls to methods only present in one operating system version when compiling for multiple versions?

I have an app that is being compiled with a minimum system requirement of Tiger (OS X 10.4), but I need to include some code to deal with Spaces if the app is executing on Leopard (OS X 10.5). How do I do this? (The call I need to make is to -[NSWindow setCollectionBehavior:]). ...

how to count space in a text statement in php

how can we count space between text in php ? example: hi how are you? spaces: 3 is there any way to count spaces ? Language : Only PHP ...

Insert spaces instead of TAB in Emacs viper-mode

I am long time-vim user and recently discovered that emacs has viper-mode, offering best of both worlds (at least for me). However one thing is really bothering me since I am mostly coding in python and mixing of tabs and spaces is a big deal. When in insert mode I would like to insert viper-shift-width spaces instead of TAB when I pres...

Trim leading spaces including tabs

I need to read files using vbscript and remove all leading spaces including any tabs. I now LTRIM will remove the leading spaces but how do I remove tabs also. Thanks. ...

Runtime.exec() with absolute directory

I would like to use Runtime.exec() to initiate another process in a directory with spaces. (It sounds stupid but I really want to satisfy my curiosity) Details of the problem(simplified version) I have a myprogram.exe locates in C:/Program Files/MyProgram. What I observe: 1). when I call Runtime.exec("C://Program Files//MyProgram//mypr...