quotes

Windows Shell Scripting: Check for batch options containing double quotes...

Greetings, dear Experts! I want to check the existense of parameter (or argument) sting at all in my batch script: if "%*"=="" findstr "^::" "%~f0"&goto :eof This works fine if none of parameters is enclosed in double quotes. For example: test.bat par1 par2 ... --- works but test.bat "par 1" par2 ... --- fails My question are: ...

Tricky makefile syntax with quotes

Hello, I have the following start on a makefile rule (thanks to help from others), but it doesn't quite work yet: test_svn_version: @if [ $$(svn --version --quiet \ perl -ne '@a=split(/\./); \ print $$a[0]*10000 + $$a[1]*100 + $$a[2]') \ -lt 10600 ]; \ then \ echo >&2 "Svn ve...

How do I concatenate html as a string in VBA?

I'm a newbie at VBA and html and I'm getting very confused. I'm trying to set a string variable to equal several concatenated html strings and control values. I can't figure out what I'm doing wrong. Here is my code: htmlText = "<HTML><BODY bgcolor=#0b3767> <img height=""71"" width=""500"" alt=""Central Analysis Bureau, Inc. - Kno...

Is it possible to query an OleDB connection to find out if you must use square brackets or quotes?

Is it possible to query an OleDB connection to find out if you must use square brackets or quotes? SQL: SELECT [FullName] From [My Users] Oracle SELECT "FullName" From "My Users" MySQL: SELECT `FullName` From `My Users` ...

Removing double quotes from variables in batch file creates problems with CMD environment

Can anybody help with effective and safe way of removing quotes from batch variables? I have written a batch file which successfully imports a list of parameters %1, %2, %3 etc. and places them into named variables. Some of these parameters contain multiple words, and therefor are enclosed in double quotes. > "Susie Jo" (%1) > "Smit...

CMD: Check for quotes

Hello, Let's say, the user drag and drops an file into my batch file, which causes that the batch file copies the file to a certain directory. the problem is the following command: copy "%1" "C:\path\to\it" The problem here is the quotes around%1. When you drag and drop something in a batch file, normally, it wouldn't put quotes, so ...

What is the difference between single and double quotes in SQL?

What is the difference between single quotes and double quotes in SQL? ...

bash: calling a scripts with double-quote argument

Hi, I have a bash scripts which an argument enclosed with double quotes, which creates a shape-file of map within the given boundries, e.g. $ export_map "0 0 100 100" Within the script, there are two select statements: select ENCODING in UTF8 WIN1252 WIN1255 ISO-8859-8; ... select NAV_SELECT in Included Excluded; Naturally, these ...

C preprocessor: removing quotes from an argument

I'm abusing the C preprocessor for my build system to produce a "readme" plain-text file and a web page from the same source file. The construction is something like this: The actual definitions are in data.h: #define WEBSITE "http://example.com" Note that the // in the URL must be quoted, or else it will be treated as the start of a...

How can I escape single and double quotes in SQL prepared statement?

I have a SQL statement similar to the one shown below in Perl: my $sql="abc..TableName '$a','$b' "; The $a is free text which can contain anything including single quotes, double quotes, back- and front-slash characters, etc. How can these characters be escaped to make the SQL statement work? Thanks. ...

Javascript escape quotes

This is so stupid, but I can NOT figure this one out. I'm outputting values from a database (it isn't really open to public entry, but it is open to entry by a user at the company -- meaning, I'm not worried about XSS.) I'm trying to output a tag like this: <a href="" onclick="DoEdit('DESCRIPTION');">Click Me</a> DESCRIPTION is actu...

How to execute a bash command stored as a string with quotes and asterisk

I try to execute the following command : mysql AMORE -u username -ppassword -h localhost -e "SELECT host FROM amoreconfig" I store it in a string : cmd="mysql AMORE -u username -ppassword -h localhost -e\"SELECT host FROM amoreconfig\"" Test it : echo $cmd mysql AMORE -u username -ppassword -h localhost -e"SELECT host FROM am...

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? ...

Javacript in html - Using single quote inside another single quote

document.getElementById("img").innerHTML="< img src='/sitepath/"+imgg+".jpg' width='72' height='44' onclick='alert('hello');' />"; The above code is my javascript. Problem is printing hello or any other string. If I just type 123 in place of hello, it does give alert. But am not able to use a string like hello there. Normally a string ...

javascript single double quote problem

Hello guys, I have this rather classic problem when interacting with databases of handling single quotes and special characters. In PHP I am escaping the single quote with another single quote and regex syntax characters with preg_quote and they are working as a pro. The problem is with javascript, there are some points in my s...

Are Single Quotes Valid in a Doctype?

As stated in this question, single quotes in html has either become more popular or we have begun to notice them more often. Regardless, I have a related question. The HTML 4.01 Strict doctype as shown at w3schools (below) uses double quotes. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"...

Anyone know the quote about reading code with a glass of wine?

I seem to recall reading a book or article or something a while back by a relatively well-known programmer in which he said something to the effect of "If a program is well-written, you should be able to curl up with the source code listing and a glass of wine in a nice chair and enjoy reading over it.". Does anyone know what the exact q...

Does anybody know from where the "layer of abstraction"/"layer of indirection" quote emerged?

The quote goes something like this: There's no problem in Computer Science that can't be solved by adding another layer of abstraction to it (Copied in this wording from http://blogs.oracle.com/fcmartin/2009/01/pardon_my_dust.html) There are a number of variations but I have been unable to find an originator. Since I quite li...

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...

Why shouldn't `&apos;` be used to escape single quotes?

As stated in, When did single quotes in HTML become so popular? and Jquery embedded quote in attribute, the Wikipedia entry on HTML says the following: The single-quote character ('), when used to quote an attribute value, must also be escaped as &#x27; or &#39; (should NOT be escaped as &apos; except in XHTML documents) when it appe...