Search Results

Search found 4848 results on 194 pages for 'expression blend'.

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

  • T-sql Common expression query as subquery

    - by ase69s
    I have the following query: WITH Orders(Id) AS ( SELECT DISTINCT anfrageid FROM MPHotlineAnfrageAnhang ) SELECT Id, ( SELECT CONVERT(VARCHAR(255),anfragetext) + ' | ' FROM MPHotlineAnfrageAnhang WHERE anfrageid = Id ORDER BY anfrageid, erstelltam FOR XML PATH('') ) AS Descriptions FROM Orders Its concatenates varchar values of diferents rows grouped by an id. But now i want to include it as a subquery and it gives some errors i cant solve. Simplified example of use: select descriptions from ( WITH Orders(Id) AS ( SELECT DISTINCT anfrageid FROM MPHotlineAnfrageAnhang ) SELECT Id, ( SELECT CONVERT(VARCHAR(255),anfragetext) + ' | ' FROM MPHotlineAnfrageAnhang WHERE anfrageid = Id ORDER BY anfrageid, erstelltam FOR XML PATH('') ) AS Descriptions FROM Orders ) as tx where id=100012 Errors (Aproximate translation from spanish): -Incorrect sintaxis near 'WITH'. -Incorrect sintaxis near 'WITH'. If the instruction is a common table expression or a xmlnamespaces clause, the previous instruction must end with semicolon. -Incorrect sintaxis near ')'. What im doing wrong?

    Read the article

  • Constant expression with custom object

    - by nils
    I'm trying to use an instant of a custom class as a template parameter. class X { public: X() {}; }; template <class Foo, Foo foo> struct Bar { }; const X x; Bar<X, x> foo; The compiler states that x cannot appear in a constant expression. Why that? There is everything given to construct that object at compile time.

    Read the article

  • Expression Engine Template Exporting

    - by Lark
    I have a project that was developed into a Expression Engine template. I used the Core version of EE to develop this template on my local machine. Now I need to export this template/weblog so it can be loaded onto the production server so the client can begin using EE to update their site. The issue I am running into is how to export the templates plus the weblogs that go along with the template. This is my first time using EE so if you know how to accomplish this please explain it in detail. Thank you in advance.

    Read the article

  • Create a string with the result of an expression and the expression that originated the value. Is it

    - by Oscar Reyes
    Like String r = SomeThing.toExecString("new Object().toString()"); And when executed the value of r would be: "new Object().toString() = java.lang.Object@c5e3974" Is this even possible at all? Would it need a bunch of reflection? A built in compiler maybe? AFAIK, this is not possible with regular Java. The closest thing I could get is IDE support like in IDEA with the "macro" soutv+tab that prints: Hit taband type the expression The IDE types the rest for you. But that's quite another completely thing.

    Read the article

  • parsing expression trees with booleans

    - by Schotime
    I am trying to parse an expression tree for a linq provider and running into a little snag with booleans. I can parse this no problems. var p = products.Where(x=>x.IsAvailable == true).ToList(); however when its written like this? var p = products.Where(x=>x.IsAvailable).ToList(); i only get a MemberAccess to look at and i can't see how i deduce that it is true or false (!x.IsAvailable). Any help would be great. Thanks.

    Read the article

  • Expression Web 4 - Master Page Error

    - by Eric J.
    I created an ASP.Net Web Application in VS 2010. That in turn creates an example Site.Master, Default.aspx, and several other example files. I then opened Default.aspx in Expression Web 4 and get the error message The Master Page file 'Site.Master' cannot be loaded. Default.aspx can still be displayed fine in VS 2010. Source.Master: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="SampleWebApp.SiteMaster" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head runat="server"> <title></title> <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" /> <asp:ContentPlaceHolder ID="HeadContent" runat="server"> </asp:ContentPlaceHolder> <style type="text/css"> .style1 { font-family: Tunga; } </style> </head> <body> <form runat="server"> <div class="page"> <div class="header"> <div class="title"> <h1 class="style1"> My Application Master Page</h1> </div> <div class="loginDisplay"> <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false"> <AnonymousTemplate> [ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ] </AnonymousTemplate> <LoggedInTemplate> Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>! [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ] </LoggedInTemplate> </asp:LoginView> </div> <div class="clear hideSkiplink"> <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"> <Items> <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"> <asp:MenuItem NavigateUrl="~/Home/NewItem.aspx" Text="New Item" Value="New Item"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/Home/AnotherItem.aspx" Text="Another Item" Value="Another Item"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/> <asp:MenuItem NavigateUrl="~/ContactUs.aspx" Text="ContactUs" Value="ContactUs"> </asp:MenuItem> </Items> </asp:Menu> </div> </div> <div class="main"> <asp:ContentPlaceHolder ID="MainContent" runat="server"/> </div> <div class="clear"> </div> </div> <div class="footer"> </div> </form> </body> </html> Default.aspx: <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SampleWebApp._Default" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> <style type="text/css"> .style2 { color: #669900; } .style3 { background-color: #FFFFCC; } </style> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> Welcome to MY page! </h2> <p> To learn more <span class="style2"><strong><em><span class="style3">about</span></em></strong></span> ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>. </p> <p> You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;clcid=0x409" title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>. </p> </asp:Content> Any idea how to get the master page to work properly in Expression Web 4?

    Read the article

  • Print expression as is without evaluating it

    - by Raj
    i want to print the expression Xmin and Ymin as is without calculating the final value . i,e with the values of I and J as 1,2,3,4,5 example when I=1 Xmin= Xmin ((1 - 1)*10 + (1 - 1)*1) is there a way to do it .. I tried the following code, but no luck: int a, g; a = 10; g = 1; for (int J=1; J<=5; J++) { for (int I = 1; I <= 5; I++) { string Xmin = Convert.ToString((I - 1)*a + (I - 1)*g); string Ymin = Convert.ToString((J - 1) * a); Debug.WriteLine("X=" + Xmin + "Y=" + Ymin); } }

    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

  • Why is this logical expression in python False?

    - by W3ctor
    My question is, why are these expressions False? Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> num = raw_input("Choose a number: ") Choose a number: 5 >>> print num 5 >>> print ( num < 18 ) False >>> print ( num == 5 ) False Because if i try this: >>> print ( num > 0 ) True The expression works fine. Thank you for the help!

    Read the article

  • Expression Studio - v2 good enough for learning?

    - by aSkywalker
    I have VS 2008, and looking forward to moving fairly quickly to VS2010. Our applications (we only have a few) are all winforms apps - mostly VB. I want to start to learn WPF. My version of Expression Studio is version 2. I have heard that the improvements made from version 2 to version 3 are significant. If it follows the paradigm of version 3 being the adult app (past the infancy of version 1 and the awkwardness of version 2), then I suppose it would be worth the investment to get it before starting to learn. But, unless my company was willing to pay, I am hoping to keep costs low. Can anyone share some experience - is version 2 good enough to learn on, or should I bite the bullet and smooth my learning experience by going with version 3? Thanks!

    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

  • IntelliSense: expression must have integral or enum type

    - by user1743737
    Guys i need someone fix this problem ? when i compile that code i have this error: Error: IntelliSense: expression must have integral or enum type i have problem in this part: Console(0, V("seta sv_hostname " + servername + ";\n")); so how i can fix that if (strncmp(command, V("exec config_mp"), 14) == 0) { if (GAME_MODE == 'D') { CIniReader iniReader(V(".\\teknogods.ini")); char *servername = iniReader.ReadString(V("Settings"),V("Servername"),""); if (strcmp(servername,"") == 0) { info("Server name set to defult."); } else { //Console(0, V("seta scr_teambalance 1;\n")); Console(0, V("seta sv_hostname " + servername + ";\n")); info("server name set to: %s.", servername); } } }

    Read the article

  • Mixing expressions and expression language (<%= %> inside of c:if)

    - by Jack
    I need to access some constants in my jsp, and sadly the EL does not offer any functionality for it. There are some options like the unstandard tag library, but I'd like to keep it a bit more standard. I tried: <%@ page import = "com.jackdane.Constants"%> <c:if test="${object.display == '<%=com.jackdane.Constants.YES %>}'"> //some display logic </c:if> But that doesn't appear to do the trick. It's been a while since I've used an expression so I might have made an error. Any input is appreciated. Edit: To clarify, the constants class is not in my control. It's inside a jar file that I recieved. It contains no getters/setters. Just private static final Strings.

    Read the article

  • LINQ Expression help with Func TEntity,TType

    - by Chris Conway
    I have a repository method that accepts an order by parameter in the form: public IEnumerable<TEntity> Get<TEntity>(Expression<Func<TEntity,string>> orderBy) Now that works fine when trying to sort by a property of type string, var entities = rep.Get(x => x.Name); but what if i want to sort by double or int or any other type. Doing something like var entities = rep.Get(x => x.Price); obviously throws a compile error saying I can't convert double to string. How can I make this more generic so I can sort by any property in my entity, or at least the properties where the type implements IComparable or something similar?

    Read the article

  • logical or expression c++

    - by user1870181
    I have a problem using the Logical OR operator in C++. The problem is coming that the right-side expression is not evaluated if the left-side is true. I have two deque-s and I need to popLeft from them with a while, but if I can pop from the first deque, I don't pop from the second because is not evaluated, by the OR operator. How can I overcome this problem. Here is the piece of code: while( D.popLeft( k ) || E.popLeft( m ) ) { if( k < m ) { C.pushRight( k ); E.pushLeft( m ); } else { C.pushRight( m ); D.pushLeft( k ); } }

    Read the article

  • Why isn't Expression Blend rendering my User Control? It's only showing XAML.

    - by unforgiven3
    I'm opening valid XAML within my VS2008 solution in Expression Blend 3 and it is only showing XAML when I try to open individual XAML files. My solution/projects all build and run correctly. When I go to View - Active Document View the Design View, Split View and XAML View options are all grayed out... which doesn't make much sense. I'm not much of a Blend user, but this has never happened before, and I'm coming up blank for how to fix it. Any ideas?

    Read the article

  • How to go to the next level integrating animations in WPF applications with Blend / VS2008?

    - by Edward Tanguay
    I have been able to create little animations with the storyline in Blend. And I have been able to copy in the isolated storylines and triggers into existing projects in visual studio to spruce them up on the edges a little bit. But after adding too many animations, they start to conflict or cancel each other out, etc., or I can make a panel slide down and slide it back up, then it no longer can slide down since it is not in its original state anymore. Does anyone have any links, video tutorials, books, resources which not only show you how to make a little animation and then leave you to figure out how to integrate numerous animations into a typical business application layout, but instead take you through the whole process of building a business application while integrating animations and WPF goodness with Blend and Visual Studio?

    Read the article

  • How can I use a config-file in Expression Blend 4?

    - by sofri
    Hi, while trying to use the "InfoStrat"-Bing-Maps-Control in Expression Blend 4 for my Surface Application, I get the error message: "Mixed mode assembly is built against version v2.0.50527 of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information" I already found out that I need to write this configfile: <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> </startup> </configuration> But Expression Blend doesn't seem to recognize that it is there. So how can I solve this problem?

    Read the article

  • Why is the binding icon not visible in blend?

    - by Ankit Rathod
    Hello, Why is the binding icon (a small gray icon) not visible in blend for some properties even though they are DependencyProperties? For eg. I dragged a button on my page and dragged a textbox. I want to bind button's content property to textbox's text property. But i can't find the Binding icon in Blend. I know if i type the binding syntax in code it will work just fine. But why is that icon missing? Thanks in advance :)

    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

  • Need a regular expression to parse a text body

    - by Ali
    Hi guys, I need a regular expression to parse a body of text. Basically assume this that we have text files and each of which contains random text but within the text there would be lines in the following formats - basically they are a format for denoting flight legs. eg: 13FEB2009 BDR7402 1000 UUBB 1020 UUWW FLT This line of text is always on one line The first word is a date in the format DDMMMYYYY Second word could be of any length and hold alphanumeric characters third word is the time in format HHMM - its always numeric fourth word is a location code - its almost always just alphabets but could also be alphanumeric fifth word is the arrival time in format HHMM - its always numeric sixth word is a location code - its almost always just alphabets but could also be alphanumeric Any words which follow on the same line are just definitions A text file may contain among lots of random text information one or more such lines of text. I need a way to be able to extract all this information i.e just these lines within a text file and store them with their integral parts separated as mentioned in an associative array so I have something like this: array('0'=>array('date'=>'', 'time-dept'=>'', 'flightcode'=>'',....)) I'm assuming regular expressions would be in order here. I'm using php for this - would appreciate the help guys :)

    Read the article

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

    - 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 --the relation for all the subparts of ozsolar including itself all_managers (id, username, managerid, idlist) as ( --seed that is the ozsola part 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 the total number of subparts and group by subpart select id, username from all_managers; The problem is that in this line: select u1.id, u1.username, u1.managerid, ' ' The sqlserver 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)

    Read the article

  • how to make Regular expression into non-greedy ?

    - by Rueta
    Hi everyone! I have made a Work with JQ. My Work is a string width a special character block begin and end of string. I want take the text in that special characters, i used regular expression for find in string, but how to make JQ find multi result when have two special character or more. My html here; <div id="container"> <div id="textcontainer"> Cu?c chi?n pháp lý gi?a [|co th?|nghi?m|] th? tru?ng [|test2|dây là test l?n 2|] ch?ng khoán [|M?|day la nuoc my|] và ngân hàng d?u tu quy?n l?c nh?t Ph? Wall m?i ch? b?t d?u. </div> </div> and my JQ $(document).ready(function() { var takedata = $("#textcontainer").text(); var test = 'abcd adddb'; var filterdata = takedata.match(/(\[.+\])/); alert(filterdata); //end write js }); my result is: [|co th?|nghi?m|] th? tru?ng [|test2|dây là test l?n 2|] ch?ng khoán [|M?|day la nuoc my|] . but this is'nt the result i want :(. How to get [text] for times 1 and [demo] for times 2 ?. pls help me !. thankyou :)

    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

  • LINQ to SQL: Reusable expression for property?

    - by coenvdwel
    Pardon me for being unable to phrase the title more exact. Basically, I have three LINQ objects linked to tables. One is Product, the other is Company and the last is a mapping table Mapping to store what Company sells which products and by which ID this Company refers to this Product. I am now retrieving a list of products as follows: var options = new DataLoadOptions(); options.LoadWith<Product>(p => p.Mappings); context.LoadOptions = options; var products = ( from p in context.Products select new { ProductID = p.ProductID, //BackendProductID = p.BackendProductID, BackendProductID = (p.Mappings.Count == 0) ? "None" : (p.Mappings.Count > 1) ? "Multiple" : p.Mappings.First().BackendProductID, Description = p.Description } ).ToList(); This does a single query retrieving the information I want. But I want to be able to move the logic behind the BackendProductID into the LINQ object so I can use the commented line instead of the annoyingly nested ternary operator statements for neatness and re-usability. So I added the following property to the Product object: public string BackendProductID { get { if (Mappings.Count == 0) return "None"; if (Mappings.Count > 1) return "Multiple"; return Mappings.First().BackendProductID; } } The list is still the same, but it now does a query for every single Product to get it's BackendProductID. The code is neater and re-usable, but the performance now is terrible. What I need is some kind of Expression or Delegate but I couldn't get my head around writing one. It always ended up querying for every single product, still. Any help would be appreciated!

    Read the article

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