Search Results

Search found 111 results on 5 pages for 'kristina childs'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • How do I get the child of a unique parent in ActionScript?

    - by Koen
    My question is about targeting a child with a unique parent. For example. Let's say I have a box people can move called box_mc and 3 platforms it can jump on called: Platform_1 Platform_2 Platform_3 All of these platforms have a child element called hit. Platform_1 Hit Platform_2 Hit Platform_3 Hit I use an array and a for each statement to detect if box_mc hits one of the platforms childs. var obj_arr:Array = [Platform_1, Platform_2, Platform_3]; for each(obj in obj_arr){ if(box_mc.hitTestObject(obj.hit)){ trace(obj + " " + obj.hit); box_mc.y = obj.hit.y - box_mc.height; } } obj seems to output the unique parent it is hitting but obj.hit ouputs hit, so my theory is that it is applying the change of y to all the childs called hit in the stage. Would it be possible to only detect the child of that specific parent?

    Read the article

  • *Browsing* iTunes University

    - by Kristina
    I recently discovered iTunes U and have been downloading a number of lectures, but I'd like to find more stuff in areas I'm interested in and iTunes U seems to want none of it. When I select a category of content to choose from - let's say Science - Physics - the only choices for browsing I seem to have are "Featured" and "New and Notable." I've looked around online and discovered that even the "See All" for these sections only shows a subsection of the entire collection for that category. There doesn't seem to be a regular "Browse" option like you would expect to find in such an application. Or is there? Does anyone here know if there is such a feature and, if so, where I can find it?

    Read the article

  • Cut in excel doesn't work, and copying tables from one program to another returns text

    - by Kristina
    My excel 2007 on Windows 7 operating system seems to have a probelm with regular cut function. when I highlight cells I want to cut and press cut (either on keyboard shortcut Ctrl+x, Home menu cut command, or from the right-click menu) cells start flashing for a split second and after that they only turn normal. When I want to paste them, they past as if copy function was used. If I try to rightclick to use function "insert cut cells" it is not one of the offered options at all. On my home computer I have same combination, Excel 2007 on windows 7 and it works just fine. COuld the problem be due to 64-bit win7 version at my job, and 32-bit version at home? Another problem is when I copy table from excel to word, in word pasting results in unformatted text instead of table as it was in excel. Did someone have such problems and can offer a solution? Thanx a lot.

    Read the article

  • What variable dictates position of non-focused elements in the roundabout plugin?

    - by kristina childs
    Part of the problem here is that i'm not sure what the best language to use in order to find the solution. I search and searched so please forgive if this is already a thread somewhere. I'm using the roundabout plugin to cycle through 3 divs. Each div is 794px wide, which makes the roundabout-in-focus element 794 and the two not in focus 315.218px wide, positioned so half of each is hidden by the in-focus div. This is all well and good, however the total width of the display needs to stay within 1000px (ideally 980px, but i can fudge if need be.) Basically I want to make the non-focused divs be 3/4 hidden by the in-focus div but for the life of me can't figure out what variables i need to edit in order to do it. Unfortunately it's not one of the many easily-changed options like z-index and minScale. i tried minScale but it's clear this isn't going to work. the plugin outputs this code: <li class="roundabout-moveable-item" style="position: absolute; left: -57px; top: 205px; width: 319.982px; height: 149.513px; opacity: 0.7; z-index: 146; font-size: 5.6px;"> i need to find out what changes the left positioning so it's shifted closer to the center of the stage, like this: <li class="roundabout-moveable-item" style="position: absolute; left: 5px; top: 205px; width: 319.982px; height: 149.513px; opacity: 0.7; z-index: 146; font-size: 5.6px;"> i tried playing with the positioning functions of the plugin but all that did was shift everything in tandem left or right. any help is greatly appreciated. this site is going to be awesome once i figure out all this jquery stuff! here is a link to my .js file: http://avalon.eaw.com/scripts/jquery.roundabout2.js i've got an overflow:hidden on the to help guide the positioning of those no-focused items.

    Read the article

  • make img height 100% of td

    - by kristina childs
    I'm creating an HTML email and since background images can't be used on anything but <body> thought I could get around this by making a border image 100% height within a cell. Perhaps it was wishful thinking? I've searched at the solutions that worked in the past no longer work in modern browsers. Is there any special trick to making this happen without setting a hard height for the cell? Here are the things I've tried so far: <td width="25" style="margin:0; padding:0;"> <img src="http://www.mysite.com/images/side-left.jpg" width="25" height="100%" alt="border" style="margin:0; padding:0; display: block;" /> </td> stretches the image to 100% height of the entire table (even though the table is nested in a <td width="25" height="100%" style="margin:0; padding:0;"> <div style="height:100%; diplay: block;"> <img src="http://www.mysite.com/images/side-left.jpg" width="25" height="100%" alt="border" style="margin:0; padding:0; display: block;" /> </div> </td> ditto <td width="25" height="1" style="margin:0; padding:0;"> <div style="height:100%; diplay: block;"> <img src="http://www.mysite.com/images/side-left.jpg" width="25" height="100%" alt="border" style="margin:0; padding:0; display: block;" /> </div> </td> setting a smaller td size does not force it to strectch as expected. bummer.

    Read the article

  • How Can I do this??

    - by ramadan2050
    I have a table records(ID, ParentID) containg this data ID ParentID 1 null 2 1 3 2 3 4 4 5 6 null 7 6 If you draw this table in hierarchy as a family 1,2,3,4,5 will be related to each other. I want to find a way, where I can pass an ID like 3 it give me the others family members using SQL or using C# 3 - result 1,2,4,5 2 - result 1,3,4,5 6 - result 7 and so on I want to find my parent and his parents and childs and my child and his childs LIKE THE EXAMPLES

    Read the article

  • Instance variables vs. class variables in Python

    - by deamon
    I have Python classes, of which I need only one instance at runtime, so it would be sufficient to have the attributes only once per class and not per instance. If there would be more than one instance (what won't happen), all instance should have the same configuration. I wonder which of the following options would be better or more "idiomatic" Python. Class variables: MyController(Controller): path = "something/" childs = [AController, BController] def action(request): pass Instance ariables: MyController(Controller): def __init__(self): self.path = "something/" self.childs = [AController, BController] def action(self, request): pass

    Read the article

  • Exposing members or make them private in Python?

    - by deamon
    Is there a general convention about exposing members in Python classes? I know that this is a case of "it depends", but maybe there is a rule of thumb. Private member: class Node: def __init__(self): self.__childs = [] def add_childs(self, *args): self.__childs += args node = Node() node.add_childs("one", "two") Public member: class Node2: def __init__(self): self.childs = [] node2 = Node2() node2.childs += "one", "two"

    Read the article

  • Sort data using DataView

    - by Kristina Fiedalan
    I have a DataGridView with column Remarks (Passed, Failed). For example, I want to show all the records Failed in the column Remarks using DataView, how do I do that? Thank you. Here's the code I'm working on: ds.Tables["Grades"].PrimaryKey = new DataColumn[] { ds.Tables["Grades"].Columns["StudentID"] }; DataRow dRow = ds.Tables["Students"].Rows.Find(txtSearch.Text); DataView dataView = new DataView(dt); dataView.RowFilter = "Remarks = " + txtSearch.Text; dgvReport.DataSource = dataView;

    Read the article

  • split sting in xsl for content with /

    - by kristina
    I have some content being pulled in from an external xml with xsl. in the xml the title is merged with the author with a backslash seperating them. How do I seperate the title and author in xsl so I can have them with differnt tags The Maze / Jane Evans to be The Maze Jane Evans Thanks

    Read the article

  • How can I create a qr// in Perl 5.12 from C?

    - by kristina
    This has been working for me in 5.8 and 5.10, but in 5.12 my code creates this weird non-qr object: # running "print Dumper($regex)" $VAR1 = bless( do{\(my $o = '')}, 'Regexp' ); Whereas printing a qr// not created by my code looks like this: # running "print Dumper(qr/foo/i)" $VAR1 = qr/(?i-xsm:foo)/; My code is basically: REGEXP *rx = re_compile(pattern, flags); SV *regex = sv_2mortal(newSVpv("",0)); sv_magic(regex, (SV*)rx, PERL_MAGIC_qr, 0, 0); stash = gv_stashpv("Regexp", 0); sv_bless(newRV((SV*)regex), stash); Anyone know how to correctly create a regex from a string in 5.12?

    Read the article

  • SRAM Cell Diagram - Can someone explain this a bit more clearly? ( From COMP1917 @ UNSW: Lecture 2 o

    - by Kristina
    I've begun watching a series of first year lectures from the University of New South Wales (UNSW) in Australia, and I'm a bit perplexed by the instructors explanation of how an SRAM gate works. I realize this isn't exactly "programming-related" but since it comes from a series of lectures relating to computing and programming, I thought StackOverflow may be able to help (reddit failed me entirely). In this lecture beginning at around 32:12, Richard (the lecturer) tries to explain how a "latch gate" works within SRAM. Although his students seem to keep up, I feel I'm missing something crucial which is preventing the concept from really "clicking" in my brain. For convenience, I've added the image from the video below: Thanks in advance for any help you can provide, but if this question doesn't fit your view of "programming-related" could you please provide an alternate forum for this in a comment when you cast your close vote? Thanks!

    Read the article

  • If file contains certain text, how can I extract a string from the file and input it into a cell? (VBA)

    - by Kristina Kotonika
    Say I have the following path and file name: P:\Actuary\Cash Flow Forecast\Annual and Quarterly Budget Data\ECMQA 2012Q1.xls I want to write an if then statement that does the following (not sure if my statement is set up properly): If InStr(1, "P:\Actuary\Cash Flow Forecast\Annual and Quarterly Budget Data\ECMQA 2012Q1.xls", "QA", vbTextCompare) > 0 Then BD.Sheets("Sheet1").Range("C2").value = "2012Q1" End If Instead of just inputting "2012Q1", I want it to automatically read this from the file. The thing is I am actually looping through 12 or so files and there's two types, "ECMQA 2012Q1.xls" (or ECMQB 2012Q2.xls and so on) AND "ECM Annual Budget 2012.xlsx" If my file is the annual one (If file contains "Annual"), then I want: BD.Sheets("Sheet1").Range("C2").value = "2012" And i want it to read this from the actual file, same as the other one...not me putting in "2012" Is there a way to do this? Any help will be appreciated!

    Read the article

  • How can I make this script output each categories item per category [closed]

    - by Duice352
    Ok so here is the deal currently this script outputs all the products in a parent category as well as the products in the child categories. What i would like to do is seperate the output based on child categories. All the child categories are in the array $children and the string $childs. The parent category is the first array element of $children with the following ones being the actual children. The category names are stored in the database $result as " $cat_name ". I want to first Display the cat_name then the products that fall in that category and then display the next child cat_name and items, ect. Any suggestions of how to manipulate the while loop that cylcles through the rows? <?php $productsPerRow = 3; $productsPerPage = 15; //$productList = getProductList($catId); $children = array_merge(array($catId), getChildCategories(NULL, $catId)); $childs = ' (' . implode(', ', $children) . ')'; $sql = "SELECT pd_id, pd_name, pd_price, pd_thumbnail, pd_qty, c.cat_id, c.cat_name FROM tbl_product pd, tbl_category c WHERE pd.cat_id = c.cat_id AND pd.cat_id IN $childs ORDER BY pd_name"; $result = dbQuery(getPagingQuery($sql, $productsPerPage)); $pagingLink = getPagingLink($sql, $productsPerPage, "c=$catId"); $numProduct = dbNumRows($result); // the product images are arranged in a table. to make sure // each image gets equal space set the cell width here $columnWidth = (int)(100 / $productsPerRow); ?> <p><?php if(isset($_GET['m'])){echo "You must select a model first! After you select your model you can customize your dragster parts.";} ?> </p> <p align="center"><?php echo $pagingLink; ?></p> <table width="100%" border="0" cellspacing="0" cellpadding="20"> <?php if ($numProduct > 0 ) { $i = 0; while ($row = dbFetchAssoc($result)) { extract($row); if ($pd_thumbnail) { $pd_thumbnail = WEB_ROOT . 'images/product/' .$pd_thumbnail; } else { $pd_thumbnail = 'images/no-image-small.png'; } if ($i % $productsPerRow == 0) { echo '<tr>'; } // format how we display the price $pd_price = displayAmount($pd_price); echo "<td width=\"$columnWidth%\" align=\"center\"><a href=\"" . $_SERVER['PHP_SELF'] . "?c=$catId&p=$pd_id" . "\"><img src=\"$pd_thumbnail\" border=\"0\"><br>$pd_name</a><br>Price : $pd_price <br> $cat_id - $cat_name"; // if the product is no longer in stock, tell the customer if ($pd_qty <= 0) { echo "<br>Out Of Stock"; } echo "</td>\r\n"; if ($i % $productsPerRow == $productsPerRow - 1) { echo '</tr>'; } $i += 1; } if ($i % $productsPerRow > 0) { echo '<td colspan="' . ($productsPerRow - ($i % $productsPerRow)) . '">&nbsp;</td>'; }

    Read the article

  • condition in recursion - best practise

    - by mo
    hi there! what's the best practise to break a loop? my ideas were: Child Find(Parent parent, object criteria) { Child child = null; foreach(Child wannabe in parent.Childs) { if (wannabe.Match(criteria)) { child = wannabe; break; } else { child = Find(wannabe, criteria); } } return child; } or Child Find(Parent parent, object criteria) { Child child = null; var conditionator = from c parent.Childs where child != null select c; foreach(Child wannabe in conditionator) { if (wannabe.Match(criteria)) { child = wannabe; } else { child = Find(wannabe, criteria); } } return child; } or Child Find(Parent parent, object criteria) { Child child = null; var enumerator = parent.Childs.GetEnumerator(); while(child != null && enumerator.MoveNext()) { if (enumerator.Current.Match(criteria)) { child = wannabe; } else { child = Find(wannabe, criteria); } } return child; } what do u think, any better ideas? i'm looking for the niciest solution :D mo

    Read the article

  • Grails - Recursive computing call "StackOverflowError" and don't update on show

    - by Kedare
    Hello, I have a little problem, I have made a Category domain on Grails, but I want to "cache" the string representation on the database by generating it when the representation field is empty or NULL (to avoid recursive queries at each toString), here is the code : package devkedare class Category { String title; String description; String representation; Date dateCreated; Date lastUpdate; Category parent; static constraints = { title(blank:false, nullable:false, size:2..100); description(blank:true, nullable:false); dateCreated(nullable:true); lastUpdate(nullable:true); autoTimestamp: true; } static hasMany = [childs:Category] @Override String toString() { if((!this.representation) || (this.representation == "")) { this.computeRepresentation(true) } return this.representation; } String computeRepresentation(boolean updateChilds) { if(updateChilds) { for(child in this.childs) { child.representation = child.computeRepresentation(true); } } if(this.parent) { this.representation = "${this.parent.computeRepresentation(false)}/${this.title}"; } else { this.representation = this.title } return this.representation; } void beforeUpdate() { this.computeRepresentation(true); } } There is 2 problems : It don't update the representation when the representation if NULL or empty and toString id called, it only update it on save, how to fix that ? On some category, updating it throw a StackOverflowError, here is an example of my actual category table as CSV : Uploaded the csv file here, pasting csv looks buggy: http://kedare.free.fr/Dist/01.csv Updating the representation works everywhere except on "IT" that throw a StackOverlowError (this is the only category that has many childs). Any idea of how can I fix those 2 problems ? Thank you !

    Read the article

  • How to create a Binary Tree from a General Tree?

    - by mno4k
    I have to solve the following constructor for a BinaryTree class in java: BinaryTree(GeneralTree<T> aTree) This method should create a BinaryTree (bt) from a General Tree (gt) as follows: Every Vertex from gt will be represented as a leaf in bt. If gt is a leaf, then bt will be a leaf with the same value as gt If gt is not a leaf, then bt will be constructed as an empty root, a left subTree (lt) and a right subTree (lr). Lt is a stric binary tree created from the oldest subtree of gt (the left-most subtree) and lr is a stric binary tree created from gt without its left-most subtree. The frist part is trivial enough, but the second one is giving me some trouble. I've gotten this far: public BinaryTree(GeneralTree<T> aTree){ if (aTree.isLeaf()){ root= new BinaryNode<T>(aTree.getRootData()); }else{ root= new BinaryNode<T>(null); // empty root LinkedList<GeneralTree<T>> childs = aTree.getChilds(); // Childs of the GT are implemented as a LinkedList of SubTrees child.begin(); //start iteration trough list BinaryTree<T> lt = new BinaryTree<T>(childs.element(0)); // first element = left-most child this.addLeftChild(lt); aTree.DeleteChild(hijos.elemento(0)); BinaryTree<T> lr = new BinaryTree<T>(aTree); this.addRightChild(lr); } } Is this the right way? If not, can you think of a better way to solve this? Thank you!

    Read the article

  • Rails 3 HABTM Strange Association: Project and Employee in a tree.

    - by Mauricio
    Hi guys I have to adapt an existing model to a new relation. I have this: A Project has many Employees. the Employees of a Project are organized in some kind of hierarchy (nothing fancy, I resolved this adding a parent_id for each employee to build the 'tree') class Employee < AR:Base belongs_to :project belongs_to :parent, :class_name => 'Employee' has_many :childs, :class_name => 'Employee', :foreign_column => 'parent_id' end class Project < AR:Base has_many :employees, end That worked like a charm, now the new requirement is: The Employees can belong to many Projects at the same time, and the hierarchy will be different according to the project. So I though I will need a new table to build the HABTM, and a new class to access the parent_id to build the tree. Something like class ProjectEmployee < AR:Base belongs_to :project belongs_to :employee belongs_to :parent, :class_name => 'Employee' # <--- ?????? end class Project < AR:Base has_many :project_employee has_many :employees, :through => :project_employee end class Employee < AR:Base has_many :project_employee has_many :projects, :through => :project_employee end How can I access the parent and the childs of an employee for a given project? I need to add and remove childs as wish from the employees of a project. Thank you!

    Read the article

  • merge 2 php arrays which aren't of the same length by value

    - by Iain Urquhart
    Excuse me if this has indeed been asked before, I couldn't see anything that fitted my needs out of the dozens of similar titled posts out there ;) I'm trying to merge 2 php arrays which aren't of the same length, and merge them on a value that exists from identical key = values within both arrays. My first query produces an array from a nested set: array ( 1 => array ( 'node_id' => 1, 'lft' => 1, 'rgt' => 4, 'moved' => 0, 'label' => 'Home', 'entry_id' => 1, 'template_path' => '', 'custom_url' => '/', 'extra' => '', 'childs' => 1, 'level' => 0, 'lower' => 0, 'upper' => 0 ), 2 => array ( 'node_id' => 2, 'lft' => 2, 'rgt' => 3, 'moved' => 0, 'label' => 'Home', 'entry_id' => NULL, 'template_path' => '', 'custom_url' => 'http://google.com/', 'extra' => '', 'childs' => 0, 'level' => 1, 'lower' => 0, 'upper' => 0 ) ); My second array returns some additional key/values I'd like to insert to the above array: array ( 'entry_id' => 1, 'entry_title' => 'This is my title', ); I want to merge both of the arrays inserting the additional information into those that match on the key 'entry_id', as well as keeping the sub arrays which don't match. So, by combining the two arrays, I'd end up with array ( 1 => array ( 'node_id' => 1, 'lft' => 1, 'rgt' => 4, 'moved' => 0, 'label' => 'Home', 'entry_id' => 1, 'template_path' => '', 'custom_url' => '/', 'extra' => '', 'childs' => 1, 'level' => 0, 'lower' => 0, 'upper' => 0, 'entry_title' => 'This is my title' ), 2 => array ( 'node_id' => 2, 'lft' => 2, 'rgt' => 3, 'moved' => 0, 'label' => 'Home', 'entry_id' => NULL, 'template_path' => '', 'custom_url' => 'http://google.com/', 'extra' => '', 'childs' => 0, 'level' => 1, 'lower' => 0, 'upper' => 0, 'entry_title' => NULL ) ); Actually, writing this out makes me think I should do it via sql... Any help/advice greatly appreciated...

    Read the article

  • Moving items from one tableView to another tableView with extra's

    - by Totumus Maximus
    Let's say I have 2 UITableViews next to eachother on an ipad in landscape-mode. Now I want to move multiple items from one tableView to the other. They are allowed to be inserted on the bottom of the other tableView. Both have multiSelection activated. Now the movement itself is no problem with normal cells. But in my program each cell has an object which contains the consolidationState of the cell. There are 4 states a cell can have: Basic, Holding, Parent, Child. Basic = an ordinary cell. Holding = a cell which contains multiple childs but which wont be shown in this state. Parent = a cell which contains multiple childs and are shown directly below this cell. Child = a cell created by the Parent cell. The object in each cell also has some array which contains its children. The object also holds a quantityValue, which is displayed on the cell itself. Now the movement gets tricky. Holding and Parent cells can't move at all. Basic cells can move freely. Child cells can move freely but based on how many Child cells are left in the Parent. The parent will change or be deleted all together. If a Parent cell has more then 1 Child cell left it will stay a Parent cell. Else the Parent has no or 1 Child cell left and is useless. It will then be deleted. The items that are moved will always be of the same state. They will all be Basic cells. This is how I programmed the movement: *First I determine which of the tableViews is the sender and which is the receiver. *Second I ask all indexPathsForSelectedRows and sort them from highest row to lowest. *Then I build the data to be transferred. This I do by looping through the selectedRows and ask their object from the sender's listOfItems. *When I saved all the data I need I delete all the items from the sender TableView. This is why I sorted the selectedRows so I can start at the highest indexPath.row and delete without screwing up the other indexPaths. *When I loop through the selectedRows I check whether I found a cell with state Basic or Child. *If its a Basic cell I do nothing and just delete the cell. (this works fine with all Basic Cells) *If its a Child cell I go and check it's Parent cell immidiately. Since all Child cells are directly below the Parent cell and no other the the Parent's Childs are below that Parent I can safely get the path of the selected Childcell and move upwards and find it's Parent cell. When this Parent cell is found (this will always happen, no exceptions) it has to change accordingly. *The Parent cell will either be deleted or the object inside will have its quantity and children reduced. *After the Parent cell has changed accordingly the Child cell is deleted similarly like the Basic cells *After the deletion of the cells the receiver tableView will build new indexPaths so the movedObjects will have a place to go. *I then insert the objects into the listOfItems of the receiver TableView. The code works in the following ways: Only Basic cells are moved. Basic cells and just 1 child for each parent is moved. A single Basic/Child cell is moved. The code doesn't work when: I select more then 1 or all childs of some parent cell. The problem happens somewhere into updating the parent cells. I'm staring blindly at the code now so maybe a fresh look will help fix things. Any help will be appreciated. Here is the method that should do the movement: -(void)moveSelectedItems { UITableView *senderTableView = //retrieves the table with the data here. UITableView *receiverTableView = //retrieves the table which gets the data here. NSArray *selectedRows = senderTableView.indexPathsForSelectedRows; //sort selected rows from lowest indexPath.row to highest selectedRows = [selectedRows sortedArrayUsingSelector:@selector(compare:)]; //build up target rows (all objects to be moved) NSMutableArray *targetRows = [[NSMutableArray alloc] init]; for (int i = 0; i<selectedRows.count; i++) { NSIndexPath *path = [selectedRows objectAtIndex:i]; [targetRows addObject:[senderTableView.listOfItems objectAtIndex:path.row]]; } //delete rows at active for (int i = selectedRows.count-1; i >= 0; i--) { NSIndexPath *path = [selectedRows objectAtIndex:i]; //check what item you are deleting. act upon the status. Parent- and HoldingCells cant be selected so only check for basic and childs MyCellObject *item = [senderTableView.listOfItems objectAtIndex:path.row]; if (item.consolidatedState == ConsolidationTypeChild) { for (int j = path.row; j >= 0; j--) { MyCellObject *consolidatedItem = [senderTableView.listOfItems objectAtIndex:j]; if (consolidatedItem.consolidatedState == ConsolidationTypeParent) { //copy the consolidated item but with 1 less quantity MyCellObject *newItem = [consolidatedItem copyWithOneLessQuantity]; //creates a copy of the object with 1 less quantity. if (newItem.quantity > 1) { newItem.consolidatedState = ConsolidationTypeParent; [senderTableView.listOfItems replaceObjectAtIndex:j withObject:newItem]; } else if (newItem.quantity == 1) { newItem.consolidatedState = ConsolidationTypeBasic; [senderTableView.listOfItems removeObjectAtIndex:j]; MyCellObject *child = [senderTableView.listOfItems objectAtIndex:j+1]; child.consolidatedState = ConsolidationTypeBasic; [senderTableView.listOfItems replaceObjectAtIndex:j+1 withObject:child]; } else { [senderTableView.listOfItems removeObject:consolidatedItem]; } [senderTableView reloadData]; } } } [senderTableView.listOfItems removeObjectAtIndex:path.row]; } [senderTableView deleteRowsAtIndexPaths:selectedRows withRowAnimation:UITableViewRowAnimationTop]; //make new indexpaths for row animation NSMutableArray *newRows = [[NSMutableArray alloc] init]; for (int i = 0; i < targetRows.count; i++) { NSIndexPath *newPath = [NSIndexPath indexPathForRow:i+receiverTableView.listOfItems.count inSection:0]; [newRows addObject:newPath]; DLog(@"%i", i); //scroll to newest items [receiverTableView setContentOffset:CGPointMake(0, fmaxf(receiverTableView.contentSize.height - recieverTableView.frame.size.height, 0.0)) animated:YES]; } //add rows at target for (int i = 0; i < targetRows.count; i++) { MyCellObject *insertedItem = [targetRows objectAtIndex:i]; //all moved items will be brought into the standard (basic) consolidationType insertedItem.consolidatedState = ConsolidationTypeBasic; [receiverTableView.ListOfItems insertObject:insertedItem atIndex:receiverTableView.ListOfItems.count]; } [receiverTableView insertRowsAtIndexPaths:newRows withRowAnimation:UITableViewRowAnimationNone]; } If anyone has some fresh ideas of why the movement is bugging out let me know. If you feel like you need some extra information I'll be happy to add it. Again the problem is in the movement of ChildCells and updating the ParentCells properly. I could use some fresh looks and outsider ideas on this. Thanks in advance. *updated based on comments

    Read the article

  • Multi-Threading - Cleanup strategy at program end

    - by weismat
    What is the best way to finish a multi-threaded application in a clean way? I am starting several socket connections from the main thread in seperate sockets and wait until the end of my business day in the main thread and use currently System.Environment.Exit(0) to terminate it. This leads to an unhandled execption in one of the childs. Should I stop the threads from the list? I have been reluctant to implement any real stopping in the childs yet, thus I am wondering about the best practice. The sockets are all wrapped nicely with proper destructors for logging out and closing, but it still leads to errors.

    Read the article

  • jQuery li:has(ul) selector issue

    - by sushil bharwani
    I was creating a tree using UL LI list and jQuery. I used a jQuery Selector jQuery(li:has(ul)) to find all the list nodes having childs and then added a click event to it. jQuery(li:has(ul)).click(function(event) { jQuery(this).children.toggle(); jQuery(this).css("cursor","hand"); }); This works for me except i dont understand why i get a cursor hand and click event triggering even when i take mouse pointer to childs of my selected li <li> Parent // it works here that is fine <ul> <li> child1 // it works here i dont understand need explanation </li> <li> child2 // it works here i dont understand need explanation </li> </ul> </li>

    Read the article

  • PHP: documentElemnt->childNodes warning

    - by jun
    $xml = file_get_contents(example.com); $dom = new DomDocument(); $dom->loadXML($xml); $items = $dom->documentElement; foreach($items->childNodes as $item) { $childs = $item->childNodes; foreach($childs as $i) { echo $i->nodeValue . "<br />"; } } Now I get this warning in every 2nd foreach: Warning: Invalid argument supplied for foreach() in file_example.php on line 14 Please help guys. Thanks!

    Read the article

  • PHP: documentElement->childNodes warning

    - by jun
    $xml = file_get_contents(example.com); $dom = new DomDocument(); $dom->loadXML($xml); $items = $dom->documentElement; foreach($items->childNodes as $item) { $childs = $item->childNodes; foreach($childs as $i) { echo $i->nodeValue . "<br />"; } } Now I get this warning in every 2nd foreach: Warning: Invalid argument supplied for foreach() in file_example.php on line 14 Please help guys. Thanks!

    Read the article

  • C++ virtual + protected?

    - by user346113
    Hi, In C++, I have a base class A, a sub class B. Both have the virtual method Visit. I would like to redefine 'Visit' in B, but B need to access the 'Visit' function of each A (and all subclass to). I have something like that, but it tell me that B cannot access the protected member of A! But B is a A too :-P So, what can I do? class A { protected: virtual Visit(...); } class B : public class A { protected: vector<A*> childs; Visit(...); } B::Visit(...) { foreach(A* a in childs) { a->Visit(...); } } Thx

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >