FAQ Database Discussion Community


git: fatal: I don't handle protocol '​​http'

git,clone,whitespace
I copy and pasted an git clone command from a web page: https://fedorahosted.org/ibus-typing-booster/ I got this: [email protected]> git clone ​​http://git.fedorahosted.org/git/ibus-typing-booster.git Cloning into 'ibus-typing-booster'... fatal: I don't handle protocol '​​http' I took me some time to find the bug, that's why I answer my own question below...

In R: use system() to pass python command with white spaces

python,r,system,whitespace,argument-passing
Im trying to pass a python command from R (on Windows x64 Rstudio) to a python script via the command promt. It works if I type directly into cdm but not if I do it via R using the R function system(). The format is (this is how I EXACTLY...

Why does this one chunk of code come up with error but the other one doesn't?

python,if-statement,whitespace
I have two sections of Python code - one works and the other one comes up with an error. What rule makes this the case? Here is the chunk of code that got the error, along with the error: Code: elif door == "2": print "You stare into the endless...

C Language - how to ensure a constant format is kept while reading multiple input files?

c,whitespace,string-formatting
I'm trying to indent my string output for the below code but for some reason my variables keep being pulled from the files with ranging lengths of noise or space (I'm not to sure). This is my code: #include <stdio.h> #include <string.h> int main (void) { FILE *data_File; FILE *lake_File;...

Do white spaces take space in txt files?

c,file-io,whitespace,scanf,fscanf
I'm wondering if the white spaces take space in txt files for C. For example if i'm going to take the file pointer back using fseek() or if I am going to fscanf an input from a file do I need to consider white spaces? A Assume a file has...

How to keep spaces from becoming tabs in Eclipse (w/ PyDev)

eclipse,whitespace,pydev,spaces
I have an unfortunate problem with Eclipse that only happens in existing Python files with tabs somewhere in them. It doesn't happen in empty files or non .py files. Basically, if I try to copy and then past more than 3 spaces I end up with tabs for every X...

Extra Space Before and After HTML Table

html,table,whitespace
I am trying to create a resume website with HTML CSS and Javascript. I have tables in my website that I can't seem to move closer together vertically. I've tried using CSS like margin: 0; and padding: 0; in both table, tr, and td but not luck. Can anybody help...

How to change tabSize and insertSpaces in vscode

whitespace,indentation,vscode
How do you actually go about changing the "editor.tabSize" and "editor.insertSpaces" values for vscode? I've opened File > Preferences > User Settings and added: // Place your settings in this file to overwrite the default settings { // Controls the rendering size of tabs in characters. If set to auto,...

Copy an XML file preserving closing tags of some elements

xml,haskell,whitespace,hxt
I'm hacking a thing that should copy an XML file and edit little part of it. Editing now is OK, but interestingly enough copying may be quite tricky. This is essentially «reverse engineering» work and now I know that I should somehow preserve closing tags of some elements (even if...

Python script to read a line that has white space and return value

python,whitespace,readline
I need to read the line which has the const keyword and return version as the value. Content in the Version.php file final class Version { /** * The current Piwik version. * @var string */ const VERSION = '2.0.3'; } Here is the code I have written but its...

Function to return the stripped whitespace of a string

python,string,whitespace,strip
Is there an existing function in Python that works like .strip()/.lstrip()/.rstrip() do, but instead, returns the stripped whitespace rather than the resulting stripped string? Namely: test_str = '\n\ttext goes here' test_str.lstrip() # yields 'text goes here' test_str.lwhite() # yields '\n\t' Where .white(), .lwhite(), and .rwhite() are the functions that I'm...

Why does this scanner not eat whitespaces?

regex,whitespace,bison,flex-lexer
These are my lexer-definitions, there are many lexer-definitions but this one is mine. I have several regexes trying to capture and ignore whitespace, from this sample. The error I get is that in line 1: 14 there is a $undefined Symbold to be found - that is of asci-value 32....

TextBox MaxLength property is counting whitespace

wpf,textbox,whitespace,maxlength
My TextBox has a limit of 100 characters set by MaxLength property. However, if the user types '\n' or '\t', they are counted as an additional character, which would make sense to the programmer, but not to the user. Is there any workaround besides counting the characters by myself?...

How do I remove white-space from map-canvas?

twitter-bootstrap,google-maps,twitter-bootstrap-3,whitespace
I'm looking to align this map with some content I have under it in another row but I can't seem to figure out how to remove the left and right white-space, (and keep it responsive) http://www.bootply.com/QpCcKAQhBu...

White spaces in the for loop in win batch

batch-file,for-loop,whitespace
I have the following loop in my Windows batch script set Folder = %~1 for %%M in (d:\%Folder%\*.exe) do ( set FileName = %%~nM echo !FileName! ) When one of the Folder have spaces the %%M is has value till the first space. How can I fix it? ...

dynamic select option from ajax no space

jquery,ajax,whitespace
success: function(data) { //console.log(data); var country = $('#Country'); country.empty(); $('#Cities').empty(); for (var i = 0; i < data.length; i++) { $(country).append('<option id=' + data[i].sysid + ' value=' + data[i].name + '>' + data[i].name + '</option>'); //console.log("PAIR " + i + ": " + data[i].sysid); //console.log("PAIR " + i + ":...

Regex International Phone numbers allowing white spaces

regex,whitespace,phone-number,international
I'm trying to get a regex to validate international phone numbers. This is what i have so far: ^\+?( |\(|\))*?\d{8,14}$ What I'm aiming for is total allowed digits is 8-14. In addition, to allow as many whitespace and dashes in between, after or before the digits. Examples: 12345678901234 123 456789...

How can I split an expression onto multiple lines in Python

python,string,whitespace,string-formatting
How can I split an assignment like this onto two lines? myLongVariableName = 'some somewhat long format string like this %s' % myOtherVariable I tried a few variations: myLongVariableName = 'some somewhat long format string like this %s' % myOtherVariable myLongVariableName = 'some somewhat long format string like this %s'...

(bootstrap) Keeping a bit of vertical space between elements when they wrap?

html,css,twitter-bootstrap,button,whitespace
Using Bootstrap, when I'm putting a bunch of elements (e.g. buttons) in a row and shrink the window, the elements wrap around. But while there is some horizontal space between the elements when the window is wide enough to contain everything next to eachother, vertically everything gets stuck together, with...

max number of text lines + ellipsis

css3,text,overflow,line,whitespace
I have multiple titles with different lenghts and i would like them to always take 1 line and leave suspension points/ellipsis (...) if they can't fit. I can't just change the text inside the divs because the h2s inside them will automatically change everyday. Heres my code: http://jsfiddle.net/FranLegon/k9LsLuuk/ You can...

How to print variables without spaces between values

python,whitespace,python-2.x
I would like to know how to remove additional spaces when I print something. Like when I do: print 'Value is "', value, '"' The output will be: Value is " 42 " But I want: Value is "42" Is there any way to do this?...

Replace every symbol of comments by whitespace

c#,replace,comments,whitespace
I have some C# code document. Need to replace every symbol of every comment by "whitespace".(need to do this with one-lined and multi-lined comments both). As example: I have comment: //12345 it must be replaced to 7 whitespaces. The same with multi-line comments. After doing this action I need to...

Regular Expression Substring in SQL on two character delimeter

sql,regex,oracle,substring,whitespace
I am attempting to take a delimited string and return each substring between delimiters. This is used in a bigger function I am writing thus the delimiter is usually a variable. A very common delimiter that we use is ', ' and thus that has been my number one test...

Elasticsearch “pattern_replace”, replacing whitespaces while analyzing

elasticsearch,whitespace,tokenize,removing-whitespace
Basically I want to remove all whitespaces and tokenize the whole string as a single token. (I will use nGram on top of that later on.) This is my index settings: "settings": { "index": { "analysis": { "filter": { "whitespace_remove": { "type": "pattern_replace", "pattern": " ", "replacement": "" } },...

What is the symbol for whitespace in C?

c,whitespace,space
I am trying to figure out how to check if a character is equal to whitespace in C. I know that tabs are '\t' and newlines are '\n', but I want to be able to check for just a regular normal space (from the spacebar) inside of an if statement....

What is causing this white space at the bottom of my page in Chrome?

google-chrome,hosting,whitespace,removing-whitespace,shockwave
I've been working on my new website for many days (building it locally on my Macbook Air), and always testing it locally in the Chrome browser on my computer. When I view it locally, it looks perfect. However, when I upload it to my hosting account @ hostmonster.com, for some...

Display Rules for Whitespace for Elements inside Inline Spans

html,css,whitespace
I am having a weird issue where I tend to think that a space should exist, but browsers clobber it. At the very least, I cannot quite understand the underlying logic for the behavior of how spaces are handled in elements that live inside an display: inline-block;. For example: <p>...

Can't get rid of invisible padding / white space to allow text to wrap under button

html,css,forms,button,whitespace
I am a beginner to html and css and need help with a small problem I'm facing. On this website I am redesigning, I have three button form (Donate, Find and Subscribe). I want the paragraph beneath the Donate and Find buttons to fit where the white space appears. I...

Regular expression to match any vertical whitespace

.net,regex,perl,whitespace,multiline
Is there a regex pattern for .NET that will match any character that will result in multiple lines, i.e. any vertical whitespace character, like perl regex does with \v? In other words, is there a way to match \n (new line), \r (carriage return), \v (vertical tab), and \f (form...

space containing items in bash for-loop

bash,for-loop,whitespace,filenames,filepath
I want to recursively convert all markdown files under ./src/ to html: #!/bin/bash function do_recursive_pandoc { local markdown_src_file_extension=\*.markdown local markdown_src_path="$1" local html_output_path="$2" mkdir "$html_output_path" 2>/dev/null for i in $(find $markdown_src_path -name $markdown_src_file_extension 2>/dev/null | cut --delimiter='/' --fields=2- ) do mkdir "$html_output_path"/$(dirname "$i") 2>/dev/null pandoc -rmarkdown -whtml "$markdown_src_path"/"$i" --output="$html_output_path"/"$i".html done }...

Remove space from a filename

perl,whitespace,removing-whitespace
I am stuck at finding an answer to my question, so i made windows-cmd like program and one of my feature is to rename a file. Everything is fine if theres no whitespace in the old name / new name, but as long as theres a space it simply doesn't...

In Go, how can I state I want to match all kinds of space, including the non-breaking one?

regex,unicode,go,whitespace
I have to match a given pattern that looks like this : Place *: *(.*) In other words, I have a label, some spaces, a colon, some spaces, and the value I want. However, I have in my data some places where spaces are not the usual 20 ASCII character,...

Atom text editor remove trailing whitespace on save

save,whitespace,sublimetext3,removing-whitespace,atom-editor
I am switching from Sublime text to Atom text editor. I believe it is the right decision for me. However, something is bothering me. When I save any file in sublime text it does not include any trailing blank line. But saving any file in Atom text editor leaves a...

JQuery add a whitespace to each new text node to prevent clumping on extraction

jquery,text,whitespace
What I do is I want to transform <div id=master> Blah <span id=crap>Blah1</span> <div id=crap2>Blah2</div> <b>Blah3</b> </div> to <div id=master> Blah <span id=crap> Blah1 </span> <div id=crap2> Blah2 </div> <b> Blah3 </b> </div> because when I extract all the text from all elements inside master it becomes looking like this...

.append() method doesn't works with   in

jquery,html,string,whitespace
Have following code: $("[id$='somelement_detection']").parent().parent().append("<span id='checkspan_button' class='checkspan checkspan_unchecked'/>&nbsp;</span>"); but it produces wrong output: <span class="checkspan checkspan_unchecked" id="checkspan_button"></span> Without &nbsp; I can't use this span in IE for some actions. Any suggestion?...

How to remove white spaces from columns in SQL Server 2000?

sql-server,sql-server-2000,whitespace
I have an old SQL Server 2000 database from which I read data. My problem is every query involving a String returns a value the size of that column filled with blank spaces. e.g: let's say we have a column called NAME CHAR(20). All queries would return: "John " instead...

How do I wrap text in a pre tag for Internet explorer?

html,css,internet-explorer,whitespace,word-wrap
I am using following code to wrap the <PRE> region in HTML: <PRE style = "white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"> It is working fine on chrome and Mozilla but the same is not working for IE. I am using IE9. Please tell me if any...

Remove spaces from user input string in Python

python,string,whitespace,user-input
how can I remove whitespaces from within a user input string? Can't I use .replace(" ","")? it didn't work for me. My code: >>>p=raw_input ("Enter phrase:\n") >>>p.replace(" "."") It still outputs user input phrase WITH spaces..what am I doing wrong?Please help. ...

Count the number of whitespaces at the beginng of the string

vb.net,string,whitespace
Is there an easy way using vb.net to count whitespaces in at the beginning of the string? For example my string is " this is a test". The number of whitespaces in the beginning is 3. Is there a built-in function to count them programmatically?...

Show whitespace in Visual Studio Code

whitespace,vscode
Is it possible to show whitespace characters, like the the space character, in Visual Studio Code? There doesn't appear to be an option for it in the settings.json (though it is an option in Atom.io), and I haven't been able to display whitespace characters using CSS....

Remove whitespaces from XML file read from a zip file

java,xml,inputstream,whitespace,zipinputstream
I'm reading in an XML file that's stored inside a zip file. I need to remove the whitespaces, but I nothing seems to work. Here's what I have, but trim() isn't doing anything. for (Enumeration e = zip.entries(); e.hasMoreElements(); ) { ZipEntry entry = (ZipEntry) e.nextElement(); InputStream inputStream = zip.getInputStream(entry);...

Adding whitespaces to a multicolumn Listbox in Winforms

c#,winforms,listbox,whitespace,multicolumn
I have a Listbox with two Columns in it and filling it that way: list.Items.Add(string.Format("{0} {1}","header1","header2")); for (int i = 0; i < column1.Count;i++) { list.Items.Add(string.Format("{0} {1}", column1[i], column2[i])); } What I want to do is putting whitespaces in it without doing it on my own (without making the gap...

Launching exe with parameters containing whitespace from vb.net

vb.net,string,whitespace,exe,launch
What I need to do: I have a path (copied from a working shortcut) to an .exe that I need to launch from my vb.net application. Following Path: "C:\Program Files (x86)\Citrix\ICA client\pnagent.exe" /CitrixShortcut: (2) /QLaunch "Farm1:ADS @ Citrix" My problem: I cannot figure out how to do this. My best...

Multiple white space in html

html,styles,whitespace
I would like to ensure that my chords above words are separated nicely by multiple white space. The issue is that when I use pre, it comes out pre-formatted and hence not what I wanted. Also, with &nbsp;, the code looks very ugly. What is the best method to solve...

How to read a space in bash - read will not

bash,character,whitespace
Many people have shown how to keep spaces when reading a line in bash. But I have a character based algorithm which need to process each end every character separately - spaces included. Unfortunately I am unable to get bash read to read a single space character from input. while...

Python: prevent mixed tabs/spaces on module import

python,whitespace,indentation
I know you can ensure pure tabbed/spaced code by calling Python with -tt. However, when I have no control over the top-level call, can I still enforce this behaviour on the modules that are loaded by my script?

Unwanted Space Between
and

html,css,html5,whitespace,semantic-markup
I have the following HTML5 code: <!doctype html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <style> body { max-width: 960px; margin: 0 auto; font-size: 120%; } header, nav { margin: 0; padding: 0; border: 1px solid black; } header { border-color: red; } img.mainpicture { width: 100%; height: auto;...

Remove whitespace from all filenames in directory - Java

java,image,directory,whitespace,rename
I have directory of images and I want to rename the files by removing all of the whitespace in the name. So let's say I have a file name called " f il ena me .png" (I plan on checking all of the file names in the directory). How might...

XSLT : Insert new line between two elements in a template

xml,visual-studio-2010,xslt,whitespace
I'm currently entering in the world of XSLT, because I've to make a transformation between two XML files. I'm starting, but I face a small issue which make my files hardly readable on every generation. I've as input an XML which is: <?xml version="1.0" encoding="utf-8"?> <ConfigurationNodes> <Versions> <PackagesA Version="1.8" />...

non-breaking space in link

html,css,whitespace
In a subnavigation of a Website I try to have the link "Suite «Mont Blanc»" which was read out of the Backend to be wrapped like this:       Suite «Mont Blanc» And not:   Suite «Mont       Blanc» I know there is &nbsp; but if I insert that in the Structure-Element Name (which...

ScalaXML and empty lines

xml,scala,whitespace,implicit-conversion,removing-whitespace
I'm just getting started in scala and have an issue with representing my domain object (case class) to a well-formatted XML. I have the following implicit converter: implicit def identifierToXml(ident : Identifier): Elem = <identifier> { if(ident.use != null) <use value={ident.use}/> } { if(ident.label != null) <label value={ident.label}/> } {...

python lxml tree, line[] creating multiple lines, desire single line output

python,xml,parsing,whitespace
I'm am creating an xml file with python using lxml. I am parsing through a file by line, looking for a string, and if that string exists, I create a SubElement. I am assigning the the SubElement a value which exists in the parsed file after the string I'm searching...

Whitespace in textarea

php,textarea,whitespace,simple-html-dom
I build an array of URLs from the content of a textarea, than process it with simple php dom. I get this error: Warning: file_get_contents(http://www.example.com ) Obviously, there is a whitespace at the end of the URL (which is the last in the array and the last in the textarea)...

Sending escaped whitespaces in HTTP POST with JMeter

http-post,jmeter,whitespace
I'm having trouble with sending an HTTP POST request with a parameter that has a value that includes a whitespace. JMeter replaces every " " and "%20" with a "+". It seems to have something to do with the HTTP implementation as it occurs only when using HttpClient3.1 and HttpClient4....

How to ignore whitespace in a file for c++

c++,file,io,whitespace,istream
I'm a beginner to c++ and one of my homework assignments is to add two binary numbers located in a file. These numbers are separated by a space within the file. Assuming all binary numbers are 8-bits. So we read them from a file and store the 8-bits into a...

Delete Registry Key with spaces at the end of line through VBS

vbscript,registry,whitespace
It seems that reg delete does not work with keys that have spaces at the end. I'm trying to delete a key with spaces, for example: "HKCU\Software\Microsoft\Sample " Does anyone have any idea on how to delete this, I already use the replace and trim function to convert the registry...

How to remove both whitespace and new line in Regex

regex,newline,whitespace
I have a text string like: Function: General Business So after "Function:" there is a bit of whitespace, then a new line. I have created an API to a website and need to do some Regex to just get "General Business" as a string. At the moment my regex is...

Using exact percentages and font-size:0 to make grids that fit perfectly?

html,css,responsive-design,whitespace
I'm trying to work with grids which are whole numbers, that perfectly match up, e.g 20% for 5 menu items would fill 100%. I have the following code: #menu-primary-navigation li{display:inline-block;font-size:0;width:20%;} #menu-primary-navigation li a{font-size:22px;} I understand the issue of whitespace between ul li elements that means 20% elements will not fit...

Perl and Regex - single line mode matching

regex,string,perl,whitespace
Why doesn't perl -ne "print if /(<Conn)([\S|\s]+?)(>)/sg;" /path/to/file match <Connector port="PORT" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" />` when it does match <Connector port="PORT" protocol="AJP/1.3" redirectPort="PORT" /> And what would I need to do to match both with the same regex?...

Simple ZSH function and files with spaces in their name

whitespace,filenames,zsh,expansion
I have put the following function into my ~/.zshrc file: function note() { vim $HOME/Dropbox/$1.md } When I call it with note "20150209-132501-Recx-new note today.md" for example it creates a new file but with the file name "20150209-132501-Recx-new". I realise this is a simple question but how do I get...