quotes

How to pass a variable as an argument to a command with quotes in powershell

Hi there, My powershell script takes the following parameter: Param($BackedUpFilePath) The value that is getting passed into my script is: "\123.123.123.123\Backups\Website.7z" I have another variable which is the location I want to extract the file: $WebsiteDeploymentFolder = "C:\example" I am trying to extract the archive with t...

jquery append choking on quotes in ei

This jQuery statement works in recent versions of Firefox and Chrome but throws an error in IE 8. left_bar_string = "<tr><td><a href='#' onclick= "return newPopUpWindow('somelink','window', '1000','800','100','0','yes')">Directions</a></td></tr>"; $("#side_bar").append(left_bar_string); I think problem is with double quotes. Any com...

How to pass a string containing both single and double quotes as a parameter to XSLT in PHP?

Hi, I have a simple PHP-based XSLT trasform code that looks like that: $xsl = new XSLTProcessor(); $xsl->registerPHPFunctions(); $xsl->setParameter("","searchterms", $searchterms); $xsl->importStylesheet($xslDoc); echo $xsl->transformToXML($doc); The code passes the variable $searchterms, which contains a string, as a parameter to th...

Automatically add close quote in visual studio like resharper does

can not find this option in new studio (2010) ...

csv file enclosed with double quotes not stripping quotes

I am generating a csv download from my web server and to be safe, I have enclosed each field with double quotes. i.e. "Field1","Field2","Field3","Field4" "row1_field1","row1_field2","row1_field3","row1_field4" "row2_field1","row2_field2","row2_field3","row2_field4" The problem is that when the file is opened in Excel, it does not str...

bash/ksh/scripting eval subshell quotes

I'm using ksh and having some trouble. Why does this code not run? [root]$ CMD="ls -ltr" [root]$ eval "W=$( $CMD )" [root]$ ksh: ls -ltr: not found. [root]$ echo $W But this works fine: [root]$ CMD="ls -ltr" [root]$ eval 'W=$('$CMD')' [root]$ echo $W ...

bash ksh single quotes vs double quotes

Hi guys, I'm learning ksh, I'm trying to run a command using a subshell, but I got different results, I'm guessing the reason. root@setPrompt[/home/za] X=$("ls -ltr") ksh: ls -ltr: not found. root@setPrompt[/home/za] X=$('ls -ltr') ksh: ls -ltr: not found. root@setPrompt[/home/za] X="$(ls -ltr)" root@setPrompt[/home/za] echo $X total...

Converting MS word quotes and apostrophes

Hi, How do I convert the MS Word quotes and apostrophes to regular quotes and apostrophes characters in Java? What's the unicode number for these characters? i.e., “how are you doing?” ‘howdy’ to "how are you doing?" 'howdy' Thanks Edit: It appears that stackoverflow is already converting it to regular quotes and apostrophes...ho...

Quote marks in controls' property in ASP.NET markup

Sounds dummy but I can't set to a server-side control's property a value contains quote marks ": <asp:CompareValidator ErrorMessage="Currency-from can't be equal to currency-to" runat="server" /> I need to quote "from" and "to". I tried escaping \"from\" and double quote marks ""from"" - both doesn't work. How to do that? ...

Antlr Lexer Quoted String Predicate

I'm trying to build a lexer to tokenize lone words and quoted strings. I got the following: STRING: QUOTE (options {greedy=false;} : . )* QUOTE ; WS : SPACE+ { $channel = HIDDEN; } ; WORD : ~(QUOTE|SPACE)+ ; For the corner cases, it needs to parse: "string" word1" word2 As three tokens: "string" as STRING and word1" an...

How can I put quotes in a string?

I need to write a string literal to a text file, but the C# compiler finds errors when I use quote characters in it. My current code: writeText.WriteLine("<?xml version="1.0" encoding="utf-8"?>"); I need the output for the text file to be: <?xml version="1.0" encoding="utf-8"?> How can I put quote characters in strings in C#? ...

Elaboration of A quotation on 'Simple Design'

An excerpt from Programming Perls: A Simple Design : Antonie de Saint-Exupery, the Fresh writer and aircraft designer, said that, *"A designer knows he has arrived at perfection not when there is no longer anything to add, but when there is no longer anything to take away."* More programmers should judge their work by this criteria. ...

javascript string difference

Possible Duplicates: single quotes versus double quotes in js When to Use Double or Single Quotes in JavaScript What is the difference (if any) between the javascript strings defined below? var str1 = "Somestring"; var str2 = 'Somestring'; "" and '' mean two very different things to me predominantly writing code in C++ :...

Using YQL multi-query & XPath to parse HTML, how to escape nested quotes?

The title is more complicated than it has to be, here's the problem query. SELECT * FROM query.multi WHERE queries=" SELECT * FROM html WHERE url='http://www.stumbleupon.com/url/http://www.guildwars2.com' AND xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span'; SELECT * FROM xml ...

Javascript HERE-doc or other large-quoting mechanism?

Is here a convenient way to quote a large block of HTML that has both single and double quotes in JavaScript? Is there anything like a HERE-doc <<EOF, a multi-quote character """, or custom delimiters q{}? Any creative or inventive solutions to this problem? ...

Python "string_escape" vs "unicode_escape"

According to the docs, the builtin string encoding string_escape: Produce[s] a string that is suitable as string literal in Python source code ...while the unicode_escape: Produce[s] a string that is suitable as Unicode literal in Python source code So, they should have roughly the same behaviour. BUT, they appear to treat si...

Help with variables and new lines, and quoting in a bash script

I would like to automate the following svn command. Note this command produces the desired results on my system - Ubuntu 10.04, svn 1.6.6, bash shell, when issued from the command line: svn ci -m $'Added new File: newFile.txt\nOrig loc: /etc/networking/newFile.txt' /home/user/svnDir/newFile.txt I would like to run that command in a ba...

[Single|Double|Or no] Quotes when using grep?

Grep acts differently depending on what kind of quotes I surround the regex with. I can't seem to get a clear understanding of why this is. Here is an example of the problem: hamiltont$ grep -e show\( test.txt variable.show(); variable.show(a); variable.show(abc, 132); variableshow(); hamiltont$ grep -e "show\(" test.txt gre...

Drupal UC "Quoting / Estimate" error

Hi, I was playing around with Drupal UC and installed a module called "Quoting / Estimate" (http://drupal.org/project/quoting), I tried to run it and got this error: **warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'quoting_quote_clear_page' was given in /home/ergospec...

ASP.NET single quotes are converted to &#39;

Note: Most probably this will be a double question, but since I haven't found a clear answer, I'm asking it anyway. In ASP.NET I'd like to add some JavaScript to the onclick event of a CheckBox. I've simplified the case to this: <asp:CheckBox ID="TestCheckBox" runat="server" onclick="alert('test');" Text="Test" /> The resulting HTML...