Search Results

Search found 4350 results on 174 pages for 'chilly child'.

Page 46/174 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • How can I eager-load a child collection mapped to a non-primary key in NHibernate 2.1.2?

    - by David Rubin
    Hi, I have two objects with a many-to-many relationship between them, as follows: public class LeftHandSide { public LeftHandSide() { Name = String.Empty; Rights = new HashSet<RightHandSide>(); } public int Id { get; set; } public string Name { get; set; } public ICollection<RightHandSide> Rights { get; set; } } public class RightHandSide { public RightHandSide() { OtherProp = String.Empty; Lefts = new HashSet<LeftHandSide>(); } public int Id { get; set; } public string OtherProp { get; set; } public ICollection<LeftHandSide> Lefts { get; set; } } and I'm using a legacy database, so my mappings look like: Notice that LeftHandSide and RightHandSide are associated by a different column than RightHandSide's primary key. <class name="LeftHandSide" table="[dbo].[lefts]" lazy="false"> <id name="Id" column="ID" unsaved-value="0"> <generator class="identity" /> </id> <property name="Name" not-null="true" /> <set name="Rights" table="[dbo].[lefts2rights]"> <key column="leftId" /> <!-- THIS IS THE IMPORTANT BIT: I MUST USE PROPERTY-REF --> <many-to-many class="RightHandSide" column="rightProp" property-ref="OtherProp" /> </set> </class> <class name="RightHandSide" table="[dbo].[rights]" lazy="false"> <id name="Id" column="id" unsaved-value="0"> <generator class="identity" /> </id> <property name="OtherProp" column="otherProp" /> <set name="Lefts" table="[dbo].[lefts2rights]"> <!-- THIS IS THE IMPORTANT BIT: I MUST USE PROPERTY-REF --> <key column="rightProp" property-ref="OtherProp" /> <many-to-many class="LeftHandSide" column="leftId" /> </set> </class> The problem comes when I go to do a query: LeftHandSide lhs = _session.CreateCriteria<LeftHandSide>() .Add(Expression.IdEq(13)) .UniqueResult<LeftHandSide>(); works just fine. But LeftHandSide lhs = _session.CreateCriteria<LeftHandSide>() .Add(Expression.IdEq(13)) .SetFetchMode("Rights", FetchMode.Join) .UniqueResult<LeftHandSide>(); throws an exception (see below). Interestingly, RightHandSide rhs = _session.CreateCriteria<RightHandSide>() .Add(Expression.IdEq(127)) .SetFetchMode("Lefts", FetchMode.Join) .UniqueResult<RightHandSide>(); seems to be perfectly fine as well. NHibernate.Exceptions.GenericADOException Message: Error performing LoadByUniqueKey[SQL: SQL not available] Source: NHibernate StackTrace: c:\opt\nhibernate\2.1.2\source\src\NHibernate\Type\EntityType.cs(563,0): at NHibernate.Type.EntityType.LoadByUniqueKey(String entityName, String uniqueKeyPropertyName, Object key, ISessionImplementor session) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Type\EntityType.cs(428,0): at NHibernate.Type.EntityType.ResolveIdentifier(Object value, ISessionImplementor session, Object owner) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Type\EntityType.cs(300,0): at NHibernate.Type.EntityType.NullSafeGet(IDataReader rs, String[] names, ISessionImplementor session, Object owner) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Persister\Collection\AbstractCollectionPersister.cs(695,0): at NHibernate.Persister.Collection.AbstractCollectionPersister.ReadElement(IDataReader rs, Object owner, String[] aliases, ISessionImplementor session) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Collection\Generic\PersistentGenericSet.cs(54,0): at NHibernate.Collection.Generic.PersistentGenericSet`1.ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, Object owner) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Loader.cs(706,0): at NHibernate.Loader.Loader.ReadCollectionElement(Object optionalOwner, Object optionalKey, ICollectionPersister persister, ICollectionAliases descriptor, IDataReader rs, ISessionImplementor session) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Loader.cs(385,0): at NHibernate.Loader.Loader.ReadCollectionElements(Object[] row, IDataReader resultSet, ISessionImplementor session) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Loader.cs(326,0): at NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet, ISessionImplementor session, QueryParameters queryParameters, LockMode[] lockModeArray, EntityKey optionalObjectKey, IList hydratedObjects, EntityKey[] keys, Boolean returnProxies) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Loader.cs(453,0): at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Loader.cs(236,0): at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Loader.cs(1649,0): at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Loader.cs(1568,0): at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Loader.cs(1562,0): at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Loader\Criteria\CriteriaLoader.cs(73,0): at NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Impl\SessionImpl.cs(1936,0): at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Impl\CriteriaImpl.cs(246,0): at NHibernate.Impl.CriteriaImpl.List(IList results) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Impl\CriteriaImpl.cs(237,0): at NHibernate.Impl.CriteriaImpl.List() c:\opt\nhibernate\2.1.2\source\src\NHibernate\Impl\CriteriaImpl.cs(398,0): at NHibernate.Impl.CriteriaImpl.UniqueResult() c:\opt\nhibernate\2.1.2\source\src\NHibernate\Impl\CriteriaImpl.cs(263,0): at NHibernate.Impl.CriteriaImpl.UniqueResult[T]() D:\proj\CMS3\branches\nh_auth\DomainModel2Tests\Authorization\TempTests.cs(46,0): at CMS.DomainModel.Authorization.TempTests.Test1() Inner Exception System.Collections.Generic.KeyNotFoundException Message: The given key was not present in the dictionary. Source: mscorlib StackTrace: at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs(2047,0): at NHibernate.Persister.Entity.AbstractEntityPersister.GetAppropriateUniqueKeyLoader(String propertyName, IDictionary`2 enabledFilters) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs(2037,0): at NHibernate.Persister.Entity.AbstractEntityPersister.LoadByUniqueKey(String propertyName, Object uniqueKey, ISessionImplementor session) c:\opt\nhibernate\2.1.2\source\src\NHibernate\Type\EntityType.cs(552,0): at NHibernate.Type.EntityType.LoadByUniqueKey(String entityName, String uniqueKeyPropertyName, Object key, ISessionImplementor session) I'm using NHibernate 2.1.2 and I've been debugging into the NHibernate source, but I'm coming up empty. Any suggestions? Thanks so much!

    Read the article

  • Serving static content with jetty 7, using defaultservlet configured from web.xml

    - by Chilly
    Hi All, This is jetty 7 and xml configured, not embedded. I'm trying to serve a static file, crossdomain.xml, to an app that connects to a datasource I run from jetty. To do this, I configured a servlet and its mapping thus: default org.eclipse.jetty.servlet.DefaultServlet resourceBase /moo/somedirectory default /* Sadly all I get are 404's. Any help would be much appreciated, btw the rest of my web.xm lfile looks like: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" cometd org.cometd.server.continuation.ContinuationCometdServlet 1 cometd /cometd/* default org.eclipse.jetty.servlet.DefaultServlet resourceBase /foo/foo default /* initializer com.foo.research.Initializer 2 cross-origin org.eclipse.jetty.servlets.CrossOriginFilter cross-origin /cometd/* </web-app>

    Read the article

  • jQuery not loading on Master Page when the Content Page is in a child folder.

    - by ProfK
    I have a site where I am trying to implement a jQuery UI based MessageBox in my master page. Content pages are arranged accoring to business area folders, i.e. '~/Branding/Contracts.aspx'. I find that when I load such a content page, jQuery, which is referenced in the master page as below, does not load. I assume that this is because the browser is requesting 'Branding/Scripts/jQuery '. What can I do about this? I don't have the 'root' operator in a plain 'script' tag. <script src="/Scripts/jquery-1.3.2.js" type="text/javascript"></script> <script src="Scripts/jquery-1.3.2.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>

    Read the article

  • How to ajax load a parent-child listbox in JQuery/Asp.net MVC popup?

    - by melaos
    hi guys, i'm new to the asp.net mvc. and i have a link which will popup show a 3 panes listbox which allows the user to select country, region and language. and when the user click on the language, this will redirect back to the controller and refresh the page and show the proper localized content. i was thinking of using a jquery dialog/modal to do this but so i try using fancybox for this which will load the hidden div of the three listbox up. unfortunately, on clicking on the first listbox, the page will call a jquery event which will show the populate the 2nd list box in which the lightbox will close. is there a better way to do this? or i'm not using the proper jquery plugin? i was thinking of putting the whole three panes inside a html file and do ajax call to get the content into that page and load the listbox like that and just use the html popup like a normal popup. Any suggestions? i'm stuck, help!!

    Read the article

  • SugarCRM - how to make users see only child users?

    - by John
    Hello, I want to change the behaviour of Sugar CRM community version. Here's what sugar currently does: 1) Admin logs into Sugar. 2) Admin clicks on Admin tab. 3) Admin creates a new user named George with admin access 4) Under user information section, Admin makes George report to Admin (in the database, it will show users.report_to_id is the admin's user_id) 5) Admin saves and logs out 6) George logs in with his password 7) George goes to admin tab. 8) George goes to list users page and sees all users, including Admin, the person he is supposed to report to. I want to change step 8 such that George is not allowed to see the user he reports to. Additionally, he is not allowed to see his grand parent user, great grand parent user, great great grand parent user etc... George should only be able to see users that he creates. How can I achieve this? Is this even possible?

    Read the article

  • is it possible to add DataRelation to DataSet if child table contains rows that have no parent in pa

    - by matti
    If I fill the DataSet with DataAdapters that select all rows from Orders and Customers and call: private void CreateRelation() { // Get the DataColumn objects from two DataTable objects // in a DataSet. Code to get the DataSet not shown here. DataColumn parentColumn = DataSet1.Tables["Customers"].Columns["CustID"]; DataColumn childColumn = DataSet1.Tables["Orders"].Columns["CustID"]; // Create DataRelation. DataRelation relCustOrder; relCustOrder = new DataRelation("CustomersOrders", parentColumn, childColumn); // Add the relation to the DataSet. DataSet1.Relations.Add(relCustOrder); } (from http://msdn.microsoft.com/en-us/library/system.data.datarelation.aspx) there will be a runtime error if there is orders that do not have customers. This might happen when a buggy program has not deleted customer's orders when customer was deleted. What can I do except put Orders select string a additional where-condition: CUSTID IN (SELECT DISTINCT CUSTID FROM CUSTOMERS) OR: is it really that way (that all children have to have parents)? My code might have a bug also. The exception occurs when IN MY CODE I add the relation to filled DataSet. The exception is: An unhandled exception of type 'System.ArgumentException' occurred in System.Data.dll Additional information: This constraint cannot be enabled as not all values have corresponding parent values. Thanks & Best Regards - Matti

    Read the article

  • add a div.class in a child, only when the parent does not have other div.class

    - by armandfp
    i have a html code like this: <div class="someclass"> <div class="childclass"></div> <div class="checkclass"></div> </div> <div class="someclass"> <div class="childclass"></div> </div> <div class="someclass"> <div class="childclass"></div> <div class="checkclass"></div> </div> <div class="someclass"> <div class="childclass"></div> <div class="checkclass"></div> </div> <div class="someclass"> <div class="childclass"></div> </div> and i need to add a div only on those divs that dont have that "checkclass", so it will like this: <div class="someclass"> <div class="childclass"></div> <div class="checkclass"></div> </div> <div class="someclass"> <div class="childclass"></div> <div class="newclass"></div> </div> <div class="someclass"> <div class="childclass"></div> <div class="checkclass"></div> </div> <div class="someclass"> <div class="childclass"></div> <div class="checkclass"></div> </div> <div class="someclass"> <div class="childclass"></div> <div class="newclass"></div> </div> i tried with jquery something like: $('.someclase:not(children(hasClass(checkclass))').append('<div class="newclass"></div>'); $('.someclass:not(:children(.checkclass))').append('<div class="newclass"></div>'); $('.someclass > :not(.checkclass)').append('<div class="newclass"></div>'); but still nothing, any ideas?

    Read the article

  • How do I get a list of child elements from XDocument object?

    - by Nick
    Hello.. I am trying to get all of the "video" elements and their attributes from an XML file that looks like this: <?xml version="1.0" encoding="utf-8" ?> <videos> <video title="video1" path="videos\video1.wma"/> <video title="video2" path="videos\video2.wma"/> <video title="video3" path="videos\video3.wma"/> </videos> The following will only select the root node and all of the children. I would like to get all of the 'video' elements into the IEnumerable. Can someone tell me what I'm doing wrong? IEnumerable<XElement> elements = from xml in _xdoc.Descendants("videos") select xml; The above returns a collection with a length == 1. It contains the root element and all the children.

    Read the article

  • What is the Best way to databind an ASP.NET TreeView for table with many to many parent child relati

    - by Matt W
    I've got a table which has the usual ParentID, ChildID as it's first two columns in a self-referencing tree data structure. My issue is that when I pull this out and use the following code: DataSet set = DA.GetNewCategories(); set.Relations.Add( new DataRelation("parentChildCategories", set.Tables[0].Columns["CategoryParentID"], set.Tables[0].Columns["CategoryID"]) ); StringBuilder buildXml = new StringBuilder(); StringWriter writer = new StringWriter(buildXml); set.WriteXml(writer); TreeView2.DataSource = new HierarchicalDataSet(set, "CategoryID", "CategoryParentID"); TreeView2.DataBind(); I get the error: These columns don't currently have unique values I believe this is because my data has children with multiple parent nodes. This is fine for my application - I don't mind if one row of data is rendered in multiple nodes of my TreeView. Could someone shed light on this please? It doesn't seem unreasonable to have a DataSet render XML which has nodes appearing in multiple places, but I can't figure out how to do it. Thanks, Matt.

    Read the article

  • ASP.NET treeview populate child nodes. How can I avoid a postback to server?

    - by mas_oz2k1
    I am trying to test populate on demand for a treeview. I follow the procedure from these links: http://msdn.microsoft.com/en-us/library/e8z5184w.aspx But the treeview still make a postback to the server if I expanded one of the tree nodes (If you put a breakpoint in the first line of Page_load event), thus refreshing the whole page. I am using VS2005 and Asp.net 2.0 (but the same issue occurs in VS2008) My simple test page markup is: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="aspTreeview.aspx.cs" Inherits="aspTreeview" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <table> <tr> <td style="height: 80%; width: 45%;"> <asp:Panel ID="Panel1" runat="server" BorderColor="#0033CC" BorderStyle="Solid" ScrollBars="Both"> <asp:TreeView ID="TreeView1" runat="server" ShowLines="True" PopulateNodesFromClient="True" EnableClientScript="True" NodeWrap="True" ontreenodepopulate="TreeView1_TreeNodePopulate" ExpandDepth="0"> </asp:TreeView> </asp:Panel> </td> <td style="width: 10%; height: 80%;" > <div> <asp:Button ID="Button1" runat="server" Text="->" onclick="Button1_Click" /> </div> <div> <asp:Button ID="Button2" runat="server" Text="<-" /> </div> </td> <td style="width: 136px; height: 80%"> <asp:Panel ID="Panel2" runat="server" BorderColor="Lime" BorderStyle="Solid"> <asp:TreeView ID="TreeView2" runat="server" ShowLines="True" ExpandDepth="0"> </asp:TreeView> </asp:Panel> </td> </tr> <tr> <td> </td> <td> </td> <td style="width: 136px"> </td> </tr> </table> </div> </form> </body> </html> The code behind is: protected void Page_Load(object sender, EventArgs e) { Debug.WriteLine("Page_Load started."); if (!IsPostBack) { if (Request.Browser.SupportsCallback) Debug.WriteLine("Browser supports callback scripts."); for (int i = 0; i < 3; i++) { TreeNode node = new TreeNode("ENTRY " + i.ToString()); node.Value = i.ToString(); node.PopulateOnDemand = true; node.Expanded = false; TreeView1.Nodes.Add(node); } } Debug.WriteLine("Page_Load finished."); } protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e) { TreeNode targetNode = e.Node; for (int j = 0; j < 4200; j++) { TreeNode subnode = new TreeNode(String.Format("Sub ENTRY {0} {1}", targetNode.Value, j)); subnode.PopulateOnDemand = true; subnode.Expanded = false; targetNode.ChildNodes.Add(subnode); } }

    Read the article

  • WPF - Grid - updating Row and Column number attached properties on child controls each time a new Ro

    - by ig105
    I have a WPF Grid with a XAML similar to this: <Grid width=200 Height=200 > <Grid.ColumnDefinitions > <ColumnDefinition Width="1*" /> <ColumnDefinition Width="2*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" MinHeight="24" /> </Grid.RowDefinitions> <TextBlock Text="Name" Grid.Row="0" Grid.Column="0"/> <TextBox Grid.Row="0" Grid.Column="1" /> <TextBlock Text="Age" Grid.Row="1" Grid.Column="0"/> <TextBox Grid.Row="1" Grid.Column="1" /> </Grid> I need to add a new row in between existing 2 rows of data, but my worry is that when I add a new row, I will need to manually update Grid.Row attached property in each of the controls that appear in rows below the newly added row. Is there a smarter way of doing this? may be to set Row/Column numbers relative to adjacent Rows/Columns ? Cheers.

    Read the article

  • where to enlist transaction with parent child delete (repository or bll)?

    - by Caroline Showden
    My app uses a business layer which calls a repository which uses linq to sql. I have an Item class that has an enum type property and an ItemDetail property. I need to implement a delete method that: (1) always delete the Item (2) if the item.type is XYZ and the ItemDetail is not null, delete the ItemDetail as well. My question is where should this logic be housed? If I have it in my business logic which I would prefer, this involves two separate repository calls, each of which uses a separate datacontext. I would have to wrap both calls is a System.Transaction which (in sql 2005) get promoted to a distributed transaction which is not ideal. I can move it all to a single repository call and the transaction will be handled implicitly by the datacontext but feel that this is really business logic so does not belong in the repository. Thoughts? Carrie

    Read the article

  • jQuery: is there a way to make a recursive child selector?

    - by gsquare567
    instead of checking only the immediate children of an element, i would like to recursively check all children of the element. specifically, something like $("#survey11Form>input[type=text]:visible").val(); with the html: <form id="survey11Form" name="survey11Form" action="#" method="post"> <div id="survey11Div"> <fieldset> <legend>TEST'TEST"TEST</legend> <div class="label"> <label test="" title="TEST'TEST" for="answer15"> TEST'TEST"TEST </label></div> <div class="fieldWrapper text required"> <div style="width: 146px;" class="cellValue"> <input type="text" title="TEST'TEST" value="" id="survey11answer15" name="survey11answer15"> should give me the value of that input. the jquery i've come up with does not. any ideas as to what would work in this situation (and all recursive situations)? thanks!

    Read the article

  • How do I keep child elements together with parent jQuery sortable.

    - by unknowndomain
    I have a list of items like this... <ol> <li> <span></span> <img src="image.png" /> <p>Image Caption</p> </li> </ol> And I want to be able to sort the LI's but not the sub elements, they should just move with their parent. I am using the jQuery to do that... $('ol li').sortable({ 'cursor': 'move' }); And its working but not moving the whole lot just the element you clicked i.e. the <p>, <img> or <span> I can't figure out how to solve this so I looked about and found an option called 'items': '> li' which was recommended but upon using this nothing drags any more but using firebug + jquery plugin I can see there is a sortable on the <li> still. Not sure what to do, example here: http://clareshilland.unknowndomain.co.uk/ Press ctrl+l to login. Enter the login details: Username: clarePassword: demo Select 'edit' from under then 'image' portion of the menu. The sortables should be those polaroids. Thanks in advance, another one I've been banging my head on the table with.

    Read the article

  • How to copy child nodes to another xml document?

    - by Alex
    Below is my xml XML1 <?xml version="1.0" encoding="ISO-8859-1" ?> <CATALOG> <CD> <TITLE>1</TITLE> <ARTIST>Bob Dylan</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>10.90</PRICE> <YEAR>1985</YEAR> </CD> <CD> <TITLE>2</TITLE> <ARTIST>Bonnie Tyler</ARTIST> <COUNTRY>UK</COUNTRY> <COMPANY>CBS Records</COMPANY> <PRICE>9.90</PRICE> <YEAR>1988</YEAR> </CD> </CATALOG> XML2 <?xml version="1.0" encoding="ISO-8859-1" ?> <CATALOG> <CD> <TITLE>3</TITLE> <ARTIST>Dolly Parton</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>RCA</COMPANY> <PRICE>9.90</PRICE> <YEAR>1982</YEAR> </CD> </CATALOG> i need output like this <?xml version="1.0" encoding="ISO-8859-1" ?> <CATALOG> <CD> <TITLE>1</TITLE> <ARTIST>Bob Dylan</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>10.90</PRICE> <YEAR>1985</YEAR> </CD> <CD> <TITLE>2</TITLE> <ARTIST>Bonnie Tyler</ARTIST> <COUNTRY>UK</COUNTRY> <COMPANY>CBS Records</COMPANY> <PRICE>9.90</PRICE> <YEAR>1988</YEAR> </CD> <CD> <TITLE>3</TITLE> <ARTIST>Dolly Parton</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>RCA</COMPANY> <PRICE>9.90</PRICE> <YEAR>1982</YEAR> </CD> </CATALOG> How i write this in classic asp ?

    Read the article

  • XML: When to use attributes instead of child nodes?

    - by Rosarch
    For tree leaves in XML, when is it better to use attributes, and when is it better to use descendant nodes? For example, in the following XML document: <?xml version="1.0" encoding="utf-8" ?> <savedGame> <links> <link rootTagName="zombies" packageName="zombie" /> <link rootTagName="ghosts" packageName="ghost" /> <link rootTagName="players" packageName="player" /> <link rootTagName="trees" packageName="tree" /> </links> <locations> <zombies> <zombie> <positionX>41</positionX> <positionY>100</positionY> </zombie> <zombie> <positionX>55</positionX> <positionY>56</positionY> </zombie> </zombies> <ghosts> <ghost> <positionX>11</positionX> <positionY>90</positionY> </ghost> </ghosts> </locations> </savedGame> The <link> tag has attributes, but it could also be written as: <link> <rootTagName>trees</rootTagName> <packageName>tree</packageName> </link> Similarly, the location tags could be written as: <zombie positionX="55" positionY="56" /> instead of: <zombie> <positionX>55</positionX> <positionY>56</positionY> </zombie> What reasons are there to prefer one over the other? Is it just a stylistic issue? Any performance considerations?

    Read the article

  • no appropriate default constructor available . (when creating a child class)

    - by numerical25
    I am creating some custom exception classes doing the following class GXException { public: GXException(LPCWSTR pTxt):pReason(pTxt){}; LPCWSTR pReason; }; class GXVideoException : GXException { public: GXVideoException(LPCWSTR pTxt):pReason(pTxt){}; LPCWSTR pReason; }; When I created GXVideoException to extend GXException, I get the following error 1>c:\users\numerical25\desktop\intro todirectx\godfiles\gxrendermanager\gxrendermanager\gxrendermanager\gxexceptions.h(14) : error C2512: 'GXException' : no appropriate default constructor available

    Read the article

  • How should child views of UIScrollView report their bounds for contentSize?

    - by Mike
    I'm looking more for advice on the correct design for a view. What I have is a UIScrollView that contains one or more custom Views I have created. My problem is, who reports to the scrollview what it's contentSize should be? I have the following: UIView +-UIScrollView +-CustomView 1 with dynamic height depending on data +-CustomView 2 with dynamic Height depending on data The UIViewController creates new instances of the custom views with data and then adds them as subviews to the UIScrollView. The problem I'm having is how to set the value of the scrollview's contentSize? Right now, I'm not doing that and the contents of the scrollview are clipped with no scrolling possible. Should the custom view call [parent setContentSize:] in its drawRect:? Should the UIViewController query the custom view after creation to get its bounds and then call setContentSize? Should I subclass the UIScrollView to override addSubView to query each subview's height? Is there something else I'm missing? I hope I explained that properly. I'm new to this and still getting a handle on things.

    Read the article

  • Can I make a matrix row group span its child groups in SSRS?

    - by AaronSieb
    I have a matrix, whose rows are grouped into two groups. A class, and a time for that class. The class cell is going to end up being several lines long, and I'd like the rows for each time slot of the class to line up next to the class description, like this: ----------------------------------------- **Class** | 7:00am | [row data] Description of |---------------------- the class, this | 12:00pm | [row data] is several lines |---------------------- long. | 1:00pm | [row data] ----------------------------------------- But what I'm getting is this: ----------------------------------------- **Class** | 7:00am | [row data] Description of | | the class, this | | is several lines | | long. | | ----------------------------------------- | 12:00pm | [row data] | | | | | | | | ----------------------------------------- | 1:00pm | [row data] | | | | | | | | ----------------------------------------- Is there any way to make SSRS collapse the matrix?

    Read the article

  • What is the best practise to create MSI with some other child MSI as prerequisite?

    - by sankar
    Currently we are using Innosetup as a bootstrapper to install the MSI prerequisites. It makes bit complex to maintain the setup. I found that burn tool which may help us to resolve this issue by having a single setup to install whatever we need. I could not find either documentation or sample for this tool. Is anyone have idea about this? or you can give me the alternate solution if you have. Looking for the alternate soltuion for the actions that we do with ISS bootstrapper now: Extract the files (Main setup, Prerequisite setup) Need to ensure prerequisites status and install on demand. Start main install.

    Read the article

  • Is there any way to manipulate variables passed in to a child class constructor before passing it of

    - by Matt
    Hi, Is there any way to delay calling a superclass constructor so you can manipulate the variables first? Eg. public class ParentClass { private int someVar; public ParentClass(int someVar) { this.someVar = someVar; } } public class ChildClass : ParentClass { public ChildClass(int someVar) : base(someVar) { someVar = someVar + 1 } } I want to be able to send the new value for someVar (someVar + 1) to the base class constructor rather than the one passed in to the ChildClass constructor. Is there any way to do this? Thanks, Matt

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >