doublequotes

Is there any difference between "string" and 'string' in Python?

In PHP, a string enclosed in "double quotes" will be parsed for variables to replace whereas a string enclosed in 'single quotes' will not. In Python, does this also apply? ...

SQL putting two single quotes around datetime fields and fails to insert record

I am trying to INSERT into an SQL database table, but it doesn't work. So I used the SQL server profiler to see how it was building the query; what it shows is the following: declare @p1 int set @p1=0 declare @p2 int set @p2=0 declare @p3 int set @p3=1 exec InsertProcedureName @ConsumerMovingDetailID=@p1 output, @UniqueID=@p2 output, ...

Mixing Single and Double Quotations in Bash

Alright, I have a script that takes a few arguments, runs data, and then rsyncs the data out to a different server. The problem is that to run the data, I have to take one of the arguments and then run a report using it, which is very bash unfriendly (Ex. [3023.2<>1], [5111.3$]="5", etc). So if I'm going to run the command, I need t...

json parse error with double quotes

A double quote even if escaped is throwing parse error. look at the code below //parse the json in javascript var testJson = '{"result": ["lunch", "\"Show\""] }'; var tags = JSON.parse(testJson); alert (tags.result[1]); This is throwing parse error because of the double quotes (which are already escaped). Even eval() won't work ...

php to extract a string from double quote

I have a string This is a text, "Your Balance left $0.10", End 0 how can i extract the string in between double quote and have only the text 'Your Balance left $0.10' (without the double quotes) Tried preg_match_all but no luck ...

Apache Ant command line arguments without double quotes - is it possible?

Today I had to add a task to an Apache Ant file. The command line should have been something like myprogram --param1 --param2 path\somefile 2> path\logfile The problem with this was that if I used something like the following for this <exec executable="$(myprogram)" <arg value="--param1"> <arg value="--param2"> <arg path="$(som...

single quotes and double quotes in mysql insert and update query (java)

The ComName is 'a'b'c'"def"j Limited. i try to add \ before every ' and " but the resultant query that is executed is "UPDATE empTable SET empId= '25', ComName = 'a'b'c'"def"j Limited where ID=1" i don't see my Comname within '' and \ is not present before every ' and " Here is the code to construct the column value columnValue....

Automate escape of double quotes

I have the following variable being dynamically set by user generated content: $variable = <a href="http://www.mysite.com/article"&gt;This Article</a>; When this variable is set, I then echo it as such echo $variable; I know that as is, this wouldn't be valid because I would need to escape the double quotes etc. I'm a total beginn...

Insert double quotes multiple times into string

Hi Folks I have inherited a flat html file with a few hundred lines similar to this: <blink> <td class="pagetxt bordercolor="#666666 width="203 colspan="3 height="20> </blink> So far I have not been able to work out a sed way of inserting the closing double quotes for each element. Probably needs something other than sed to do this. C...

double quote escaping in os.system on windows

Hi, I want to escape '"' and all other wild chars in program name and arguments, so I try to double quote them. and I can do this in cmd.exe C:\bay\test\go>"test.py" "a" "b" "c" hello ['C:\\bay\\test\\go\\test.py', 'a', 'b', 'c'] but what's wrong with the following code using os.sytem? cmd = '"test.py" "a" "b" "c"' print cmd os.syst...

Does Java have the '@' character to escape string quotes?

My string has double quotes in it, in C# I would do: string blah = @"this is my ""text"; how would I do that in Java? ...

What's the difference between single and double quotes in Perl?

I am just begining to learn Perl. I looked at the beginning perl page and started working. It says: The difference between single quotes and double quotes is that single quotes mean that their contents should be taken literally, while double quotes mean that their contents should be interpreted When I run this program: #!/usr/l...

Remove escaped quotes from Wordpress posts

In my content I'm giving my <h3> tags id's for the sake of direct linking. This is how it looks in the post editor: <h3 id="h3-title">H3 Title</h3> So that I can directly link to it like this: <a href="http://example.com/page#h3-title"&gt;H3 Title</a> However, the double quotes are getting escaped somehow, with the html output on...

quotes issue (ruby)

any idea how I can pass correct argument to xpath? There must be something about how to use single/double quotes. When I use variable parser_xpath_identificator = "'//table/tbody[@id=\"threadbits_forum_251\"]/tr'" gives me an incorrect value or parser_xpath_identificator = "'//table/tbody[@id="threadbits_forum_251"]/tr'" gives me an ...

How do I make VS2008 place double quotes around intellisense offerings

I am in the HTML editor (building an ASP.NET MVC view) and coding up HTML. The editor is handy with intellisense for various attributes, but when I select whatever VS2008 offers, it never places double quotes around them, as HTML says you should. For instance: <head runat= offers server, but when I select it, I get: <head runat=s...

Encode double quotes inside XML element using LINQ to XML

I'm parsing a string of XML into an XDocument that looks like this (using XDocument.Parse) <Root> <Item>Here is &quot;Some text&quot;</Item> </Root> Then I manipulate the XML a bit, and I want to send it back out as a string, just like it came in <Root> <Item>Here is &quot;Some text&quot;</Item> <NewItem>Another item</NewItem> ...

HTML: Single vs Double quotes (' vs ")

I've always used single quotes when writing my HTML by hand. I work with a lot of rendered HTML which always uses double quotes. This allows me to determine if the HTML was written by hand or generated. Is this a good idea? What is the difference between the two? I know they both work and are supported by all modern browsers but is ther...

Administrator's shortcut to batch file with double quoted parameters

Take an excruciatingly simple batch file: echo hi pause Save that as test.bat. Now, make a shortcut to test.bat. The shortcut runs the batch file, which prints "hi" and then waits for a keypress as expected. Now, add some argument to the target of the shortcut. Now you have a shortcut to: %path%\test.bat some args The shortcut ...

PHP mssql_query double quotes cannot be used

Hi all, In java-jdbc, I can easily run the following SQL (NOTE the double quotes around columns and table names) Select cus."customer_id" , cus."organisation_or_person" , cus."organisation_name" , cus."first_name" , cus."last_name" , cus."date_became_customer" , cus."other_customer_det...

Print array variables when using or not using double quotes.

Hi, When I learning to print array variables, I found the white space inserted when double quoter used. Snippet code as below. Could you please tell me why? #!/usr/bin/perl -w use strict; use warnings; my @str_array = ("Perl","array","tutorial"); my @int_array = (5,7,9,10); print @str_array; print "\n"; # added the double quotes print...