Search Results

Search found 2155 results on 87 pages for 'mathematical expressions'.

Page 22/87 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Cognos 8.3: Can I use parameters in conditional style expressions?

    - by Jacob
    Hi, I have Start Date and End date parameters that work fine as filters on a query, as follows: [EMR Reporting].[Appointments].[Appointment Date] between ?Start Date? and ?End Date? But when I attempt to apply conditional styles to a field based on ?Start Date?, the report blows up. Should I be able to use parameter values in conditional style expressions, or is this not supported for some reason? Thanks!

    Read the article

  • If you're not supposed to use Regular Expressions to parse HTML, then how are HTML parsers written?

    - by Andy E
    I see questions every day asking how to parse or extract something from some HTML string and the first answer/comment is always "Don't use RegEx to parse HTML, lest you feel the wrath!" (that last part is sometimes omitted). This is rather confusing for me, I always thought that in general, the best way to parse any complicated string is to use a regular expression. So how does a HTML parser work? Doesn't it use regular expressions to parse. One particular argument for using a regular expression is that there's not always a parsing alternative (such as JavaScript, where DOMDocument isn't a universally available option). jQuery, for instance, seems to manage just fine using a regex to convert a HTML string to DOM nodes. Not sure whether or not to CW this, it's a genuine question that I want to be answered and not really intended to be a discussion thread.

    Read the article

  • Is it possible to join these two regex expressions into one?

    - by Pure.Krome
    Hi folks, i have the following two regular expressions (in order btw). 1. ^~/buying/(.*)\?(.*) => foo= group 1 baa= group 2. 2. ^~/buying/(.*) => foo= group 1 baa= nothing/empty/null/baibai What's i'm trying to do is, if the url has a questionmark, then split it into two groups. Otherwise, just throw all the stuff into the first group. the reason why the order is important for me, is that if i switch them round, the '?' regex will never get fired because the #2 expression (above) will catch all. So .. can this be re-fixed? NOTE: I have tried using this website** to help me debug/tweak .. but I can't figure it out. ** I have no affiliation with that site.

    Read the article

  • How can I capture a multiline pattern using a regular expressions in java?

    - by lampShade
    I have a text file that I need to parse using regular expressions. The text that I need to capture is in multiline groups like this: truck zDoug Doug's house (123) 456-7890 [email protected] 30 61234.56 8/10/2003 vehicle eRob Rob's house (987) 654-3210 [email protected] For this example I need to capture truck followed by the next seven lines.In other words, in this "block" I have 8 groups. This is what I've tried but it will not capture the next line: (truck)\n(\w). NOTE: I'm using the program RegExr to test my regex before I port it to Java.

    Read the article

  • R: How to pass a list of selection expressions (strings in this case) to the subset function?

    - by John
    Here is some example data: data = data.frame(series = c("1a", "1b", "1e"), reading = c(0.1, 0.4, 0.6)) > data series reading 1 1a 0.1 2 1b 0.4 3 1e 0.6 Which I can pull out selective single rows using subset: > subset (data, series == "1a") series reading 1 1a 0.1 And pull out multiple rows using a logical OR > subset (data, series == "1a" | series == "1e") series reading 1 1a 0.1 3 1e 0.6 But if I have a long list of series expressions, this gets really annoying to input, so I'd prefer to define them in a better way, something like this: series_you_want = c("1a", "1e") (although even this sucks a little) and be able to do something like this, subset (data, series == series_you_want) The above obviously fails, I'm just not sure what the best way to do this is?

    Read the article

  • How to use regular expressions to pull a substring? (screen scraping)

    - by Diego
    Hey guys, i'm really trying to understand regular expressions while scraping a site, i've been using it in my code enough to pull the following, but am stuck here. I need to quickly grab this: http://www.example.com/online/store/TitleDetail?detail&sku=123456789 from this: ('<a href="javascript:if(handleDoubleClick(this.id)){window.location=\'http://www.example.com/online/store/TitleDetail?detail&sku=123456789\';}" id="getTitleDetails_123456789">\r\n\t\t\t \tcheck store inventory\r\n\t\t\t </a>', 1) This is where I got confused. any ideas?

    Read the article

  • Microsoft expressions ... How its different from visual studio ?

    - by Xinus
    I heard just Microsoft Expressions studio from my project manager and he told me to explore on it and find out if we can do development faster using it as compared to vs2008, I started downloading trial version and started googling about it, but I couldn't find answers to following questions Why Microsoft came out with new IDE when they already have very successful one i.e. the visual studio ? How its different that visual studio ? Does it offer advantages over visual studio ? Can somebody please help me find out these answers ?

    Read the article

  • Can we use Resource Expressions in javascript and other parts except Literal?

    - by balexandre
    The Literal control works all the time <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:ErrorMessages, errorCompanyNotFound %>" /> But if I want to use this as a parameter in an image, like <img src="blahblah" alt="" title"<%$ Resources:ErrorMessages, errorCompanyNotFound %>" /> It gives the annoying error Literal expressions like '' are not allowed. Use instead. Same happens if I try to access it through Javascript var noHit = '<%$ Resources:ErrorMessages, errorCompanyNotFound %>'; Does anyone had any idea how can I fetch the Global Resource value under this circumstances?

    Read the article

  • GUI for watching logs (tail and grep)

    - by Grzegorz Oledzki
    Could you recommend a GUI application with powerful log watching capabilities? Generally it would work as tail -f in GUI, but on top of that following features would be very useful: filtering out some lines based on (regular) expressions coloring some lines based on (regular) expressions interactive search saveable configuration easily applicable to different files notifications based on (regular) expressions A similar tool on Windows is BareTail and its paid version - BareTailPro

    Read the article

  • GUI for watching logs (tail and grep)

    - by Grzegorz Oledzki
    Could you recommend a GUI application with powerful log watching capabilities? Generally it would work as tail -f in GUI, but on top of that following features would be very useful: filtering out some lines based on (regular) expressions coloring some lines based on (regular) expressions interactive search saveable configuration easily applicable to different files notifications based on (regular) expressions A similar tool on Windows is BareTail and its paid version - BareTailPro

    Read the article

  • Selectively replacing words outside of tags using regular expressions in PHP?

    - by Gary Willoughby
    I have a paragraph of text and i want to replace some words using PHP (preg_replace). Here's a sample piece of text: This lesson addresses rhyming [one]words and ways[/one] that students may learn to identify these words. Topics include learning that rhyming words sound alike and these sounds all come from the [two]ending of the words[/two]. This can be accomplished by having students repeat sets of rhyming words so that they can say them and hear them. The students will also participate in a variety of rhyming word activities. In order to demonstrate mastery the students will listen to [three]sets of words[/three] and tell the teacher if the words rhyme or not. If you notice there are many occurances of the word 'words'. I want to replace all the occurances that don't occur inside any of the tags with the word 'birds'. So it looks like this: This lesson addresses rhyming [one]words and ways[/one] that students may learn to identify these birds. Topics include learning that rhyming birds sound alike and these sounds all come from the [two]ending of the words[/two]. This can be accomplished by having students repeat sets of rhyming birds so that they can say them and hear them. The students will also participate in a variety of rhyming word activities. In order to demonstrate mastery the students will listen to [three]sets of words[/three] and tell the teacher if the birds rhyme or not. Would you use regular expressions to accomplish this? Can a regular expression accomplish this?

    Read the article

  • How can I factor out repeated expressions in an SQL Query? Column aliases don't seem to be the ticke

    - by Weston C
    So, I've got a query that looks something like this: SELECT id, DATE_FORMAT(CONVERT_TZ(callTime,'+0:00','-7:00'),'%b %d %Y') as callDate, DATE_FORMAT(CONVERT_TZ(callTime,'+0:00','-7:00'),'%H:%i') as callTimeOfDay, SEC_TO_TIME(callLength) as callLength FROM cs_calldata WHERE customerCode='999999-abc-blahblahblah' AND CONVERT_TZ(callTime,'+0:00','-7:00') >= '2010-04-25' AND CONVERT_TZ(callTime,'+0:00','-7:00') <= '2010-05-25' If you're like me, you probably start thinking that maybe it would improve readability and possibly the performance of this query if I wasn't asking it to compute CONVERT_TZ(callTime,'+0:00','-7:00') four separate times. So I try to create a column alias for that expression and replace further occurances with that alias: SELECT id, CONVERT_TZ(callTime,'+0:00','-7:00') as callTimeZoned, DATE_FORMAT(callTimeZoned,'%b %d %Y') as callDate, DATE_FORMAT(callTimeZoned,'%H:%i') as callTimeOfDay, SEC_TO_TIME(callLength) as callLength FROM cs_calldata WHERE customerCode='5999999-abc-blahblahblah' AND callTimeZoned >= '2010-04-25' AND callTimeZoned <= '2010-05-25' This is when I learned, to quote the MySQL manual: Standard SQL disallows references to column aliases in a WHERE clause. This restriction is imposed because when the WHERE clause is evaluated, the column value may not yet have been determined. So, that approach would seem to be dead in the water. How is someone writing queries with recurring expressions like this supposed to deal with it?

    Read the article

  • How to delete files on the command line with regular expressions?

    - by Jack
    Lets say I have 20 files named FOOXX, where XX is the number of the file, eg 01, 02 etc. At the moment, if I want to delete all files lower than the number 10, this is easy and I just use a wildcard, eg rm FOO0* However, if I want to delete specific files ina range, eg 13-15, this becomes more difficult. rm FPP[13-15] does not work, and asks me if I wish to delete all files. Likewse rm FOO1[3-5] wishes to delete all files that begin with FOO1 So, what is the best way to delete ranges of files like this? I have tried with both bash and zsh, and I don't think they differ so much for such a basic task?

    Read the article

  • Make a Perl-style regex interpreter behave like a basic or extended regex interpreter

    - by Barry Brown
    I am writing a tool to help students learn regular expressions. I will probably be writing it in Java. The idea is this: the student types in a regular expression and the tool shows which parts of a text will get matched by the regex. Simple enough. But I want to support several different regex "flavors" such as: Basic regular expressions (think: grep) Extended regular expressions (think: egrep) A subset of Perl regular expressions, including the character classes \w, \s, etc. Sed-style regular expressions Java has the java.util.Regex class, but it supports only Perl-style regular expressions, which is a superset of the basic and extended REs. What I think I need is a way to take any given regular expression and escape the meta-characters that aren't part of a given flavor. Then I could give it to the Regex object and it would behave as if it was written for the selected RE interpreter. For example, given the following regex: ^\w+[0-9]{5}-(\d{4})?$ As a basic regular expression, it would be interpreted as: ^\\w\+[0-9]\{5\}-\(\\d\{4\}\)\?$ As an extended regular expression, it would be: ^\\w+[0-9]{5}-(\\d{4})?$ And as a Perl-style regex, it would be the same as the original expression. Is there a "regular expression for regular expressions" than I could run through a regex search-and-replace to quote the non-meta characters? What else could I do? Are there alternative Java classes I could use?

    Read the article

  • How to do an fetch request with expressions like this on the iPhone?

    - by dontWatchMyProfile
    The documentation has an example on how to retrieve simple values only, rather than managed objects. This remembers a lot SQL using aliases and functions to only retrieve calculated values. So, actually pretty geeky stuff. To get the minimum date from a bunch of records, this is used on the mac: NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Event" inManagedObjectContext:context]; [request setEntity:entity]; // Specify that the request should return dictionaries. [request setResultType:NSDictionaryResultType]; // Create an expression for the key path. NSExpression *keyPathExpression = [NSExpression expressionForKeyPath:@"creationDate"]; // Create an expression to represent the minimum value at the key path 'creationDate' NSExpression *minExpression = [NSExpression expressionForFunction:@"min:" arguments:[NSArray arrayWithObject:keyPathExpression]]; // Create an expression description using the minExpression and returning a date. NSExpressionDescription *expressionDescription = [[NSExpressionDescription alloc] init]; // The name is the key that will be used in the dictionary for the return value. [expressionDescription setName:@"minDate"]; [expressionDescription setExpression:minExpression]; [expressionDescription setExpressionResultType:NSDateAttributeType]; // Set the request's properties to fetch just the property represented by the expressions. [request setPropertiesToFetch:[NSArray arrayWithObject:expressionDescription]]; // Execute the fetch. NSError *error; NSArray *objects = [managedObjectContext executeFetchRequest:request error:&error]; if (objects == nil) { // Handle the error. } else { if ([objects count] > 0) { NSLog(@"Minimum date: %@", [[objects objectAtIndex:0] valueForKey:@"minDate"]; } } [expressionDescription release]; [request release]; Nice, I though - but having a deep look into NSExpression -expressionForFunction:arguments: it turns out that iPhone OS does NOT support the min: function. Well, probably there's a nifty way to use an own function for this kind of stuff on the iPhone as well? Because on thing I'm already worrying about is, how I'm gonna sort a table based on the calculated distance of targets on a map (location-based stuff).

    Read the article

  • Discrete Math and Computing Course

    - by ShrimpCrackers
    I was recently admitted into a Computing and Software Systems program (basically software engineering) and one of the first courses I'll be taking is called Mathematical Principles of Computing. The course description: "Integrating mathematical principles with detailed instruction in computer programming. Explores mathematical reasoning and discrete structures through object-oriented programming. Includes algorithm analysis, basic abstract data types, and data structures." I'm not a fan of math, but I've been doing well in all my math classes mostly A's and B's ever since I started two years ago, and I've been doing math every quarter - never took a quarter without math - so I've been doing it all in sequence without gaps. However, I'm worried about this class. I've read briefly on what discrete math is and from what my advisor told me, its connection with computer science is that it has alot to do with proving algorithms. One thing that my instructors briefly touched on and never went into detail was proving algorithms, and when I tried, I just wasn't very good at mathematical induction. It's one of the things that I ignored every time it showed up in a homework problem (usually in Calculus III which I'm finishing up right now). Questions: 1. What can I expect from this class? 2. How can I prepare myself for this class? 3. Other tips? Thank you.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >