Questions tagged [spaces]

The space character, `U+0020`, used to separate words/tokens in most natural and programming languages.

The space character, U+0020, used to separate words/tokens in most natural and programming languages. Space is a whitespace character.

Spaces are frequently of concern to programmers in the context of languages with significant whitespace (e.g. Python), source code indentation, and separating tokens. Separating tokens correctly is important for shell scripts, URIs, file names/paths, text processing, and string formatting. Questions regarding all of these areas are common on Stack Overflow, as spaces appearing unexpectedly can cause unexpected behavior whose source is not immediately obvious.

"Spaces" may also refer to the virtual desktop functionality of Mac OS X, first referred to as "Spaces" in OS X 10.5.

1024 questions
5
votes
2 answers

Tabs "can be displayed completely differently on different types of systems and editors"?

While reading arguments against the use of Tabs, I came across this (source): ...it can be a good idea to avoid tabs alltogether, because the semantics of tabs are not very well-defined in the computer world, and they can be displayed completely…
its_me
  • 10,998
  • 25
  • 82
  • 130
5
votes
2 answers

Inno Setup, spaces and double quote in [Run]

I'm trying to schedule a task on Windows, and unfortunately, it doesn't work! The task is created but not correctly. When I look into task's parameters, it says: PROGRAM: C:\Program ARGUMENTS: Files(x86)\AppName\executable.exe This is how I…
user3628871
  • 55
  • 1
  • 5
5
votes
4 answers

java creating blank spaces with printf

When I run my program, I get this: run: Heat Index: Key West, Florida Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov …
user2967353
  • 257
  • 3
  • 9
  • 18
5
votes
6 answers

Is there a text editor that will automatically determine whether to indent with spaces or tabs?

It's very easy to set a text editor to use spaces or tab characters with each press of the tab key. However, I'm working with a grip of Python code maintained by a large team of developers in my company, and some use spaces and some use tabs. I…
Cory Petosky
  • 12,458
  • 3
  • 39
  • 44
5
votes
7 answers

Length of string WITHOUT spaces (C#)

Quick little question... I need to count the length of a string, but WITHOUT the spaces inside of it. E.g. for a string like "I am Bob", string.Length would return 8 (6 letters + 2 spaces). I need a method, or something, to give me the length (or…
kikx
  • 61
  • 1
  • 1
  • 3
5
votes
2 answers

Sublime2 "translate_tabs_to_spaces: false" but it still inserts spaces. Why?

So I'm using Sublime Text 2, and I have set "translate_tabs_to_spaces": false, so that tabs remain tabs and don't get converted to spaces. However, when I type a tab, it still inserts 4 spaces, and not a tab. Does anybody know why that is?
Willem Mulder
  • 12,974
  • 3
  • 37
  • 62
5
votes
2 answers

Git pull --rebase converting spaces to tabs

This problem is driving me mad. Using Git with Github. I'm working on one particular file using spaces instead of tabs. I always ensure that I change all tab indents to spaces. Diffs confirm that I've changed tabs to spaces. I commit and push the…
Tim W.
  • 371
  • 4
  • 13
5
votes
3 answers

bash for loop using variables with spaces

I am on Mac OS 10.7.x and needing to interrogate network services to report on which interfaces are defined against a service and which dns servers are set against each. servicesAre=`networksetup -listallnetworkservices | tail -n +2 | sed…
chop
  • 461
  • 1
  • 6
  • 16
5
votes
1 answer

Spaces in string in django templates

I have this code in a Django Template: input type="text" name="ppoisNomePOI" value={{ request.session.ppoisNomePOI }} If my "request.session.ppoisNomePOI" is "John" then in the page it appears "John" in the input, but if my…
Krull
  • 259
  • 2
  • 6
5
votes
8 answers

How to add spaces around a substring if spaces aren't already there yet?

Example input string: test:)test:)test:) :) test:p test Wanted output string: test :) test :) test :) :) test :p test As you can see in the example above, I want to parse the string and produce an output string with spaces added around all…
Erik
  • 121
  • 1
  • 3
4
votes
2 answers

How do I use a variable containing a filename with spaces in a bash script?

I have a simple bash script running on OS X that removes specific files and directories and copies new ones in their place. One Mac .app directory contains a space, and when I run the script there is a "No such file or directory" error. Here is the…
nick
  • 221
  • 2
  • 3
  • 8
4
votes
2 answers

Getting SignatureDoesNotMatch: null error while uploading images to DigitalOcean Spaces using multers3 node.js

Error: code:'SignatureDoesNotMatch' extendedRequestId:undefined message:null name:'SignatureDoesNotMatch' region:null // Load dependencies const aws = require('aws-sdk'); const express = require('express'); const multer = require('multer'); const…
Aryan
  • 3,338
  • 4
  • 18
  • 43
4
votes
8 answers

PHP Insert Multiple Spaces

I've got some data that needs to be cleaned up into a fixed length format. I'm using PHP to grab the data out, covert it, and put it back in, but it's not working as planned. There is a certain point in each piece in the middle of the data where…
bmbaeb
  • 520
  • 1
  • 8
  • 15
4
votes
2 answers

SQL Is there a way to link two tables with the same value but different formats?

So I have two columns from two different databases that I would like to link. Problem is that my first column outputs the numbers with this format "1 789 987" and my second column outputs the data "0000000001789987" How can I write my WHERE sql…
Kalween
  • 101
  • 7
4
votes
2 answers

JAVA CSV writing Space without quotes

I am using Apache Commons CSV lib to write CSV files. The sample provided to me had a strange pattern. Sample output expected: Name with designation,Phone,Action,Date "John Doe,Officer", ,Under investigation,8-Jun-2017 Jack,+123-4567,False…
n0ahz
  • 107
  • 9