space

Set a path variable with spaces in the path in a Windows .cmd file or batch file

与世无争的帅哥 提交于 2019-12-28 03:20:14
问题 I'm new to script writing and can't get this one to work. I could if I moved the files to a path without a space in it, but I'd like it to work with the space if it could. I want to extract a bunch of Office updates to a folder with a .cmd file. To make the batch file usable on any computer, I set a path variable which I only have to change in one place to run it on another machine. The problem is that the path has a space in it. If I put quotes around the path in the definition, cmd.exe puts

ant java task with space issue

放肆的年华 提交于 2019-12-25 05:14:36
问题 I was trying to execute a jar file via ant script. Like this <java jar="${jar.file}" fork="true" failonerror="true"> <arg line="${jar.args}"/> </java> jar.file has full path to the jar file and contains some space in it. When I executed that on Linux, there was no problem. But when I do the same on Windows I got error. java task couldn't locate the jar! I've tried all different variations like wrapping the file path with quote ("), replaced space with ", tried escaping with backslash, etc.

ant java task with space issue

岁酱吖の 提交于 2019-12-25 05:14:00
问题 I was trying to execute a jar file via ant script. Like this <java jar="${jar.file}" fork="true" failonerror="true"> <arg line="${jar.args}"/> </java> jar.file has full path to the jar file and contains some space in it. When I executed that on Linux, there was no problem. But when I do the same on Windows I got error. java task couldn't locate the jar! I've tried all different variations like wrapping the file path with quote ("), replaced space with ", tried escaping with backslash, etc.

Freeing up space in SQL Server

你说的曾经没有我的故事 提交于 2019-12-25 03:27:49
问题 I wonder if anyone can point me in the right direction with this please. I have a number of tables in a SQL Server database and I have used a script to analyze the space that's being used by each table. The script can be found here if anyone's interested: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61762 My table sizes only account for about a third of the size of the database, so my question is what is using the rest of space and how can I reduce the overall database size? Many thanks

javascript code (new line, loops)

∥☆過路亽.° 提交于 2019-12-25 02:55:50
问题 So I am doing an assignment and I am incredibly stuck at the moment with a few steps to go until the finish. Here is the code I have thus far and what I need to do is first off is put the "var week" on a new line and ive tried many ways of /n but ever time it either breaks the script or does nothing. Also the other thing I need to do is create a loop that will display each day of the month (example, Mon 1, Tue 2, Wed 3, ect until all the days of April are displayed) and for the life of me I

Bash script argument with spaces

感情迁移 提交于 2019-12-25 02:16:49
问题 I'm trying to use Torrent-Video-Player script but it doesn't works with files that contains spaces. It's a Nautilus script. #!/bin/bash xterm -e "peerflix "$1" --vlc" "test.torrent" -> OK "test test.torrent" -> Cannot execvp peerflix test : No such file or directory found 回答1: Change the line xterm -e "peerflix "$1" --vlc" to xterm -e "peerflix '$1' --vlc" or xterm -e "peerflix \"$1\" --vlc" The first form is equivalent to: xterm -e "peerflix " $1 " --vlc" It's not what you were expecting. 来源

Can you have variables with spaces in PHP?

故事扮演 提交于 2019-12-24 14:29:47
问题 I was messing around with variable variables in PHP, so I came up with the code: $a = 'two words'; $$a = 'something'; echo $$a; // outputs something echo "$two words"; // error since $two doesn't exist I was just trying to understand how PHP will behave if we have a string with spaces, and try to make a variable variable from it. And it seems it still stores the variable with spaces, since I did var_dump($GLOBALS); and I have this: 'a' => string 'two words' (length=9) 'two words' => string

How String concatenation works in ruby? [duplicate]

二次信任 提交于 2019-12-24 11:36:40
问题 This question already has answers here : Why do two strings separated by space concatenate in Ruby? (2 answers) Closed 4 years ago . How the following line of code concatenates a string in ruby? 2.1.0 :052 > value = "Kamesh" "Waran" => "KameshWaran" I understand that '+' is a method on String class which concatenates the strings passed. How the space(' ') can be the operator/method? Can anyone elaborate how the space(' ') concatenate strings? 回答1: The space is not an operator. This only works

htaccess file: replace spaces with hypen + link to new url

笑着哭i 提交于 2019-12-24 10:35:44
问题 I'd like to replace any space in my URLs with a hypen This is my complete htaccess file: Options -MultiViews RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteRule ^archive/([^/]+)$ news?title=$1 The problem is that my title often contains spaces so it returns this url: example.com/archive/this%20is%20a%20test Url that I'd like to create: example.com/archive/this-is-a-test I read that I could include a "\" to remove

Hibernate causes out of memory exception when saving large number of entities

梦想的初衷 提交于 2019-12-24 09:41:19
问题 In my application I'm using CSVReader & hibernate to import large amount of entities (like 1 500 000 or more) into database from a csv file. The code looks like this: Session session = headerdao.getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); int count = 0; String[] nextLine; while ((nextLine = reader.readNext()) != null) { try { if (nextLine.length == 23 && Integer.parseInt(nextLine[0]) > lastIdInDB) { JournalHeader current = parseJournalHeader(nextLine);