I see this all the time: object literals declared such that some keys are surrounded with quotes and others are not. An example from jQuery 1.4.2:
jQuery.props = {
"for": "htmlFor",
"class": "className",
readonly: "readOnly",
maxlength: "maxLength",
cellspacing: "cellSpacing",
rowspan: "rowSpan",
colspan: "co...
Hi,
I'm an iPhone developer. I'm writing my unit test cases, one of which checks if the app accepts UTF8 strings to be written to a sqlite3 database. I created a test case to generate random UTF8 strings and I can see the ones that fail do so because they contain an apostrophe (') which I need to be accepted.
I'm writing to the databa...
I am using adodb with php. I need to insert html into my database, and need to know the best method to escape the quotes before inserting it into the database? I tried using pg_escape_string() but it still does not seem to insert.
What is the best method to do this?
...
For example:
"I don't like these "double" quotes"
and I want the output to be
I don't like these double quotes
...
I think the word "clean" isn't the right idea, but I am trying to make sure that the data I am getting from the database is ready to be inserted into JSON objects. I would like to find a packaged deal for this, or if JSON.Simple does this and I just haven't run into it. But double quotes, single quotes (for obvious reasons), and new line...
[quote=Username here]quoted text here[/quote]
Reply text here
I need a regular expression that stores the "Username here", "quoted text here" and "Reply text here" in a Array.
This expression needs to support nesting aswell. Eks:
[quote=Username2 here][quote=Username here]quoted text here[/quote]
Reply text here[/quote]
Reply text...
Here is how I'm currently converting XMLDocument to String
StringWriter stringWriter = new StringWriter();
XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter);
xmlDoc.WriteTo(xmlTextWriter);
return stringWriter.ToString();
The problem with this method is that if I have " ((quotes) which I have in attributes) it escapes the...
Hy everyone how can I replace "" // i think its called double quotes with '' // i think its called single quotes
using PHP ?
...
Hi all,
I've got a simple application that opens a tab-delimited text file, and inserts that data into a database.
I'm using this CSV reader to read the data: http://www.codeproject.com/KB/database/CsvReader.aspx
And it is all working just fine!
Now my client has added a new field to the end of the file, which is "ClaimDescription", ...
I'm talking about the performance increase here. From all I know you can echo variables in double quotes ("), like so:
<?php
echo "You are $yourAge years old";
?>
But single quotes will just return You are $yourAge years old. But what about performance differences? I've always gone by the rule that single quotes are faster because t...
For Example:
myJSON = {
param1:val1,
param2:val2
}
vs.
myJSON = {
"param1":val1,
"param2":val2
}
Also are there any browser compatibility issues or possible exceptions that may arise out of using one or the other?
...
Hello there,
I'm trying to build something on javascript that I can have an input that can be everything
like string, xml, javascript and (non-javascript string without quotes) as follows:
//strings
eval("'hello I am a string'"); /* note the following proper quote marks */
//xml
eval(<p>Hello I am a XML doc</p>);
//javascri...
Im using python to access a MySQL database and im getting a unknown column in field due to quotes not being around the variable.
code below:
cur = x.cnx.cursor()
cur.execute('insert into tempPDBcode (PDBcode) values (%s);' % (s))
rows = cur.fetchall()
How do i manually insert double or single quotes around the value of s?
I've tryin...
I know there are already many questions like mine but I found no answer which works in Java. So I write a new question.
I have text files with content like this:
key1 = "This is a \"test\" text with escapes using '\\' characters";
key2 = 'It must work with \'single\' quotes and "double" quotes';
I need a regular expression which mat...
I have a file called "physics 1b.sh".
In bash, if i try
x="physics 1b"
grep "string" "$x".sh
grep complains:
grep: physics 1b: No such file or directory.
However, when I do
grep "string" physics\ 1b.sh
It works fine. So I guess the problem is something to do with the variable not being expanded to include the backslash that gr...
Hi,
I am programmer and share trader.
Before
I have written a day trading application. Until last week it was possible to fetch realtime quotes from http://aktien.boerse.de/aktien_startseite.php?view=2&order=name%20asc&liste=prime&page=0 . Every time the site was surfed the quotes had changed. The HTML contents could then b...
Do you know if there is anything out there like Chilton's for cars for programming quotes:
http://chilton.cengage.com/
Looking for a programming book or sites that may be like it, or about process. I am trying to get a better grip on quoting jobs and wondering if there is anything like this.
...
I have an SQL query that has an alias in the SELECT statement
SELECT
CONCAT(YEAR(r.Date),_utf8'-',_utf8'Q',QUARTER(r.Date)) AS 'QuarterYear'
Later, I want to refer to this in my group by statement.
I'm a little confused...should I wrap this with backticks, single quote or just leave it unwrapped int he group by
GROUP BY
`Quarte...
Hi,
On many occasions I have dealt with passing batch files arguments with spaces, quotes, percents, and slashes and all sorts of combinations of them. Usually I managed to figure out how to accomplish what I want, but this time I am stuck. I have tried a couple of hundred combinations now and my head is starting to hurt.
I’ve reduced ...
when I view source on my php page I get " for a quote. But instead, I would like " to be used in the source code. I have no control over manually replacing it so Im wondering if there is a function to do such a thing.
...