Search Results

Search found 21817 results on 873 pages for 'last child'.

Page 2/873 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Last parameter of last command in bash in vi-mode

    - by Mo
    I have been convinced (over at stackoverflow) to use my beloved bash in vi mode. So far I got used to it quite well and I like it. However I really do miss one feature: In emacs-mode, you can enter the last parameter of the previous command by pressing "ESC ." (That is, press escape followed by the .) Is there a default binding to insert the last parameter in vi-mode? I wasn't able to find one and I really miss this command... Thanks a lot

    Read the article

  • How to get the parent node of a given child node using PowerShell?

    - by kumar
    I am new to PowerShell. I have to write a script which can return me the first parent(node) value by passing the child node. I have the following XML. When I pass my PowerShell script the value "AAA", it should return "parent2", and when I pass "III", it should return "parent311". Can someone help me write this script? XML: <root> <parent> <parent2> <child>AAA</child> </parent2> <parent3> <child>BBB</child> <child>CCC</child> <child>DDD</child> </parent3> <parent4> <child>EEE</child> </parent4> <parent5> <child>FFF</child> </parent5> </parent> <parent21> <parent211> <child>GGG</child> </parent211> <parent311> <child>HHH</child> <child>III</child> <child>JJJ</child> </parent311> <parent411> <child>KKK</child> </parent411> <parent511> <child>LLL</child> </parent511> </parent21> </root>

    Read the article

  • ExpandableListView child items don't get focus when touched...

    - by Justin
    Ok, so I wrote an ExpandableListView and subclassed BaseExpandableListAdapter... Everything works fine except I cannot get the child views to take focus when clicked. If I use the trackball everything works fine. But if I try to click on a child I get no feedback whatsoever. I have tried setting android:focusable, android:focusableInTouchMode, and android:clickable (and I have also tried setting this via code) but I can't get anything to work. Any ideas? Here is my Adapter code: public class ExpandableAppAdapter extends BaseExpandableListAdapter { private PackageManager m_pkgMgr; private Context m_context; private List<ApplicationInfo> m_groups; private List<List<ComponentName>> m_children; public ExpandableAppAdapter(Context context, List<ApplicationInfo> groups, List<List<ComponentName>> children) { m_context = context; m_pkgMgr = m_context.getPackageManager(); m_groups = groups; m_children = children; } @Override public Object getChild(int groupPos, int childPos) { return m_children.get(groupPos).get(childPos); } @Override public long getChildId(int groupPos, int childPos) { return childPos; } @Override public int getChildrenCount(int groupPos) { return m_children.get(groupPos).size(); } @Override public View getChildView(int groupPos, int childPos, boolean isLastChild, View convertView, ViewGroup parent) { if (convertView == null) { LayoutInflater inflater = LayoutInflater.from(m_context); convertView = inflater.inflate(R.layout.expandable_app_child_row, null); } ComponentName child = (ComponentName)getChild(groupPos, childPos); TextView txtView = (TextView)convertView.findViewById(R.id.item_app_pkg_name_id); if (txtView != null) txtView.setText(child.getPackageName()); txtView = (TextView)convertView.findViewById(R.id.item_app_class_name_id); if (txtView != null) txtView.setText(child.getClassName()); convertView.setFocusableInTouchMode(true); return convertView; } @Override public Object getGroup(int groupPos) { return m_groups.get(groupPos); } @Override public int getGroupCount() { return m_groups.size(); } @Override public long getGroupId(int groupPos) { return groupPos; } @Override public View getGroupView(int groupPos, boolean isExpanded, View convertView, ViewGroup parent) { if (convertView == null) { LayoutInflater inflater = LayoutInflater.from(m_context); convertView = inflater.inflate(R.layout.expandable_app_group_row, null); } ApplicationInfo group = (ApplicationInfo)getGroup(groupPos); ImageView imgView = (ImageView)convertView.findViewById(R.id.item_selection_icon_id); if (imgView != null) { Drawable img = m_pkgMgr.getApplicationIcon(group); imgView.setImageDrawable(img); imgView.setMaxWidth(20); imgView.setMaxHeight(20); } TextView txtView = (TextView)convertView.findViewById(R.id.item_app_name_id); if (txtView != null) txtView.setText(m_pkgMgr.getApplicationLabel(group)); return convertView; } @Override public boolean hasStableIds() { return false; } @Override public boolean isChildSelectable(int groupPos, int childPos) { return true; } } Thanks in advance!

    Read the article

  • Simple first-child js?

    - by Glister
    Searching for a simple first-child detection via javascript (no framework). It should add some class for the first child of the element. Like a css-hacks for ie, but in javascript and for a html file. Must work similar to :first-child When I say no framework, I mean some code like this: <script type="text/javascript">document.documentElement.id = "js"</script> For example: <div class="terms"> <dl> <dt>Term 1 name</dt> <dd>Term 1 description</dd> </dl> <dl> <dt>Term 2 name</dt> <dd>Term 2 description</dd> </dl> <dl> <dt>Term 3 name</dt> <dd>Term 3 description</dd> </dl> </div> Three <dl>, the first one includes Term 1. This css won't work in IE6, thats why I'm searching for a javascript solution. CSS-hacks are not allowed. .terms dl:first-child { float: right; }

    Read the article

  • How to get child container reference in View Model

    - by niels-verkaart
    Hello, I´m trying to share a Data Service (Entity Manager) wrapped in a Repository from a ViewModel (called 'AVM') in Module A to a ViewModel (called 'BVM') in Module B, and I can't get this working. We use PRISM/Unity 2.0 This is my scenario: A user may open multiple Customer screens (composite view as mini shell) each with another customer (unit of work). We realize this using child containers. Each child container resolves it's own repository with its own Entity manager (the repository is a singleton within the child container). This is done in module A. The main shell has a main region manager, and each Customer screen with its childcontainer creates a scoped region. In each customer screen there is a View 'AV' (connected to ViewModel 'AVM') with a SubRegion (tab control) registered as 'SubRegion'. We create this with a 'Screen Factory' In Module B we have a Customer Orders in View 'BV' and ViewModel 'BVM'. In the constructor of Module B we get the main container by injection. In the initialize method we resolve the (main) region manager and register View 'BV' with it. In the constructor of View 'BV' a ViewModel 'BVM' is injected/created. Now this works, but the ViewModel 'BVM' cannot get the child container. It only get the main container. Is this doable, or do I have to do this another way? Thanks, Niels

    Read the article

  • How to terminate all [grand]child processes using C# on WXP (and newer MSWindows)

    - by NVRAM
    Question: How can I determine all processes in the child's Process Tree to kill them? I have an application, written in C# that will: Get a set of data from the server, Spawn a 3rd party utility to process the data, then Return the results to the server. This is working fine. But since a run consumes a lot of CPU and may take as long as an hour, I want to add the ability to have my app terminate its child processes. Some issues that make the simple solutions I've found elsewhere are: My app's child process "A" (InstallAnywhere EXE I think) spawns the real processing app "B" (a java.exe), which in turns spawns more children "C1".."Cn" (most of which are also written in Java). There will likely be multiple copies of my application (and hence, multiple sets of its children) running on the same machine. The child process is not in my control so there might be some "D" processes in the future. My application must run on 32-bit and 64-bit versions of MSWindows. On the plus side there is no issue of data loss, a "clean" shutdown doesn't matter as long as the processes end fairly quickly.

    Read the article

  • Communication between parent and child

    - by Pierre
    Hi every one ! I have a little problem. I have to code a simple C application that creat a process and his child (fork()) and I have to do an operation. Parent initialize the values and child calculate. I write this : #include #include #include #include #include typedef struct { int op1; char op; int op2; }Operation; Operation *varOP; void finalResult() { float result = 0; if(varOP-op == '+') result = (varOP-op1 + varOP-op2); if(varOP-op == '-') result = (varOP-op1 - varOP-op2); if(varOP-op == '*') result = (varOP-op1 * varOP-op2); if(varOP-op == '+') result = (varOP-op1 / varOP-op2); printf("%f",result); } int main () { int p; varOP = (Operation *)malloc(sizeof(Operation)); p = fork(); if(p == 0) // If child { signal(SIGUSR1, finalResult ); pause(); } if(p 0) // If parent { varOP-op = '+'; varOP-op1 = 2; varOP-op2 = 3; kill(p, SIGUSR1); wait(NULL); } return 0; } But my child is never called. Is there something wrong with my code? Thanks for your help !

    Read the article

  • :first-child fails when an element of a different class is dynamically inserted above

    - by koko
    So, I've encountered a situation where inserting an element of a different class/id breaks all css-rules on that :first-child. <div id="nav"> <div class="nSub">abcdef</div> <div class="nSub">abcdef</div> <div class="nSub">abcdef</div> <div class="nSub">abcdef</div> <div class="nSub">abcdef</div> </div> .nSub:first-child { margin-top:15px; -moz-border-radius-topleft:5px; /* ... */ } .nSub { background:#666; /* ... */ } .nSub:last-child { -moz-border-radius-bottomleft:5px; /* ... */ } As soon as I insert an element of another class/id above, like this: $('nav').insert({top:'<div id="newWF"></div>'}); all declarations for .nSub:first-child are being ignored in both FF 3.6 and Safari 4.

    Read the article

  • Python's subprocess.Popen object hangs gathering child output when child process does not exit

    - by Daniel Miles
    When a process exits abnormally or not at all, I still want to be able to gather what output it may have generated up until that point. The obvious solution to this example code is to kill the child process with an os.kill, but in my real code, the child is hung waiting for NFS and does not respond to a SIGKILL. #!/usr/bin/python import subprocess import os import time import signal import sys child_script = """ #!/bin/bash i=0 while [ 1 ]; do echo "output line $i" i=$(expr $i \+ 1) sleep 1 done """ childFile = open("/tmp/childProc.sh", 'w') childFile.write(child_script) childFile.close() cmd = ["bash", "/tmp/childProc.sh"] finish = time.time() + 3 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) while p.poll() is None: time.sleep(0.05) if finish < time.time(): print "timed out and killed child, collecting what output exists so far" out, err = p.communicate() print "got it" sys.exit(0) In this case, the print statement about timing out appears and the python script never exits or progresses. Does anybody know how I can do this differently and still get output from my child processe

    Read the article

  • Foreign key not stored in child entity (one-to-many)

    - by Kamil Los
    Hi, I'm quite new to hibernate and have stumbled on this problem, which I can't find solution for. When persisting parent object (with one-to-many relationship with child), the foreign-key to this parent is not stored in child's table. My classes: Parent.java @javax.persistence.Table(name = "PARENT") @Entity public class PARENT { private Integer id; @javax.persistence.Column(name = "ID") @Id @GeneratedValue(strategy=GenerationType.AUTO) public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } private Collection<Child> children; @OneToMany(mappedBy = "parent", fetch = FetchType.EAGER, cascade = {CascadeType.ALL}) @Cascade({org.hibernate.annotations.CascadeType.ALL}) public Collection<Child> getChildren() { return children; } public void setChildren(Collection<Child> children) { this.children = children; } } Child.java @javax.persistence.Table(name = "CHILD") @Entity @IdClass(Child.ChildId.class) public class Child { private String childId1; @Id public String getChildId1() { return childId1; } public void setChildId1(String childId1) { this.childId1 = childId1; } private String childId2; @Id public String getChildId2() { return childId2; } public void setChildId2(String childId2) { this.childId2 = childId2; } private Parent parent; @ManyToOne @javax.persistence.JoinColumn(name = "PARENT_ID", referencedColumnName = "ID") public Parent getParent() { return parent; } public void setParent(Operation parent) { this.parent = parent; } public static class ChildId implements Serializable { private String childId1; @javax.persistence.Column(name = "CHILD_ID1") public String getChildId1() { return childId1; } public void setChildId1(String childId1) { this.childId1 = childId1; } private String childId2; @javax.persistence.Column(name = "CHIILD_ID2") public String getChildId2() { return childId2; } public void setChildId2(String childId2) { this.childId2 = childId2; } public ChildId() { } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ChildId that = (ChildId) o; if (childId1 != null ? !childId1.equals(that.childId1) : that.childId1 != null) return false; if (childId2 != null ? !childId2.equals(that.childId2) : that.childId2 != null) return false; return true; } @Override public int hashCode() { int result = childId1 != null ? childId1.hashCode() : 0; result = 31 * result + (childId2 != null ? childId2.hashCode() : 0); return result; } } } Test.java public class Test() { private ParentDao parentDao; public void setParentDao(ParentDao parentDao) { this.parentDao = parentDao; } private ChildDao childDao; public void setChildDao(ChildDao childDao) { this.childDao = parentDao; } test1() { Parent parent = new Parent(); Child child = new Child(); child.setChildId1("a"); child.setChildId2("b"); ArrayList<Child> children = new ArrayList<Child>(); children.add(child); parent.setChildren(children); parent.setValue("value"); parentDao.save(parent); //calls hibernate's currentSession.saveOrUpdate(entity) } test2() { Parent parent = new Parent(); parent.setValue("value"); parentDao.save(parent); //calls hibernate's currentSession.saveOrUpdate(entity) Child child = new Child(); child.setChildId1("a"); child.setChildId2("b"); child.setParent(parent); childDao.save(); //calls hibernate's currentSession.saveOrUpdate(entity) } } When calling test1(), both entities get written to database, but field PARENT_ID in CHILD table stays empty. The only workaround I have so far is test2() - persisting parent first, and then the child. My goal is to persist parent and its children in one call to save() on Parent. Any ideas?

    Read the article

  • Debugging nth-child selector

    - by Ross
    I have the following selectors: .progress:nth-child(3n+1) { background: teal; } .progress:nth-child(3n+2) { background: red; } .progress:nth-child(3n+3) { background: blue; } However all of the items end up with a teal background. Are these selectors correct? I'm thinking I should get: Teal (every 3, starting with 1) Red (every 3, starting with 2) Blue (every 3, starting with 3) etc. I've tested on Firefox 3.5.8 and Opera 10.10 on Ubuntu. Also tested with nothing but these rules in the CSS. I'm using the YUI Reset stylesheet but excluding it does nothing.

    Read the article

  • Creating a child process on Unix systems?

    - by Hakan Svensson
    I'm trying to create a child process in another process. I am writing both the programs in C language. First I write a dummy process which will be the child process. What it is doing is only to write a string on the screen. It works well on its own. Then I write another program which will be the parent process. However, I can't make it happen. I'm trying to use fork and execl functions together, but I fail. I also want the child process does not terminate until the parent process terminates. How should I write the parent process? Thanks.

    Read the article

  • Run shell command from child shell

    - by LinuxPenseur
    Hi, I have a Unix shell script test.sh. Within the script i would like to invoke another shell and then execute the rest of the commands in the shell script from the child shell and exit To make it clear: test.sh #! /bin/bash /bin/bash /* create child shell */ <shell-command1> <shell-command2> ...... <shell-commandN> exit 0 What my intention is to run the shell-commands1 to shell-commandN from the child shell. Kindly tell me how to do this

    Read the article

  • AS3 Accessing Variables of Parent Class From Child

    - by TheDarkIn1978
    i'm trying to assign a parent's variable from the parent's child //Parent public class Main extends Sprite { public var selectedSquare:Sprite; public function Main() { //inits and adds new Square child class to display list } ... ------- //Child public function dragSquare(evt:MouseEvent):void { Sprite(parent).selectedSquare = this; //evil doesn't work! parent.addChild(this); this.startDrag(); } i'm receiving this error, but i'm casting parent from displayObjectContainer to a Sprite so i have no idea why it's not working. 1119: Access of possibly undefined property selectedSquare through a reference with static type flash.display:Sprite.

    Read the article

  • Problem installing wordpress child themes.

    - by Jay
    Hi, I've tried to install either the Fusion or Thematic child themes for my blog. My Wordpress directory is located at myblog/wordpress while my domain is just myblog (example). Everything works fine with both basic themes or the parent Fusion or Thematic themes. When I install a child theme for either framework, I can view the preview and select 'activate.' However, after that my entire site crashes. I can't even view the wordpress admin panel. I've had to restore my database from my hosting provider just to get my blog working. All that I'm able to see is my favicon icon and a blank page. I've tried to deactivate all plugins and this doesn't help either. I really want to use the Hybrid News child template. Any thoughts on what might be happening? thanks so much!

    Read the article

  • Stacking :last and :checked jQuery selectors together

    - by jethomas
    I'm trying to setup custom validation for a checkbox. I have 7 checkboxes each with the same name and I want to identify if the last one is checked. This is the code I have and I know its wrong, could anyone shed some light on how to properly stack the :last and :checked selectors together? $.validator.addMethod('ObserverOtherBox',function(v, e) { return ($('[[name="4_observers"]:last]:checked').length == 1) && ($('[name="4_observerstxt"]').length == 0) ; }, 'Please enter the other observers');

    Read the article

  • Css specificity :last-child

    - by Turbodurso
    I would like to use the following to target the last link (a) of the last ul inside my div. So this is what came to mind: #menu ul:last-child li a { /*.....*/ } I cant manually add a class to that element, and even if i wanted to do it dynamically i would still have to target the element the above way. Any ideas why this is not working? Thanks!

    Read the article

  • Last time the contact was modified

    - by Bostjan
    Hey, is there a way to find out the last time a contact was modified? I can't seem to find a variable for it. The reason I'm asking is because I'd like to do a sync of the contacts to my web server and I don't feel like checking for each contact with a HTTP request if it needs updating. So I was thinking to check the date of the last update to the date of the last sync.

    Read the article

  • TSQL Cascade delete for child records?

    - by ElHaix
    I have a parent/child table (simple tree) table structure (ID, ParentID), where I want to delete (and get the ID of) all children for a given parent ID - similar to this post http://stackoverflow.com/questions/1433808/sql-server-cascade-delete-and-parent-child-table . During the loop, where I've got the current ID, I will also be performing other actions with this ID. Can someone give me an example of the SPROC to accomplish this? Thanks

    Read the article

  • current page highlights on child pages

    - by user557318
    Im trying to achieve current page highlights on wordpress similar to this site Alex Soth. I'm very nearly there with my css. At present i have current page highlights on pages, ie. home,calendar, projects. However when it come to current page highlights on child pages i have a problem. the indented child page list appears on hover when selecting a child page, but after page selection the menu reverts back to the standard pages menu with no visible child menus? unlike the link to the Alex Soth site where the extended menu stays and current page is highlighted I know that the answer will be a simple piece of css involving current_page_item and possible position:relative to obtain the menu staying visible after selection. But i can for the life of me work it out. Any ideas Ive attached my relivant pieces of css below?? thanks /* =Link Styles ------------------------------------------------------------------*/ input#submit { cursor: pointer; } input#searchsubmit { background: url(images/search.png) no-repeat center; } input#searchsubmit:hover { background: url(images/search.png) no-repeat center #3399FF !important; cursor: pointer; } .navigation a:hover, input#submit { background: #3399FF; color: #3399FF !important; } a { color: #666; } a:hover, a:hover span { color: #c11501 !important;background-color: #fae100; } .entry sup a, #main_nav .current_page_item a, #main_nav .current_page_ancestor a { color: #666 !important; } #main_nav h1.masthead a { color: #666; } #main_nav h1.masthead a:hover { border-right: none; } h2 a, #main_nav a { color: #3399FF; } img a, img a:hover { text-decoration: none; } .post a, .navigation a { font-weight: bold; color: #000; } .navigation a { background: #EEE; color: #666; font-weight: normal; padding: 3px 0px; border-radius: 0px; -webkit-border-radius: 0px; -moz-border-radius: 0px; } .post sup { font-size: 11px; color: #aaa; } .post sup a { border: 0; margin: 0; font-weight: normal; font-size: 10px; } #supplementary .post_nav ul.about_nav li a, #supplementary .post_nav ul.single_post_meta a, #supplementary ul.contact_key li a { color: #888888; border-bottom: 0; } /* =Main Menu ------------------------------------------------------------------*/ #main_nav ul.menu li { position: relative; } #main_nav ul.menu li:hover ul.sub-menu, #main_nav ul.menu li:hover ul.children { display: block; }

    Read the article

  • Finding nth-child of siblings via jQuery

    - by DA
    Let's say I have two tables that look like this: TH TH TH TH TD TD TD TD TD TD TD TD and TH TH TH TH TH TD TD TD TH TD TD TD I'd like to select the 3rd column in each. At first I was using nth-child as such: $('table tr td:nth-child(3)') But that's not going to work, as 3rd TD is in a different column in each table. What I need in pseudo code is 'get the 3rd TD or TH in each row'. I assume I need to use $.siblings but not entirely sure.

    Read the article

  • SQL query root parent child records

    - by Vish
    Hi, We have nested folders with parent-child relationship. We use MySQL MyISAM DB. The data is stored in the DB in the following manner. Every time a child folder is created in the nested structure, the previous parentID is added. I want to get the RootFolderID of a folder which is added in the hierarchy as tabulated below. FoldID ParentID |RootFolderID -----------------|------------------- 1 0 | 0 2 1 | 1 3 2 | 1 4 3 | 1 5 4 | 1 Please let me know how to get the root folderID and populate it in the RootFolderID column after a folder is created each time. Thanks.

    Read the article

  • JQuery nth-child not working properly

    - by Keith Donegan
    Hi Guys, I am using JQuery's nth-child selector to alter the margin on every 3rd div with a class of photo_post_thumbnail, but it alters it every 2nd div? Can anyone spot what I am doing wrong? Site http://www.clients.eirestudio.net/hatstand/wordpress/photos/ HTML markup <div class="postbox photo_post_thumbnail"> blah blah </div> <div class="postbox photo_post_thumbnail"> blah blah </div> <div class="postbox photo_post_thumbnail"> blah blah </div> JQuery Code $('.photo_post_thumbnail:nth-child(3n)').css('margin-right', '0px');

    Read the article

  • How to implement parent-child windows and pass values from child to parent?

    - by Andrew
    I am working on an ASP.NET MVC 2 application. In one of my data entry forms, I have an "employer" field which has a "search" link next to it. When a user clicks on this link, another window is opened with a search form. The user uses the search form to search for the correct employer. A list of employers is shown to the user. Currently, the user has to then copy and paste the correct employer from the child window into the original window. I want to implement it so that each employer search result in the child window is a hyperlink. The user would then click on the correct employer and then the correct employer value would be populated in the original parent window employer field. How would I go about implementing this in ASP.NET MVC 2?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >