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
6
votes
3 answers

Emacs global configuration of tabs

I'm attempting to switch from Vim to Emacs, but I'm tearing my hair out trying to configure it to treat tabs how I wish. I require: Inserted "tabs" to be expanded into two spaces. Emacs stubbornly sticks to eight, no matter what I do. Tabs (i.e.…
jameshfisher
  • 34,029
  • 31
  • 121
  • 167
6
votes
5 answers

Faster way to remove 'extra' spaces (more than 1) from a large range of cells using VBA for Excel

How do I remove extra spaces faster, from a large range of cells containing text strings? Let's say 5000+ cells. Some ways I have tried include: For Each c In range c.Value = Trim(c.Value) Next c and For Each c In range c =…
walter's human
  • 103
  • 1
  • 1
  • 9
6
votes
6 answers

How to stop Java from separating JSON string passed as a command line argument into separate subunits of args[]

I want to pass this JSON String to a Java class through command line arguments. {"body": "We should definitely meet up, man", "startDate": "2014-05-29 11:00:00", "endDate": "2014-05-29 12:00:00", "location": "Boca Raton", "subject": "This is the…
Ben Sandler
  • 2,223
  • 5
  • 26
  • 36
6
votes
2 answers

How do I work with spaces in my wix source path?

wxs file the File tag Source attribute; the path has a space in it.
godseyeview
  • 163
  • 2
  • 11
6
votes
4 answers

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.
Sam
5
votes
5 answers

Cocoa - Programmatically adding an application to all spaces

is there a way to add an application to all spaces programmatically? I'd like my application to be on all spaces by default.
Larvell Jones
  • 159
  • 2
  • 15
5
votes
3 answers

How to upload images to Digital Ocean Spaces using AWS SDK for Android?

Since Digital Ocean Spaces API is compatible with AWS SDK, how to upload images to Digital Ocean Spaces programmatically using AWS SDK for Android?
Quan Nguyen
  • 5,074
  • 3
  • 24
  • 26
5
votes
3 answers

Curl upload with spaces in filenames

I am trying to use cURL to upload files with spaces in their filenames onto a dedicated server. I am using bash. In a previous project, I just gave up, removing all spaces from filenames. This is not feasible for this project. Running cURL in…
5
votes
1 answer

C# Use Process.Start with parameters AND spaces in path

I've seen similar examples, but can't find something exactly like my problem. I need to run a command like this from C#: ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "cmd"; startInfo.Arguments = "/K D:\\as…
5
votes
3 answers

How to get rid of extra spacing in LinearLayout?

I've built a widget that uses a LinearLayout and I've put two TextViews in the layout. The gravity of the layout is "top". The problem is that I get a space between the two TextViews and I can't get rid of it.
Ran
  • 4,117
  • 4
  • 44
  • 70
5
votes
2 answers

Spaces in directory path python

I'm a noob at coding Python and I've run into something that no amount of Googling is helping me with. I'm trying to write a simple Directory listing tool and I cannot seem to deal with Spaces in the directory name in OSX. My code is as follows: def…
dennis
  • 83
  • 1
  • 2
  • 6
5
votes
5 answers

How do I check to see if a character is a space character in Swift?

In a program I'm writing, I need to check to see if a character is a space (" "). Currently have this as the conditional but it's not working. Any ideas? Thanks in advance. for(var k = indexOfCharBeingExamined; k < lineBeingExaminedChars.count;…
TomLisankie
  • 3,785
  • 7
  • 28
  • 32
5
votes
1 answer

Does Java regard a 'normal' space as whitespace for the purposes of Character.isWhitespace?

This might seem to be a no-brainer at first glance. It probably is, but a few things have me feeling I might be missing something. First the Java documentation for Character.isWhitespace seems to exclude it. The definition for what is and what is…
Ger
  • 889
  • 1
  • 12
  • 21
5
votes
1 answer

SharePoint 2013 REST view item with space in fieldname

I have the following to look up my standard fields in SharePoint 2013: var requestURI = _spPageContextInfo.webAbsoluteUrl + "_api/web/lists/getbytitle('" + listname + "')/items?" + "$select=ID,Title,Status"; $.ajax({ url: requestURI, …
Matthew Dewell
  • 563
  • 7
  • 30
5
votes
2 answers

JDBC url with database containing spaces

I'm trying to connect to a SQL Server database using JDBC, the database I'm trying to connecto to contains a space, and unfortunately I have no control over the name, so I can't change it. The code I'm using is: String jdbcString =…
Izbitzer
  • 53
  • 1
  • 1
  • 3