spaces

Can you make valid Makefiles without tab characters?

懵懂的女人 提交于 2019-11-27 17:19:10
target: dependencies command1 command2 On my system (Mac OS X), make seems to require that that Makefiles have a tab character preceding the the content of each command line, or it throws a syntax error. This is an annoyance when creating or editing Makefiles because I have my editor set up to be all-spaces-all-the-time. Can you make valid Makefiles without tab characters? Alok Singhal This is a syntax oddity/requirement of make , it has nothing to do with Mac OS X. Unfortunately, there's nothing you can do about it if you are going to use make . Edit : GNU Make now supports a custom recipe

How can I convert tabs to spaces in every file of a directory?

。_饼干妹妹 提交于 2019-11-27 16:34:36
How can I convert tabs to spaces in every file of a directory (possibly recursively)? Also, is there a way of setting the number of spaces per tab? Martin Beckett Warning: This will break your repo. This will corrupt binary files , including those under svn , .git ! Read the comments before using! find . -type f -exec sed -i.orig 's/\t/ /g' {} + The original file is saved as [filename].orig . Downsides: Will replace tabs everywhere in a file. Will take a long time if you happen to have a 5GB SQL dump in this directory. Simple replacement with sed is okay but not the best possible solution. If

Bash variables with spaces

纵然是瞬间 提交于 2019-11-27 13:30:29
I'm facing the next problem in MinGW shell under windows. I have in my /etc/profile the next expression: export GIT_SSH="/c/Program Files/TortoiseGit/bin/TortoisePlink.exe" This doesn't work when I use git fetch on the local repository. But if I do it like (old dos way) this it works: export GIT_SSH="/c/Progra~1/TortoiseGit/bin/TortoisePlink.exe" My question is: How can I make it work using spaces in the variable? For testing purpose you can simulate something like this (any example is good): export VAR="/c/Program Files/TortoiseGit/bin/TortoisePlink.exe" # and try to execute like this $VAR Is

How do I convert a list into a string with spaces in Python?

穿精又带淫゛_ 提交于 2019-11-27 13:22:53
问题 How can I convert a list into a space-separated string in Python? For example, I want to convert this list: my_list = [how,are,you] Into the string "how are you" The spaces are important. I don't want to get howareyou as I have with my attempt so far of using "".join(my_list) 回答1: " ".join(my_list) you need to join with a space not an empty string ... 回答2: I'll throw this in as an alternative just for the heck of it, even though it's pretty much useless when compared to " ".join(my_list) for

Auto-convert tab to 4 spaces in TextWrangler?

a 夏天 提交于 2019-11-27 12:37:30
问题 Is there a preference in Textwrangler to redefine a tab as 4 spaces? In Vim this is set expandtab in the vimrc, but I don't know how to set it in TW besides clicking "Detab" when I'm done editing the document. Thanks, Kevin 回答1: Go to "Preferences" -> "Editor Defaults" -> "Auto-expand tabs," and then set tabs to 4 spaces. Then restart TextWrangler for changes to take place. 回答2: For docs that already exist you have to hit the "Text options" button in the top of the editor window of the open

Git Merge and Fixing Mixed Spaces and Tabs with two Branches

时光怂恿深爱的人放手 提交于 2019-11-27 11:14:18
I've gone through some similar SOQ's and have not seen an adequate solution for this case. I've noticed that in many files there is a dirty mix of tabs and spaces used for indenting. The coding standard we follow uses 4 spaces for a tab currently. Although this should have been addressed when it happened, I need to consider it now and would like to fix the files I come across. The issue is that there are two teams using different branches of code and we will eventually have to merge those branches. What will happen if we change all the files of our branch to be the correct formatting and try

validating textbox in windows form applications

谁都会走 提交于 2019-11-27 09:05:37
问题 My scenario is: Not allowing spaces at starting position of textbox after enter one or more characters text box allows spaces Below not applicable to my scenario. private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.Handled = (e.KeyChar == (char)Keys.Space)) { MessageBox.Show("Spaces are not allowed"); } } textBox1.Text.TrimStart() 回答1: private void textBox1_KeyPress(object sender, KeyPressEventArgs e) \ { if(textBox1.Text.Length == 0) { if (e.Handled = (e.KeyChar ==

How can I convert spaces to tabs in Vim or Linux?

柔情痞子 提交于 2019-11-27 08:55:57
问题 I've looked over several questions on Stack Overflow for how to convert spaces to tabs without finding what I need. There seem to be more questions about how to convert tabs to spaces, but I'm trying to do the opposite. In Vim I've tried :retab and :retab! without luck, but I believe those are actually for going from tabs to spaces anyways. I tried both expand and unexpand at the command prompt without any luck. Here is the file in question: http://gdata-python-client.googlecode.com/hg

Run programs with too many spaces

社会主义新天地 提交于 2019-11-27 07:37:27
问题 I have a command that works fine with command prompt: CMD /C ""C:\Program Files (x86)\VideoLAN\VLC\VLC" -vvv "http://www.foo.com:8085/video.mp4/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NC8yNy8yMDE3IDEyO==" :sout=#file{dst="F:\\Partition C Backup\\Downloads\\Video\\TESTING.mp4",no-overwrite} :sout-keep"" Here I need CMD /C to return the errorlevel. That's how I tried to run this in VBScript using Run method: WshShell.Run "CMD /C ""C:\Program Files (x86)\VideoLAN\VLC\VLC" -vvv "http://www.foo

How do you import a file in python with spaces in the name?

廉价感情. 提交于 2019-11-27 07:35:05
Do I have to take out all the spaces in the file name to import it, or is there some way of telling import that there are spaces? You should take the spaces out of the filename. Because the filename is used as the identifier for imported modules (i.e. foo.py will be imported as foo ) and Python identifiers can't have spaces, this isn't supported by the import statement. If you really need to do this for some reason, you can use the __import__ function: foo_bar = __import__("foo bar") This will import foo bar.py as foo_bar . This behaves a little bit different than the import statement and you