Search Results

Search found 7529 results on 302 pages for 'replace'.

Page 32/302 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • In C# VS2008 how to replace new SqlParameter("@values", SqlDbType.SomeType, 1500)) to ("@values", Sq

    - by CodeYun
    In C# VS2008 how to replace new SqlParameter("@Description", SqlDbType.NChar, 1500) or new SqlParameter("@IsRequired", SqlDbType.Bit) to "@Description", SqlDbType.NChar, 1500 or "@IsRequired", SqlDbType.B the idea is to remove new SqlParameter() and leave the parameters inside it. I have thounds of lines code have this pattern. I just want to pass compile by using some regular expression.

    Read the article

  • replace commas with spaces from json array

    - by Alex
    I have a looping function creating: <li id="id1" name="Tag1,Tag2,Tag3"> <li id="id2" name="Tag1,Tag2,Tag3"> $.each(data.posts, function(i, post){ $('<li >', {id: this.id , name: post.tags}) }); How do I replace the commas between the tags with spaces. Also is there a way I can send the tags to a "class" attribute instead of "name". It seems to not work in Safari.

    Read the article

  • javascript replace commas with spaces from json array

    - by Alex
    I have a looping function creating: <li id="id1" name="Tag1,Tag2,Tag3"> <li id="id2" name="Tag1,Tag2,Tag3"> $.each(data.posts, function(i, post){ $('<li >', {id: this.id , name: post.tags}) }); How do I replace the commas between the tags with spaces. Also is there a way I can send the tags to a "class" attribute instead of "name". It seems to not work in Safari.

    Read the article

  • Replace always replacing null values

    - by Mike
    Why does left(FIELD, replace(nullif(charindex('-', FIELD), 0), null, len(FIELD))) always return null? The idea behind the query is that if charindex() returns 0, then convert the results into null, then convert the null into the length of the field. So if '-' does not exist, show the whole string. For some reason it makes every row equal null. Thank you.

    Read the article

  • Replace table of one database with other

    - by coure06
    I have 2 databases with same tables. DBProduction and DBLocal both have testTable. How can i replace testTable of DBProduction with of DBLocal? There are some new rows inserted and some updated rows in testTable of DBLocal. Using SQL Server 2008

    Read the article

  • sed 's/this/that/' -- ignoring g but still replace entire file

    - by lakshmipathi
    as title said, Im trying to change only the first occurrence of word.By using sed 's/this/that/' file.txt though i'm not using g option it replace entire file. How to fix this.? UPDATE: $ cat file.txt first line this this this this $ sed -e '1s/this/that/;t' file.txt first line this // ------> I want to change only this "this" to "that" :) this this this

    Read the article

  • inplace replace entire html document

    - by james
    is it possible to in-place replace the entire html document? i tried jQuery("html").html("....") but style information does not survive. i'm trying to avoid using data uri because i do not want the generated document to be stored in the browsers history

    Read the article

  • XML + DOM + replace text in element

    - by yael
    from XML < NET ID="10.10.10.10, 255.255.255.0" / I need to replace the text 10.10.10.10, 255.255.255.0 with 192.9.1.1, 255.0.0.0 by VB + DOM script so the final line in the XML should be < NET ID="192.9.1.1, 255.0.0.0" / THX

    Read the article

  • Replace for loop with formula

    - by hamax
    I have this loop that runs in O(end - start) and I would like to replace it with something O(1). If "width" wouldn't be decreasing, it would be pretty simple. for (int i = start; i <= end; i++, width--) if (i % 3 > 0) // 1 or 2, but not 0 z += width; start, end and width have positive values

    Read the article

  • using sed to replace whole word containing '='?

    - by rashid
    EDIT i have something like this in a file: imagecolor=0 arrayimagecolorcopy=0 arrayimagecolorcopy3d=0 when i use sed -i -e 's/imagecolor=0/imagecolor=1/' it will change 1 and 2 line. But i only want it to replace first line. i also tried sed with \< \ and \b \b, but no luck. Could it be the '=' sign? Do we have something like -w as in grep command? Thank you.

    Read the article

  • Is there a command-line utility app which can find a specific block of lines in a text file, and replace it?

    - by fred.bear
    UPDATE (see end of question) The text "search and replace" utility programs I've seen, seem to only search on a line-by-line basis... Is there a command-line tool which can locate one block of lines (in a text file), and replace it with another block of lines.? For example: Does the test file file contain this exact group of lines: 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. 'Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!' I want this, so that I can replace multiple lines of text in a file and know I'm not overwriting the wrong lines. I would never replace "The Jabberwocky" (Lewis Carroll), but it makes a novel example :) UPDATE: ..(sub-update) My following comment about reasons when not use sed are only in the context of; don't push any tool too far beyond its design intent (I use sed quite often, and consider it to be invaluable.) I just now found an interesting web page about sed and when not to use it. So, because of all the sed answers, I"ll post the link.. it is part of the sed FAQ on sourceforge Also, I'm pretty sure there is some way diff can do the job of locating the block of text (once it's located, the replacement is quite straight foward; using head and tail) ... 'diff' dumps all the necessary data, but I haven't yet worked out how to filter it , ... (I'm still working on it)

    Read the article

  • HTML Agility Pack - ReplaceNode doesn't change the InnerHTML of the Body

    - by morsanu
    Hi there, I have this The body: <body><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent leo leo, ultrices eu venenatis et, rutrum fringilla dolor.</p></body> The code: HtmlNode body = doc.DocumentNode.SelectSingleNode("//body"); Dictionary<HtmlNode, HtmlNode> toReplace = new Dictionary<HtmlNode, HtmlNode>(); // I do some logic here adding nodes to the toReplace dictionary. foreach (HtmlNode replaceNode in toReplace.Keys) { replaceNode.ParentNod.ReplaceChild(toReplace[replaceNode], replaceNode); } After i do this, the InnerHtml of the body node remains the same as from beginning, although the OutterHtml or the InnerText are showing the good result. Is there something wrong with my code? The result: // body.InnerHtml <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent leo leo, ultrices eu venenatis et, rutrum fringilla dolor.</p> // body.OutterHtml <body><p>Lorem ipsum dolor sit amet...</p></body>

    Read the article

  • PHP preg_replace oddity with £ pound sign and ã

    - by Barry Ramsay
    Hello I am applying the following function <?php function replaceChar($string){ $new_string = preg_replace("/[^a-zA-Z0-9\sçéèêëñòóôõöàáâäåìíîïùúûüýÿ]/", "", $string); return $new_string; } $string = "This is some text and numbers 12345 and symbols !£%^#&$ and foreign letters éèêëñòóôõöàáâäåìíîïùúûüýÿ"; echo replaceChar($string); ?> which works fine but if I add ã to the preg_replace like $new_string = preg_replace("/[^a-zA-Z0-9\sçéèêëñòóôõöàáâãäåìíîïùúûüýÿ]/", "", $string); $string = "This is some text and numbers 12345 and symbols !£%^#&$ and foreign letters éèêëñòóôõöàáâäåìíîïùúûüýÿã"; It conflicts with the pound sign £ and replaces the pound sign with the unidentified question mark in black square. This is not critical but does anyone know why this is? Thank you, Barry

    Read the article

  • Do I need to replace localhost in the IIS://localhost/MimeMap when reading the Mimemap

    - by Rob
    I'm reading out the mime types from IIS's MimeMap using the command _mimeTypes = new Dictionary<string, string>(); //load from iis store. DirectoryEntry Path = new DirectoryEntry("IIS://localhost/MimeMap"); PropertyValueCollection PropValues = Path.Properties["MimeMap"]; IISOle.MimeMap MimeTypeObj; foreach (var item in PropValues) { // IISOle -> Add reference to Active DS IIS Namespace provider MimeTypeObj = (IISOle.MimeMap)item; _mimeTypes.Add(MimeTypeObj.Extension, MimeTypeObj.MimeType); } Do I need replace the localhost part when I deploy it to my live server? If not, why not and what are the implications of not doing so. Cheers

    Read the article

  • [PHP] preg_replace: replacing using %

    - by Juan
    Hi all, I'm using the function preg_replace but I cannot figure out how to make it work, the function just doesn't seem to work for me. What I'm trying to do is to convert a string into a link if any word contains the % (percentage) character. For instance if I have the string "go to %mysite", I'd like to convert the mysite word into a link. I tried the following... $data = "go to %mysite"; $result = preg_replace('/(^|[\s.\,\:\;]+)%([A-Za-z0-9]{1,64})/e', '\1%\2', $data); ...but it doesn't work. Any help on this would be much appreciated. Thanks Juan

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >