quotes

Triple Quotes? How do I delimit a databound Javascript string parameter in ASP.NET?

How do I delimit a Javascript databound string parameter in an anchor OnClick event? I have an anchor tag in an ASP.NET Repeater control. The OnClick event of the anchor contains a call to a Javascript function. The Javascript funciton takes a string for it's input parameter. The string parameter is populated with a databound val...

Double Quotes in Oracle Column Aliases

Ok, this is bit of an obscure question, but hopefully someone can help me out with it. The system I'm working on builds a dynamic SQL string for execution inside a stored procedure, and part of that dynamic SQL defining column aliases, which themselves are actually values retrieved from another table of user generated data. So, for exa...

Great programming quotes

There are a lot of great programming quotes out there. Which do you like? Today (Sept 12, 2008) I heard a new one from a friend, Lars-Gunnar, he said "Gud finns i Emacs" (in Swedish). This basically means "God is in Emacs". Still laughing about it here :) What he meant was that a function "gud is grand-unified-debugger" is in Emacs. A ...

How would you explain binary to your grandmother?

I recently bought a shirt with this great quote on "There are 10 types of people in the world, those who can read binary, and those who can't." Now I find myself having to explain it to everybody! How would you explain this shirt to your grandmother, mother, kid, etc... ...

What's your best trick to break out of an unbalanced quote condition in BASE SAS?

As a base SAS programmer, you know the drill: You submit your SAS code, which contains an unbalanced quote, so now you've got not only and unclosed quote, but also unclosed comments, macro function definitions, and a missing run; or quit; statement. What's your best trick for not having those unbalanced quotes bother you? ...

Generally define the process of testing

How would you define testing? In the interest of full disclosure, I'm posting this because I already have some answers I like. ...

How can i parse a comma delimited string into a list (caveat)?

I need to be able to take a string like: '''foo, bar, "one, two", three four''' into: ['foo', 'bar', 'one, two', 'three four'] I have an feeling (with hints from #python) that the solution is going to involve the shlex module. ...

How do I protect quotes in a batch file?

I want to wrap a perl one-liner in a batch file. For (trivial) example, in a unix shell I could quote up a command like this: perl -e 'print localtime() . "\n"' But DOS chokes on that with the helpful Can't find string terminator "'" anywhere before EOF at -e line 1. What's the best way to do this within a .bat? ...

What's the easiest way to add a quote box to mediawiki?

I installed mediawiki on my server as my personal knowledge base. Sometimes I copy some stuff from Web and paste to my wiki - such as tips & tricks from somebody's blog. How do I make the copied content appear in a box with border? For example, the box at the end of this blog post looks pretty nice: http://blog.dreamhost.com/2008/03/21/...

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

What's the accepted way of storing quoted data in XML?

What's the accepted way of storing quoted data in XML? For example, for a node, which is correct? (a) <name>Jesse "The Body" Ventura</name> (b) <name>Jesse \"The Body\" Ventura</name> (c) <name>Jesse &quot;The Body&quot; Ventura</name> (d) none of the above (please specify) If (a), what do you do for attributes? If (c), is it really...

Double quotes in Oracle Alias

Hi, I am having fickle of problem in Oracle 9i select 1"FirstColumn" from dual; Oracle throwing error while executing above query. ORA-03001: unimplemented feature in my Production server. The Same query is working fine in my Validation server. Both servers are with Oracle 9i Any one have Idea what's wrong...? Is this something conf...

MYSQL: REGEXP single quotation matching

I am having a trouble matching a string in a MySQL-query with the following regex: I want it to match to this string: "Rue de l' Harmonie" SELECT id, street_name FROM street_names WHERE street_name REGEXP '^(rue[a-z]+[[:blank:]])((du|de|la|des|d[\']|l[\'])[[:blank:]])*[[:<:]]HARMONIE$' Anybody can give me a hint? ...

Regexp for quoted string with escaping quotes

How to get substring " It's big \"problem " using a regexp s = ' function(){ return " Is big \"problem "; }'; ...

Regex Question - One or more spaces outside of a quote enclosed block of text

I want to be replace any occurrence of more than one space with a single space, but take no action in text between quotes. Is there any way of doing this with a Java regex? If so, can you please attempt it or give me a hint? ...

php quotation strip

In my webpage, I want the website to greet the user, but the username is surrounded by 'single quotations'. Since this isn't to prevent MySQL injection, i just want to remove quotes around my name on the display page. Ex: Welcome 'user'! I'm trying to find the way where i can strip the quotations around the user and have it display on t...

Nuggets of wisdom?

There are many quotes from famous computer scientists that have become the wisdom that guides our profession. For example: "Premature optimization is the root of all evil in programming." Donald Knuth (citing Hoare's Dictum) "Everyone knows that debugging is twice as hard as writing a program in the first pla...

Smarty replace text with double quotes

I have the following string in the smarty (php templating system) variable $test: <img height="113" width="150" alt="Sunset" src="/test.jpg"/> I want to add "em" to the height and width like this: {$test|replace:'" w':'em" w'|replace:'" a':'em" a'} But this doesn't work... What's the problem and the solution? ...

Remove quotes from named environement variables in Windows scripts

I want to store a URL prefix in an Windows environment variable. The ampersands in the query string makes this troublesome though. For example: I have a URL prefix of "http://example.com?foo=1&amp;bar=", and want to create a full URL by providing a value for the bar param. I then want to launch that url using the "start" command. Addin...

How can one turn regular quotes (i.e. ', ") into LaTeX/TeX quotes (i.e. `', ``'')

Given a document written with normal quotes, e.g. Ben said "buttons, dear sir". I replied "Did you say 'buttons'?" to him. What ways can one turn these sort of things into LaTeX quotes, with the appropriate semantics. i.e. Ben said ``buttons, dear sir''. I replied ``Did you say `buttons'?'' to him. So that LaTeX produces: Ben said...