Search Results

Search found 6420 results on 257 pages for 'mathieu parent'.

Page 50/257 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Can Flash AS3 listbox data contain variable info?

    - by Anne
    I'm populating a listbox like this: dp.addItem( {label:"red dress", data:"OV4MP/23OL.swf"} ); Instead of data:"OV4MP/23OL.swf", I would like to make part of the data file name a variable from a dynamic textbox named centerPt that belongs to the parent movieclip, so I did this: dp.addItem( {label:"red dress", data:"OV4MP/23"+MovieClip(parent.parent).centerPt.text+".swf"} ); When I trace the selectedItem.data using: trace("you have selected: "+ overlays.selectedItem.data); trace(MovieClip(parent.parent).centerPt.text); I'm getting: you have selected: OV4MP/23.swf. What I should get is OV4MP/23OL.swf. It is not picking up what is in the dynamic centerPt.text field which are the letters OL eventhough that text field is tracing correctly. Is it possible that data can not hold a variable? Thank you in advance for any help. Anne

    Read the article

  • JSF Render response programatically

    - by Shamik
    I have one parent page with a parentManagedBean (attached to Session Scope). On click of a button on this parent page, one popup comes which has a childManagedBean (attached to Request scope). Now ChildManagedBedan holds a reference to parentManaged bean thru JSFs managed Property feature. On this popup window, user selects some option which populates a large value object class. I use the managed property of childMnaagedBean to set the values from this large object to that of parentmanagedbean. Problem is - The parent page shows a link, on click of which a popup comes, on selection of the popup, the popup disappears and set the values to the parentManaged bean.So far so good, but the newly set values need to appear on the parent page. This is where I am stuck. How to programatically render the master page/render page when I am at the child managed bean... is there a way I can get handle of the parent page and refresh it ?

    Read the article

  • versioning fails for onetomany collection holder

    - by Alexander Vasiljev
    given parent entity @Entity public class Expenditure implements Serializable { ... @OneToMany(mappedBy = "expenditure", cascade = CascadeType.ALL, orphanRemoval = true) @OrderBy() private List<ExpenditurePeriod> periods = new ArrayList<ExpenditurePeriod>(); @Version private Integer version = 0; ... } and child one @Entity public class ExpenditurePeriod implements Serializable { ... @ManyToOne @JoinColumn(name="expenditure_id", nullable = false) private Expenditure expenditure; ... } While updating both parent and child in one transaction, org.hibernate.StaleObjectStateException is thrown: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): Indeed, hibernate issues two sql updates: one changing parent properties and another changing child properties. Do you know a way to get rid of parent update changing child? The update results both in inefficiency and false positive for optimistic lock. Note, that both child and parent save their state in DB correctly. Hibernate version is 3.5.1-Final

    Read the article

  • Strange: Planner takes decision with lower cost, but (very) query long runtime

    - by S38
    Facts: PGSQL 8.4.2, Linux I make use of table inheritance Each Table contains 3 million rows Indexes on joining columns are set Table statistics (analyze, vacuum analyze) are up-to-date Only used table is "node" with varios partitioned sub-tables Recursive query (pg = 8.4) Now here is the explained query: WITH RECURSIVE rows AS ( SELECT * FROM ( SELECT r.id, r.set, r.parent, r.masterid FROM d_storage.node_dataset r WHERE masterid = 3533933 ) q UNION ALL SELECT * FROM ( SELECT c.id, c.set, c.parent, r.masterid FROM rows r JOIN a_storage.node c ON c.parent = r.id ) q ) SELECT r.masterid, r.id AS nodeid FROM rows r QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------- CTE Scan on rows r (cost=2742105.92..2862119.94 rows=6000701 width=16) (actual time=0.033..172111.204 rows=4 loops=1) CTE rows -> Recursive Union (cost=0.00..2742105.92 rows=6000701 width=28) (actual time=0.029..172111.183 rows=4 loops=1) -> Index Scan using node_dataset_masterid on node_dataset r (cost=0.00..8.60 rows=1 width=28) (actual time=0.025..0.027 rows=1 loops=1) Index Cond: (masterid = 3533933) -> Hash Join (cost=0.33..262208.33 rows=600070 width=28) (actual time=40628.371..57370.361 rows=1 loops=3) Hash Cond: (c.parent = r.id) -> Append (cost=0.00..211202.04 rows=12001404 width=20) (actual time=0.011..46365.669 rows=12000004 loops=3) -> Seq Scan on node c (cost=0.00..24.00 rows=1400 width=20) (actual time=0.002..0.002 rows=0 loops=3) -> Seq Scan on node_dataset c (cost=0.00..55001.01 rows=3000001 width=20) (actual time=0.007..3426.593 rows=3000001 loops=3) -> Seq Scan on node_stammdaten c (cost=0.00..52059.01 rows=3000001 width=20) (actual time=0.008..9049.189 rows=3000001 loops=3) -> Seq Scan on node_stammdaten_adresse c (cost=0.00..52059.01 rows=3000001 width=20) (actual time=3.455..8381.725 rows=3000001 loops=3) -> Seq Scan on node_testdaten c (cost=0.00..52059.01 rows=3000001 width=20) (actual time=1.810..5259.178 rows=3000001 loops=3) -> Hash (cost=0.20..0.20 rows=10 width=16) (actual time=0.010..0.010 rows=1 loops=3) -> WorkTable Scan on rows r (cost=0.00..0.20 rows=10 width=16) (actual time=0.002..0.004 rows=1 loops=3) Total runtime: 172111.371 ms (16 rows) (END) So far so bad, the planner decides to choose hash joins (good) but no indexes (bad). Now after doing the following: SET enable_hashjoins TO false; The explained query looks like that: QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- CTE Scan on rows r (cost=15198247.00..15318261.02 rows=6000701 width=16) (actual time=0.038..49.221 rows=4 loops=1) CTE rows -> Recursive Union (cost=0.00..15198247.00 rows=6000701 width=28) (actual time=0.032..49.201 rows=4 loops=1) -> Index Scan using node_dataset_masterid on node_dataset r (cost=0.00..8.60 rows=1 width=28) (actual time=0.028..0.031 rows=1 loops=1) Index Cond: (masterid = 3533933) -> Nested Loop (cost=0.00..1507822.44 rows=600070 width=28) (actual time=10.384..16.382 rows=1 loops=3) Join Filter: (r.id = c.parent) -> WorkTable Scan on rows r (cost=0.00..0.20 rows=10 width=16) (actual time=0.001..0.003 rows=1 loops=3) -> Append (cost=0.00..113264.67 rows=3001404 width=20) (actual time=8.546..12.268 rows=1 loops=4) -> Seq Scan on node c (cost=0.00..24.00 rows=1400 width=20) (actual time=0.001..0.001 rows=0 loops=4) -> Bitmap Heap Scan on node_dataset c (cost=58213.87..113214.88 rows=3000001 width=20) (actual time=1.906..1.906 rows=0 loops=4) Recheck Cond: (c.parent = r.id) -> Bitmap Index Scan on node_dataset_parent (cost=0.00..57463.87 rows=3000001 width=0) (actual time=1.903..1.903 rows=0 loops=4) Index Cond: (c.parent = r.id) -> Index Scan using node_stammdaten_parent on node_stammdaten c (cost=0.00..8.60 rows=1 width=20) (actual time=3.272..3.273 rows=0 loops=4) Index Cond: (c.parent = r.id) -> Index Scan using node_stammdaten_adresse_parent on node_stammdaten_adresse c (cost=0.00..8.60 rows=1 width=20) (actual time=4.333..4.333 rows=0 loops=4) Index Cond: (c.parent = r.id) -> Index Scan using node_testdaten_parent on node_testdaten c (cost=0.00..8.60 rows=1 width=20) (actual time=2.745..2.746 rows=0 loops=4) Index Cond: (c.parent = r.id) Total runtime: 49.349 ms (21 rows) (END) - incredibly faster, because indexes were used. Notice: Cost of the second query ist somewhat higher than for the first query. So the main question is: Why does the planner make the first decision, instead of the second? Also interesing: Via SET enable_seqscan TO false; i temp. disabled seq scans. Than the planner used indexes and hash joins, and the query still was slow. So the problem seems to be the hash join. Maybe someone can help in this confusing situation? thx, R.

    Read the article

  • how to register a selectionProvider for the Viewer from a superclass

    - by Tom
    I have a View which extends a View provided by another plugin like this; public class View2 extends some.other.package.View1 { public void createPartControl(Composite parent) { super.createPartControl(parent); //I want to do this, but I can't because its private //getSite().setSelectionProvider(treeViewer); } } But I can't edit the super class, so I need to access the viewer from the Control. public class some.other.package.View1 extends ViewPart { private TreeViewer treeViewer; public void createPartControl(Composite parent) { treeViewer = new TreeViewer(parent, SWT.V_SCROLL); } } I tried using parent.getChildren(); to get a Tree object, but I can't see that it can be cooerced into an ISElectionProvider as required

    Read the article

  • WSS 3.0 to SharePoint 2010: Tips for delaying the Visual Upgrade

    - by Kelly Jones
    My most recent project has been to migrate a bunch of sites from WSS 3.0 (SharePoint 2007) to SharePoint Server 2010.  The users are currently working with WSS 3.0 and Office 2003, so the new ribbon based UI in 2010 will be completely new.  My client wants to avoid the new SharePoint 2010 look and feel until they’ve had time to train their users, so we’ve been testing the upgrades by keeping them with the 2007 user interface. Permission to perform the Visual Upgrade One of the first things we noticed was the default permissions for who was allowed to switch the UI from 2007 to 2010.  By default, site collection administrators and site owners can do this.  Since we wanted to more tightly control the timing of the new UI, I added a few lines to the PowerShell script that we are using to perform the migration.  This script creates the web application, sets the User Policy, and then does a Mount-SPDatabase to attach the old 2007 content database to the 2010 farm.  I added the following steps after the Mount-SPDatabase step: #Remove the visual upgrade option for site owners # it remains for Site Collection administrators foreach ($sc in $WebApp.Sites){ foreach ($web in $sc.AllWebs){ #Visual Upgrade permissions for the site/subsite (web) $web.UIversionConfigurationEnabled = $false; $web.Update(); } } These script steps loop through each Site Collection in a particular web application ($WebApp) and then it loops through each subsite ($web) in the Site Collection ($sc) and disables the Site Owner’s permission to perform the Visual Upgrade. This is equivalent to going to the Site Collection administrator settings page –> Visual Upgrade and selecting “Hide Visual Upgrade”. Since only IT people have Site Collection administrator privileges, this will allow IT to control the timing of the new 2010 UI rollout. Newly created subsites Our next issue was brought to our attention by SharePoint Joel’s blog post last week (http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=524 ).  In it, he lists some updates about the 2010 upgrade, and his fourth point was one that I hadn’t seen yet: 4. If a 2007 upgraded site has not been visually upgraded, the sites created underneath it will look like 2010 sites – While this is something I’ve been aware of, I think many don’t realize how this impacts common look and feel for master pages, and how it impacts good navigation and UI. As well depending on your patch level you may see hanging behavior in the list picker. The site and list creation Silverlight control in Internet Explorer is looking for resources that don’t exist in the galleries in the 2007 site, and hence it continues to spin and spin and eventually time out. The work around is to upgrade to SP1, or use Chrome or Firefox which won’t attempt to render the Silverlight control. When the root site collection is a 2007 site and has it’s set of galleries and the children are 2010 sites there is some strange behavior linked to the way that the galleries work and pull from the parent. Our production SharePoint 2010 Farm has SP1 installed, as well as the December 2011 Cumulative Update, so I think the “hanging behavior” he mentions won’t affect us. However, since we want to control the roll out of the UI, we are concerned that new subsites will have the 2010 look and feel, no matter what the parent site has. Ok, time to dust off my developer skills. I first looked into using feature stapling, but I couldn’t get that to work (although I’m pretty sure I had everything wired up correctly).  Then I stumbled upon SharePoint 2010’s web events – a great way to handle this. Using Visual Studio 2010, I created a new SharePoint project and added a Web Event Receiver: In the Event Receiver class, I used the WebProvisioned method to check if the parent site is a 2007 site (UIVersion = 3), and if so, then set the newly created site to 2007:   /// <summary> /// A site was provisioned. /// </summary> public override void WebProvisioned(SPWebEventProperties properties) { base.WebProvisioned(properties);   try { SPWeb curweb = properties.Web;   if (curweb.ParentWeb != null) {   //check if the parent website has the 2007 look and feel if (curweb.ParentWeb.UIVersion == 3) { //since parent site has 2007 look and feel // we'll apply that look and feel to the current web curweb.UIVersion = 3; curweb.Update(); } } } catch (Exception) { //TODO: Add logging for errors } }   This event is part of a Feature that is scoped to the Site Level (Site Collection).  I added a couple of lines to my migration PowerShell script to activate the Feature for any site collections that we migrate. Plan Going Forward The plan going forward is to perform the visual upgrade after the users for a particular site collection have gone through 2010 training. If we need to do several site collections at once, we’ll use a PowerShell script to loop through each site collection to update the sites to 2010.  If it’s just one or two, we’ll be using the “Update All Sites” button on the Visual Upgrade page for Site Collection Administrators. The custom code for newly created sites won’t need to be changed, since it relies on the UI version of the parent site.  If the parent is 2010, then the new site will look 2010.

    Read the article

  • Translatable behavior not working if used with Containable

    - by bakerjr
    An example: $this-Parent-Behaviors-attach('Containable'); $parent = $this->Parent->find('first', array( 'contain' => array('Child' => array( 'order' => 'Child.order ASC', )), 'conditions' => array('Parent.id' => $parentId) ) ); Child has translated data and parent isn't using translatable. When I fetch the child data this way it's not translated. Is Translatable (and also SmoothTranslate) working with Containable? What solutions would you guys recommend? Thanks in advance

    Read the article

  • HTML/CSS Div placing

    - by Andreas Carlbom
    Yo. There's a tendency in placing divs to follow each other vertically, but what i'm trying to accomplish right now is to is basically to place a number of divs (two) inside a parent div like so: <div id='parent'><div id='onediv'></div> <div id='anotherone'></div> </div> And i'd like to place 'anotherone' just to the right of 'onediv'. Sadly, float:right is pretty much ruining the layout with the divs popping out of their parent divs and whatnot. Any suggestions are welcome. Edit: It might be worth noting that the parent div and 'anotherone' has no height elements at all, with 'onediv' planned to be thought as the "height support" div, allowing the contents of 'anotherone' to make the parent div larger at will.

    Read the article

  • Eager fetching of children with JDO (Datanucleus)

    - by Jan
    Hi, can JDO fetch all children of a database model at once? Like: class Parent { @Persistent(mappedBy="parent") private Set<Children> children; } class Children { @Persistent private Parent parent; @Persistent private String name; } In my case, I have a large number of Parents which I fetch at once. Accessing their children then takes a lot of time because they are fetched lazily. Does JDO (Datanucleus) support their fetching at once, togehter with the Parents? I also tried to fetch all Children independantly with another quey and put them into the Level2 cache afterwards, but still they are fetched (maybe jdo doesn't know about their relationship? Because the ForeignKey (parent-id) hasn't been fetched at first?) Any ideas how to read the data structure faster? Cheers, Jan

    Read the article

  • PHP Moving mySQL Tree Node

    - by TK
    I am having trouble trying to move sub nodes or parent nodes up or down... not that good at math. CREATE TABLE IF NOT EXISTS `pages` ( page-id mediumint(8) unsigned NOT NULL AUTO_INCREMENT, page-left mediumint(8) unsigned NOT NULL, page-right smallint(8) unsigned NOT NULL, page-title text NOT NULL, page-content text NOT NULL, page-time int(11) unsigned NOT NULL, page-slug text NOT NULL, page-template text NOT NULL, page-parent mediumint(8) unsigned NOT NULL, page-type text NOT NULL, PRIMARY KEY (page-id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; INSERT INTO pages (page-id, page-left, page-right, page-title, page-content, page-time, page-slug, page-template, page-parent, page-type) VALUES (17, 1, 6, '1', '', 0, 'PARENT', '', 0, ''), (18, 2, 5, '2', '', 0, 'SUB', '', 17, ''), (19, 3, 4, '3', '', 0, 'SUB-SUB', '', 18, ''), (20, 7, 8, '5', '', 0, 'TEST', '', 0, ''); As example how would I move TEST up above PARENT and say move SUB down below SUB-SUB by playing with the page-left/page-right IDs? Code is not required just help with the SQL concept or math for it, would help me understand how to move it better...

    Read the article

  • Get the ID of a Child in a cascade="all" relationship, while adding it to a collection, in Hibernate

    - by Marco
    Hi, i have two Entities, "Parent" and "Child", that are linked through a bidirectional one-to-many relationship with the cascade attribute set to "all". When adding a Child object to the Parent children collection using the code below, i can't get the ID of the persisted child until i commit the transaction: Parent p = (Parent) session.load(Parent.class, pid); Child c = new Child(); p.addChild(c); // "c" hasn't an ID (is always zero) However, when i persist a child entity by explicitly calling the session.save() method, the ID is created and set immediately, even if the transaction hasn't been committed: Child c = new Child(); session.save(c); // "c" has an ID Is there a way to get the ID of the child entity immediately without calling the session.save() method? Thanks

    Read the article

  • Google App Engine : PolyModel + SelfReferenceProperty

    - by rvandervort
    Is a PolyModel-based class able to be used as a SelfReferenceProperty ? I have the below code : class BaseClass(polymodel.PolyModel): attribute1 = db.IntegerProperty() attribute2 = db.StringProperty() class ParentClass(BaseClass): attribute3 = db.StringProperty() class ChildClass(BaseClass): parent = SelfReferenceProperty(collection_name = 'children') p = ParentClass() p.attribute1 = 1 p.attribute2 = "Parent Description" p.attribute3 = "Parent additional data" p.put() c = ChildClass() c.attribute1 = 5 c.attribute2 = "Child Description" c.parent = p.key() c.put() I execute this code and check the datastore via the development server's admin interface. The parent instance is saved to the datastore class = 'BaseClass,ParentClass', but the child is not. There is no error output to the browser (debug is turned on) and nothing in the launcher's log for my app. Is this possible to do ?

    Read the article

  • In datastore, confused on how to pass a list of key_names as an argument to somemodel.get_or_insert(

    - by indiehacker
    Are there examples of how to pass a list of key_names to Model.get_or_insert() ? My Problem: With a method of ParentLayer I want to make the children. The key_names of the new (or editable) entities of class Child will come from such a list below: namesList = ["picture1","picture2"] so I should be able to build a list of key_names with method from the parent class as follows: class ParentLayer(db.Model): def getOrMakeChildren(self, namesList): keyslist = [ db.Key.from_path( 'Child' , name , parent = self.key() ) for name in namesList ] the problem is next where I simply want to get_or_insert entities based on keylist defined above: childrenEntitiesList = Child.get_or_insert(keyslist) # no works? also none of the below attempts worked: #childrenEntitiesList = Child.get_or_insert(keyslist, parent = u'TEST') #childrenEntitiesList = Child.get_or_insert(keyslist, parent=self.key().name() ) #childrenEntitiesList = Child.get_or_insert(keyslist, parent=self.key()

    Read the article

  • pyramid traversal resource url no attribute __name__

    - by Santana
    So I have: resources.py: def _add(obj, name, parent): obj.__name__ = name obj.__parent__ = parent return obj class Root(object): __parent__ = __name__ = None def __init__(self, request): super(Root, self).__init__() self.request = request self.collection = request.db.post def __getitem__(self, key): if u'profile' in key: return Profile(self.request) class Profile(dict): def __init__(self, request): super(Profile, self).__init__() self.__name__ = u'profile' self.__parent__ = Root self.collection = request.db.posts def __getitem__(self, name): post = Dummy(self.collection.find_one(dict(username=name))) return _add(post, name, self) and I'm using MongoDB and pyramid_mongodb views.py: @view_config(context = Profile, renderer = 'templates/mytemplate.pt') def test_view(request): return {} and in mytemplate.pt: <p tal:repeat='item request.context'> ${item} </p> I can echo what's in the database (I'm using mongodb), but when I provided a URL for each item using resource_url() <p tal:repeat='item request.context'> <a href='${request.resource_url(item)}'>${item}</a> </p> I got an error: 'dict' object has no attribute '__name__', can someone help me?

    Read the article

  • java protected method accessibility

    - by JavaUser
    In the below code the Consumer class can access the protected method of Parent class.How is it possible since there is no relation between Parent and Consumer class.Please explain class Parent { public void method1(){ System.out.println("PUBLIC METHOD"); } private void method2(){ System.out.println("PRIVATE METHOD"); } protected void method3(){ System.out.println("PROTECTED METHOD"); } } public class Consumer { public static void main(String[] args){ Parent parentObj = new Parent(); parentObj.method1(); //parentObj.method2(); parentObj.method3(); } } Thanks

    Read the article

  • django many to many validation when add()

    - by Julien
    Hi i have a Category model with parent/child self relation For primary category and sub categories : class Place(models.Model): name = models.CharField(_("name"), max_length=100) categories = models.ManyToManyField("Category", verbose_name=_("categories")) class Category(models.Model): name = models.CharField(_("name"), max_length=100) parent = models.ForeignKey('self', blank=True, null=True, related_name='child_set') i need to prevent orphans, to prevent this kind of errors (in admin web interface) c_parent = Category(name='Restaurant') c_parent.save() c_child = Category(name="Japanese restaurant", parent=c_parent) c_child.save() place1 = Place (name="Planet sushi") place1.save() place1.categories.add(c_parent) place1.categories.add(c_child) So now we have a new Place called "Planet sushi", it's a Restaurant (root category), and a Japanese Restaurant (sub category) but i want to prevent this kind of things : place2 = Place (name="Tokyofood") place2.save() place2.categories.add(c_child) because parent is not set, or is not the correct parent category where can i do form validation for the admin ? and other forms (because any user can add a new place and will have to choose correct categories for)

    Read the article

  • Changing A Different Class Display on Hover with Jquery

    - by John K
    Ok, here's what I'm trying to do. I have a DIV box with a child element set with DISPLAY: NONE;. I'm trying to use Jquery so that when the mouse enters the parent DIV box, the child element is made visible, and then hides when the mouse leaves the parent DV. There will be multiple divs on the page with these classes. For some reason it's not working. Any ideas? Here's my code: HTML: <div class="parent"> <span class="handle" style="display: none;">My Handle</span> <p>Child Text</p> </div> Javascript: $(document).ready(function () { $('.parent').mouseenter(function(){ $(this).next('.handle').show(); }); $('.parent').mouseleave(function(){ $(this).next('.handle').hide(); }); })

    Read the article

  • Animated record deletion with jquery like mootools example

    - by twitter
    I was reading around and saw this example from David Walsh about how to animate record deletion with mootools. Does the exact same effect exist in jquery? This is his mootools code. window.addEvent('domready',function() { $$('a.delete').each(function(el) { el.addEvent('click',function(e) { e.stop(); var parent = el.getParent('div'); var request = new Request({ url: 'mootools-record-delete.php', link: 'chain', method: 'get', data: { 'delete': parent.get('id').replace('record-',''), ajax: 1 }, onRequest: function() { new Fx.Tween(parent,{ duration:300 }).start('background-color', '#fb6c6c'); }, onSuccess: function() { new Fx.Slide(parent,{ duration:300, onComplete: function() { parent.dispose(); } }).slideOut(); } }).send(); }); }); });

    Read the article

  • AutoMapper: How to transform object graph to into?

    - by epitka
    If I have a one-to-many relationship and I want to transorm this into a list of flat Dto-s where some attributes of parent and some of child appear in a dto, is this something that is supported out-of-box with AutoMapper? For example if I have something like this Parent 1. ParentId 2. ParentAttr1 3. List<Child> Child 1. ChildId 2. ChildAttr1 2. ChildAttr2 Dto 1. ParentId 2. ChildId 2. ChildAttr1 3. ChildAttr2 How do I project Parent into a Dto where for each child in parent I will get an instace of Dto? I've setup two maps Parent-Dto and Child-Dto but just doing _mapper.Map(parentInstance) only projects parents attributes. Does this have to be done in two steps, where I would iterate children myself?

    Read the article

  • SSAS OLAP MDX and relationships

    - by Sonic Soul
    I new to OLAP, and still not sure how to create a relationship between 2 or more entities. I am basing my cube on views. For simplicity sake let's call them like this: viewParent (ParentID PK) viewChild (ChildID PK, ParentID FK) these views have more fields, but they're not important for this question. in my data source, i defined a relationship between viewParent and viewChild using ParentID for the link. As for measures, i was forced to create separate measures for Parent and Child. in my MDX query however, the relationship does not seem to be enforced. If i select record count for parent, child, and add some filters for the parent, the child count is not reflecting it.. SELECT { [Measures].[ParentCount],[Measures].[ChildCount] } ON COLUMNS FROM [Cube] WHERE { ( {[Time].[Month].&[2011-06-01T00:00:00]} ,{[SomeDimension].&[Foo]} ) } the selected ParentCount is correct, but ChildCount is not affected by any of the filters (because they are parent filters). However, since i defined a relationship, how can i take advantage of that to filter children by parent filter?

    Read the article

  • Get recursive data with sql server

    - by user228777
    I am trying to get recursive data. Following code returns all parents on the top and then the children. I would like to get data Parent 1 – his children then parent 2 - his children then parent3 – his children. How do I do this? USE Subscriber GO WITH Parent (ParentId, Id, Name,subscriberID) AS ( -- Anchor member definition SELECT A.ParentId,A.id, A.name,A.SubscriberId FROM Subscriber.Budget.SubscriberCategory AS A WHERE ParentId IS NULL UNION ALL -- Recursive member definition SELECT B.ParentId, B.id, B.name,B.SubscriberId FROM Subscriber.Budget.SubscriberCategory AS B INNER JOIN Parent AS P ON B.ParentId = P.Id ) -- Statement that executes the CTE SELECT parentId, id, name FROM Parent where subscriberID = '1C18093B-5031-42E4-9251-CEF69114365F' GO

    Read the article

  • transition background-image/css change on hover?

    - by John Isaacks
    I have a thumb nail inside another div, when the thumbnail is hovered I want the parent div to fade/transition to the background of the thumbnail, then fade back to the original image after hover. I have this so far which changes the parent background to that of the thumbnail and back but with no transition. $(document).ready(function() { var originalBG; var hoverBG; $(".alt-img").hover( function () { originalBG = $(this).parent().css('backgroundImage'); hoverBG = $(this).css('backgroundImage'); $(this).parent().css('backgroundImage',hoverBG); }, function () { $(this).parent().css('backgroundImage',originalBG); } ); });

    Read the article

  • Recursive MySQL function call eats up too much memory and dies.

    - by kylex
    I have the following recursive function which works... up until a point. Then the script asks for more memory once the queries exceed about 100, and when I add more memory, the script typically just dies (I end up with a white screen on my browser). public function returnPArray($parent=0,$depth=0,$orderBy = 'showOrder ASC'){ $query = mysql_query("SELECT *, UNIX_TIMESTAMP(lastDate) AS whenTime FROM these_pages WHERE parent = '".$parent."' AND deleted = 'N' ORDER BY ".$orderBy.""); $rows = mysql_num_rows($query); while($row = mysql_fetch_assoc($query)){ // This uses my class and places the content in an array. MyClass::$_navArray[] = array( 'id' => $row['id'], 'parent' => $row['parent'] ); MyClass::returnPArray($row['id'],($depth+1)); } $i++; } Can anyone help me make this query less resource intensive?

    Read the article

  • Session and Pop Up Window

    - by imran_ku07
     Introduction :        Session is the secure state management. It allows the user to store their information in one page and access in another page. Also it is so much powerful that store any type of object. Every user's session is identified by their cookie, which client presents to server. But unfortunately when you open a new pop up window, this cookie is not post to server with request, due to which server is unable to identify the session data for current user.         In this Article i will show you how to handle this situation,  Description :         During working in a application, i was getting an Exception saying that Session is null, when a pop window opens. After seeing the problem more closely i found that ASP.NET_SessionId cookie for parent page is not post in cookie header of child (popup) window.         Therefore for making session present in both parent and child (popup) window, you have to present same cookie. For cookie sharing i passed parent SessionID in query string,   window.open('http://abc.com/s.aspx?SASID=" & Session.SessionID &','V');           and in Application_PostMapRequestHandler application Event, check if the current request has no ASP.NET_SessionId cookie and SASID query string is not null then add this cookie to Request before Session is acquired, so that Session data remain same for both parent and popup window.    Private Sub Application_PostMapRequestHandler(ByVal sender As Object, ByVal e As EventArgs)           If (Request.Cookies("ASP.NET_SessionId") Is Nothing) AndAlso (Request.QueryString("SASID") IsNot Nothing) Then               Request.Cookies.Add(New HttpCookie("ASP.NET_SessionId", Request.QueryString("SASID")))           End If       End Sub           Now access Session in your parent and child window without any problem. How this works :          ASP.NET (both Web Form or MVC) uses a cookie (ASP.NET_SessionId) to identify the user who is requesting. Cookies are may be persistent (saved permanently in user cookies ) or non-persistent (saved temporary in browser memory). ASP.NET_SessionId cookie saved as non-persistent. This means that if the user closes the browser, the cookie is immediately removed. This is a sensible step that ensures security. That's why ASP.NET unable to identify that the request is coming from the same user. Therefore every browser instance get it's own ASP.NET_SessionId. To resolve this you need to present the same parent ASP.NET_SessionId cookie to the server when open a popup window.           You can confirm this situation by using some tools like Firebug, Fiddler,  Summary :          Hopefully you will enjoy after reading this article, by seeing that how to workaround the problem of sharing Session between different browser instances by sharing their Session identifier Cookie.

    Read the article

  • How to delete child object in NHibernate?

    - by Mark Struzinski
    I have a parent object which has a one to many relationship with an IList of child objects. What is the best way to delete the child objects? I am not deleting the parent. My parent object contains an IList of child objects. Here is the mapping for the one to many relationship: <bag name="Tiers" cascade="all"> <key column="mismatch_id_no" /> <one-to-many class="TGR_BL.PromoTier,TGR_BL"/> </bag> If I try to remove all objects from the collection using clear(), then call SaveOrUpdate(), I get this exception: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column If I try to delete the child objects individually then remove them from the parent, I get an exception: deleted object would be re-saved by cascade This is my first time dealing with deleting child objects in NHibernate. What am I doing wrong? edit: Just to clarify - I'm NOT trying to delete the parent object, just the child objects. I have the relationship set up as a one to many on the parent. Do I also need to create a many-to-one relationship on the child object mapping?

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >