Search Results

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

Page 42/174 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • What's the best way to move "a child up" in a C# XmlDocument?

    - by Mike
    Hi everyone, Given an xml structure like this: <garage> <car>Firebird</car> <car>Altima</car> <car>Prius</car> </garage> I want to "move" the Prius node "one level up" so it appears above the Altima node. Here's the final structure I want: <garage> <car>Firebird</car> <car>Prius</car> <car>Altima</car> </garage> So given the C# code: XmlNode priusNode = GetReferenceToPriusNode() What's the best way to cause the priusNode to "move up" one place in the garage's child list? Thanks! -Mike

    Read the article

  • In an ExpandableListView, how can I show one additional line at the end of the child results?

    - by fiXedd
    I have created a custom ExpandableListAdapter and everything works properly. What I'd like to be able to do is in each of the groups add a different type of child to the end. I have tried adding 1 to the getChildrenCount() number and then testing isLastChild in the getChildView() method, but that doesn't seem to work. If a group has three children what I have working looks like this: Group NormalChild NormalChild NormalChild But I'd really like something like this: Group NormalChild NormalChild NormalChild AlternateChild The idea being that the AlternateChild could be a link to more info about the group. Any Ideas? EDIT: ListView has addFooterView() which will allow you to add a footer to a whole ListView... wonder how to add them to the ExpandableListView's children, or if it's even possible

    Read the article

  • C# - How can i open a second winform asynchronously but still behave as a child to the parent form?

    - by Gary Willoughby
    I am creating an application and i would like to implement a progress window that appears when a lengthy process is taking place. I've created a standard windows form project to which i've created my app using the default form. I've also created a new form to use as a progress window. The problem arises when i open the progress window (in a function) using: ProgressWindow.ShowDialog(); When this command is encountered, the focus is on the progress window and i assume it's now the window who's mainloop is being processed for events. The downside is it blocks the execution of my lengthy operation in the main form. If i open the progress window using: ProgressWindow.Show(); Then the window opens correctly and now doesn't block the execution of the main form but it doesn't act as a child (modal) window should, i.e. allows the main form to be selected, is not centered on the parent, etc.. Any ideas how i can open a new window but continue processing in the main form?

    Read the article

  • How to refresh parent and ancestor windows afret colsing the child windows?

    - by truthseeker
    Hi, I have three windows: 1st - main window 2nd - child window - it's opened using window.showModalDialog from 1st widnow. 3rd - window - is an ancestor of 1st widnow and is's opened from 2nd widnow using window.showModalDialog. And now what I need to achivie is to open 1, 2 and 3 window. Next after closing the 3rd one, refrest the 2nd one. And after closing the 2nd one, refresh the 1st one. But there is one more assumption, I don't want to have any postback during this proces. Dose anybody have any idea how to make it?

    Read the article

  • How do I make a child control re-anchor to its parent Form when it has been cut off on a small resol

    - by Paul Fedory
    I have a Windows Form with a default size of 1100 x 400, and I have a DataGridView control on it anchored to Top, Left, Bottom, Right. Resizing the form on a screen with resolution higher than 1100 x 400 works fine, and the anchoring works well, resizing the DataGridView control as expected. When I launch the form on a screen with resolution 800x600, the form is cut off, and made to fit the 800 x 600. The DataGridView is cut off, and cannot be seen entirely - it bleeds off the form to the right, so it's not respecting the right anchor. Resizing the form in this situation doesn't respect the anchoring settings for some reason: the DataGridView control does not resize when the form is resized. Is there a way programmatically (on a resize event or something) to force the child DataGridView control to anchor to the sides of the form? I've already tried calling a PerformLayout and Refresh in the Form's resize event but it's rather redundant, isn't it?

    Read the article

  • Can I pass a child class to a reference of a parent class?

    - by michael
    Hi, I have a class A which takes a reference of B in its constructor. class A { public: A(B& b); } And I have a class SubB which is a child class of B: class SubB : public B { //omitted... } In my code, I create a SubB and pass it to A: SubB subB; A a(subB); But I get this compile Error: error: ‘B’ is an inaccessible base of ‘SubB’ Can I pass a reference of SubB as B? Thank you.

    Read the article

  • Bulk get of child entities on Google app engine?

    - by dfrankow
    On Google App Engine in Python, I have a Visit entity that has a parent of Patient. A Patient may have multiple visits. I need to set the most_recent_visit (and some auxiliary visit data) somewhere for later querying, probably in another child entity that Brett Slatkin might call a "relationship index entity." I wish to do so in a bulk style as follows: 1. get 100 Patient keys 2. get all Visits that have any of the Patients from 1 as an ancestor 3. go through the Visits and get the latest for each Patient Is there any way to perform step 2 in a bulk get? I know there is a way to bulk get entities from a list of keys, and there is a way to match a single entity by its ancestor.

    Read the article

  • How can I Query only __key__ on a Google Appengine PolyModel child?

    - by Gabriel
    So the situation is: I want to optimize my code some for doing counting of records. So I have a parent Model class Base, a PolyModel class Entry, and a child class of Entry Article: How would I query Article.key so I can reduce the query load but only get the Article count. My first thought was to use: q = db.GqlQuery("SELECT __key__ from Article where base = :1", i_base) but it turns out GqlQuery doesn't like that because articles are actually stored in a table called Entry. Would it be possible to Query the class attribute? something like: q = db.GqlQuery("select __key__ from Entry where base = :1 and :2 in class", i_base, 'Article') neither of which work. Turns out the answer is even easier. But I am going to finish this question because I looked everywhere for this. q = db.GqlQuery("select __key__ from Entry where base = :1 and class = :2", i_base, 'Article')

    Read the article

  • Absolute positioned child div expands to fit the parent?

    - by Amon
    Is there anyway for an absolute positioned child to expand to fill its relative positioned parent? (The height of parent is not fixed) Here is what i did and it is working fine with Firefox and IE7 but not IE6. :( <div id="parent"> <div id="child1"></div> </div> #parent { position: relative; width: 200px; height:100%; background:red } #child1 { position: absolute; top: 0; left: 200px; height: 100%; background:blue }

    Read the article

  • How to Retrieve Values of A Dynamically Created Control's Child Controls on PostBack?

    - by Jordan
    Given: I have a custom server control in the markup of an aspx page. This control creates child controls in its CreateChildControls() method (e.g. it retrieves content from a database and based on that content dynamically creates either a CheckBoxList or a RadioButtonList) Now I understand that I cannot access the dynamically created controls on postback unless I add them again on Page_Init or Page_PreInit (as per here). My question is, how do I add them again explicitly in Page_Init or Page_PreInit if they are just going to be added yet again when we get around to calling Render() on each of the custom server controls? I'm very certain this is not a unique problem, so there must be a best practice way of doing it...I just don't know what it is :/

    Read the article

  • How do I propagate an exception thrown by croak in forked child to parent/foreground process?

    - by Pedro Silva
    Throwing an exception via croak in a forked child process seems to print the error as a background process would. That is, it clobbers the shell prompt. If I die instead of croak, the the error message pops up as a foreground process. I've trying to find out why that is in the Carp documentation without any luck. Here's what I mean. The croak version: $ perl Wrapper.pm $ error: ... does not exist at Wrapper.pm line 624 The die version: $ perl Wrapper.pm error: ... does not exist at Wrapper.pm line 515. I tried trapping the fork and printing $@ to STDERR and exiting, but that didn't have an effect. Any ideas? I'd like to be able to use croak in this particular case.

    Read the article

  • How do you compose DataTemplates / link to a child datatemplate in WPF?

    - by Gishu
    Here's the problem. Given a large/intricate datatemplate A, which has 3 sections - General, Properties, Misc. Imagine 3 grids for each. Now I need to reuse the Properties section of the above Datatemplate in another place. Reasons: To avoid redundancy + ensure that further updates to the datatemplate are applied identically to all usages. So I guess what I am asking for is an ability to slot in a link to a child DataTemplate in a parent Datatemplate. What's the best way to go about this ? I found one way to do this.. but I'm not sure if its the right way or the best.. Posting it as an answer below so that it can be rated.

    Read the article

  • How to handle recursive parent/child problems like this?

    - by lsdude
    In web dev I come across these problems a lot. For example, we have a giant list of URLs that are in this format: /businesses /businesses/food /businesses/food/wendys /businesses/food/wendys/chili /businesses/food/wendys/fries /businesses/food/wendys/chicken-nuggets /businesses/pharmacy/cvs /businesses/pharmacy/cvs/toothpaste /businesses/pharmacy/cvs/toothpaste/brand ... and then we need to output each one, where the parent category is in h1 tags, the child is in h2 tags, and the children of that are in h3 tags. I can handle this but I feel my code is messy. I'm sure there is a design pattern I can use? Langs are ruby/php usually. how would you handle this?

    Read the article

  • What's the best way to move "a child up" in a .NET XmlDocument?

    - by Mike
    Given an XML structure like this: <garage> <car>Firebird</car> <car>Altima</car> <car>Prius</car> </garage> I want to "move" the Prius node "one level up" so it appears above the Altima node. Here's the final structure I want: <garage> <car>Firebird</car> <car>Prius</car> <car>Altima</car> </garage> So given the C# code: XmlNode priusNode = GetReferenceToPriusNode() What's the best way to cause the priusNode to "move up" one place in the garage's child list?

    Read the article

  • how to force nhibernate to set the foreign key of the child item?

    - by npeBeg
    i have a collection in the mapping: <bag name="Values" cascade="all-delete-orphan" lazy="false" inverse="true"> <key column="[TemplateId]"/> <one-to-many class="MyNamespace.Value, MyLib"/> </bag> the Value object has a foreign key [TemplateId]. both entities has their generator set to "identity". when i call session.Save() for the parent Template object, the Value objects has their [TemplateId] (the foreign key) set to zero, so an SQL exception appears. how do i forse nhibernate to set the FK value for the child items to the value of the inserted parent object?

    Read the article

  • how to select specific number of child entities instead of all in entity framework 3.5?

    - by Sasha
    Hi all, i am wondering how can i select specific number of child objects instead of taking them all with include? lets say i have object 'Group' and i need to select last ten students that joined the group. When i use '.Include("Students"), EF includes all students. I was trying to use Take(10), but i am pretty new to EF and programming as well, so i couldn't figure it out. Any suggestions? UPDATED: ok, i have Group object already retrieved from db like this: Group group = db.Groups.FirstOrDefault(x=>x.GroupId == id) I know that i can add Include("Students") statement, but that would bring ALL students, and their number could be quite big whether i need only freshest 10 students. Can i do something like this: var groupWithStudents = group.Students.OrderByDescending(//...).Take(10);? The problem with this is that Take< no longer appears in intellisense. Is this clear enough? Thanks for responses

    Read the article

  • Can you apply a CSS hover effect to an element that’s not a child of the hovered element?

    - by WilliamB
    I was not sure if this is possible or not. I am working in CSS3 animations right now and I need to hover on a link that will effect other div element(non-child) on the page. I was not sure if there is a work around or not. <style type="text/css"> #header { background-color:red; } #header:hover .element { background-color:blue; } .element { background-color:green; } </style> - <header id="header"> <li><a href="#">Hover</a></li> </header> <div class="element" > <p>hello world </p> </div>

    Read the article

  • Is it possible for a parent to use a child's constant or static variables from inside a static metho

    - by ryeguy
    Below is an example of what I'm trying to do. The parent can't access any of the child's variables. It doesn't matter what technique I use (static or constants), I just need some kind of functionality like this. class ParentClass { public static function staticFunc() { //both of these will throw a (static|const) not defined error echo self::$myStatic; echo self::MY_CONSTANT; } } class ChildClass extends ParentClass { const MY_CONSTANT = 1; public static $myStatic = 2; } ChildClass::staticFunc();

    Read the article

  • In Django, using __init__() method of non-abstract parent model to record class name of child model

    - by k-g-f
    In my Django project, I have a non-abstract parent model defined as follows: class Parent(models.Model): classType = models.CharField(editable=False,max_length=50) and, say, two children models defined as follows: class ChildA(Parent): parent = models.OneToOneField(Parent,parent_link=True) class ChildB(Parent): parent = models.OneToOneField(Parent,parent_link=True) Each time I create an instance of ChildA or of ChildB, I'd like the classType attribute to be set to the strings "ChildA" or "ChildB" respectively. What I have done is added an _ _ init_ _() method to Parent as follows: class Parent(models.Model): classType = models.CharField(editable=False,max_length=50) def __init__(self,*args,**kwargs): super(Parent,self).__init__(*args,**kwargs) self.classType = self.__class__.__name__ Is there a better way to implement and achieve my desired result? One downside of this implementation is that when I have an instance of the Parent, say "parent", and I want to get the type of the child object linked with "parent", calling "parent.classType" gives me "Parent". In order to get the appropriate "ChildA" or "ChildB" value, I need to write a "_getClassType()" method to wrap a custom sql query.

    Read the article

  • how to COPY Attribute value in a new attribute

    - by Mukesh
    How to copy data of attribute to new attribute in the same column in sql original data <root> <child attr='hello'></child> </root> Result 1 <root> <child attr='hello' attr2='hello'></child> </root> Result 2(with a modification) <root> <child attr='hello' attr2='**H**ello **W**orld'></child> </root>

    Read the article

  • Creating multiple process and simulation in C via fork()

    - by Yakup OZDEN
    i want to create multiple process groups which will call different functions. i write the code below. firstly i want to get following output ./fork 4 5 I am a child: 1 PID: 22330 I am a child2: 1 PID: 22334 I am a child: 2 PID: 22331 I am a child2: 5 PID: 22338 I am a child: 4 PID: 22333 I am a child: 3 PID: 22332 I am a child2: 2 PID: 22335 I am a child2: 4 PID: 22337 I am a child2: 3 PID: 22336 ' #include <stdio.h> #include <stdlib.h> #include <unistd.h> void forkChildren (int nChildren) { int i; pid_t pid; for (i = 1; i <= nChildren; i++) { pid = fork(); if (pid == -1) { /* error handling here, if needed */ return; } if (pid == 0) { printf("I am a child: %d PID: %d\n",i, getpid()); sleep (5); wait(NULL); return; } } } void forkChildren2 (int nChildren) { int i; pid_t pid; for (i = 1; i <= nChildren; i++) { pid = fork(); if (pid == -1) { /* error handling here, if needed */ return; } if (pid == 0) { printf("I am a child2: %d PID: %d\n",i, getpid()); sleep (2); return; } } } the code gives me the output [ozdeny@hyperion ~]$ ./fork 4 5 I am a child: 1 PID: 22330 I am a child: 2 PID: 22331 I am a child: 3 PID: 22332 I am a child: 4 PID: 22333 I am a child2: 1 PID: 22334 I am a child2: 2 PID: 22335 I am a child2: 4 PID: 22337 I am a child2: 5 PID: 22338 [ozdeny@hyperion ~]$ I am a child2: 3 PID: 22336 I am a child2: 1 PID: 22339 I am a child2: 2 PID: 22340 I am a child2: 3 PID: 22341 I am a child2: 4 PID: 22342 I am a child2: 5 PID: 22343 I am a child2: 1 PID: 22345 I am a child2: 2 PID: 22346 I am a child2: 3 PID: 22347 I am a child2: 1 PID: 22349 I am a child2: 2 PID: 22350 I am a child2: 1 PID: 22344 I am a child2: 2 PID: 22352 I am a child2: 3 PID: 22353 I am a child2: 4 PID: 22354 I am a child2: 5 PID: 22355 I am a child2: 3 PID: 22351 I am a child2: 4 PID: 22356 I am a child2: 5 PID: 22357 I am a child2: 4 PID: 22348 I am a child2: 5 PID: 22358

    Read the article

  • C signals and processes

    - by Gary
    Hi, so basically I want "cmd_limit" to take a number in seconds which is the maximum time we'll wait for the child process (safe to assume there's only one) to finish. If the child process does finish during the sleep, I want cmd_limit to return pass and not run the rest of the cmd_limit code. Could anyone help me do this, here's what I've got so far.. int cmd_limit( int limit, int pid ) { signal( SIGCHLD, child_died ); sleep( limit ); kill( pid, SIGKILL ); printf("killin'\n"); return PASS; } void child_died( int sig ) { int stat_loc; /* child return information */ int status; /* child return status */ waitpid( -1, &stat_loc, WNOHANG ); if( WIFEXITED(stat_loc) ) { // program exited normally status = WEXITSTATUS( stat_loc ); /* get child exit status */ } printf("child died: %s\n", signal); }

    Read the article

  • CSS3 Hover transition strange behavior

    - by Aleksandar Ivanov
    So I was playing around with transition/hover effects so that's the code. <pre> <code> /* HTML */ section> a href="#" title="button">CLICK!</a> // deleted the lt sign for visibility reasons! a href="#" title="button">CLICK!</a> a href="#" title="button">CLICK!</a> a href="#" title="button">CLICK!</a> /section> /********/ /* CSS */ section{ width: 700px; height: 500px; margin: 250px auto; position: relative; background: #08c; } section a{ border-radius: 51px; background: #e60; line-height: 100px; text-align: center; color: #04e; font-size: 24px; font-weight: bold; font-family: tahoma; text-decoration: none; display: block; width: 100px; height: 100px; } section a:nth-child(1){ position: absolute; top: -100px; left: -100px; -webkit-transition: left 2s ease; } section a:nth-child(2){ position: absolute; top: -100px; right: -100px; -webkit-transition: top 2s ease; } section a:nth-child(3){ position: absolute; bottom: -100px; right: -100px; -webkit-transition: right 2s ease; } section a:nth-child(4){ position: absolute; bottom: -100px; left: -100px; -webkit-transition: bottom 2s ease; } section a:nth-child(1):hover,section a:nth-child(1):focus{ left: 800px; } section a:nth-child(2):hover{ top: 600px; } section a:nth-child(3):hover{ right: 800px; } section a:nth-child(4):hover{ bottom: 600px; } /*******/ </code> </pre> BUT, I stumbled upon a strange thing. When I hover over a link its starts getting to its right position applied by the hover, but at some point (always different) the effect stops and it gets back to its original position! Have anyone seen this and know what is the problem ?

    Read the article

  • Java: Non-static nested classes and instance.super()

    - by Kiv
    I'm having a hard time wrapping my head around non-static nested classes in Java. Consider the following example, which prints "Inner" and then "Child". class Outer { class Inner { Inner() { System.out.println("Inner"); } } } public class Child extends Outer.Inner { Child(Outer o) { o.super(); System.out.println("Child"); } public static void main(String args[]) { new Child(new Outer()); } } I understand that instances of Inner always have to be associated with an Outer instance, and that that applies to Child too since it extends Inner. My question is what the o.super() syntax means - why does it call the Inner constructor? I've only seen a plain super(args) used to call the superclass constructor and super.method() to call the superclass version of an overridden method, but never something of the form instance.super().

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >