FAQ Database Discussion Community


CKEditor updating parent textarea from child window

javascript,ckeditor,parent-child
I have a parent window with a textarea and when the parent window opens it also opens a child window. The user answers a question that is posted back into the parent textarea when the user clicks on the submit button that triggers the javascript code below. However this code...

Modifying already added child elements

wpf,vb.net,border,parent-child,children
How can I edit/modify child elements, that have already been added? I have a grid with added child element border that is set to specific color. How can I change the existing border color without adding a new child element? Because I need these elements to be created dynamically, I've...

UIAlertView after MOC background save works iOS 7 not iOS 8

ios,uitableview,ios8,parent-child,uialertview
I have a parent detail view controller that provides common custom functions to child detail views. The parent includes two custom functions. One function triggers a background save to two NSManagedObjectContexts that saves a main MOC immediately to free up UI, then saves a private MOC. Fairly standard setup pre...

How can I pass all current environmental variables in a node spawn?

node.js,environment-variables,parent-child,spawn
I am spawning child tasks in Node the following way: function createChildProc(prog, params0, cmdAndEnv) { var spawn = require('child_process').spawn; return spawn(prog, params0, cmdAndEnv); } Where cmdAndEnv manually contain the environment variables created during the initial fire up of Node. Instead of manually issuing all the environmental variables into the spawned...

jQuery remove class from parent on click

jquery,click,parent-child,addclass,removeclass
I have an element that once you click on it, it adds and removes a class with jQuery. When you click on a child element I want the classes to swap again. I tried doing it with .parent but that doesn't seem to work.. This is the html: <article class="block...

C# Trying to mask child values in a dynamic object

c#,parsing,dynamic,parent-child
At the moment I'm adding functionality to our service that will take in an object that is about to be logged to trace and mask any sensitive fields that are included in the object. The issue is that we can get objects with different layers. The code I have written...

CSS - Set div to same height as sibling of unknown height so parent will be same height as the latter

html,css,css3,responsive-design,parent-child
So I have 2 divs in a container. One floated left and one floated right. The one on the right is text. The one on the left is an image. How can I set the image height so it's equal to the unknown height of the right text? The container...

how to redirect empty parent category to its first non empty child category in wordpress

wordpress,parent-child,category,url-redirection
In Wordpress, If parent category is empty then it will redirect to its first child category that is not empty.

Akka: Stop actor after child actors are finished

java,akka,parent-child,terminate
I often find myself using a "main" actor that creates a number of child actors for sub-tasks. When the sub-tasks are finished, the main actor should also stop himself. So I watch the child actors and stop the main actor when context.children.isEmpty. I often use this pattern, but as I...

XLS Copy Child Element to Parent Attribute

xslt,attributes,parent-child,xls,elements
I'm just starting to learn about XLS just do modify my XML below. In particular, I would like to copy the value of the <description> element and replace it into the name attribute of its parent <game>. Source XML: <?xml version="1.0"?> <menu> <game name="$100000P" index="" image=""> <description>$100,000 Pyramid (1988)</description> <cloneof></cloneof>...

Creating complex VC Hierarchy using NIB

ios,objective-c,iphone,uiviewcontroller,parent-child
I have MainVC than contains 2 tabs: FirstVC and SecondVC. Then I tap on some of this taps I want to present below desired View/VC. I am working on this project with Nib, so I have some confusion about it. That object should I use here? View? How? How I...

How do I inherit a variable from a parent class? [duplicate]

java,variables,inheritance,parent-child,subclass
This question already has an answer here: Why does Eclipse require me to set (arbitrary) brackets in java code? 5 answers I have a subclass that needs to inherit a method and a variable, and I want to be able to make several instances of the subclass. However, I...

in ActiveRecord::Relation, is it preferable to scope by parent in the model or set @parent in the controller

ruby-on-rails-4,activerecord,model-view-controller,scope,parent-child
I have a class which belongs to another. course.rb class Course < ActiveRecord::Base belongs_to :school I currently use a before_action to set the parent instance in the controller. courses_controller.rb class CoursesController < ApplicationController #returns @school. only: [methods] avoids trying to set @school when no school param expected before_action :set_school, only:...

Parent child relation using mysql

mysql,join,parent-child
I have a sample mysql table named relation as follows: ID TypeID Name Parent_ID ---------------------------------- 1 1 Parent 0 2 2 Child1 1 3 2 Child2 1 4 3 GrandChild1 2 5 3 GrandChild2 2 6 3 GrandChild3 2 7 3 GrandChild4 3 8 3 GrandChild5 3 How can I...

How do I set the borders in which I want my children to move when following the cursor on a movement?

jquery,parent-child,mouseover,area
I am making a project in which I have to add some googly eyes to a face in jQuery. I have the design in CSS and my divs in HTML I now want to add the mouse movement with Jquery. I found a very helpful answer on this site and...

repeating child with this.props of parent react element

javascript,components,reactjs,parent-child,repeat
Currently i m working on creating react components, and i need to repeat the child components, based on this.props.value of parent component. I am struggling to find any good examples. here is my code var LiComponent = React.createClass({ render:function(){ return( <div> <span>{this.props.label}</span> <span>{this.props.value}</span> </div> ); } }); var StatsComponent =...

Open new window (Child-Window), and refresh parent window…with TIME DELAY

javascript,php,parent-child,page-refresh,timedelay
I have a script which opens a new (child) window, while refreshing the parent page. <script type="text/javascript"> function OpenWindow() { window.open ('start_process.php', 'newwindow', config='height=670, width=1400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no'); window.location = 'www.example.com'; } </script> However, this process is rather "blitz" --- it happens in the blink of...

how to get name of a accessible parent(panel) in swing?

java,swing,parent-child
When i click the button, it will print the accessible parent name. is there any way is to do that?. I have tried some codes, but its printing null. Can anyone point out my mistake. Container c = cancel.getParent(); System.out.println("Parent Name = "+c.getName()); ...

Virto Commerce Parent Customer Relationship Needed [closed]

c#,html,parent-child,parent,virtocommerce
I'm looking to create a parent customer that has child customers underneath it. So for example Home Depot as the parent and store #300 as the child.

parent process and child process timing

c++,c,process,parent-child
Hi I have a simple question, however the timing issue is troubling me. Assume this is the code. #include <stdio.h> int main() { int p = fork(); if (p==0) { printf("ok\n"); sleep(1); } else { printf("hey!"); sleep(1); } printf("done!"); return 0; } My question is, will "done!" always be executed...

Put an id to a parent element

javascript,jquery,html,css,parent-child
I wanted to put an id in my element's parent element. Below is my code: <div> <div id="child"></div> <div> Im aware that jquery has a way to select a parent element , but I dont know how what method shall I use to put an id to it. Below is...

Parent Child SQL Recursion

sql,sql-server,tsql,recursion,parent-child
I have seen similar but not Exactly the same requests. If I had the following table Parent Child 1 2 1 3 4 3 5 1 6 1 5 7 8 9 I selected "1" I would expect back all records where one is the parent or child but also...

How to take advantage of each process when using two fork()'s in C

c,process,fork,parent-child
So, I've been trying to understand forks, and although I understand the basics (ie. another process gets created with a copy of the original data when we use fork()), I can't really grasp actually doing things with these processes that are created. For example: I have to write a program...

Child element's box-shadow superior to parent's?

html,css,css3,parent-child,box-shadow
Somehow I find this wierd and I couldn't solve it myself. I have form with large outset box-shadow which overlaps top inner (inset) box-shadow of the parent container. I need to have parent's black inset shadow to be visible. See this fiddle z-index does nothing. My CSS: #description { display:...

unity | Find child gameObject with specified parent

unity3d,find,parent-child,gameobject
I have to find child gameObject with specified parent. Uhm. Let me explain more detail. I'm creating the prefab which have one child gameObject named 'state' and the name of parent gameObject is changed when i play the game. I mean the name of child gameObject is always same but...

Fork and execlp not executing my program?

c,fork,parent-child,pid,child-process
So I'm trying to create a child using fork and have that child run a program using execlp, only problem is that it isnt running... kind of. Heres my simple program else if (pid == 0) { fprintf(stderr,"Child process is accessing memory %d.\n", rand_num); execlp("helloworld", "helloworld", (char*)0); printf("hi\n"); exit(0); }...

Open child window and redirect parent window

javascript,redirect,parent-child,new-window
I have a JavaScript that opens a new window when a button is clicked. It works fine. But, I want to re-direct the Parent Window (i.e. the current page) once the new window is opened. Here is my script : <script type="text/javascript"> function OpenWindow() { window.open('/My_Folder/file.php', 'newwindow', config='height=670,width=1400,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no'); } </script>...

Child user can't select view of parent in teradata

sql,select,parent-child,teradata
In Teradata SQLAssistant, I have created a db user USER1 which has 17 views. This user can do a SELECT on any view, thanks to a profile/role I granted and then associated to him. His child USER2 is a db user with the same profile/role as USER1, but my problem...

adding current function to child functions.php for editing

php,wordpress,function,parent-child
I am working on a client site that has two blocks of blog content (enclose in the article tags below) on the home page, and I need to move the title and date of the blocks to the end of them. I was able to move the title by moving...

Parent child tree with ID's spread through multiple arrays/tables

php,arrays,recursion,parent-child
I inherited a table structure that I have never seen for a parent/child tree. This is not your typical parent/child tree to array problem. It involves 3 arrays; Companies, Divisions, Users Few Rules There is always a root node that is a company A division can be a sub node...

How to “extend” javascript “class” and add new stuff?

javascript,parent-child
Okay, so what I'm trying to do is make a Projectile class, and then make a BasicShot class that "extends" Projectile in a way like you can in Java. I want to set the vars the parent has to the parent class, and any new vars get set in the...

Elasticsearch data model

data,elasticsearch,model,nested,parent-child
I'm currently parsing text from internal résumés in my company. The goal is to index everything in elasticsearch to perform search on them. for the moment I have the following JSON document with no mapping defined : Each coworker has a list of project with the client name { name:...

Zend\Db Model with Child Models

zend-framework2,parent-child,zend-db,one-to-one
ZF2 project - no Doctrine, using native Zend\Db: Have the following structure: Controller ProductController Model Product ProductTable ProductType ProductTypeTable Product is the model, has variables corresponding to the “products" table fields. ProductTable is table class which is connected to the database via tableGateway. ProductTable has getItem() method to retrieve requested...

How to use a method from the Startup form to enable its controls when called through a child form?

c#,winforms,parent-child
I am trying to enable admin privileges on my startup form. For this I've created an admin toolstrip login which would cause a password form to launch. I am however unable to update the startup form through the password form. I've seen a similar article over here [Why the controls...

Uncaught TypeError When Passing Variable from FancyBox Into Parent

javascript,php,fancybox,parameter-passing,parent-child
i have a problem when i passing variable value from FancyBox. First, i will tell the code : Here is the code in the FancyBox : JavaScript function post_value(no){ parent.setSelectedUser(document.forms[no]["NO_INDUK"].value); parent.$.fancybox.close(); } html while($baris = mysqli_fetch_assoc($hasil)) { //1 item($baris); $no++; ?> <tr> <form name="<?php echo $no ?>" method='post'> <td><?php echo...

PyQT4 WheelEvent in parent from child

python,event-handling,pyqt,parent-child
Hi my question is related to this: PyQT4 WheelEvent from PyQt4.QtGui import * from PyQt4.QtCore import * import sys class Main(QWidget): def __init__(self, parent=None): super(Main, self).__init__(parent) layout = QHBoxLayout(self) layout.addWidget(Scroll(self)) class Scroll(QScrollArea): def __init__(self, parent=None): super(Scroll, self).__init__(parent) self.parent = parent def wheelEvent(self, event): super(Scroll, self).wheelEvent(event) print "wheelEvent", event.delta() newHeight =...

using auto/pointer to child, access child's parent method

c++,c++11,parent-child,auto
I'm trying to figure out how to access a parent method using a pointer to the child class. Any ideas? I looked for examples but found things that were more different than not. child access parent - different. I have a test class with the following: auto canvasObj = parseCanvas(one,...

Qt childs are visible but parent not

qt,parent-child,visibility
I have some widgets, QToolButtons to be exactly, and I initialize them like this: QFrame *frmBackground = new QFrame(ui->centralWidget); QToolButton *btnMenueExit = new QToolButton(frmBackground); But now my problem. When I call frmBackground->setVisible(false), the child should disappear too, but thats not the case. The children are still visible and I would...

Height Problems with CSS Child element

html,css,magento,parent-child
I got a problem with giving back the child height to its parent. The code comes from the Magento OnePageCheckOut site and I guess it is an css issue. Normally the checkout goes from up to down. With using of a modified css code, the progressbar is seperated on top...

Meaning of syntax of new object creation of a child class in Java?

java,class,interface,instance,parent-child
I have below java program which i wrote while going through a java tutorial. public class Primitive_prac { public static void main(String[] args) { // TODO code application logic here Parent obj1 = new Child(); Child obj2 = new Child(); System.out.println("ojb1 is instance of Parent: " + (obj1 instanceof Parent));...

How to represent hirerarical child-parent rows?

sql,sql-server,parent-child
Edit: SQL Fiddle here I have a persons table that contains these sample rows: +----+-------+-----------+ | id | name | parent_id | +----+-------+-----------+ | 1 | max | (null) | | 2 | payne | 1 | | 3 | mike | 1 | | 4 | sara | 2...

Ruby on Rails: Child Class Gives Parent Class values when child class is created

ruby-on-rails,ruby,parent-child,belongs-to
I am basically looking for the opposite of this: Ruby on Rails: Building a child with default values when its parent is created But I have not been able to find anything on stack overflow or the documentation to assist me with this. class GeneralError < Details #ASSOCIATIONS belongs_to :type...

SQL Merge a List of Parent Child data

sql,sql-server,merge,parent-child,master-detail
I have a list of data that I am passing to a stored procedure as XML. The data is a list of Widget and a widget contains a list of WidgetItem (parent child data). I would like to do a MERGE based a subset of Widget based on the ParentID....

creating nested TreeItem in javafx

javafx,parent-child,treetableview
At the time my TreeItem in TreeTableView looks flat and like this: //////////////////row////////////////////////////// for (Entry<String, String> entryRow : dc.getSortedfuncAll().entrySet()) { root.getChildren().add(new TreeItem<String>(entryRow.getValue())); } // ////////////////treetable//////////////////////////// final TreeTableView<String> treeTableView = new TreeTableView<>(root); AUF_1086686287581_9999 AUF_1086686329972_10049 AUF_1079023138936_6682 AUF_1087981634453_7022 AUF_1060589919844_59496...

Subview has higher alpha then parent?

objective-c,uiviewcontroller,parent-child,alpha
I am programming in Xcode 6.1.1 with objective-c. I have two UIViewcontrollers (one parent and one child). The parent has an alpha of 0.7. What I would like to have is an child with an higher alpha then it's parent. I would like to have the child an alpha of...

Can't access method defined in parent class

python,class,inheritance,methods,parent-child
I am attempting to use the method is_word_in() from TitleTrigger's parent class WordTrigger but I am getting a NameError saying is_word_is is not defined. I feel like I am missing a key concept of inheritance, how can I correct this? class NewsStory(object): def __init__(self, guid, title, subject, summary, link): self.guid...

query from the child to the great great grandfather list in ORACLE 12c

sql,oracle,parent-child,hierarchy,oracle12c
I need help with a SQL query. I have this table: ITEM PARENT 1 NULL 2 1 3 2 4 2 5 3 6 5 7 5 8 4 9 8 10 1 11 10 12 10 13 8 Chosen an item, i'd need the following result: Chosen item 9:...

Parent changing child's attribute

python,inheritance,python-3.x,attributes,parent-child
I want to have class-based counter, storing the number of instances created. It could be implemented as such: class Parent(object): counter = 0 def __init__(self): # remembers the order in which the instances were created self.counter = counter Parent.counter += 1 And I want to have numerous Child classes doing...

Storing Child Class Objects in the Same Container without loosing data?

c++,object,containers,parent-child,base
So lets say I have a base class called Fruits, class Fruit{ public TYPE{ Apples, Oranges, Grapes, NoType }; virtual int getType(){ return Fruit::TYPE::NoType; }; virtual ~Fruits(){}; virtual int randomFunc(){ return 991; }; } And then lets say I have a child class called Apple, class Apple : public Fruit{...

unity3d - Cannot move a parent empty gameobject

unity3d,parent-child,draggable
I have an empty game object which is a parent of several childs that create parts of a tank, The problem is I wrote a script to make that parent object move according to mouse, but when I apply it to it does nothing, whilst when I apply it to...

call parent windows routine in window.opener in typescript

javascript,typescript,parent-child
I have a child browser window opened in JavaScript that needs to call a routine in the parent. I know from other questions that I want to do something like window.opener.parentFunction() but when I try to do this, TypeScript, somewhat reasonably, complains that it doesn't know what parentFunction is. How...