Search Results

Search found 1121 results on 45 pages for 'quotes'.

Page 2/45 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to pass a variable as an argument to a command with quotes in powershell

    - by da_ponc
    Hi there, My powershell script takes the following parameter: Param($BackedUpFilePath) The value that is getting passed into my script is: "\123.123.123.123\Backups\Website.7z" I have another variable which is the location I want to extract the file: $WebsiteDeploymentFolder = "C:\example" I am trying to extract the archive with the following command: `7z x $BackedUpFilePath -o$WebsiteDeploymentFolder -aoa I keep getting the following error: Error: cannot find archive The following works but I need $BackedUpFilePath to be dynamic: `7z x '\123.123.123.123\Backups\Website.7z' -o$WebsiteDeploymentFolder -aoa I think I need to pass $BackedUpFilePath to 7z with quotes but they seem to get stripped out no matter what I try. I am in quote hell. Thanks.

    Read the article

  • Replacing quotes in a file

    - by Matthijs
    I have a large number of large semicolon-separated data files. All string fields are surrounded by double quotes. In some of the files, there are extra quotes in the string fields, which messes up the subsequent importing of the data for analysis (I'm importing to Stata). This code allows me to see the problematic quotes using gnu-awk: echo '"This";"is";1;"line" of" data";""with";"extra quotes""' | awk 'BEGIN { FPAT = "([^;]+)|(\"[^\"]+\")"}; {for ( i=1 ; i<=NF ; i++ ) if ($i ~ /^"(.*".*)+"$/) {print NR, $i}}' 1 "line" of" data" 1 ""with" 1 "extra quotes"" but I do not know how to replace them. I was thinking of doing the replace manually, but it turns out that there are several hundred matches in some of the files. I know about awk's -sub-, -gsub-, and -match- functions, but I am not sure how to design a search and replace for this specific problem. In the example above, the respective fields should be "This", "is", 1, "line of data", "with", "extra quotes", that is: all semicolons are separators, and all quotes except for the outermost quotes should be removed. Should I may be use -sed-, or is -awk- the right tool? Hope you can help me out! Thanks, Matthijs

    Read the article

  • bash/ksh/scripting eval subshell quotes

    - by jhon
    Hi tehere, I'm using ksh and have some little troubles, could you help me? why does not this code run? [root]$ CMD="ls -ltr" [root]$ eval "W=$( $CMD )" [root]$ ksh: ls -ltr: not found. [root]$ echo $W and this works fine: [root]$ CMD="ls -ltr" [root]$ eval 'W=$('$CMD')' [root]$ echo $W Thanks :-)

    Read the article

  • ASP.NET single quotes are converted to &#39;

    - by Monty
    Note: Most probably this will be a double question, but since I haven't found a clear answer, I'm asking it anyway. In ASP.NET I'd like to add some JavaScript to the onclick event of a CheckBox. I've simplified the case to this: <asp:CheckBox ID="TestCheckBox" runat="server" onclick="alert('test');" Text="Test" /> The resulting HTML is as follows: <input id="MainContainer_TestCheckBox" type="checkbox" name="ctl00$MainContainer$TestCheckBox" onclick="alert(&#39;test&#39;);" /><label for="MainContainer_TestCheckBox">Test</label> What particularly bothers me is that a single quote 'automatically' gets converted into '&#39;'. If I omit the onclick in the markup and assign it in Page_Load, the exact same results show in the HTML. protected void Page_Load(object sender, EventArgs e) { this.TestCheckBox.Attributes["onclick"] = "alert('test');"; } Anyone got a clue about what's happening? Or how to fix/ avoid it?

    Read the article

  • How can I put quotes in a string?

    - by riad
    I need to write a string literal to a text file, but the C# compiler finds errors when I use quote characters in it. My current code: writeText.WriteLine("<?xml version="1.0" encoding="utf-8"?>"); I need the output for the text file to be: <?xml version="1.0" encoding="utf-8"?> How can I put quote characters in strings in C#?

    Read the article

  • How to disable “smart quotes” in Windows Live Mail?

    - by Indrek
    Windows Live Mail by default changes straight quotation marks (" and ') to typographic quotation marks, aka "smart quotes" (“, ”, ‘ and ’). This often results in the recipient of the email seeing blank rectangles or other symbols instead of the smart quotes, due to encoding problems. Unlike in most programs, there's doesn't seem to be any built-in option to disable this, and searching online for solutions only leads to workarounds, like hitting Backspace immediately after typing a single or double quote, and switching to "Plain text" mode. Is there any way to disable this behaviour?

    Read the article

  • How to combine wildcards and spaces (quotes) in an Windows command?

    - by Jan Fabry
    I want to remove directories of the following format: C:\Program Files\FogBugz\Plugins\cache\[email protected]_NN NN is a number, so I want to use a wildcard (this is part of a post-build step in Visual Studio). The problem is that I need to combine quotes around the path name (for the space in Program Files) with a wildcard to match the end of the path. I already found out that rd is the remove command that accepts wildcards, but where do I put the quotes? I have tried no ending quote (works for dir), ...example.com*", ...example.com"*, ...example.com_??", ...cache\"[email protected]*, ...cache"\[email protected]*, but none of them work. (How many commands to remove a file/directory are there in Windows anyway? And why do they all differ in capabilities?)

    Read the article

  • Textmate single quotes autoclosure

    - by Arnold Sakhnov
    I’m using TextMate 1.5.10 on OS X Lion, and for some weird reason I don‘t get autocomplete for single quotes ('). Double quotes (") work fine. Since I personally prefer to use single quotes whenever I code in JavaScript or PHP, that thing annoys me a little. And as far I have googled, TextMate is actually supposed to autoclose single quotes by default. So why doesn’t this work for me and how do I force-enable this feature?

    Read the article

  • SEO Question - allintitle with or without quotes

    - by Aaron
    I'm trying to learn more about implementing basic SEO strategies and have been spending a lot of time refining my keywords using Google Analytics combined with manually checking them using Google's allintitle operator. However, I'm unclear on whether I should be using quotes with my allintitles. Example: allintitle: seo tips and tricks for beginners 191 results allintitle: "seo tips and tricks for beginners" 70 results My thought is that it would be more accurate to use it without quotes because that way you get a more well rounded idea of all those you are competing with. So, my question is does Google give more weight to exact matches in the title tag or does that not really matter? If someone searched for: seo tips and tricks for beginners, would they be more likely to see the ones that have that exact phrase in their title tag or does that not have any impact?

    Read the article

  • Copying first 1000 PDF files having single, double quotes in their name to another folder

    - by racer_ace
    I am having this folder with PDFs into it and I need to process 1000 at a time. So I need to move them into another folder, process them and delete them. For this I tried using $ find . -maxdepth 1 -type f |head -1000|xargs cp -t $destdir It gives error on single and double quotes in filename. There are thousands of files and I have no idea how many of them has these quotes in them. Can anyone help me find a solution? And I tried with the -0 option, it did not work

    Read the article

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

    - by David HAust
    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 value from the Repeater. I need the 'double quotes' for the Container.DataItem. I need the 'single quotes' for the OnClick. And I still need one more delimiter (triple quotes?) for the input string parameter of the Javascript function call. Since I can't use 'single quotes' again, how do I ensure the Javascript function knows the input parameter is a string and not an integer? Without the extra quotes around the input string parameter, the Javascript function thinks I'm passing in an integer. Cheers in advance for any knowledge you can drop. The anchor: <a id="aShowHide" onclick='ToggleDisplay(<%# DataBinder.Eval(Container.DataItem, "JobCode") %>);' >Show/Hide</a> and here is the Javascript: <script language="JavaScript" type="text/javascript">/* Shows/Hides the Jobs Div */ function ToggleDisplay(jobCode) { /* Each div has it's ID set dynamically ('d' plus the JobCode) */ var elem = document.getElementById('d' + jobCode); if (elem) { if (elem.style.display != 'block') { elem.style.display = 'block'; elem.style.visibility = 'visible'; } else { elem.style.display = 'none'; elem.style.visibility = 'hidden'; } } }</script>

    Read the article

  • replace symbol in javascript

    - by Jin Yong
    Does anyone know how can I replace this 2 symbol below from the string into code? ' left single quotation mark into ‘ ' right single quotation mark into ’ " left double quotation mark into “ " right double quotation mark into ”

    Read the article

  • Accessing Yahoo realtime stock quotes

    - by DVK
    There's a fairly easy way of retrieving 15-minute delayed quotes off of Yahoo! Finance web site ("quotes.csv" API). However, so far I was unable to find any info on how to access real-time quotes. The hang-ups with real-time quotes are: Only available to logged-in user No API Non-obvious how to scrape the info - I'm somewhat convinced they are placed on the page by some weird Ajax call. So I was wondering if anyone had managed to develop a publically available solution to retrieve real-time quotes for a stock from Yahoo! Finance. Notes: Implementation language/framework need is flexible but Perl or Excel is highly preferred. Assume that security is not an issue - I'm willing to supply yahoo userid and pasword, even in cleartext. I'm not 100% hung up on Yahoo - they are merely the only provider of free realtime stock quotes I'm familiar with. if the same thing can be done with Google Finance, I'd be just as happy. This is for a personal project, so scalability/fault tolerance/etc... are not important. I'm looking for a "do the whole retrieval" library ideally, but if I'm pointed to partial solutions (e.g. how to retrieve info from Yahoo's user-logged-in pages; how to scrape realtime quotes from Yahoo's page) I can fill in the blanks. I saw Finance::YahooQuote but it does not seem to allow you to supply log-in information and appears to use the lagging quotes.csv API Thanks!

    Read the article

  • Can't escape single quotes in shell

    - by user13743
    I'm trying to make a command to do a perl substitution on a batch of php files in a directory. The string I want to replace has single quotes in it, and I can't get it to properly escape the in shell. I tried echoing the string with unescaped quotes, to see what perl would be getting: echo 's/require_once('include.constants.php');/require_once('include.constants.php');require_once("./functions/include.session.inc.php");/g' and it doesn't have the single-quotes in the result: s/require_once\(include.constants.php\);/require_once\(include.constants.php\);require_once\("\./functions/include\.session\.inc\.php"\);/g However, when I try to escape the single quotes: echo 's/require_once\(\'include\.constants\.php\'\);/require_once\(\'include\.constants\.php\'\);require_once\("\./functions/include\.session\.inc\.php"\);/g' I get the prompt to complete the command: > What I want it to parse to is this: What am I doing wrong? s/require_once\('include.constants.php'\);/require_once\('include.constants.php'\);require_once\("\./functions/include\.session\.inc\.php"\);/g

    Read the article

  • How to store data which contents the quotes in mysql

    - by Nitz
    Hey Guys, i have one problem. In one of my form i have use rich text editor from the yahoo. now i want to store the data from that text area to mysql database. bcz user can enter anything in that textarea. as example user can enter many double quotes, or single quotes. so i need to store that data which may content many double quotes or many single quotes, so how to do that? normally we store by adding that data in one variable and then put that in sql then fire. but now variable contents many quotes and now i have problem to store. i can't remove that quotes bcz of my style which is generated by rich text editor. So how can store that data without affecting my styles of data.

    Read the article

  • How to make Excel strip ALL quotes from CSV text fields

    - by Klay
    When importing a CSV file into Excel, it only strips the double-quotes from the FIRST field on the line, but leaves them on all other fields. How can I force Excel to strip the quotes from ALL strings? For instance, I have a CSV file: "text1", "text2", "numeric1", "numeric 2" "abc", "def", 123, 456 "abc", "def", 123, 456 "abc", "def", 123, 456 "abc", "def", 123, 456 I import it into Excel using Data Import External Data Import Data. I specify that the fields are delimited by commas, and that the text delimiter is the double-quote character. Both the data preview and the actual Excel spreadsheet columns only strip the double-quotes from the first text field. All other text fields still have quotes around them. What's really strange is that Access is able to import this data correctly (i.e. strips quotes from every text field. Note that this is NOT a matter of internal commas or quotes or escape characters. This happens in Excel 2003 and Excel 2007.

    Read the article

  • Using YQL multi-query & XPath to parse HTML, how to escape nested quotes?

    - by Tivac
    The title is more complicated than it has to be, here's the problem query. SELECT * FROM query.multi WHERE queries=" SELECT * FROM html WHERE url='http://www.stumbleupon.com/url/http://www.guildwars2.com' AND xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span'; SELECT * FROM xml WHERE url='http://services.digg.com/1.0/endpoint?method=story.getAll&link=http://www.guildwars2.com'; SELECT * FROM json WHERE url='http://api.tweetmeme.com/url_info.json?url=http://www.guildwars2.com'; SELECT * FROM xml WHERE url='http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.guildwars2.com'; SELECT * FROM json WHERE url='http://www.reddit.com/button_info.json?url=http://www.guildwars2.com'" Specifically this line, xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span' It's problematic because of the quoting, I have to nest them three levels deep and I've run out of quote characters to use. I've tried the following variations without success: //no attribute quoting xpath='//li[@class=listLi]/div[@class=views]/a/span' //try to quote attribute w/ backslash & single quote xpath='//li[@class=\'listLi\']/div[@class=\'views\']/a/span' //try to quote attribute w/ backslash & double quote xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span' //try to quote attribute with double single quotes, like SQL xpath='//li[@class=''listLi'']/div[@class=''views'']/a/span' //try to quote attribute with double double quotes, like SQL xpath='//li[@class=""listLi""]/div[@class=""views""]/a/span' //try to quote attribute with quote entities xpath='//li[@class=&quot;listLi&quot;]/div[@class=&quot;views&quot;]/a/span' //try to surround XPath with backslash & double quote xpath=\"//li[@class='listLi']/div[@class='views']/a/span\" //try to surround XPath with double double quote xpath=""//li[@class='listLi']/div[@class='views']/a/span"" All without success. I don't see much out there about escaping XPath strings but everything I've found seems to be variations on using concat (which won't help because neither ' nor " are available) or html entities. Not using quotes for the attributes doesn't throw an error but fails because it's not the actual XPath string I need. I don't see anything in the YQL docs about how to handle escaping. I'm aware of how edge-casey this is but was hoping they'd have some sort of escaping guide.

    Read the article

  • Double vs Single Quotes in Chrome

    - by Rodrigo
    So when you want to embed google docs on a site you are given this chunk of code: <iframe width='500' height='300' frameborder='0' src='https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AiV6Vq32hBZIdHZRN3EwWERLZHVUT25ST01LTGxubWc&output=html&widget=true'></iframe> This works fine on my site. If you edit the page, we run the new content through some filters to escape out stuff and make sure it is valid html. After the process, the link above gets converted to this: <iframe frameborder="0" height="300" src="https://docs.google.com/spreadsheet/pub?hl=en_US&amp;hl=en_US&amp;key=0AiV6Vq32hBZIdHZRN3EwWERLZHVUT25ST01LTGxubWc&amp;output=html&amp;widget=true" width="500"></iframe> This will work on every browser except for chrome. Chrome thinks I am running JS in the src. I narrowed it down to a combination of double quotes and escaped '&' symbols. If i revert one of those back to the original state, the iframe works. I work in ruby where ' and " have different behaviors. Is Chrome doing the same thing? Is there a way to turn that off?

    Read the article

  • How to pass a string containing both single and double quotes as a parameter to XSLT in PHP?

    - by Boaz
    Hi, I have a simple PHP-based XSLT trasform code that looks like that: $xsl = new XSLTProcessor(); $xsl->registerPHPFunctions(); $xsl->setParameter("","searchterms", $searchterms); $xsl->importStylesheet($xslDoc); echo $xsl->transformToXML($doc); The code passes the variable $searchterms, which contains a string, as a parameter to the XSLT style sheet which in turns uses it as a text: <title>search feed for <xsl:value-of select="$searchterms"/></title> This works fine until you try to pass a string with mixes in it, say: $searchterms = '"some"'." text's quotes are mixed." In that point the XSLT processor screams: Cannot create XPath expression (string contains both quote and double-quotes) What is the correct way to safely pass arbitrary strings as input to XSLT? Note that these strings will be used as a text value in the resulting XML and not as an XPATH paramater. Thanks, Boaz

    Read the article

  • How to escape or remove double quotes in rsyslog template

    - by Evgeny
    I want rsyslog to write log messages in JSON format, which requires to use double-quotes (") around strings. Problem is that values sometime include double-quotes themselves, and those need to be escaped - but I can't figure out how to do that. Currently my rsyslog.conf contains this format that I use (a bit simplified): $template JsonFormat,"{\"msg\":\"%msg%\",\"app-name\":\"%app-name%\"}\n",sql But when a msg arrives that contains double quotes, the JSON is broken, example: user pid=21214 uid=0 auid=4294967295 msg='PAM setcred: user="oracle" exe="/bin/su" (hostname=?, addr=?, terminal=? result=Success)' turns into: {"msg":"user pid=21214 uid=0 auid=4294967295 msg='PAM setcred: user="oracle" exe="/bin/su" (hostname=?, addr=?, terminal=? result=Success)'","app-name":"user"} but what I need it to become is: {"msg":"user pid=21214 uid=0 auid=4294967295 msg='PAM setcred: user=\"oracle\" exe=\"/bin/su\" (hostname=?, addr=?, terminal=? result=Success)'","app-name":"user"}

    Read the article

  • SQL Server Bulk insert of CSV file with inconsistent quotes

    - by mattstuehler
    Is it possible to BULK INSERT (SQL Server) a CSV file in which the fields are only OCCASSIONALLY surrounded by quotes? Specifically, quotes only surround those fields that contain a ",". In other words, I have data that looks like this (the first row contain headers): id, company, rep, employees 729216,INGRAM MICRO INC.,"Stuart, Becky",523 729235,"GREAT PLAINS ENERGY, INC.","Nelson, Beena",114 721177,GEORGE WESTON BAKERIES INC,"Hogan, Meg",253 Because the quotes aren't consistent, I can't use '","' as a delimiter, and I don't know how to create a format file that accounts for this. I tried using ',' as a delimter and loading it into a temporary table where every column is a varchar, then using some kludgy processing to strip out the quotes, but that doesn't work either, because the fields that contain ',' are split into multiple columns. Unfortunately, I don't have the ability to manipulate the CSV file beforehand. Is this hopeless? Many thanks in advance for any advice. By the way, i saw this post SQL bulk import from csv, but in that case, EVERY field was consistently wrapped in quotes. So, in that case, he could use ',' as a delimiter, then strip out the quotes afterwards.

    Read the article

  • Favorite Programmer Quotes…

    - by SGWellens
      "A computer once beat me at chess, but it was no match for me at kick boxing." — Emo Philips   "There are only 10 types of people in the world, those who understand binary and those who don't. " – Unknown.   "Premature optimization is the root of all evil." — Donald Knuth   "I should have become a doctor; then I could bury my mistakes." — Unknown   "Code softly and carry a large backup thumb drive." — Me   "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." — Martin Golding   "DDE…the protocol from hell"— Charles Petzold   "Just because a thing is new don't mean that it's better" — Will Rogers   "The mark of a mature programmer is willingness to throw out code you spent time on when you realize it's pointless." — Bram Cohen   "A good programmer is someone who looks both ways before crossing a one-way street." — Doug Linder   "The early bird may get the worm but it's the second mouse that gets the cheese." — Unknown   I hope someone finds this amusing. Steve Wellens CodeProject

    Read the article

  • Funny statements, quotes, phrases, errors found on technical Books [closed]

    - by Felipe Fiali
    I found some funny or redundant statements on technical books I've read, I'd like to share. And I mean good, serious, technical books. Ok so starting it all: The .NET framework doesn't support teleportation From MCTS 70-536 Training kit book - .NET Framework 2.0 Application Development Foundation Teleportation in science fiction is a good example of serialization (though teleportation is not currently supported byt the .NET Framework). C# 3 is sexy From Jon Skeet's C# in Depth second Edition You may be itching to get on to the sexy stuff from C# 3 by this point, and I don’t blame you. Instantiating a class From Introduction to development II in Microsoft Dynamics AX 2009 To instantiate a class, is to create a new instance of it. Continue or break From Introduction to development II in Microsoft Dynamics AX 2009 Continue and break commands are used within all three loops to tell the execution to break or continue. These are just a few. I'll post some more later. Share some that you might have found too.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >