Search Results

Search found 1746 results on 70 pages for 'expressions'.

Page 7/70 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Lambda expressions as CLR (.NET) delegates / event handlers in Visual C++ 2010

    - by absence
    Is it possible to use the new lambda expressions in Visual C++ 2010 as CLR event handlers? I've tried the following code: SomeEvent += gcnew EventHandler( [] (Object^ sender, EventArgs^ e) { // code here } ); It results in the following error message: error C3364: 'System::EventHandler' : invalid argument for delegate constructor; delegate target needs to be a pointer to a member function Am I attempting the impossible, or is simply my syntax wrong?

    Read the article

  • Eclipse PDT debugging web application: evaluating expressions in a console

    - by dreftymac
    When using Eclipse PDT with XDebug to debug a PHP web application, is there any way to open up a console window that will allow me to type in and see the value of arbitrary expressions in the current scope? This would seem like an obvious element of the debugging environment, and I may be missing something, but the only thing resembling a console says "no consoles to display at this time"

    Read the article

  • Library to work with date expressions in C#?

    - by ObligatoryMoniker
    What library can I use to calculate dates based on date expressions? A date expression would be something like: "+3D" (plus three days) "-1W" (minus one week) "-2Y+2D+1M" (minus 2 years, plus one day, plus one month) Example: DateTime EstimatedArrivalDate = CalcDate("+3D", DateTime.Now); Where estimated arrival date would equal the current date plus 3 days. I have heard about JodaTime and NodaTime but I have not seen anything in them yet that does this. What should I be using to get this functionality in C#?

    Read the article

  • ASP.NET, JQuery - Sharing regular expressions

    - by Steve
    If you have a fair number of regular expressions used by both client (javascript) and server side code (C#, vb.net) and want to store them in one place to avoid duplication, where do you store them? I could use registerscript and write out the regex as strings, but just wondering if there is something more elegant.

    Read the article

  • Can I use relative XPath expressions in libxml2?

    - by brbr
    I am wondering whether it is possible to use relative XPath expressions in libxml2. This is from the javax.xml.xpath API and I would like to do the similar thing using libxml2: Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE); With a reference to the element, a relative XPath expression can now written to select the child element: XPath xpath = XPathFactory.newInstance().newXPath(); String expression = "manufacturer"; Node manufacturerNode = (Node) xpath.evaluate(expression, **widgetNode**, XPathConstants.NODE);

    Read the article

  • string directly before with regular expressions?

    - by acidzombie24
    I have been given a file that has its string like this blah blah DUMMY blah blah DUMMY blah blah VALUE blahX blahY KEY Some values/keys are optional, i cannot depend on order. With regular expressions using C# how do i write an regex that takes the value directly behind the key? I know i could write it in such a way it will match the first DUMMY but i cant think of how to make the VALUE instead.

    Read the article

  • Learning Regular Expressions

    - by Teifion
    I already know the basics of RegEx but I'm not sure where to go from here, I'm looking for both a good and above all easy to understand guide but I am also looking for things to use RegEx's for, it's all well and good reading about it but if you never use them then they will not stick in your mind. I have already found regular-expressions.info but I'm sure there are more.

    Read the article

  • Linq Queries converting to lambda expressions ?

    - by Freshblood
    Hello from item in range where item % 2 ==0 select i ; is converting to lamda expressions as below range.where(item % 2 ==0).select(x=>x). I feel that first way of linq is translating next one and if it is ,so is there any optimization like this range.where(item & 2 == 0) instead of other one ?

    Read the article

  • Reverse regular expressions to generate data

    - by Anton Gogolev
    In one of the StackOverflow Podcasts (the one where guys were discussing data generation for testing DBs -- either #11 or #12), Jeff mentioned something like "reverse regular expressions", which are used exactly for that purpose: given a regex, produce a string which will eventually match said regex. What is the correct term for this whole concept? Is this a well-known concept?

    Read the article

  • ANTLR expressions rewrite intermediate tree

    - by user313856
    For expressions like 3+4 I would like to use the value 7 in an intermediate representation tree. I cannot work out how to get the returns value into a rewrite rule. expression returns [int v]: etc. How do I get expression.v into WR? At the moment I get (+ 3 4), I want (7) |^( WRITE c=expression) - ^(WRINT ^(INTC ^($c)) the next step is to emit 7 in an assembler.

    Read the article

  • Trying to match what is before /../ but after / with regular expressions

    - by tim
    I am trying to match what is before /../ but after / with regular expressions, but i want it to look back and stop at the first / I feel like I am close but it just looks at the first slash and then takes everything after it like... input is this: this/is/a/./path/that/../includes/face/./stuff/../hat and my regular expression is #\/(.*)\.\.\/# matching /is/a/./path/that/../includes/face/./stuff/../ instead of just that/../ and stuff/../ how can i adapt what i'm doing to work?

    Read the article

  • JavaScript regular expressions to validate string

    - by Activist
    I'm not that good with regular expressions... I need a JavaScript regular expression that will do the following: The string can contain letters (upper and lower case), but not punctuations such as éàïç... The string can contain numbers (0..9) anywhere in the string, except on the first position. The string can contain underscores (_). Valid strings: foo foo1 foo_bar fooBar Invalid strings: 1foo -- number as first character foo bar -- space föo -- punctuation ö Many thanks!

    Read the article

  • Lambda Expressions for a 5th Grader

    - by Randy Minder
    If you had to explain Lambda expressions to a 5th grader, how would you do it? And what examples might you give, or resources might you point them to? I may be finding myself in the position of having to teach this to 5th grade level developers and could use some assistance. Thanks very much.

    Read the article

  • regular expressions for class name

    - by user576701
    i need a regular expressions string to get all anchor tags in a page with a specific css class name, in c#/vb.net this is what i got so far "<a.*?href=""(.*?)"".*?>(.*?)</a>" but my attempts to add "class=name" isnt working, also is it possible to find links where the class name appears either before or after the href with one expression ? i am familiar with 3rd party html libraries, but thats an overkill for what i have in mind, so is the webbrowser control.

    Read the article

  • nginx dynamic servername with regular expression doesn't work for co.uk

    - by redn0x
    I'm trying to setup a nginx server which dynamically loads content from a folder for a domain. To do this I'm using regular expressions in the server name like so: server_name ((?<subdomain>.+)\.)?(?<domain>.+)\.(?<tld>.*); This will create a 3 variables for nginx to use later on, for example when using the following url: test.foo.example.com this will evaluate to: $subdomain = test.foo $domain = example $tld = com The problem arises when the co.uk top-level domain is used. In this case when using the url test.foo.example.co.ukit will evaluate to: $subdomain = test.foo.cedira $domain = co $tld = uk How can I edit the regular expression so that it will also work for co.uk?

    Read the article

  • Python regular expressions matching variables to end of line

    - by None
    When you use variables (is that the correct word?) in python regular expressions like this: "blah (?P\w+)" ("value" would be the variable), how could you make the variable's value be the text after "blah " to the end of the line or to a certain character not paying any attention to the actual content of the variable. For example, this is pseudo-code for what I want: >>> import re >>> p = re.compile("say (?P<value>continue_until_text_after_assignment_is_recognized) endsay") >>> m = p.match("say Hello hi yo endsay") >>> m.group('value') 'Hello hi yo' Note: The title is probably not understandable. That is because I didn't know how to say it. Sorry if I caused any confusion.

    Read the article

  • Regular expressions in URL Rewrite Module for IIS7

    - by TN
    I have following rewrite rule to append .aspx extension if url has no extension. <rule name="SimpleRewrite" stopProcessing="true"> <match url="^(.*(?&lt;=/)([^/.]*))$" /> <action type="Rewrite" url="{R:1}.aspx" /> </rule> However the rule is not working: Error HTTP 500.52 - URL Rewrite Module Error. The expression "^(.*(?<=/)([^/.]*))$" has an invalid syntax. However, this regular expression works in .NET. What regular expressions are supported by IIS Url Rewrite Module? How to make positive lookbehind assertion?

    Read the article

  • Fuzzy Regular Expressions

    - by Thomas Ahle
    In my work I have with great results used approximate string matching algorithms such as Damerau–Levenshtein distance to make my code less vulnerable to spelling mistakes. Now I have a need to match strings against simple regular expressions such TV Schedule for \d\d (Jan|Feb|Mar|...). This means that the string TV Schedule for 10 Jan should return 0 while T Schedule for 10. Jan should return 2. This could be done by generating all strings in the regex (in this case 100x12) and find the best match, but that doesn't seam practical. Do you have any ideas how to do this effectively?

    Read the article

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