Search Results

Search found 8593 results on 344 pages for 'regular expression'.

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

  • Grabbing values from Expression.Blend.SampleData

    - by Mitchell Skurnik
    I am trying to figure out how to grab a value from Expression.Blend.SampleData. If my id is equal to a drop down for example, I can grab it by doing this: ((Expression.Blend.SampleData.MyDatabase.something)(MyDropDown.SelectedItem)).description; I need some way to place my own value where (MyDropDown.SelectedItem) is. Visual studio wants me to convert it a "Expression.Blend.SampleData.MyDatabase.something" format. I have tried a few ways to do this but I have been unsuccessful. Any Ideas? EDIT I am starting to think there is no way in Silverlight to do this

    Read the article

  • Reverse Expression.Like criterion

    - by Joel Potter
    How should I go about writing a backwards like statement using NHibernate criteria? WHERE 'somestring' LIKE [Property] + '%' Sub Question: Can you access the abstract root alias in a SQLCriterion expression? This is somewhat achievable using the SQLCriterion expression Expression.Sql("? like {alias}.[Property] + '.%'", value, NHibernateUtil.String); However, in the case of class inheritance, {alias} is replaced with the incorrect alias for the column. Example (these classes are stored in separate tables): public abstract class Parent { public virtual string Property { get; set; } } public class Child : Parent { } The above query executed with Child as the root type will replace {alias} with the alias to the Child table rather than the Parent table. This results in an invalid column exception. I need to execute a like statement as above where the property exists on the parent table rather than on the root type table.

    Read the article

  • How do I get values of Linq Expression

    - by Yucel
    Hi, I have a method that takes Expression type parameter, in my method i want to get values of this expression but cant find out hot to do that. private User GetUser(Expression<Func<User, bool>> query) { User user = Context.User.Where(query).FirstOrDefault(); return user; } I am calling this method with different parameters like GetUser(u => u.Username == username); GetUser(u=> u.Email == email); I want to change GetUser method to work with stored procedures but i need to find what is inside query parameter I want to check if query is u.Username == username I will call GetUserByUsername SP if query is u.Email == email I will call GetuserByEmail SP

    Read the article

  • VB.NET logical expression evaluator

    - by Tim
    I need to test a logical expression held in a string to see if it evaluate to TRUE or FALSE.(the strig is built dynamically) For example the resulting string may contain "'dog'<'cat' OR (14 AND 4<6)". There are no variables in the string, it will logically evaluate. It will only contain simple operators = < < = <= and AND , OR and Open and Close Brackets, string constants and numbers. (converted to correct syntax && || etc.) I currently acheive this by creating a jscipt function and compiling it into a .dll. I then reference the .dll in my VB.NET project. class ExpressionEvaluator { function Evaluate(Expression : String) { return eval(Expression); } } Is there a simpler method using built in .NET functions or Lamdba expressions.

    Read the article

  • Regular Expression for exclude something that has specific word inside bracked (MySQL)

    - by bn
    This Regular expression if for MySQL query: I want to exclude this row because it has 'something' in side the bracket "bla bla bla bla bla bla (bla bla bla something)" However I want to include this row, because it does not have 'something' inside the bracket "bla bla bla (bla bla bla)" I tried this query but it didnt work. SELECT * FROM table WHERE field NOT REGEXP '((%something%))'; I think this is wrong, I just did trial and error, I like to use regular expression, but never understand it completely. is there any good tutorial/books/links for learning the detail of regular expression? Thank You

    Read the article

  • difference between Casini [IIS express] and VS Development server or Expression web

    - by anirudha
    MVC3 project can be run within Expression web and Visual studio as opened like a website not a project. they work same even if you open blogengine.net project in VS they take a time when you have more theme but expression web debug them in a second. well because theme design not matter for code. Expression web is a good because they save time for compile the code. even changes we make a little in design nothing in backend code.   i found a little difference between Casini and VS development server that if image putted in wrong way like <img src=”//img.png”/> instead of <img src=”/img.png”/> the error we make // instead of / that’s not worked in Expression web or Visual studio debugging but in Cassini it’s work fine.   Well i found that debug Blogengine.net in Expression web is a great thing because in VS they take a time like a minute to debug when you trying to debug first time. Expression Web save a time when we design themes within them and that’s much good option because web is also maked for design.   Well if you want to debug application faster then use casini but Expression web debugging is a good option when they take a long time to debug in Visual studio and EW debug them in a seconds.

    Read the article

  • Excel Matching problem with logic expression

    - by abelenky
    I have a block of data that represents the steps in a process and the possible errors: ProcessStep Status FeesPaid OK FormRecvd OK RoleAssigned OK CheckedIn Not Checked In. ReadyToStart Not Ready for Start I want to find the first Status that is not "OK". I have attempted this: =Match("<>""OK""", StatusRange, 0) which is supposed to return the index of the first element in the range that is NOT-EQUAL (<) to "OK" But this doesn't work, instead returning #N/A. I expect it to return 4 (index #4, in a 1-based index, representing that CheckedIn is the first non-OK element) Any ideas how to do this?

    Read the article

  • Regular Expression for $_GET query strings

    - by sandelius
    Hi there! I'm trying to find a regular expression for $_GET query strings. I have an array like this: private $_regexp = array( ':id' => '[0-9]+', ':year' => '[12][0-9]{3}', ':month' => '0[1-9]|1[012]', ':day' => '0[1-9]|[12][0-9]|3[01]', ':slug' => '[a-zA-Z0-9-]+', ':query' => '...' ); and I loop throw them to see if I have a matching wildcard like this: if ( array_key_exists($matches[0], $this->_regexp) ) { return '^('.$this->_regexp[$matches[0]].')$'; } All other regexp go throw but I've tried a whole lot of different regexp to find: ?anything=anything can't figure it out, googled like h..l but can't find anything. I've tried, for example something like this: (\?)(.*)(=)(.*) but without result... Any regexp gurus here? / Tobias

    Read the article

  • Regular expression replacing only if contained withing a regular expression match?

    - by Tower
    Hi, I have the following: [list] [*] test [*] test [*] test [/list] and I would like to create a regular expression that turns that into: <ul> <li>test</li> <li>test</li> <li>test</li> </ul> I know regex enough to replace simple tags, but in this case I need to replace li tags only if they are contained inside ul. Is there a way to check that before replacing? I am using JavaScript if that matters.

    Read the article

  • strange UnindexedFileException for Expression Encoder MediaItem

    - by George2
    Hello everyone, When I use the following statement to create a new instance of MediaItem (VSTS 2008 + .Net 3.5 + C# + Windows 7), and I met with the following exception, any ideas what is wrong? I have tried with other wmv files, and there are no such issues. BTW: I am using Expression Encoder 3 SDK. MediaItem video = new MediaItem("1.wmv"); Microsoft.Expression.Encoder.UnindexedFileException {"Cannot seek file."} thanks in advance, George

    Read the article

  • PostgreSQL - can't save items - "type integer but expression is of type character"

    - by user984621
    I am getting still over and over again this error, the column age has the type integer, I am saving into this column integer-value, I also tried to don't save nothing into this column, but still getting this error... Could anyone help me, how to fix that? PG::Error: ERROR: column "age" is of type integer but expression is of type character varying at character 102 HINT: You will need to rewrite or cast the expression. : INSERT INTO "user_details" ("created_at", "age", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id"

    Read the article

  • Reporting Services Expression

    - by Alex
    I'm trying to set the Hidden-property of a Textbox based on this expression: =IIf(IsNothing(Parameters!customer_numbers.Value) AND IsNothing(Parameters!country_codes.Value),False,True) Error: "Argument not specified for parameter 'FalsePart' of Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object" I'm a jScript/C# guy and not used to this pseudo-VB language. What is wrong? Regards Alex

    Read the article

  • php regular expression assistance bold a filename

    - by jason
    I am not very good, with regular expression in php I am trying to get a reg_expression to find all file names such as /file-name-here.php and make it bold. This expression works in Flash but not in php it also doesn't accept the '-' i'm not sure why i can't get it to work with preg_replace /(https?://)?(www\.)?([a-zA-Z0-9_%]*)\b\.[a-z]{2,4}(\.[a-z]{2})?((/[a-zA-Z0-9_%]*)+)?(\.[a-z]*)?/g

    Read the article

  • Expression 4 ships

    - by guybarrette
    The Expression 4 suite of products shipped today.  Good news, it’s a free upgrade for Expression 3 owners. New with version 4 is the Expression Studio 4 Web Professional suite.  Basically, it’s Expression Studio 4 Ultimate without Blend and SketchFlow. var addthis_pub="guybarrette";

    Read the article

  • Python: Convert format string to regular expression

    - by miracle2k
    The users of my app can configure the layout of certain files via a format string. For example, the config value the user specifies might be: layout = '%(group)s/foo-%(locale)s/file.txt' I now need to find all such files that already exist. This seems easy enough using the glob module: glob_pattern = layout % {'group': '*', 'locale': '*'} glob.glob(glob_pattern) However, now comes the hard part: Given the list of glob results, I need to get all those filename-parts that matched a given placeholder, for example all the different "locale" values. I thought I would generate a regular expression for the format string that I could then match against the list of glob results (or then possibly skipping glob and doing all the matching myself). But I can't find a nice way to create the regex with both the proper group captures, and escaping the rest of the input. For example, this might give me a regex that matches the locales: regex = layout % {'group': '.*', 'locale': (.*)} But to be sure the regex is valid, I need to pass it through re.escape(), which then also escapes the regex syntax I have just inserted. Calling re.escape() first ruins the format string. I know there's fnmatch.translate(), which would even give me a regex - but not one that returns the proper groups. Is there a good way to do this, without a hack like replacing the placeholders with a regex-safe unique value etc.? Is there possibly some way (a third party library perhaps?) that allows dissecting a format string in a more flexible way, for example splitting the string at the placeholder locations?

    Read the article

  • d:DesignData issue, Visual Studio 2010 cant build after adding sample design data with Expression Bl

    - by Valko
    Hi, VS 2010 solution and Silverlight project builds fine, then: I open MyView.xaml view in Expression Blend 4 Add sample data from class (I use my class defined in the same project) after I add new sample design data with Expression blend 4, everything looks fine, you see the added sample data in the EB 4 fine, you also see the data in VS 2010 designer too. Close the EB 4, and next VS 2010 build is giving me this errors: Error 7 XAML Namespace http://schemas.microsoft.com/expression/blend/2008 is not resolved. C:\Code\source\...myview.xaml and: Error 12 Object reference not set to an instance of an object. ... TestSampleData.xaml when I open the TestSampleData.xaml I see that namespace for my class used to define sample data is not recognized. However this namespace and the class itself exist in the same project! If I remove the design data from the MyView.xaml: d:DataContext="{d:DesignData /SampleData/TestSampleData.xaml}" it builds fine and the namespace in TestSampleData.xaml is recognized this time?? and then if add: d:DataContext="{d:DesignData /SampleData/TestSampleData.xaml}" I again see in the VS 2010 designer sample data, but the next build fails and again I see studio cant find the namespace in my TestSampleData.xaml containing sample data. That cycle is driving me crazy. Am I missing something here, is it not possible to have your class defining sample design data in the same project you have the MyView.xaml view?? cheers Valko

    Read the article

  • Dynamic expression tree how to

    - by Savvas Sopiadis
    Hello everybody! Implemented a generic repository with several Methods. One of those is this: public IEnumerable<T> Find(Expression<Func<T, bool>> where) { return _objectSet.Where(where); } Given to be it is easy to call this like this: Expression<Func<Culture, bool>> whereClause = c => c.CultureId > 4 ; return cultureRepository.Find(whereClause).AsQueryable(); But now i see (realize) that this kind of quering is "limiting only to one criteria". What i would like to do is this: in the above example c is of type Culture. Culture has several properties like CultureId, Name, Displayname,... How would i express the following: CultureId 4 and Name.contains('de') and in another execution Name.contains('us') and Displayname.contains('ca') and .... Those queries should be created dynamically. I had a look in Expression trees (as i thought this to be a solution to my problem - btw i never used them before) but i cannot find anything which points to my requirement. How can this be costructed? Thanks in advance

    Read the article

  • Regular Expressions Cookbook Code Samples

    - by Jan Goyvaerts
    %COOKBOOKFRAME% One of the common criticisms against the first edition was that we didn’t have the regular expressions and code samples available for download. Since our book only has very short code snippets rather than complete programs, we (the authors) did not have these available as separate files either. But for the second edition we’re trying to do better. You can now download the code samples from the 2nd edition of Regular Expressions Cookbook. This HTML file contains all the blocks with regular expressions and source code from the book, along with the titles of the chapters, recipes, and sections that they are found in. If you have purchased the book, you can use this file to easily copy and paste the regular expressions and source code snippets. Even if you purchased the ebook, you may prefer to use this file. The regexes in the ebook are formatted with line breaks and gray dots for spaces to make them easier to read in print. The HTML file does not use such formatting, so you can copy and paste them directly. This means that some very regexes will run beyond the edge of your browser window.

    Read the article

  • Matching math expression with regular expression?

    - by Ethan
    For example, these are valid math expressions: a * b + c -a * (b / 1.50) (apple + (-0.5)) * (boy - 1) And these are invalid math expressions: --a *+ b @ 1.5.0 // two consecutive signs, two consecutive operators, invalid operator, invalid number -a * b + 1) // unmatched parentheses a) * (b + c) / (d // unmatched parentheses I have no problem with matching float numbers, but have difficulty with parentheses matching. Any idea? If there is better solution than regular expression, I'll accept as well. But regex is preferred.

    Read the article

  • O'Reilly deal of the week to 23:59 PT 4/Sept/2012 - Master Regular Expressions

    - by TATWORTH
    O'Reilly at http://shop.oreilly.com/category/deals/regular-expressions-owo.do?code=WKRGEX are offering 50% off a range of e-books on mastering Regular Expressions "Take the guesswork out of using regular expressions. Learn powerful tips for matching, extracting, and transforming text as well as the gotchas to avoid. For one week only, SAVE 50% on these e-books and discover a whole new world of mastery over your code." I recommend Mastering Regular Expression to Dot Net developer as it covers the use of regular expressions across a number of environments, including Dot Net.

    Read the article

  • Boolean Expression Evaluation in Java

    - by Trilok
    Hey everyone, Is there a relatively simpler (when compared with writing a parser) way to evaluate boolean expressions in Java? I do not want to use the JEP library. I have a String expression something like: (x 4 || x < 8 && p 6) [ I will replace the variables with values. Is there a way by which I can evaluate this expression? The problem is, this can be any level deep. So, writing a parser would be really complex. Thanks

    Read the article

  • When are ASP.NET Expression Builders most useful?

    - by SkippyFire
    I saw an example of using Expression Builders, and creating your own Custom Expression Builder Classes here: http://aspnet.4guysfromrolla.com/articles/022509-1.aspx However, I fail to see the value in using this approach. It doesn't seem much easier than programmatically setting values in your code behind. As far as I can tell, the only thing you can do with them is set properties. Maybe they would be useful for setting defaults on certain controls? Can anyone shed light on where this ASP.NET feature becomes powerful?

    Read the article

  • Expression Encoder SDK - WMA Pro Codec Issues with Windows Server 2003

    - by PortageMonkey
    I am using the Expression Encoder SDK to encode .avi and Flash files to a .wmv format suitable for Silverlight. By default, EE encodes files with audio using the the WMA PRO codec. If you are running Windows Server 2003, this is a problem as it doesn't support the WMA PRO codec and produces and error message similar to the following. Error Message: The Audio Profile settings do not match a valid system profile. Error Source: Microsoft.Expression.Encoder Error Target Site: System.String GetProfileString() I am looking for a way to change the default audio codec to something suitable for WS 2003. I am aware that although not supported natively, there is a highly invasive way to install Windows Media Player 11 and it's codecs on WS 2003 but this involves registry tinkering and other hacks not suitable for our production environments so that solution is out.

    Read the article

  • Storing expression references to data base

    - by Marcus
    I have standard arithmetic expressions sotred as strings eg. "WIDTH * 2 + HEIGHT * 2" In this example WIDTH and HEIGHT references other objects in my system and the literals WIDTH and HEIGHT refers to a property (Name) on those objects. The problem I'm having is when the Name property on an expression object changes the expression won't match anymore. One solution I came up with is to instead of storing "WIDTH * 2 + HEIGHT * 2" i store "{ID_OF_WIDTH} * 2 + {ID_OF_HEIGHT} * 2" And let my parser be able to parse this new syntax and implement an interface or such on referenced objects IExpressionReference { string IdentifierName { get; } } Anyone have a better/alternative solution to my problem?

    Read the article

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