Search Results

Search found 5101 results on 205 pages for 'expression trees'.

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

  • 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

  • How to Serialize Binary Tree

    - by Veljko Skarich
    I went to an interview today where I was asked to serialize a binary tree. I implemented an array-based approach where the children of node i (numbering in level-order traversal) were at the 2*i index for the left child and 2*i + 1 for the right child. The interviewer seemed more or less pleased, but I'm wondering what serialize means exactly? Does it specifically pertain to flattening the tree for writing to disk, or would serializing a tree also include just turning the tree into a linked list, say. Also, how would we go about flattening the tree into a (doubly) linked list, and then reconstructing it? Can you recreate the exact structure of the tree from the linked list? Thank you/

    Read the article

  • How can I debug or set a break statement inside an expression tree?

    - by Abel
    When an external library contains a LINQ provider, and it throws an exception when executing a dynamic expression tree, how can I break when that expression is thrown? For example, I use a third party LINQ2CRM provider, which allows me to call the Max<TSource, TResult>() method of IQueryable, but when it throws an InvalidCastException, I fail to break on the spot when the exception is thrown, making it hard to review the stack-trace because it's already unwinded when the debugger breaks it in my code. I've set "break on throw" for the mentioned exception. My debug settings are: Clarification on where exactly I'd want to break. I do not want to break in side the LINQ Expression, but instead, I want to break when the expression tree is executed, or, put in other words, when the IQueryable extension method Max() calls the override provided by the LINQ provider. The top of the stacktrace looks like this, which is where I would like to break inside (or step through, or whatever): at XrmLinq.QueryProviderBase.Execute[T](Expression expression) at System.Linq.Queryable.Max[TSource,TResult](IQueryable`1 source, Expression`1 selector)

    Read the article

  • Convert Javascript Regular Expression to PHP (PCRE) Expression

    - by Matt
    Hi all, I am up to my neck in regular expressions, and I have this regular expression that works in javascript (and flash) that I just can't get working in PHP Here it is: var number = '(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)'; var oneChar = '(?:[^\\0-\\x08\\x0a-\\x1f\"\\\\]' + '|\\\\(?:[\"/\\\\bfnrt]|u[0-9A-Fa-f]{4}))'; var str = '(?:\"' + oneChar + '*\")'; var varName = '\\$(?:' + oneChar + '[^ ,]*)'; var func = '(?:{[ ]*' + oneChar + '[^ ]*)'; // Will match a value in a well-formed JSON file. // If the input is not well-formed, may match strangely, but not in an unsafe // way. // Since this only matches value tokens, it does not match whitespace, colons, // or commas. var jsonToken = new RegExp( '(?:false|true|null' +'|[\\}]' + '|' + varName + '|' + func + '|' + number + '|' + str + ')', 'g'); If you want it fully assembled here it is: /(?:false|true|null|[\}]|\$(?:(?:[^\0-\x08\x0a-\x1f"\\]|\\(?:["/\\bfnrt]|u[0-9A-Fa-f]{4}))[^ ,]*)|(?:{[ ]*(?:[^\0-\x08\x0a-\x1f"\\]|\\(?:["/\\bfnrt]|u[0-9A-Fa-f]{4}))[^ ]*)|(?:-?\b(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\b)|(?:"(?:[^\0-\x08\x0a-\x1f"\\]|\\(?:["/\\bfnrt]|u[0-9A-Fa-f]{4}))*"))/g Interestingly enough, its very similar to JSON. I need this regular expression to work in PHP... Here's what I have in PHP: $number = '(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)'; $oneChar = '(?:[^\\0-\\x08\\x0a-\\x1f\"\\\\]|\\\\(?:[\"/\\\\bfnrt]|u[0-9A-Fa-f]{4}))'; $string = '(?:\"'.$oneChar.'*\")'; $varName = '\\$(?:'.$oneChar.'[^ ,]*)'; $func = '(?:{[ ]*'.$oneChar.'[^ ]*)'; $jsonToken = '(?:false|true|null' .'|[\\}]' .'|'.$varName .'|'.$func .'|'.$number .'|'.$string .')'; echo $jsonToken; preg_match_all($jsonToken, $content, $out); return $out; Here's what happens if I try using preg_match_all(): Warning: preg_match_all() [function.preg-match-all]: Compilation failed: nothing to repeat at offset 0 in /Users/Matt/Sites/Templating/json/Jeeves.php on line 88 Any help would be much appreciated! Thanks, Matt

    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

  • Figuring a max repetitive sub-tree in an object tree

    - by bonomo
    I am trying to solve a problem of finding a max repetitive sub-tree in an object tree. By the object tree I mean a tree where each leaf and node has a name. Each leaf has a type and a value of that type associated with that leaf. Each node has a set of leaves / nodes in certain order. Given an object tree that - we know - has a repetitive sub-tree in it. By repetitive I mean 2 or more sub-trees that are similar in everything (names/types/order of sub-elements) but the values of leaves. No nodes/leaves can be shared between sub-trees. Problem is to identify these sub-trees of the max height. I know that the exhaustive search can do the trick. I am rather looking for more efficient approach.

    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

  • Can LINQ expression classes implement the observer pattern instead of deferred execution?

    - by Tormod
    Hi. We have issues within an application using a state machine. The application is implemented as a windows service and is iteration based (it "foreaches" itself through everything) and there are myriads of instances being processed by the state machine. As I'm reading the MEAP version of Jon Skeets book "C# in Depth, 2nd ed", I'm wondering if I can change the whole thing to use linq expression instances so that guards and conditions are represented using expression trees. We are building many applications on this state machine engine and would probably greatly benefit from the new Expression tree visualizer in VS 2010 Now, simple example. If I have an expression tree where there is an OR Expression condition with two sub nodes, is there any way that these can implement the observer pattern so that the expression tree becomes event driven? If a condition change, it should notify its parent node (the OR node). Since the OR node then changes from "false" to "true", then it should notify ITS parent and so on. I love the declarative model of expression trees, but the deferred execution model works in opposite direction of the control flow if you want event based "live" conditions. Am I off on a wild goose chase here? Or is there some concept in the BCL that may help me achieve this?

    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

  • Storing expression template functors

    - by UncaughtException
    Hello guys, at the moment I'm really interested in expression templates and want to code a library for writing and differentiating mathematical functions with a lambda-style syntax. At the moment, I'm able to write (_x * _x)(2); and get the correct result 4. But I would really like to do something like MathFunction f = _x * _x; f(2);, but I don't have any ideas on how to cope with the recursive expression templates on the right side. Is it possible to achieve this without using the 'auto'-Keyword instead of MathFunction or having to make the operator() virtual? Thanks for your help!

    Read the article

  • Enumerable.Range in and Expression and Entity Framework

    - by eka808
    I'm currently developping an expression method (used in linq to entity queries) who has to give me a daycount for a given period (start date and end date) decrementing this daycount if specials days are in the period. My idea was the following : Generate an enumerable with all the dates (and with Enumerable.Range) Make a .Where on this enumerable to remove the specials dates Like a MyEnumerable.Where(a = a != "20120101") After that, return a MyEnumerable.Count() I come with this code : return (p) => Enumerable .Range(1, 4) .Where(a => a != 20120101) .AsQueryable() .Count() I tried to cast as a list, as a queryable, both (like the example) and no way ! it doesn't work ! I always get this error : LINQ to Entities does not recognize the method 'System.Collections.Generic.IEnumerable`1[System.Int32] Range(Int32, Int32)' method, and this method cannot be translated into a store expression. Have you got an idea about that ? Using an enumerable is of course not mandatory, any working solutions is good ^^ Thank's by advance !

    Read the article

  • Express XPath as an expression tree

    - by 47d_
    If I have an XPath query like NodeA/NodeB[@WIDTH and not(@WIDTH="20")] | NodeC[@WIDTH and not(@WIDTH="20")]/NodeD Is there any API available to visualize this XPath query as a stack of atomic expressions, something like (following is generic) Get results of NodeA, call it "first set" Get results of NodeB from "first set" Filter where [@WIDTH and not(@WIDTH="20")] Filter NodeD, call this "node d for B" Get results of NodeC from "first set" Filter where [@WIDTH and not(@WIDTH="20")] Filter NodeD, call this "node d for C" Combine "node d for B" and "node d for C" I am trying to see if we can convert the XPath expression into custom expression which is close to english and vice versa. If no API is available, what would be the best approach? Thanks in advance.

    Read the article

  • C# Regular Expression for Regular Expression Parsing

    - by Chris
    I want to returns matches from a regular expression string. The regex string is: (?<TICKER>[A-Z]+)(?<SPACE>\\s)(?<MONTH_ALPHA_ABBREV>Jan|Feb|Mar|Apr|May|Jun|Jul|Sep|Oct|Nov|Dec)(?<SPACE>\\s)(?<DAY>\\d+)(?<SPACE>\\s)(?<YEAR_LONG>[2][0][0-9][0-9])(?<SPACE>\\s)(?<STRIKE_DOLLAR>\\d+(?=[.]))[.](?<STRIKE_DECIMAL>(?<=[.])\\d+)(?<SPACE>\\s)(?<PUTCALL_LONG>Call|Put) And I want to get matches for all of the group names and all of the items within square brackets (including the square brackets) outside of open and closed parenthesis. I have this regex: ((?<=[<])([A-Z]|[_])+(?=[>]))|(\\[.\\]) But this returns square bracket items within the parenthesis. To be more specific these are the matches I want from the regex at the top (keep in mind this needs to be flexible for any regex): TICKER SPACE MONTH_ALPHA_ABBREV SPACE DAY SPACE YEAR_LONG SPACE STRIKE_DOLLAR [.] STRIKE_DECIMAL SPACE PUTCALL_LONG

    Read the article

  • Mixing regular expression and other conditional expression in a bash if statement

    - by Tassos
    I can't get around this for quite sometime now. As I read along manuals and tutorials I'm getting more confused. I want an if statement with the following logic: if [ -n $drupal_version ] && [[ "$drupal_version" =~ DRUPAL-[6-9]-[1-9][1-9] ]]; then but I can't get it to work properly. When the script is evaluated using the "bash -x ... " script construct, works ok but when is run as a regular script my expression is not evaluated (eventhough the above condition should be met the else part is run). Could you provide any help?

    Read the article

  • Expression Studio 4 Community Launch Event

    - by Timmy Kokke
    Event On June 7th Expression Studio 4 will be launched at the Internet Week in New York. One day later, on June 8th, the Dutch Silverlight and Expression User Group SIXIN organizes the Dutch Community Launch in collaboration with Microsoft and Centric at Centric's office in IJsselstein. To celebrate the 4 Expression release we have two interesting speakers. In addition, we give three packages Expression Studio and more great gifts away.   Program The preliminary program for the evening is as follows: 5:45 p.m. - Food, drinks and networking 6:45 p.m. - Reception and Introduction by Koen Zwikstra, co-founder of SIXIN and Silverlight MVP 7:00 p.m. - Phone 7 Building a Windows application using the new features of Expression Blend by Loek van den Ouweland, founder and web designer for Magic Studio 8:00 p.m. - Break 8:30 p.m. - Tour Encoder and Expression Web by Antoni Dol, senior designer at Macaw 9:30 p.m. - Networking while enjoying a drink   Ask your question to one of the speakers If you have a question to one of the speakers, then you can by email ([email protected]) or thru Twitter. Send an email with subject # expression4 or send a tweet @ sixinUG and use it to hashtag # expression4.   Register To register for this event or to get more information you can go to the SIXIN meetings page here.   Special thanks to our sponsors:

    Read the article

  • How to use Common Table Expression and check no duplication in SQL Server

    - by vodkhang
    I have a table references to itself. User table: id, username, managerid and managerid links back to id Now, I want to get all the managers including direct manager, manager of direct manager, so on and so forth... The problem is that I do not want to have a unstop recursive sql. So, I want to check if an id alreay in a list, I will not include it anymore. Here is my sql for that: with all_managers (id, username, managerid, idlist) as ( select u1.id, u1.username, u1.managerid, ' ' from users u1, users u2 where u1.id = u2.managerid and u2.id = 6 UNION ALL select u.id, u.username, u.managerid, idlist + ' ' + u.id from all_managers a, users u where a.managerid = u.id and charindex(cast(u.id as nvarchar(5)), idlist) != 0 ) select id, username from all_managers; The problem is that in this line: select u1.id, u1.username, u1.managerid, ' ' The SQL Server complains with me that I can not put ' ' as the initialized for idlist. nvarchar(40) does not work as well. I do not know how to declare it inside a common table expression like this one. Usually, in db2, I can just put varchar(40) My sample data: ID UserName ManagerID 1 admin 1 2 a 1 3 b 1 4 c 2 What I want to do is that I want to find all managers of c guy. The result should be: admin, a, b. Some of the user can be his manager (like admin) because the ManagerID does not allow NULL and some does not have direct manager. With common table expression, it can lead to an infinite recursive. So, I am also trying to avoid that situation by trying to not include the id twice. For example, in the 1st iteration, we already have id : 1, so, in the 2nd iteration and later on, 1 should never be allowed. I also want to ask if my current approach is good or not and any other solutions? Because if I have a big database with a deep hierarchy, I will have to initialize a big varchar to keep it and it consumes memory, right?

    Read the article

  • Create an Action<T> to "set" a property, when I am provided with the LINQ Expression for the "get"

    - by Alex
    I'd like to be able to generate a compiled expression to set a property, given the lambda expression that provides the "get" method for a property. Here's what I'm looking for: public Action<int> CreateSetter<T>(Expression<Func<T, int>> getter) { // returns a compiled action using the details of the getter expression tree, or null // if the write property is not defined. } I'm still trying to understand the various types of Expression classes, so if you can point me in the right direction that would be great.

    Read the article

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