Search Results

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

Page 53/174 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • WCF- "The underlying connection was closed: The connection was closed unexpectedly"

    - by SumGuy
    Hi there. I'm recieving that wonderfuly ambiguous error message when using one of my webmethods on my WCF webservice. As that error message doesn't provide any explanation whatsoever allow me to post my theory. I believe it may have something to do with the return type I'm using I have a Types DLL which is refrenced in both the webservice and the client. In this DLL is the base class ExceptionMessages. There is a child of this class called DrawingExcepions. Here is some code: public class ExceptionMessages { public object[] ReturnValue { get; set; } } public class DrawingExceptions : ExceptionMessages { private List<DrawingException> des = new List<DrawingException>(); } public class DrawingException { public Exception ExceptionMsg { get; set; } public List<object> Errors { get; set; } } The using code: [OperationContract] ExceptionMessages createNewBom(Bom bom, DrawingFiles dfs); public ExceptionMessages createNewBOM(Bom bom, DrawingFiles dfs) { return insertAssembly(bom, dfs); } public DrawingExceptions insertAssembly(Bom bom, DrawingFiles dfs) { DrawingExceptions des = new DrawingExceptions(); foreach (DrawingFile d in dfs.drawingFiles) { DrawingException temp = insertNewDrawing(bom, d); if (temp != null) des.addDrawingException(temp); if (d.Child != null) des.addDrawingException(insertAssembly(bom, d.Child)); } return des; } Returns to: ExceptionMessages ems = client.createNewBom(bom, currentDFS); if (ems is DrawingExceptions) { } Basically the return type from the webmethod is ExceptionMessages however I would usually be sending the child class back instead. My only idea is that it's the child that's causing the error but as far as I've read, this should have no effect. Has anyone got any ideas what could be going wrong here? If any more info is required, just ask :) Thanks.

    Read the article

  • fork() within a fork()

    - by codingfreak
    Hi Is there any way to differentiate the child processes created by different fork() functions within a program. global variable i; SIGCHLD handler function() { i--; } handle() { fork() --> FORK2 } main() { while(1) { if(i<5) { i++; if( (fpid=fork())==0) --> FORK1 handle() else (fpid>0) ..... } } } Is there any way I can differentiate between child processes created by FORK1 and FORK2 ?? because I am trying to decrement the value of global variable 'i' in SIGCHLD handler function and it should be decremented only for the processes created by FORK1 .. I tried to use an array and save the process id [this code is placed in fpid0 part] of the child processes created by FORK1 and then decrement the value of 'i' only if the process id of dead child is within the array ... But this didn't work out as sometimes child processes dead so fastly that updating the array is not done perfectly and everything messed up. So is there any better solution for this problem ??

    Read the article

  • Default values for Content Taxonomy fields in Drupal with Hierarchical Select widget

    - by lazysoundsystem
    I'm trying to set the default value for a Content Taxonomy field in a hook_form_alter, but can't pin down the necessary format. I've tried this and many variations: foreach (element_children($form) as $child) { // Set $default_value. if ($form[$child]['tids']) { // This, for Content Taxonomy fields, isn't working: $form[$child]['tids']['#default_value'] = array('value' => $default_value); dsm($form[$child]['tids']['#default_value']); } else { // This, for other fields, is working: $form[$child][0]['#default_value']['value'] = $default_value; } } Can anyone tell me what I'm missing? Edit: In response to Henrik Opel (thanks for getting involved), here is the print out of the relevant field of the form with my changes to the default fields commented out, showing the '#default_value' field I'm trying to influence. It also shows that the option widget I'm using is Hierarchical Select (could this be a factor?). In the dsm() in the code above, the changes to the default value are recognised, but they don't get processed later on. field_name_of_content_taxonomy_field (Array, 3 elements) #tree (Boolean) TRUE #weight (String, 1 characters ) 5 tids (Array, 7 elements) #title (String, 10 characters ) Vocabulary_name #type (String, 19 characters ) hierarchical_select #weight (String, 1 characters ) 5 #config (Array, 15 elements) // 15 elements here #required (String, 1 characters ) 0 #description (String, 0 characters ) #default_value (Array, 0 elements)

    Read the article

  • Dropdown menu disappears in IE7

    - by Justine
    A weird problem with a dropdown menu in IE7: http://screenr.com/SNM The dropdown disappears when the mouse moves to a part that hovers above other layers. The HTML structure looks like this: <div class="header"> <ul class="nav> <li><a href="">item</a> <ul><li><a href="">sub-item</a></li></ul> </li> </ul> </div><!-- /header--> <div class="featured"></div> <div class="content"></div> The sub-menu is positioned absolutely and has visibility:hidden, then it's set to visible using jQuery, like so: $(".header ul.nav li").hover(function(){ $(this).addClass("hover"); $('ul:first',this).css('visibility', 'visible'); }, function(){ $(this).removeClass("hover"); $('ul:first',this).css('visibility', 'hidden'); }); I had a problem with the dropdown hiding under other content in IE7, fixed easily by giving the z-index to its parent and other divs: *:first-child+html .header { position: relative; z-index: 2 !important; } *:first-child+html .content, *:first-child+html .main, *:first-child+html .primary *:first-child+html .featured { position: relative; z-index: 1 !important; } Now, I have no idea why the menu disappears when hovered over other divs, you can view the site live here: http://dev.gentlecode.net/ama/ubezpieczenia.html I would love any help, been staring at this code for ages now without any solution. I guess it's just me tunnel visioning already... Thanks in advance for any help!

    Read the article

  • Axis2 Class Generation

    - by Jack
    I have an instance of a derived class (called Child) that I would like to send between the client and server of my web service. However, the method that might be returning this instance, is marked as returning an instance of the parent class (called Parent). For example: public class Service{public Parent createInstanceOfParentOrChildObject();} While Child is not a parameter anywhere in the service nor is it ever specifically named as a return type (only Parent is ever named), it is nonetheless generated and returned inside certain methods (and then cast to Parent). I generated the wsdl file using Axis2 1.4.1 java2wsdl and specifying that it include this class (using the -xc parameter). I did not use Axis2 1.5.1 because it was not honoring the -xc parameter though it looks like that bug is supposedly fixed in Axis2 1.6. I even did a quick check of the generated .wsdl file to ensure that it did indeed include a definition for Child (and, of course, Parent). However, when I used wsdl2java to generate the server-side (and client-side) code, Child was not generated. How can I get wsdl2java to generate Child? I realize that I could do this by hand but I don't want to have to do this for both the client and server. I was also hoping that I could make this as easy as possible for people to use my wsdl to generate their own clients.

    Read the article

  • How can I get the WebClient to use Cookies?

    - by Jeremy Child
    I would like the VB.net WebClient to remember cookies. I have searched and tried numerous overloads classes. I want to login to a website via POST, then POST to another page and get its contents whilst still retaining my session. Is this possible with VB.net without using WebBrowser control ? I tried Chilkat.HTTP and it works, but I want to use .Net libraries. Regards, Jeremy.

    Read the article

  • Avoid painting over nested controls

    - by Cobus Kruger
    I am writing a toolbar-style control and use the ThemeServices unit to paint the background required by the toolbar. Like so: ThemeServices.DrawElement(Canvas.Handle, ThemeServices.GetElementDetails(trRebarRoot), ARect); I then drop child controls onto the toolbar and voila - instant toolbar. Except that every now and again I notice that the nested (child) controls don't repaint as well. So my control paints its background and the child controls disappear until you move the mouse over them. Some of the edit controls show their client area (no border) and some of them are just gone altogether. This happens mostly when I place a window from another application over the toolbar and move it away. I keep thinking this has to be very easy to cure, that perhaps I'm somehow preventing the paint message from reaching the child controls, or missing an override but I have been unable to figure it out.

    Read the article

  • Get twitter bootstrap btn-group to operate like grouped navigation bar with drop down menus

    - by Jeremy Child
    I have been trying to get Twitter Bootstrap btn-group with dropdown to work for multiple buttons that have a drop down menu. Example: <div class="btn-group"> <a href="#" class="btn">1</a> <a href="#" class="btn">2</a> <a href="#" class="btn">3</a> <a href="#" class="btn">4</a> <a href="#" class="btn">5</a> </div> And also my attempt: http://jsfiddle.net/x2BGB/ This displays a button group. I would like some of the buttons in that group to have drop down menus. An example of what I am trying to achieve is: Note: the grouped button "bar" should not have rounded cornes when a button is next to another button. (right side).

    Read the article

  • Key Navigation Not Working With SL3 Treeview

    - by Chris
    I have a treeview in SL3 that is bound to a hierarchical list. Something has changed with regards to being able to navigate through the list using the up and down arrow keys. At one point, during the development of this application, I could start at the root process in the tree view, press the Enter key, and the root process would expand, showing all children processes. Some of the child processes are parent nodes for other processes. So, that functionality would work fine. Then, if I would navigate to a child node that is a parent, and press Enter, that node would expand. From that point, if I would navigate to a child node of the parent node, and then press the Up arrow key, it should select whatever item is directly above it, in this case, the corresponding parent node, but won't. It's like you can't navigate, using the UP Arrow key, to a child's parent, if you have selected the child. You can navigate down, just not UP, if the next item above it is a folder/parent node. I have no clue as to how this happened, as this functionality used to work fine, and now it doesn't. Any help would be appreciated. Thanks! Chris

    Read the article

  • Hibernate Criteria query on association

    - by DD
    Hi There, How would I go about executing the following Hibernate query using the criteria API. I have an object Parent with List children. I would like to search through all parents and find which parents contain a specified child. i.e. List findParent(Child child); Thanks.

    Read the article

  • Getting Dictionary<string,string> from List<Control>

    - by codymanix
    I want a dictionary containing the names and text of all controls. Is it possible with predefined framework methods/LINQ/colection initializers or do I have to make a loop and add all entries by myself? This gives me an error message: List<Control> controls; // .. initialize list .. controls.ToDictionary((Control child,string k)=>new KeyValuePair<string,string>(child.Name, child.Text));

    Read the article

  • Silverlight - How do I make each item in a list box be the same height?

    - by NotDan
    How can I make a silverlight listbox have all items be the same size and have them take up 100% of the listbox height. I.e. 1 item would be the height of the listbox, 2 items would each be 50% of the height of the list box, etc... Edit - Here is the code public class UniformPanel : Panel { protected override Size MeasureOverride(Size availableSize) { Size panelDesiredSize = new Size(); for (int i = 0; i < Children.Count; i++) { UIElement child = Children[i]; child.Measure(availableSize); var childDesiredSize = child.DesiredSize; panelDesiredSize.Height += childDesiredSize.Height; if (panelDesiredSize.Width < childDesiredSize.Width) { panelDesiredSize.Width = childDesiredSize.Width; } } return panelDesiredSize; } protected override Size ArrangeOverride(Size finalSize) { double height = finalSize.Height/Children.Count; for (int i = 0; i < Children.Count; i++) { UIElement child = Children[i]; Size size = new Size(finalSize.Width, height); child.Arrange(new Rect(new Point(0, i * height), size)); } return finalSize; // Returns the final Arranged size } }

    Read the article

  • How do I process a nested list?

    - by ddbeck
    Suppose I have a bulleted list like this: * list item 1 * list item 2 (a parent) ** list item 3 (a child of list item 2) ** list item 4 (a child of list item 2 as well) *** list item 5 (a child of list item 4 and a grand-child of list item 2) * list item 6 I'd like to parse that into a nested list or some other data structure which makes the parent-child relationship between elements explicit (rather than depending on their contents and relative position). For example, here's a list of tuples containing an item and a list of its children (and so forth): [('list item 1',), ('list item 2', [('list item 3',), [('list item 4', [('list item 5'),]] ('list item 6',)] I've attempted to do this with plain Python and some experimentation with Pyparsing, but I'm not making progress. I'm left with two major questions: What's the strategy I need to employ to make this work? I know recursion is part of the solution, but I'm having a hard time making the connection between this and, say, a Fibonacci sequence. I'm certain I'm not the first person to have done this, but I don't know the terminology of the problem to make fruitful searches for more information on this topic. What problems are related to this so that I can learn more about solving these kinds of problems in general?

    Read the article

  • Preoder traversal of a Btree

    - by Phenom
    I'm trying to figure out how to do a preorder traversal of a Btree. I know that generally preorder traversal works like this: preorder(node) { print value in node preorder(left child) preorder(right child) } What's confusing to me is how to make this work with a Btree, since in each node there are multiple values and multiple child pointers. When printing values, do all the values in the node get printed before descending into the left child? Each node looks like this: child1 value1 child2 value2 child3 value3 child4 Also, why would anyone want to do a preorder traversal of a Btree, since an inorder traversal is what will display the values in ascending order?

    Read the article

  • Simple Expand/Collapse divs > JQuery?

    - by Scott B
    I need to add some accordian style expand/collapse handles to a series of parent container divs in my application. Is this something that's too simple for a library like jquery? Example: <div class="handleDiv"> expand | collapse <div>child element</div> <div>child element</div> </div> <div class="handleDiv"> expand | collapse <div>child element</div> <div>child element</div> </div>

    Read the article

  • any ideas how to make checked treeview inside multiselect jqeury?

    - by B_S
    i planned to make checked treeview inside a multiselect jquery. The left side was the checked treeview, if we choose the child, the one moving to the right side was the child and the parent title, and if we choose the parent, all of the child will be moving right. I found some of the example, but they're in vb, can jqeury make something like this?

    Read the article

  • How can use the currently displayed node to filter a block-level view on that node's page?

    - by Deane
    I have parent/child relationship set up via Node Reference. A Child record can have a Parent record selected from a Node Reference field (this is optional -- I can have Parent-less Children as well). I've created a Views block to appear on the Parent pages, below the content. It's going to show a table of all the Child nodes for that Parent. Problem is, right now it shows every Child node. I need to filter it for just the Parent being displayed. What I need to be able to do is add a filter to this View to effectively say, "Only show the Child nodes that are assigned to the Parent being displayed on this page." So, somehow I need to be able to get the Nid of the currently displaying node (which will be a Parent, in all cases when this block is displayed), and use that in a filter in my View. How exactly can I do this? (Initially I used an attachment view for this (as this page instructs). I created a page view to display the Parent, then an attachment view to display all the Children, then attached that under the page view. This worked, but it was almost absurdly complicated to set up, and it was an undesirable for a number of other reasons -- primarily that my Parent now has two dedicated URLs, it's own node-level page, and the similar page created by this view.) Using Drupal 6.15.

    Read the article

  • how to get group total in self refrenced data in data table ?

    - by Nikhil Vaghela
    I have three columns in my data table. 1) ProductID 2) ProductParentID 3) ProductTotal ProductID and ProductParentID are self refrencing columns where i can set parent child relationship and get child rows based on my relationship. Let us say i have following data Product1     Product11     Product12     Product13         Product131         Product132         Product133 Product2     Product21     Product22     Product23 Next to above hierarchy in Product total column what i want is total of each child rows and sum of those child rows product total should be rolled up to it parent product. E.g if Product 131 total is 10,Product 13 total is 15 and Product 133 total is 5 then the product 13 total should be 30. The logic should work for n number of self hierarchy. Is there any functionality in data table itself where i can achieve this without iterating through each row and do it manually ? Thanks.

    Read the article

  • Problem in Rich : menubar

    - by Ramesh G
    Hi, I'm using rich:toolbar with backing bean menuAction method.I'm facing one problem in menu link icons.Suppose if i ve child menu in my parent menu it is displaying "hand symbol" for that.else if i dont ve any child menu in my parent menu it is showing "I" this icon.While clicking parent menu(without having child menu) i want hand symbol icon instead of "I" this icon. please help me....... Regards, Ramesh G

    Read the article

  • Hierarchy / Flyweight / Instancing Problem in Python

    - by Dan
    Here is the problem I am trying to solve, (I have simplified the actual problem, but this should give you all the relevant information). I have a hierarchy like so: 1.A 1.B 1.C 2.A 3.D 4.B 5.F (This is hard to illustrate - each number is the parent, each letter is the child). Creating an instance of the 'letter' objects is expensive (IO, database costs, etc), so should only be done once. The hierarchy needs to be easy to navigate. Children in the hierarchy need to have just one parent. Modifying the contents of the letter objects should be possible directly from the objects in the hierarchy. There needs to be a central store containing all of the 'letter' objects (and only those in the hierarchy). 'letter' and 'number' objects need to be possible to create from a constructor (such as Letter(**kwargs) ). It is perfectably acceptable to expect that when a letter changes from the hierarchy, all other letters will respect the same change. Hope this isn't too abstract to illustrate the problem. What would be the best way of solving this? (Then I'll post my solution) Here's an example script: one = Number('one') a = Letter('a') one.addChild(a) two = Number('two') a = Letter('a') two.addChild(a) for child in one: child.method1() for child in two: print '%s' % child.method2()

    Read the article

  • Unidirectional One-to-Many Associations in Entity Framework 4?

    - by Eric J.
    Does EF 4 support unidirectional one-to-many associations, as in: public class Parent { public int Id { get; set; } public string Something { get; set; } public List<Child> AllMyChildren { get; set; } } public class Child { public int Id { get; set; } public string Anotherthing { get; set; } // I don't want a back-reference to the Parent! // public int ParentId { get; set; } } When I try to compile my project with an association between Parent and Child where End2 Navigation is blank (because I unchecked the End2 Navigation Property checkbox in the Add Association dialog), I get Error 2027: No mapping specified for the following EntitySet/AssociationSet - Child.

    Read the article

  • One letter game problem?

    - by Alex K
    Recently at a job interview I was given the following problem: Write a script capable of running on the command line as python It should take in two words on the command line (or optionally if you'd prefer it can query the user to supply the two words via the console). Given those two words: a. Ensure they are of equal length b. Ensure they are both words present in the dictionary of valid words in the English language that you downloaded. If so compute whether you can reach the second word from the first by a series of steps as follows a. You can change one letter at a time b. Each time you change a letter the resulting word must also exist in the dictionary c. You cannot add or remove letters If the two words are reachable, the script should print out the path which leads as a single, shortest path from one word to the other. You can /usr/share/dict/words for your dictionary of words. My solution consisted of using breadth first search to find a shortest path between two words. But apparently that wasn't good enough to get the job :( Would you guys know what I could have done wrong? Thank you so much. import collections import functools import re def time_func(func): import time def wrapper(*args, **kwargs): start = time.time() res = func(*args, **kwargs) timed = time.time() - start setattr(wrapper, 'time_taken', timed) return res functools.update_wrapper(wrapper, func) return wrapper class OneLetterGame: def __init__(self, dict_path): self.dict_path = dict_path self.words = set() def run(self, start_word, end_word): '''Runs the one letter game with the given start and end words. ''' assert len(start_word) == len(end_word), \ 'Start word and end word must of the same length.' self.read_dict(len(start_word)) path = self.shortest_path(start_word, end_word) if not path: print 'There is no path between %s and %s (took %.2f sec.)' % ( start_word, end_word, find_shortest_path.time_taken) else: print 'The shortest path (found in %.2f sec.) is:\n=> %s' % ( self.shortest_path.time_taken, ' -- '.join(path)) def _bfs(self, start): '''Implementation of breadth first search as a generator. The portion of the graph to explore is given on demand using get_neighboors. Care was taken so that a vertex / node is explored only once. ''' queue = collections.deque([(None, start)]) inqueue = set([start]) while queue: parent, node = queue.popleft() yield parent, node new = set(self.get_neighbours(node)) - inqueue inqueue = inqueue | new queue.extend([(node, child) for child in new]) @time_func def shortest_path(self, start, end): '''Returns the shortest path from start to end using bfs. ''' assert start in self.words, 'Start word not in dictionnary.' assert end in self.words, 'End word not in dictionnary.' paths = {None: []} for parent, child in self._bfs(start): paths[child] = paths[parent] + [child] if child == end: return paths[child] return None def get_neighbours(self, word): '''Gets every word one letter away from the a given word. We do not keep these words in memory because bfs accesses a given vertex only once. ''' neighbours = [] p_word = ['^' + word[0:i] + '\w' + word[i+1:] + '$' for i, w in enumerate(word)] p_word = '|'.join(p_word) for w in self.words: if w != word and re.match(p_word, w, re.I|re.U): neighbours += [w] return neighbours def read_dict(self, size): '''Loads every word of a specific size from the dictionnary into memory. ''' for l in open(self.dict_path): l = l.decode('latin-1').strip().lower() if len(l) == size: self.words.add(l) if __name__ == '__main__': import sys if len(sys.argv) not in [3, 4]: print 'Usage: python one_letter_game.py start_word end_word' else: g = OneLetterGame(dict_path = '/usr/share/dict/words') try: g.run(*sys.argv[1:]) except AssertionError, e: print e

    Read the article

  • App with MVC Virtual application shared AuthCookie.

    - by Razcer
    I have a 3.5 ASP.Net WebForm parent application. The parent uses forms authentication. I have a MVC child virtual application, I would like to make it so the user logs in to the parent application, user then navigates to the virtual application by pressing a link on the parent. However every time I do this it goes to the login screen for the virtual application. Is there a web setting I should double check in Parent? Or Child? Is there an IIS setting that I should check? Should I be using a virtual directory instead of virtual application? I want the child to be able to access the Session[] from the parent. I would like the child app to use the same authCookie as the parent app.

    Read the article

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