Search Results

Search found 37183 results on 1488 pages for 'string conversion'.

Page 181/1488 | < Previous Page | 177 178 179 180 181 182 183 184 185 186 187 188  | Next Page >

  • Casting from IEnumerable<Object> to IEnumerable<string>

    - by Praveen
    Hi All, Recently I found a very surprising behavior in c#. I had a method which takes IEnumerable<Object> as a parameter and i was passing IEnumerable<string> but it's not possible. While in c# everything can be upcast to Object than why this is not possible? It's totally confusing for me. Please someone clear me on this issue.

    Read the article

  • bitwise XOR a string in Bash

    - by ricky2002
    Hi. I am trying to accomplish a work in Bash scripting. I have a string which i want to XOR with my key. #!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH teststring="abcdefghijklmnopqr" Now how do i XOR the value of teststring and store it in a variable using bash? Any help will be appreciated.

    Read the article

  • WPF - Query string parameters on page

    - by Troy
    I am very new to WPF and have what appears to be a simple question: I have a Frame and I set the Source to the Uri of one of my pages. I want to pass some query string parameters to the page, but I am not sure how to access them in the Loaded event of the Page.

    Read the article

  • Comments in string and strings in comments

    - by Jay Gridley
    Hi there, I am trying to count characters in comments included in C code using Python and Regex, but no success. I can erase strings first to get rid of comments in strings, but this will erase string in comments too and result will be bad ofc. Is there any chance to ask by using regex to not match strings in comments or vice versa?

    Read the article

  • how to specify query string in url with apache bench

    - by kshama
    hi, My rails application is running on thin server which i want to benchmark using apachebench the command am using is ab -n 1 -c 1 http://localhost:3001/welcome/search?query="doctor"&rad=5 But thin server is not taking this url.Its giving !! Invalid Request Can any one help me how to give the url such that thin accepts the url with query string

    Read the article

  • iPhone: convert string using HMAC-SHA1

    - by Rupesh
    hi all, i want to generate HMAC-SHA1 of NSString type variable. I see the post but this method give me error in CCHmac(kCCHmacAlgSHA256, cKey, strlen(cKey), cData, strlen(cData), cHMAC); and NSString *hash = [HMAC base64Encoding]; line. Please suggest how can I generate the HMAC-SHA1 of any string.

    Read the article

  • combobox value string to int

    - by asli
    Hi,I have a question about converting types each other.I want to change the selected combobox value string to int but I get errors my code: int.Parse(age.SelectedItem.ToString()); What can I do for this problem?Thank you

    Read the article

  • Generate a random alphanumeric string in cocoa

    - by Ward
    Hey there, I know this can't be that hard. I've searched, but I can't seem to find a simple solution. I want to call a method, pass it the length and have it generate a random alphanumeric string. Any ideas? Are there any utility libraries out there that may have a bunch of these types of functions? Thanks, Howie

    Read the article

  • GWT Dynamic loading using GWT.create() with String literals instead of Class literals

    - by Sathish
    GWT.create() is the reflection equivalent in GWT, But it take only class literals, not fully qualified String for the Class name. How do i dynamically create classes with Strings using GWT.create()? Its not possible according to many GWT forum posts but how is it being done in frameworks like Rocket-GWT (http://code.google.com/p/rocket-gwt/wiki/Ioc) and Gwittir (http://code.google.com/p/gwittir/wiki/Introspection)

    Read the article

  • Regex.Replace only replaces start of string

    - by Yannick Smits
    I'm trying to replace a friendly url pattern with a html url notation but due to lack of regex experience I can't figure out why my regex only replaces the first occurence of my pattern: string text = "[Hotel Des Terrasses \http://flash-hotel.fr/] and [Du Phare \http://www.activehotels.com/hotel/]"; text = Regex.Replace(text, @"\[(.+)\s*\\(.+)\]", "<a href=\"$2\" target=\"_blank\">$1</a>"); How can i make the second pattern be replaced with the HTML markup too?

    Read the article

  • t-sql string concatenation

    - by stackoverflowuser
    i have a table that has following column Type -------- type 1 type 2 type 3 How can i convert the above to a string like ('type 1', 'type 2', 'type 3') I want to use the output in my t-sql query with IN clause. Something like select * from TableA where SomeColumn IN ('Type 1','Type 2', Type 3') I used to following to come up with output (type 1, type 2, type 3) select '(' + STUFF((select ', ' + Type from TableA for xml path ('')),1,2,'') + ')' But dont know how to insert the single quotes.

    Read the article

  • Regex to Match White Space or End of String

    - by Kirk
    I'm trying to find every instance of @username in comment text and replace it with a link. Here's my PHP so far: $comment = preg_replace('/@(.+?)\s/', '<a href="/users/${1}/">@${1}</a> ', $comment); The only problem is the regex is dependent upon there being whitespace after the @username reference. Can anyone help me tweak this so it will also match if it is at the end of the string?

    Read the article

  • Get the string representation of a jquery DOM object's entire HTML

    - by Scozzard
    Hi, I have had a bit of a look around and am having some difficulty solving a wee issue I am having. I basically have a string of HTML, I convert that to a JQuery DOM object so that I can easily remove all elements that have a certain class using JQuery's .remove(). I.e., var radHtml = editor.get_html(); var jqDom = $(radHtml); $(".thickbox", jqDom).remove(); $(".thickboxcontent", jqDom).remove(); editor.set_html(this.innerHTML); NOTE: The HTML is derived from content in a RADEditor text editor so there are no parent HTML tags, so can look as follows: <p>This is a header</p> <p>this is some content followed by a table </p> <a href="#TB_inline?height=350&amp;width=400&amp;inlineId=myOnPageContent0" class="thickbox">Test Thickbox</a> <div id="myOnPageContent0" class="thickboxcontent"> <table class="modal"> <thead> </thead> <tbody> <tr> <td>item</td> <td>result</td> </tr> <tr> <td>item 1</td> <td>1</td> </tr> <tr> <td>item 2</td> <td>2</td> </tr> <tr> <td>item 3</td> <td>3</td> </tr> </tbody> </table> </div> Here is what the jqDom.html() returns from the HTML above: "This is a header" I was wondering if there was an easy way to do this - have some html and remove all elements (in this case divs) that have a certain class (but leaving their contents). JQuery doesnt have to used, but I would like to. Manipulating the DOM object is fine - it is getting the full DOM object in its entirety as a string that I am having the problem with. Any help would be much appreicated. Thanks.

    Read the article

  • when executing Powershell Script from Ruby "Can't convert true into String" error

    - by Ozie Harb
    I am trying to execute a powershell script from Ruby, I have entered the below command: scriptPath = system('powershell \"C:\\Scripts\\DB_Setup.ps1\"') The ruby Script is handling exceptions when an error is raised to stop the script as below command: rescue => ex message = "\nscript on server '#{`hostname`.strip()}' terminated unexpectedly:\n\nMessage: '#{ex.message}" raise ex Output Error: script on server 'TestDB1' terminated unexpectedly: Message: 'can't convert true into String' Thanks

    Read the article

  • adding zeros in objective-c string formats

    - by Chris
    Hello- Quick question: I am trying to fill in empty spaces with a specific number of zeroes in an NSString stringWithFormat formatting string. For example, I want: @"The number is %d", 5 // I want this to output 'the number is 05' @"the number is %d", 10 // I want this to output 'the number is 10' I know how to do this in Java, but I cant seem to find the same function in objective-c. Any help would be great.

    Read the article

  • SnowLeopard Xcode warning: "format not a string literal and no format arguments"

    - by Justin Galzic
    Since upgrading to the latest XCode 3.2.1 and SnowLeopard, I've been getting the warning, "format not a string literal and no format arguments" on the following: NSError *error = nil; if (![self.managedObjectContext save:&error]) { NSLog([NSString stringWithFormat:@"%@ %@, %@", errorMsgFormat, error, [error userInfo]]); } If 'errorMsgFormat' is an NSString with format specifiers (eg: "print me like this: %@"), what is wrong with the above NSLog statement? And what is the recommended way to fix it so that the warning isn't generated?

    Read the article

  • Parsing a string using a delimiter to a TStringList, seems to also parse on spaces (Delphi)

    - by Daisetsu
    I have a simple string which is delimited by some character, let's say a comma. I should be able to create a TStringList and set it's delimiter to a comma then set the DelimitedText to the text I want to parse and it should be automaticlly parsed. The problem is when I look at the output it also includes spaces as delimiters and chops up my results. How can I avoid this, or is there a better way to do this.

    Read the article

  • Check whether the string is a unix timestamp

    - by RHPT
    I have a string and I need to find out whether it is a unix timestamp or not, how can I do that effectively? I found this thread via Google, but it doesn't come up with a very solid answer, I'm afraid. (And yes, I cribbed the question from the original poster on the aforementioned thread). http://www.sitepoint.com/forums/showthread.php?t=585963

    Read the article

  • PHP String Split

    - by deniz
    I need to split a string into chunks of 2,2,3,3 characters and was able to do so in Perl by using unpack: unpack("A2A2A3A3", 'thisisloremipsum'); However the same function does not work in PHP, it gives this output: Array ( [A2A3A3] => th ) How can I do this by using unpack? I don't want to write a function for it, it should be possible with unpack but how? Thanks in advance,

    Read the article

  • Searching for specific HTML string using Python

    - by Morpheous
    What modules would be the best to write a python program that searches through hundreds of html documents and deletes a certain string of html that is given. For instance, if I have an html doc that has <a href="test.html">Test</a> and I want to delete this out of every html page that has it. Any help is much appreciated, and I don't need someone to write the program for me, just a helpful point in the right direction.

    Read the article

< Previous Page | 177 178 179 180 181 182 183 184 185 186 187 188  | Next Page >