Menu
  • HOME
  • TAGS

Pair? function applying on Quote in Racket

scheme,racket,quote,sicp

Bear in mind that (cdr (cdr ...)) is returning a list (not an element!), so pair? will return true if the list has enough elements (three or more). Perhaps you were aiming for something like this? (define (multiplicand p) (if (null? (cdddr p)) ; assuming list has at least 3...

**update** How i can create new column in table sales_flat_quote_item and add data with $cart->addProduct

php,mysql,magento,quote

Adding a new attribute to sales_flat_order_item table can be achieved through the XML config file and creating an install script. There is a particular method for doing this which can be seen in any of the core upgrade and install scripts of core modules. You have to add the column...

How to create custom [QUOTE] tag?

html,post,tags,forum,quote

I think the simplest way would be to use a free library, like BBCode. Then you don't have to reinvent the wheel. A standard quote-tag is built-in the BBCode library, so you don't have to worry about it. Usage Example Quoting noone in particular [quote]'Tis be a bad day[/quote] Quoting...

Pandas import csv - Probl.m with a single quote

csv,pandas,quote

A: Your pieces of data require sanity checking & some policy to detect + solve colliding cases Sure, not an easy task, however Pandas have no trouble to import properly formatted orthogonal data. Get your inputs into a feasible state ( via a syntactic parser or a sanity pre-wrapping suspicious...

R: sequence of substituted expressions from sequence of values

r,expression,quote

Try bquote: lapply(as.numeric(2:7), function(x) bquote(10^.(x))) ...

Error parsing a CSV file using Strawberry Perl with quotes and decimals

perl,csv,decimal,quote

Thanks to @ThisSuitIsBlackNot the issue lay with Text::CSV. Quoting I found this in the Text::CSV changelog under v1.12 (May 2009): getline() didn't handle a line having null (ex. "0). Are you perhaps using an old version? Check with perl -MText::CSV -e 'print $Text::CSV::VERSION' The issue was a combination of Strawberry...

Syntax error on opening quotation mark

python,syntax-error,quotes,quote,quotation-marks

The ‘ character is unrecognized by the parser. You need to use either apostrophes or quotation marks (' or ") for string literals: print ' ' * (70 - len(s)) + s For more information, see Strings literals in the documentation....

Common Lisp: How to quote parenthese in SBCL

lisp,common-lisp,sbcl,quote

nil and () are two ways to express the same concept (the empty list). Traditionally, nil is used to emphasize the boolean value "false" rather than the empty list, and () is used the other way around. The Common LISP HyperSpec says: () ['nil], n. an alternative notation for writing...

Postgres import a double quote value

postgresql,import,copy,quote

Based on the error message, I'd be suspicious it has anything to do with double quoting or anything of the sort -- had it been so, it would have been a widely reported bug and fixed ages ago. When it comes to Postgres, the error messages are almost always correct...

Magento - Getting Quote Object Data of Bundle Product based on user selection

magento,data,bundle,product,quote

If bundleproduct is added to the card, following is passed through the observer of the sales_quote_add_item event: The bundleproduct. All the underlying simple product one after another. So if you e.g. have a bundle product, with 4 options to choose a product and quantity, the observer is called 5 times....

can't work $itemObject->getProduct()->getName() in magento

magento,product,quote,sales

$quoteItemObject returns an array of all items in the quote but not a separate item. You need to "foreach" it and get information for each item separately. Try something like this: foreach ($quoteItemObject as $item) { echo $item->getProduct()->getName(); } ...

Limit CPU & Memory for *nix Process

unix,limit,quote

If you happen to use Solaris, the ability to limit resource usage is a native feature. Memory (RAM) usage can be capped per process using the rcap.max-rss setting while CPU usage can be limited per project using the project.cpu-caps. Note that Solaris also allows OS level virtualization (a.k.a. zones) which...

Regex match given word outside of quotes

regex,match,quote

\bInternet\b(?=(?:[^"]*"[^"]*")*[^"]*$) You can try this.See demo. https://www.regex101.com/r/fG5pZ8/22...

Passing parameter with double quotes [closed]

javascript,php,variables,parameters,quote

What you should be doing is generating a JavaScript string , so you need to escape for JavaScript (json_encode()) and remove the call to addslashes which is for escaping PHP. <a onclick='share(<?= json_encode($aux) ?>)'>Send</a> Note that if you have any HTML entities in your PHP string, such as &lt; they...

how to pass quoted sexp to macro

macros,lisp,common-lisp,quote

So you reimplemented the Common Lisp function nsubst. subst is the normal version and n indicates that it is the destructive version (non-consing). Note that in portable Common Lisp it is not a good idea to modify literal data. The effects are undefined. Ignoring that for a while: (macroexpand-1 (replace-symbol-in-sexp...

PHP: Single Quote escaping with PDO

pdo,escaping,quote

Merely using prepare() does not automatically quote all your variables appropriately. All prepare() sees is a string, after you have interpolated variables into it. There is no way for it to tell what part of the string came from a variable and what part came from literal strings in your...

Yii: parametrized call of javascript - problems with quotes

javascript,php,yii,components,quote

I solved the problem. It was very simple. I didn't get an erromessage and therefore thought that something was going wrong with javascript. In my controller I am not in an object-context - so $this->createUrl(...) is not possible. The solution: Yii::app()->createUrl(...) ... and it works like a charme ;-)...

wrap a string with single quotes PHP

php,mysql,quote

Try with - $sqlRome.="SELECT distinct id_jeune FROM jeunes_rome WHERE code_rome IN ("; foreach ($liste_rome as $rome) { $var[] = "'".$rome."'"; } $sqlRome.= implode(',', $var); $sqlRome.=") GROUP BY id_jeune HAVING COUNT(*)=" . $j; ...

Config quotes on vars PHP

php,apache,centos,config,quote

Guess you need some information about variables and their usage (when working with arrays) and fixed index concretions Usage of variables: $array = array('hi', 'you', 'there'); $i = 1; echo $array[$i]; // -> works and is **fine** (will output 'you') // -------------------------------- $array = array('a' => 'hi', 'b' => 'you',...

VB.Net Using Quote Mark in Quote Marks

vb.net,quote,mark

Here's one option: "text" & Chr(34) & textbox1.text & Chr(34) ...

I am confused about how to use a variable in elisp

emacs,elisp,quote

The quoted list '(font . my:font) produces a cons of those two symbols, rather than the value that you want. Instead of quote you can use either backquoting or a call to cons: `(font ,my:font) or (cons 'font my:font) You might be interested in the info pages (info "(elisp)Quoting") and...

Which quotes to use in string literal nested in another string

javascript,escaping,quote

Escape quotes: Quotes in strings should be preceded by a backslash. This allows the JavaScript interpreter to distinguish a quote within the string from the quotes that serve as string delimiters. $("#container div").html("<div id='overlay' onclick=\"goFullscreen('video1')\"></div>"); // ^^ ^ ^ ^^ DEMO OR $("#container div").html("<div id='overlay' onclick='goFullscreen(\"video1\")'></div>"); // ^ ^^ ^^...