Search Results

Search found 6420 results on 257 pages for 'mathieu parent'.

Page 55/257 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • issue in ObservableCollection

    - by prince23
    hi, i have an lsit with these data i have a class called information.cs with these properties name,school, parent ex data name school parent kumar fes All manju fes kumar anu frank kumar anitha jss All rohit frank manju anill vijaya manju vani jss kumar soumya jss kumar madhu jss rohit shiva jss rohit vanitha jss anitha anu jss anitha now taking this as an input i wanted the output to be formated with a Hierarchical data when parent is all means it is the topmost level kumar fes All. what i need to do here is i need to create an object[0] and then check in list whether kumar exists as a parent in the list if it exista then add those items as under the object[0] as a parent i need to create one more oject under **manju fes kumar anu frank kumar** if you see this class file its shows how data is formatted. public class SampleProjectData { public static ObservableCollection GetSampleData() { DateTime dtS = DateTime.Now; ObservableCollection<Product> teams = new ObservableCollection<Product>(); teams.Add(new Product() { PDName = "Product1", OverallStartTime = dtS, OverallEndTime = dtS + TimeSpan.FromDays(3), }); Project emp = new Project() { PName = "Project1", OverallStartTime = dtS + TimeSpan.FromDays(1), OverallEndTime = dtS + TimeSpan.FromDays(6) }; emp.Tasks.Add(new Task() { StartTime = dtS, EndTime = dtS + TimeSpan.FromDays(2), TaskName = "John's Task 3" }); emp.Tasks.Add(new Task() { StartTime = dtS + TimeSpan.FromDays(3), EndTime = dtS + TimeSpan.FromDays(4), TaskName = "John's Task 2" }); teams[0].Projects.Add(emp); } return teams; }

    Read the article

  • doubt in JSP:Include

    - by raja
    Hi All: I have added a code which will include child jsp using jsp:include. The problem i am facing is that the code present in child code is not executing. Below is the code iam using it now JSPF File: <jsp:include page="X.jsp" flush="true"> </jsp:include> the above code is present in a file named "A.jspf" which is included in another jsp file named "Parent.jsp". X.jsp: <%@ page import="java.util.*" %> <% System.out.println("********Child JSP"); %> Whenever i execute the parent file "Parent.jsp", all the other contents given in Parent.jsp and A.jspf is displaying except the content present in X.jsp. No error is displaying. Both X.jsp and A.jspf are present in same folder only. Please help me to resolve this issue. Thanks in advance.

    Read the article

  • Using PyQt signals correctly

    - by Skilldrick
    A while ago I did some work in Qt for C++; now I'm working with PyQt. I have a subclass of QStackedWidget, and inside that a subclass of QWidget. In the QWidget I want to click a button that goes to the next page of the QStackedWidget. My (simplified) approach is as follows: class Stacked(QtGui.QStackedWidget): def __init__(self, parent=None): QtGui.QStackedWidget.__init__(self, parent) self.widget1 = EventsPage() self.widget1.nextPage.connect(self.nextPage) self.widget2 = MyWidget() self.addWidget(self.widget1) self.addWidget(self.widget2) def nextPage(self): self.setCurrentIndex(self.currentIndex() + 1) class EventsPage(QtGui.QWidget): nextPage = QtCore.pyqtSignal() def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.continueButton = QtGui.QPushButton('Continue') self.continueButton.clicked.connect(self.nextPage) So, basically, I'm connecting the continueButton clicked signal to the EventsPage nextPage signal, which I'm then connecting in Stacked to the nextPage method. I could just delve into the internals of EventsPage in Stacked and connect self.widget1.continueButton.clicked, but that seemed to completely defeat the purpose of signals and slots. So does this approach make sense, or is there a better way?

    Read the article

  • WPF DataGrid default column types

    - by Trindaz
    Hi, I'm using a DataGrid to display 2 possible types of DataRow in a DataTable. One type has the column Parent = NULL and the other has Parent set to another DataRow in the same DataTable. The list of column in the DataTable is always different, so explicitly describing each column is not possible. I want to display a UserControl in every cell of the Parent = DataRow rows, and default Text / Check boxes for the Parent = NULL rows. My first strategy is to try and set the default Column type for all automatically generated columns to be a DataGridTemplateColumn, regardless of datatype, so that I can use styles to then use either my UserControl or CheckBox or TextBox where required. How can I do this? More importantly, though, is there a better strategy than this? Cheers, Dave

    Read the article

  • How to use SSL Web Services in a Rails application

    - by Mathieu
    Hi, I having a hard time to consume this webservice https://www.arello.com/webservice/verify.cfc?wsdl in my rails application. I successfully generated the ruby files with the wsdl2ruby.rb but when un run the generated script I get the following error: at depth 0 - 20: unable to get local issuer certificate OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed I also tried to connect via this script but same issue require 'http-access2' client = HTTPAccess2::Client.new() client.ssl_config.set_trust_ca('/arello.cert') puts client.get('https://www.arello.com/webservice/verify.cfc?wsdl').content Any ideas? Thanks

    Read the article

  • Regular Expression Fill-Down

    - by richardtallent
    I have a plain text file something like this: Ford\tTaurus F-150 F-250 Toyota\tCamry Corsica In other words, a two-level hierarchy where the first child is on the same line as the parent, but subsequent children on lines following, distinguished from being a parent by a two-space prefix (\t above represents a literal tab in the text). I need to convert to this using RegEx: Ford\tTaurus Ford\tF-150 Ford\tF-250 Toyota\tCamry Toyota\tCorsica So, I need to capture the parent (text between \r\n and \t not starting with \s\s), and apply that in the middle of any \r\n\s\s found until the next parent. I have a feeling this can be done with some sort of nested groups, but I think I need more caffeine or something, can't seem to work out the pattern. (Using .NET with IgnoreWhitespace off and Multiline off)

    Read the article

  • PHP SimpleXML - Remove xpath node

    - by Peter John
    Hi, I'm a little confused as to how i can delete a parent node of something which i can find via an xpath search: $xml = simplexml_load_file($filename); $data = $xml->xpath('//items/info[item_id="' . $item_id . '"]'); $parent = $data[0]->xpath("parent::*"); unset($parent); So, it finds the item id, no problems there - but the unset isnt getting rid of this <items> node. All i want to do is remove the <items>...</items> for this product. Obviously, there are loads of <items> nodes in the xml file so it cant do unset($xml->data->items) as that would delete everything. Any ideas much appreciated :-)

    Read the article

  • Conditional Drag and Drop Operations in Flex/AS3 Tree

    - by user163757
    Good day everyone. I am currently working with a hierarchical tree structure in AS3/Flex, and want to enable drag and drop capabilities under certain conditions: Only parent/top level nodes can be moved Parent/top level nodes must remain at this level; they can not be moved to child nodes of other parent nodes Using the dragEnter event of the tree, I am able to handle condition 1 easily. private function onDragEnter(event:DragEvent):void { // only parent nodes (map layers) are moveable event.preventDefault(); if(toc.selectedItem.hasOwnProperty("layer")) DragManager.acceptDragDrop(event.target as UIComponent); else DragManager.showFeedback(DragManager.NONE); } Handling the second condition is proving to be a bit more difficult. I am pretty sure the dragOver event is the place for logic. I have been experimenting with calculateDropIndex, but that always gives me the index of the parent node, which doesn't help check if the potential drop location is acceptable or not. Below is some pseudo code of what I am looking to accomplish. private function onDragOver(e:DragEvent):void { // if potential drop location has parents // dont allow drop // else // allow drop } Can anyone provide advice how to implement this?

    Read the article

  • XML Deserialization of complex object

    - by nils_gate
    I have xml structure like this: <Group id="2" name="Third" parentid="0" /> <Group id="6" name="Five" parentid="4" /> <Group id="3" name="Four" parentid="2" /> <Group id="4" name="Six" parentid="1" /> parent is denotes Group's Id. The Constructor of Group reads like: public Group(string name, int ID, Group parent) While De-serializing, how do I get parent using Id and pass into group?

    Read the article

  • JSF Render response programmatically

    - by Shamik
    I have one parent page with a parentManagedBean (attached to Session Scope). On click of a button on this parent page, one popup comes which has a childManagedBean (attached to Request scope). Now ChildManagedBean holds a reference to parentManaged bean through JSF's managed property facility. On this popup window, user selects some option which populates a large value object. I use the managed property of childManagedBean to set the values from this large object to that of parentManagedBean. Problem is - The parent page shows a link, on click of which a popup comes, on selection of the popup, the popup disappears and set the values to the parentManaged bean. So far so good, but the newly set values need to appear on the parent page. This is where I am stuck. How to programmatically render the master page/render page when I am at the child managed bean? Is there a way I can get handle of the parent page and refresh it? Note: I'm using JSF 1.1 EDIT- After following the solution of "resubmit-ing the form" from javascript, I am seeing that the old form is getting resubmitting which overwrites all of my changed values.

    Read the article

  • Jquery droppable live disabling/enabling

    - by Cameron
    I have a some draggables in a list of droppables (1 draggable per droppable li). When I move a draggable from one droppable to another free droppable, I want to diable the receiving droppable, and enable the droppable it is leaving from. In firebug the droppable class gets removed – but the functionality of the droppable remains. I have a feeling I need to use live() somehow, but could use a leg-up. $(function() { $(".user").draggable({ revert : true, revertDuration : 200 }); $("li.droppable").droppable({ accept : ".user", hoverClass : "drophover", drop: function(event, ui) { var position = this.getAttribute("id").replace("position_", ""), user_id = ui.draggable.attr("id").replace("user_", ""); droppable = this parent = ui.draggable.parent() $.ajax({ url : "users/"+user_id+"", type : "POST", dataType: "JSON", data : ({ "position" : position, "_method" : "PUT" }), success : function() { $(ui.draggable).parent().addClass("droppable"); $(ui.draggable).appendTo(droppable); $(parent).removeClass("droppable"); } }); } }); });

    Read the article

  • Should I worry about circular references in Python?

    - by bodacydo
    Suppose I have code that maintains parent/children structure. In such a structure I get circular references, where child points to parent and parent points to child. Should I worry about them? I'm using Python 2.5. I am concerned that they will not be garbage collected and the application will eventually consume all memory. Thanks, Boda Cydo.

    Read the article

  • T-SQL Dynamic SQL and Temp Tables

    - by George
    It looks like #temptables created using dynamic SQL via the EXECUTE string method have a different scope and can't be referenced by "fixed" SQLs in the same stored procedure. However, I can reference a temp table created by a dynamic SQL statement in a subsequence dynamic SQL but it seems that a stored procedure does not return a query result to a calling client unless the SQL is fixed. A simple 2 table scenario: I have 2 tables. Let's call them Orders and Items. Order has a Primary key of OrderId and Items has a Primary Key of ItemId. Items.OrderId is the foreign key to identify the parent Order. An Order can have 1 to n Items. I want to be able to provide a very flexible "query builder" type interface to the user to allow the user to select what Items he want to see. The filter criteria can be based on fields from the Items table and/or from the parent Order table. If an Item meets the filter condition including and condition on the parent Order if one exists, the Item should be return in the query as well as the parent Order. Usually, I suppose, most people would construct a join between the Item table and the parent Order tables. I would like to perform 2 separate queries instead. One to return all of the qualifying Items and the other to return all of the distinct parent Orders. The reason is two fold and you may or may not agree. The first reason is that I need to query all of the columns in the parent Order table and if I did a single query to join the Orders table to the Items table, I would be repoeating the Order information multiple times. Since there are typically a large number of items per Order, I'd like to avoid this because it would result in much more data being transfered to a fat client. Instead, as mentioned, I would like to return the two tables individually in a dataset and use the two tables within to populate a custom Order and child Items client objects. (I don't know enough about LINQ or Entity Framework yet. I build my objects by hand). The second reason I would like to return two tables instead of one is because I already have another procedure that returns all of the Items for a given OrderId along with the parent Order and I would like to use the same 2-table approach so that I could reuse the client code to populate my custom Order and Client objects from the 2 datatables returned. What I was hoping to do was this: Construct a dynamic SQL string on the Client which joins the orders table to the Items table and filters appropriate on each table as specified by the custom filter created on the Winform fat-client app. The SQL build on the client would have looked something like this: TempSQL = " INSERT INTO #ItemsToQuery OrderId, ItemsId FROM Orders, Items WHERE Orders.OrderID = Items.OrderId AND /* Some unpredictable Order filters go here */ AND /* Some unpredictable Items filters go here */ " Then, I would call a stored procedure, CREATE PROCEDURE GetItemsAndOrders(@tempSql as text) Execute (@tempSQL) --to create the #ItemsToQuery table SELECT * FROM Items WHERE Items.ItemId IN (SELECT ItemId FROM #ItemsToQuery) SELECT * FROM Orders WHERE Orders.OrderId IN (SELECT DISTINCT OrderId FROM #ItemsToQuery) The problem with this approach is that #ItemsToQuery table, since it was created by dynamic SQL, is inaccessible from the following 2 static SQLs and if I change the static SQLs to dynamic, no results are passed back to the fat client. 3 around come to mind but I'm look for a better one: 1) The first SQL could be performed by executing the dynamically constructed SQL from the client. The results could then be passed as a table to a modified version of the above stored procedure. I am familiar with passing table data as XML. If I did this, the stored proc could then insert the data into a temporary table using a static SQL that, because it was created by dynamic SQL, could then be queried without issue. (I could also investigate into passing the new Table type param instead of XML.) However, I would like to avoid passing up potentially large lists to a stored procedure. 2) I could perform all the queries from the client. The first would be something like this: SELECT Items.* FROM Orders, Items WHERE Order.OrderId = Items.OrderId AND (dynamic filter) SELECT Orders.* FROM Orders, Items WHERE Order.OrderId = Items.OrderId AND (dynamic filter) This still provides me with the ability to reuse my client sided object-population code because the Orders and Items continue to be returned in two different tables. I have a feeling to, that I might have some options using a Table data type within my stored proc, but that is also new to me and I would appreciate a little bit of spoon feeding on that one. If you even scanned this far in what I wrote, I am surprised, but if so, I woul dappreciate any of your thoughts on how to accomplish this best.

    Read the article

  • Make overflow hidden when shrinking div

    - by johnnietheblack
    I have a div with an image in it, and the image is too large for the div. I have solved the overflow problem with the obvious CSS overflow:hidden trick. But, the problem is that when the div's parent resizes (shrinks), the div holding the image won't shrink because of the image in it. Is there a way to have a resizable div with an image in it (almost like a background image) that overflows? MY DIV STRUCTURE: <div id="parent"> <div id="image_holder"> <!-- this image will inevitably be larger than its parent div --> <img src="too_big_for_div.jpg" /> </div> </div> MY CSS: #parent { width:100%;} #image_holder { width:100%; overflow:hidden;} The #image_holder div will not resize to a smaller dimension now. Any ideas?

    Read the article

  • Ruby on rails session = nil

    - by Mathieu
    Hi, In a controller I have 2 actions def action1 session[:test]="test" render :text => session[:test] # output test end def action2 render :text => session[:test] # output nil end I perform first action1 so the session is set Then I perform action2 but session[:test] is nil So what am I doing wrong?

    Read the article

  • WPF and routed event

    - by user109534
    I have a WPF window, which has a button that is inside a stackPanel, which is inside another stackPanel I wrote an event handler for the button for the MouseDown event. I want to execute this eventHandler three times for the button and the parent (stack panel) and the parent's parent How can I achieve that with the routed event, by writing only one event handler? I don't want to repeat the event handler code. Thanks

    Read the article

  • Rails : soap4r - How to run wsdl2ruby.rb

    - by Mathieu
    Hi, I just installed the gem soap4r on my mac and now I need to run wsdl2ruby.rb --wsdl https://www.arello.com/webservice/verify.cfc?wsdl --type client --force but I have this error : -bash: wsdl2ruby.rb: command not found What did I miss? Thanks

    Read the article

  • Using Tkinter in python to edit the title bar

    - by Dan
    I am trying to add a custom title to a window but I am having troubles with it. I know my code isn't right but when I run it, it creates 2 windows instead, one with just the title tk and another bigger window with "Simple Prog". How do I make it so that the tk window has the title "Simple Prog" instead of having a new additional window. I dont think I'm suppose to have the Tk() part because when i have that in my complete code, there's an error from tkinter import Tk, Button, Frame, Entry, END class ABC(Frame): def __init__(self,parent=None): Frame.__init__(self,parent) self.parent = parent self.pack() ABC.make_widgets(self) def make_widgets(self): self.root = Tk() self.root.title("Simple Prog")

    Read the article

  • iPhone Development - Query related records using CoreData

    - by Mustafa
    I have a case where i have three entities with one-to-many and one-to-many relationships: Entity A (Entity B relationhip), Entity B (Entity A relationship, Entity C relationship), Entity C (Entity B relationhip) I have the reference of Entity A, and now i want to fetch all the related Entity C records. How can i do that? (with least amount of code) Edit: Here's another way to put it. Can we perform joins with CoreData. For example, (and this is a very crude example), We have a following entity-relationship: Grand Parent (1)---(m) Parent Parent (1)---(m) Child So, now if i have "Albert" the Grand Parent, and i want to get all his grand children, how can i do that?

    Read the article

  • Get Raw HTML of Node in JQuery

    - by viatropos
    I have used $("#parent").html() to get the inner html of #parent, but how do I get the html of the parent itself? The use case is, I grab an input node like this: var field = $('input'); I would like to be able to get the raw html of that node (<input type='text'>) with something like field.html(), but that returns empty. Is this possible?

    Read the article

  • How to implement or emulate an "abstract" OCUnit test class?

    - by Quinn Taylor
    I have a number of Objective-C classes organized in an inheritance hierarchy. They all share a common parent which implements all the behaviors shared among the children. Each child class defines a few methods that make it work, and the parent class raises an exception for the methods designed to be implemented/overridden by its children. This effectively makes the parent a pseudo-abstract class (since it's useless on its own) even though Objective-C doesn't explicitly support abstract classes. The crux of this problem is that I'm unit testing this class hierarchy using OCUnit, and the tests are structured similarly: one test class that exercises the common behavior, with a subclass corresponding to each of the child classes under test. However, running the test cases on the (effectively abstract) parent class is problematic, since the unit tests will fail in spectacular fashion without the key methods. (The alternative of repeating the common tests across 5 test classes is not really an acceptable option.) The non-ideal solution I've been using is to check (in each test method) whether the instance is the parent test class, and bail out if it is. This leads to repeated code in every test method, a problem that becomes increasingly annoying if one's unit tests are highly granular. In addition, all such tests are still executed and reported as successes, skewing the number of meaningful tests that were actually run. What I'd prefer is a way to signal to OCUnit "Don't run any tests in this class, only run them in its child classes." To my knowledge, there isn't (yet) a way to do that, something similar to a +(BOOL)isAbstractTest method I can implement/override. Any ideas on a better way to solve this problem with minimal repetition? Does OCUnit have any ability to flag a test class in this way, or is it time to file a Radar? Edit: Here's a link to the test code in question. Notice the frequent repetition of if (...) return; to start a method, including use of the NonConcreteClass() macro for brevity.

    Read the article

  • What are the pro and cons of statically linking a library?

    - by Mathieu Pagé
    Hi, I want to release an application I developed as a hobby both for Linux and Windows. This application depends on boost (and possibly other libraries). The norm for this kind of application (a chess engine) is to provide only an executable file and possibly some helper files. I tough it would be a good idea to statically link the libraries so the executable would not have any dependencies. So the end user can just put the executable in a directory and start using it. However, while doing some research online I found some negative comments about statically linking libraries, some even arguing that an application with statically linked libraries would be hardly portable, meaning that it would only run on my system of highly similar systems. So what are the pros and cons of statically linking library? I already know that the executable will be bigger. But I can't see why it would make my application less portable.

    Read the article

  • Post-loading : check if an image is in the browser cache

    - by Mathieu
    Short version question : Is there navigator.mozIsLocallyAvailable equivalent function that works on all browsers, or an alternative? Long version :) Hi, Here is my situation : I want to implement an HtmlHelper extension for asp.net MVC that handle image post-loading easily (using jQuery). So i render the page with empty image sources with the source specified in the "alt" attribute. I insert image sources after the "window.onload" event, and it works great. I did something like this : $(window).bind('load', function() { var plImages = $(".postLoad"); plImages.each(function() { $(this).attr("src", $(this).attr("alt")); }); }); The problem is : After the first loading, post-loaded images are cached. But if the page takes 10 seconds to load, the cached post-loaded images will be displayed after this 10 seconds. So i think to specify image sources on the "document.ready" event if the image is cached to display them immediatly. I found this function : navigator.mozIsLocallyAvailable to check if an image is in the cache. Here is what I've done with jquery : //specify cached image sources on dom ready $(document).ready(function() { var plImages = $(".postLoad"); plImages.each(function() { var source = $(this).attr("alt") var disponible = navigator.mozIsLocallyAvailable(source, true); if (disponible) $(this).attr("src", source); }); }); //specify uncached image sources after page loading $(window).bind('load', function() { var plImages = $(".postLoad"); plImages.each(function() { if ($(this).attr("src") == "") $(this).attr("src", $(this).attr("alt")); }); }); It works on Mozilla's DOM but it doesn't works on any other one. I tried navigator.isLocallyAvailable : same result. Is there any alternative?

    Read the article

  • creating child process

    - by rishabh
    Write a program to creates two childs by using send –pipe and receive –pipe primitives.Each child Process reads from a different serial line and sends the character read back to parent process through a pie. The parent process outputs all characters received. A child terminates when exclamation point character is received.The parent process terminates after both children have terminate.

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >