quote

Replace double quotes (within qualifiers) in CSV for SSIS import

╄→гoц情女王★ 提交于 2019-12-04 17:38:12
I have a SSIS package importing data from a .csv file. This file has doulbe quotes ( " ) qualifiers for each entry in it but also in between. I also added commas ( , ) as a column delimiter. I can't give you the original data I'm working with but here is an example how my data is passed in Flat File Source: "ID-1","A "B"", C, D, E","Today" "ID-2","A, B, C, D, E,F","Yesterday" "ID-3","A and nothing else","Today" As you can see the second column can contain quotes (and commas) which smashes my SSIS import with an error pointing at this line. I'm not really familiar with regular expressions, but

bash_aliases and awk escaping of quotes

依然范特西╮ 提交于 2019-12-04 05:02:46
I'm trying to create an alias for a command to see the memory use, ps -u user -o rss,command | grep -v peruser | awk '{sum+=$1} END {print sum/1024}' but, the naive, #.bash_aliases alias totalmem='ps -u user -o rss,command | grep -v peruser | awk '{sum+=$1} END {print sum/1024}'' gives errors: -bash: alias: END: not found -bash: alias: {print: not found -bash: alias: sum/1024}: not found I've tried with double quotes, totalmem ="ps ... |awk '{sum+=$1} END {print sum/1024}'" , or totalmem ='ps ... |awk "{sum+=$1} END {print sum/1024}"' , escaping, totalmem ='ps ... |awk \'{sum+=$1} END {print

ruby code for modifying outer quotes on strings?

依然范特西╮ 提交于 2019-12-04 03:39:59
问题 Does anyone know of a Ruby gem (or built-in, or native syntax, for that matter) that operates on the outer quote marks of strings? I find myself writing methods like this over and over again: remove_outer_quotes_if_quoted( myString, chars ) -> aString add_outer_quotes_unless_quoted( myString, char ) -> aString The first tests myString to see if its beginning and ending characters match any one character in chars . If so, it returns the string with quotes removed. Otherwise it returns it

Add a custom option to a quote item (product in the cart)?

≡放荡痞女 提交于 2019-12-04 02:06:09
I'm running Magento 1.7. I'm trying to add a quote item option, a custom one, in sales_flat_quote_item_option. I have tried with addOption and addCustomOption functions, but it seems no query is launched to the database. This is my code right now (in a custom module helper) : public function assignDocumentToQuoteItem(Mage_Sales_Model_Quote_Item $quoteItem, $documentid) { if (is_numeric($documentid) && $documentid > 0) { /** @var Mage_Catalog_Model_Product */ $product = $quoteItem->getProduct(); $quoteItem->addOption(array( 'product_id' => $product->getId(), 'product' => $product, 'code' =>

The correct COPY command to load postgreSQL data from csv file that has single-quoted data?

老子叫甜甜 提交于 2019-12-03 11:25:47
I have csv file that has contents like this: 10,53073,0,0,'Y','2008-05-30 21:46:55',0,'2008-05-30 21:48:04',0,53071,2 I want to load the csv data into my_table. CREATE TABLE my_table ( ad_tree_id numeric(10,0) NOT NULL, node_id numeric(10,0) NOT NULL, ad_client_id numeric(10,0) NOT NULL, ad_org_id numeric(10,0) NOT NULL, isactive character(1) NOT NULL DEFAULT 'Y'::bpchar, created timestamp without time zone NOT NULL DEFAULT now(), createdby numeric(10,0) NOT NULL, updated timestamp without time zone NOT NULL DEFAULT now(), updatedby numeric(10,0) NOT NULL, parent_id numeric(10,0), seqno

How can I write two separate blockquotes in sequence using markdown?

…衆ロ難τιáo~ 提交于 2019-12-03 06:28:45
问题 I need to place two blockquotes in sequence, however markdown combines them into a single blockquote. The only way I can get them to separate is placing some junk text between them. As this textfield allows me to use Markdown I can demonstrate: > First Quote > Second Quote Results in: First Quote Second Quote While using junk text: > First Quote . > Second Quote Results in: First Quote . Second Quote I cannot use HTML tags or HTML entities. Only Markdown. 回答1: You can separate blockquotes

What is ' (apostrophe) in Lisp / Scheme?

拜拜、爱过 提交于 2019-12-03 06:27:55
问题 I am on day 1 hour 1 of teaching myself Scheme. Needless to say, I don't understand anything. So I'm reading The Little Schemer and using this thing: http://sisc-scheme.org/sisc-online.php as an interpreter. I need to use ' in for example (atom? 'turkey) to avoid an "undefined variable" error. The ' , according to the book, is a Common Lisp thing. I have two questions: Is the interpreter I mentioned above a good one? Can you recommend another? I need one that will go well with The Little

how to create a quoted expression from strings

不打扰是莪最后的温柔 提交于 2019-12-03 04:32:38
问题 Given a vector of strings, I would like to create an expression without the quotation marks. # eg, I would like to go from c("string1", "string2") # to... (notice the lack of '"' marks) quote(list(string1, string2)) I am encountering some difficulty dropping the quotation marks input <- c("string1", "string2") output <- paste0("quote(list(", paste(input, collapse=","), "))") # not quite what I am looking for. as.expression(output) expression("quote(list(string1,string2))") This is for use in

HTML5 block-quote with author

南笙酒味 提交于 2019-12-03 03:32:58
问题 Hi I'm seeing a great number of different ways to implementat blockquote in html but it doesn't seem clear in its documentation how should I properly format a blockquote let's say of a famous quote and metion its author like: In victory, you deserve Champagne, in defeat, you need it. Napoleon Bonaparte What would the correct format of that be in HTML5? Should the author be inside or outside the blockquote tag? Should it be inside the cite attribute? (even knowing the documentation specifies

Make big quotes with <blockquote>

纵饮孤独 提交于 2019-12-03 03:10:13
问题 Some years ago, I used the tag to create a quote on my site (with big quotation marks). Now I want to do the same thing, but it doesn't work anymore. The only thing I get are small "" and not the big ones. How do I get the old, big ones back? Thanks! 回答1: I believe you're looking for something like this: blockquote { font-family: Georgia, serif; font-size: 18px; font-style: italic; width: 500px; margin: 0.25em 0; padding: 0.35em 40px; line-height: 1.45; position: relative; color: #383838; }