Search Results

Search found 4347 results on 174 pages for 'devils child'.

Page 22/174 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Should the spacing between parent and child containers belong to parent or child?

    - by johntrepreneur
    I'm struggling to determine where in my CSS the padding/margins should go to keep seperation between parent and child containers. For example, if you have have a parent div with two nested children and you need to have even 10px spacing between the children and also have the children be spaced 10 px from the parent; then would you add padding to parent div {padding:10px} and then just add 10px of margin between the children? Or would you leave the parent at 0 padding and have the children define what seperation they need from each other and also their parents?

    Read the article

  • Child view adds itself to another view every time when I show dialog

    - by user565447
    A child view had joined the main view. I don't want it to be so. Look at the screenshot. But I want that the dialog has appeared and it disappeared, and the view of the dialog didn't join itself to main view. After I called dialog, the view of the it joined every time and it looked like this: _http://s014.radikal.ru/i329/1101/cc/4ce75c9e8ae2.jpg _http://i075.radikal.ru/1101/00/f1b132b07e25.jpg But the normal view must look like this: _http://i016.radikal.ru/1101/64/0b2a4718cd0e.jpg Why it happens?

    Read the article

  • Prevent content with child nodes from being deleted in umbraco

    - by Soldarnal
    I would like to prevent content nodes from being trashed if they have any children. I setup an event handler like so: public class KeepSafeEvents : ApplicationBase { public KeepSafeEvents() { Document.BeforeMoveToTrash += new Document.MoveToTrashEventHandler(Document_BeforeMoveToTrash); } void Document_BeforeMoveToTrash(Document sender, umbraco.cms.businesslogic.MoveToTrashEventArgs e) { if (sender.HasChildren) { e.Cancel = true; } } } However, this doesn't seem to work. I assume it is because the delete process moves the child nodes to trash first before dealing with the parent node (which then has no children). Is there another possible solution? Or am I making a simple mistake above?

    Read the article

  • HOw to find specific child node in XML using AS3 flash

    - by Mirage
    I have this xml var testXML:XML = <family> <father name1="tom" age="5" ><father1 name1="test1"/><father2 name1="test2"/></father> <mother name1="tomylee" age="55" ><mother1/><mother2/></mother> <sister name1="sister1" age="35" ><sister1/><sister2/></sister> </family>; I want to get the child node with name1 = test1 but i only know family so is there something like trace (testXML.children(@name1="test1"); I only know the family node , i don't know where that node is inside the father or not is there any filter can be applied on root node to find something

    Read the article

  • SQL: Join Parent - Child tables

    - by pray4Mojo
    I'm building a simple review website application and need some help with SQL Query. There are 3 tables (Topics, Comments, Users). I need a SQL query to select the data from all 3 tables. The 'Topics' table is the parent and the 'Comments' table contains the child records (anywhere from zero to 100 records per parent. The third table 'Users' contains the user information for all users. Here are the fields for the 3 tables: Topics (topicID, strTopic, userID) Comments (commentID, topicID, strComment, userID) Users (userID, userName) I tried: SELECT * FROM Topics Inner Join Comments ON Topics.topicID = Comments.topicID Inner Join Users ON Topics.userID = Users.userID But this does not work correctly because there are multiple topics and the User info is not joined to the Comments table. Any help would be appreciated.

    Read the article

  • execution of instructions in a child process

    - by ness kh
    I want to exit from a child process when the execution of os.system(comm) will be executed. My code is: pid = os.fork() if pid == 0: #instruction else: comm = "python file.py" os.system(comm) os.exit(error) Now, my file file.py contains a loop, and I can get out from it only if a condition is satisfied. But, even when the condition is not satisfied, the program exits from the loop and displays the message error. Also it doesn't execute the rest of instructions in file.py. file.py is : while 1: if(condition): break # rest of instructions

    Read the article

  • Floating child window in WPF

    - by Dusan Kocurek
    I want to create floating child window in .NET 3.0 WPF application. What I'm doing is: sideWindow = new SideWindow(this); sideWindow.Left = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - sideWindow.Width; sideWindow.Top = 125; sideWindow.WindowStartupLocation = WindowStartupLocation.Manual; sideWindow.Owner = this; sideWindow.Show(); This is running fine except one customer. According to trace messages the window is created, but the client doesn't see it! Any idea about similar problems? Thank you very much.

    Read the article

  • Bind Child table data on View field- MVC ASP.Net

    - by Tassadaque
    I have two tables Contact and Addresses. Addresses is the child table of Contact. When i create view for Contact. i also want to get addresses for user as many as user wants. For contact table i bind the textbox and add validation like this <%= Html.TextBoxFor(model => model.ContactName) %> <%= Html.ValidationMessageFor(model => model.ContactName) %> Now my question is that how can i bind address field on create view screen. Regards Tassadaque

    Read the article

  • Select from parent table return ID = 0 column values for child objects

    - by SaD
    Entities: public class Person { public Person(){} public virtual long ID { get; set; } } public class Employee : Person { public Employee(){} public virtual long ID { get; set; } public virtual string Appointment { get; set; } } Mappings: public class PersonMap : ClassMap<Person> { public PersonMap() { Id(x => x.ID) .GeneratedBy.Identity(); } } public class EmployeeMap : SubclassMap<Employee> { public EmployeeMap() { KeyColumn("ID"); Map(x => x.Appointment) .Not.Nullable() .Length(50); } } 2 items in Person table 1 item in Employee table (1 in base class, 1 in child class) Query:var list = Session.CreateQuery("from Person").List<Person>(); Return: 0 | ID = 1 1 | ID = 0, Appointment = "SomeAppointment"

    Read the article

  • Base form controls not visible in child form

    - by Kildareflare
    Hello I'm using C#.Net and have a base form that is inherited by several forms. Until yesterday, when the child (derived) form was opened in the designer the base forms controls would be displayed and shown as locked. Now, however the form is simply blank. None of the base forms controls are visible in the designer. Everything compiles, builds and runs OK. Has anyone else seen this? I've tried placing a call to the base forms InitializeComponent method in the derived forms OnLoad method but to no avail.

    Read the article

  • Cannot add or update a child row: a foreign key constraint fails

    - by myaccount
    // Getting the id of the restaurant to which we are uploading the pictures $restaurant_id = intval($_GET['restaurant-id']); if(isset($_POST['submit'])) { $tmp_files = $_FILES['rest_pics']['tmp_name']; $target_files = $_FILES['rest_pics']['name']; $tmp_target = array_combine($tmp_files, $target_files); $upload_dir = $rest_pics_path; foreach($tmp_target as $tmp_file => $target_file) { if(move_uploaded_file($tmp_file, $upload_dir."/".$target_file)) { $sql = sprintf(" INSERT INTO rest_pics (branch_id, pic_name) VALUES ('%s', '%s')" , mysql_real_escape_string($restaurant_id) , mysql_real_escape_string(basename($target_file))); $result = mysql_query($sql) or die(mysql_error()); } I get the next error: Cannot add or update a child row: a foreign key constraint fails (rest_v2.rest_pics, CONSTRAINT rest_pics_ibfk_1 FOREIGN KEY (branch_id) REFERENCES rest_branches (branch_id) ON DELETE CASCADE ON UPDATE CASCADE However, this error totally disappears and everything goes well when I put directly the restaurant id (14 for example) instead of $restaurant_id variable in the sql query. The URL am getting the id from is: http://localhost/rest_v2/public_html/admin/add-delete-pics.php?restaurant-id=2 Any help please?

    Read the article

  • Parent Thread exiting before Child Threads [python]

    - by crgwbr
    I'm using Python in a webapp (CGI for testing, FastCGI for production) that needs to send an occasional email (when a user registers or something else important happens). Since communicating with an SMTP server takes a long time, I'd like to spawn a thread for the mail function so that the rest of the app can finish up the request without waiting for the email to finish sending. I tried using thread.start_new(func, (args)), but the Parent return's and exits before the sending is complete, thereby killing the sending process before it does anything useful. Is there anyway to keep the process alive long enough for the child process to finish?

    Read the article

  • Guice child injector override binding

    - by Roman
    Hi All I am trying to to override a binding in a child injector that was already configured in a base injector. like that : public class PersistenceModule extends Abstract{ @Override protected void configure() { bind(IProductPersistenceHelper.class).to(ProductPersistenceHelper.class); } } then : Injector injector = Guice.createInjector(new PersistenceModule()); injector.createChildInjector(new AbstractModule(){ @Override protected void configure() { bind(IProductPersistenceHelper.class).to(MockProductPersistenceHelper.class); } }) Guice is complaining that it has already a binding for that. Are there any patterns or best practices for that problem ?

    Read the article

  • Problems with capturing an event in child object in Actionscript

    - by Raigomaru
    I have two classes. The first one (the starting class): package { import flash.display.Sprite; import flash.events.KeyboardEvent; import tetris.*; public class TetrisGame extends Sprite { private var _gameWell:Well; public function TetrisGame() { _gameWell = new Well(); addChild(_gameWell); } } } The second: package tetris { import flash.display.Sprite; import flash.events.KeyboardEvent; public class Well extends Sprite { public function Well() { super(); addEventListener(KeyboardEvent.KEY_DOWN, onKeyboard); } private function onKeyboard():void { //some code is here } } } But when I press any buttons on my keyboard, the child class Well doesn't have any reaction. What's the problem?

    Read the article

  • jQuery finding 'nth-child' value

    - by Rich
    Hi, I have a ul set up as navigation, which I'll be animating on hover. As all the nav items are different widths, I'll be storing their default widths in an Array, so that on hover out, these widths can be passed back in to the animate method. What I need is a way to find what 'nth-child' the element is in order to retrieve the correct width from the array. Something like: var count = $(this).count(); //obviously this isn't right! So that then I can do: $(this).animate({'width':array(count)}, 400); Any suggestions would help me a lot - and if there's a better way to do this kind of thing I'd gladly accept pointers!

    Read the article

  • Windows Phone 7 Control Caching - 'Element is already the child of another element'

    - by will
    I'm trying to speed up my windows phone 7 page load times. I have a 'static' page that has a dynamically created in a Panorama control - static meaning that the content never changes. On the first load I look at my config file, create the individual PanoramaItem controls and add them to the main Panorama control. I'm trying to keep a List in a static place so that the initial creation would only happen once and I could just add a fully rendered version to my Panorama control when the page was rendered. Works fine on first load, but when I try to add the cached PanoramaItems to the Panorama control I get the message "Element is already the child of another element". This makes sense since I already added before. But I can see a way to disconnect the PanoramaItems with the first Panorama control... I could be going about the control caching thing all wrong as well... Let me know if there's another way to do this.

    Read the article

  • Java : Using parent class method to access child class variable

    - by Jayant
    I have the following scenario : public class A { private int x = 5; public void print() { System.out.println(x); } } public class B extends A { private int x = 10; /*public void print() { System.out.println(x); }*/ public static void main(String[] args) { B b = new B(); b.print(); } } On executing the code, the output is : 5. How to access the child class(B's) variable(x) via the parent class method? Could this be done without overriding the print() method (i.e. uncommenting it in B)? [This is important because on overriding we will have to rewrite the whole code for the print() method again]

    Read the article

  • How to access child object properties?

    - by user1698312
    I'm trying to get the text property from an entry in a dialog with the following code: GtkWidget *dialog, *entry; gchar *text; entry = gtk_entry_new(); dialog = create_dialog(); ... gtk_container_child_get(GTK_CONTAINER(dialog), entry, "text", text, NULL); and i'm getting the following: (textview:3079): Gtk-WARNING **: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkcontainer.c:919: container class `GtkDialog' has no child property named `text' The dialog contains a label and an entry with two buttons.

    Read the article

  • make width of child components to be 100%

    - by Omu
    I usually write something like this: <mx:VBox height="100%" width="155"> <mx:Button label="b1" width="100%"/> <mx:Buttonlabel="b2" width="100%"/> <mx:Button label="b3" width="100%"/> <mx:Button label="b4" width="100%"/> </mx:VBox> So I need all the child components to be 100%, anybody knows any other way of doing this, like without having to specify 100% for all children.

    Read the article

  • make with of child components be 100%

    - by Omu
    I usually write something like this: <mx:VBox height="100%" width="155"> <mx:Button label="b1" width="100%"/> <mx:Buttonlabel="b2" width="100%"/> <mx:Button label="b3" width="100%"/> <mx:Button label="b4" width="100%"/> </mx:VBox> So I need all the child components to be 100%, anybody knows any other way of doing this, like without having to specify 100% for all children.

    Read the article

  • Visual Studio 2008 project organization for executable and assembly

    - by user304582
    Hi - I am having a problem setting up the following in Visual Studio 2008: a parent project which includes the entrypoint Main() method class and which declares an interface, and a child project which has classes that implement the interface declared in the parent project. I have specified that Parent's Output type is a Console application, and Child's Output type is a Class library. In Child I have add a reference to the Parent as a project, and specified that Child depends on Parent and that the build order should be Parent, then Child. The build succeeds, and as far I can tell, the right things show up in the Child/bin/debug directory: Parent.exe and Child.dll. However, if I run Parent.exe, then at the point when it should load a class from the Child.dll, it fails with the error message: exception executing operation System.TypeLoadException: Could not load type 'Child.some.class' from assembly 'Parent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. I guess I'm confused as to how to get the Parent and Child projects to play together. I plan on having more child projects that use the same framework that is set up in the Parent, and so I do not want to move the entrypoint class down into the Child project. If I try to specify that the Child project is also a Console application, then the build process fails because there is no Main() entrypoint class in the child (even though the Parent project is included as a reference). Any help would be welcome! Thanks, Martin

    Read the article

  • NHibernate Master-Detail and Detail Deletion.

    - by JMSA
    Role.cs public class Role { public virtual string RoleName { get; set; } public virtual bool IsActive { get; set; } public virtual IList<Permission> PermissionItems { get; set; } } Role.hbm.xml <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="POCO" namespace="POCO"> <class name="Role" table="Role"> <id name="ID" column="ID"> <generator class="native" /> </id> <property name="RoleName" column="RoleName" /> <property name="IsActive" column="IsActive" type="System.Boolean" /> <bag name="PermissionItems" table="Permission" cascade="all" inverse="true"> <key column="RoleID"/> <one-to-many class="Permission" /> </bag> </class> </hibernate-mapping> Permission.cs public class Permission { public virtual string MenuItemKey { get; set; } public virtual int RoleID { get; set; } public virtual Role Role { get; set; } } Permission.hbm.xml <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="POCO" namespace="POCO"> <class name="Permission" table="Permission"> <id name="ID" column="ID"> <generator class="native"/> </id> <property name="MenuItemKey" column="MenuItemKey" /> <property name="RoleID" column="RoleID" /> <many-to-one name="Role" column="RoleID" not-null="true" cascade="all"> </many-to-one> </class> </hibernate-mapping> Suppose, I have saved some permissions in the database by using this code: RoleRepository roleRep = new RoleRepository(); Role role = new Role(); role.Permissions = Permission.GetList(); role.SaveOrUpdate(); Now, I need this code to delete all Permissions, since role.Permissions == null. Here is the code: RoleRepository roleRep = new RoleRepository(); Role role = roleRep.Get(roleId); role.Permissions = null; role.SaveOrUpdate(); But this is not happening. What should be the correct way to cope with this situation? What/how should I change, hbm-file or persistance code?

    Read the article

  • Example usage of a custom delegate in c#

    - by Freakishly
    Hi, I found this question on SO about a tree implementation in C#. I have no idea about delegates and I was wondering how the following code could be used to implement a tree. Also, what would be the most efficient way to keep a track of parent nodes? delegate void TreeVisitor<T>(T nodeData); class NTree<T> { T data; LinkedList<NTree<T>> children; public NTree(T data) { this.data = data; children = new LinkedList<NTree<T>>(); } public void addChild(T data) { children.AddFirst(new NTree<T>(data)); } public NTree<T> getChild(int i) { foreach (NTree<T> n in children) if (--i == 0) return n; return null; } public void traverse(NTree<T> node, TreeVisitor<T> visitor) { visitor(node.data); foreach (NTree<T> kid in node.children) traverse(kid, visitor); } }

    Read the article

  • Maven2 - problem with pluginManagement and parent-child relationship

    - by Newtopian
    from maven documentation pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one. However, this only configures plugins that are actually referenced within the plugins element in the children. The children have every right to override pluginManagement definitions. Now : if I have this in my parent POM <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.0</version> <executions> Some stuff for the children </execution> </executions> </plugin> </plugins> </pluginManagement> </build> and I run mvn help:effective-pom on the parent project I get what I want, namely the plugins part directly under build (the one doing the work) remains empty. Now if I do the following : <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.0</version> <executions> Some stuff for the children </execution> </executions> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <inherited>true</inherited> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> mvn help:effective-pom I get again just what I want, the plugins contains just what is declared and the pluginManagement section is ignored. BUT changing with the following <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.0</version> <executions> Some stuff for the children </execution> </executions> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.0</version> <inherited>false</inherited> <!-- this perticular config is NOT for kids... for parent only --> <executions> some stuff for adults only </execution> </executions> </plugin> </plugins> </build> and running mvn help:effective-pom the stuff from pluginManagement section is added on top of what is declared already. as such : <build> <pluginManagement> ... </pluginManagement> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <version>2.0</version> <inherited>false</inherited> <!-- this perticular config is NOT for kids... for parent only --> <executions> Some stuff for the children </execution> <executions> some stuff for adults only </execution> </executions> </plugin> </plugins> </build> Is there a way to exclude the part for children from the parent pom's section ? In effect what I want is for the pluginManagement to behave exactly as the documentation states, that is I want it to apply for children only but not for the project in which it is declared. As a corrolary, is there a way I can override the parts from the pluginManagement by declaring the plugin in the normal build section of a project ? whatever I try I get that the section is added to executions but I cannot override one that exists already. EDIT: I never did find an acceptable solution for this and as such the issue remains open. Closest solution was offered below and is currently the accepted solution for this question until something better comes up. Right now there are three ways to achieve the desired result (modulate plugin behaviour depending on where in the inheritance hierarchy the current POM is): 1 - using profiles, it will work but you must beware that profiles are not inherited, which is somewhat counter intuitive. They are (if activated) applied to the POM where declared and then this generated POM is propagated down. As such the only way to activate the profile for child POM is specifically on the command line (least I did not find another way). Property, file and other means of activation fail to activate the POM because the trigger is not in the POM where the profile is declared. 2 - (this is what I ended up doing) Declare the plugin as not inherited in the parent and re-declare (copy-paste) the tidbit in every child where it is wanted. Not ideal but it is simple and it works. 3 - Split the aggregation nature and parent nature of the parent POM. Then since the part that only applies to the parent is in a different project it is now possible to use pluginManagement as firstly intended. However this means that a new artificial project must be created that does not contribute to the end product but only serves the could system. This is clear case of conceptual bleed. Also this only applies to my specific and is hard to generalize, so I abandoned efforts to try and make this work in favor of the not-pretty but more contained cut and paste patch described in 2. If anyone coming across this question has a better solution either because of my lack of knowledge of Maven or because the tool evolved to allow this please post the solution here for future reference. Thank you all for your help :-)

    Read the article

  • Adding childs to list of parents with jquery /mvc2

    - by John Landheer
    Hi, I have a table of products on my page, each product has zero or more colors, the colors are shown as a list beneath the product. After the colors I have a button to add a color. The button will do an ajax call with the parent product id to a controller which will return a JSON object with color information. My problem is where to store the product id in the DOM, should I put it in a hidden field and use jquery in the click event of the "add color" to get to it? What is the best way to do this? TIA, John EDIT: The page is initially rendered on the server so I don't want to use jquery to add the id's to the page.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >