Search Results

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

Page 124/174 | < Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >

  • Java Heap Overflow, Forcing Garbage Collection

    - by Nicholas
    I've create a trie tree with an array of children. When deleting a word, I set the children null, which I would assume deletes the node(delete is a relative term). I know that null doesn't delete the child, just sets it to null, which when using a large amount of words it causes to overflow the heap. Running a top on linux, I can see my memory usage spike to 1gb pretty quickly, but if I force garbage collection after the delete (Runtime.gc()) the memory usage goes to 50mb and never above that. From what I'm told, java by default runs garbage collection before a heap overflow happens, but I can't see to make that happen.

    Read the article

  • jQuery stopPropagation bubble down

    - by Jasie
    I have a div with a link inside of it: <div id="myDiv"> <a href="http://www.lol.com">Lol</a> </div> Clicking the <div /> should go somewhere, but clicking the child <a /> should go to www.lol.com. I've seen from previous questions and the jQuery website that .stopPropagation prevents bubbling upwards, but how do I prevent a bubble downwards (isn't that what's necessary here?).

    Read the article

  • Rails accepts_nested_attributes_for callbacks

    - by Rabbott
    I have two models Ticket and TicketComment, the TicketComment is a child of Ticket. ticket.rb class Ticket < ActiveRecord::Base has_many :ticket_comments, :dependent => :destroy, :order => 'created_at DESC' # allow the ticket comments to be created from within a ticket form accepts_nested_attributes_for :ticket_comments, :reject_if => proc { |attributes| attributes['comment'].blank? } end ticket_comment.rb class TicketComment < ActiveRecord::Base belongs_to :ticket validates_presence_of :comment end What I want to do is mimic the functionality in Trac, where if a user makes a change to the ticket, and/or adds a comment, an email is sent to the people assigned to the ticket. I want to use an after_update or after_save callback, so that I know the information was all saved before I send out emails. How can I detect changes to the model (ticket.changes) as well as whether a new comment was created or not (ticket.comments) and send this update (x changes to y, user added comment 'text') in ONE email in a callback method?

    Read the article

  • Action script 3 bitmap glitch, alpha fade in out

    - by user150946
    I have actually solved this problem but it was a weird one so I will post it and my solution. I had a movie clip with several children each of which had it's own alpha settings. It also had a bitmap child object with a masked movie clip sitting on top of it. I was fading in and out the parent movie clip and was getting some odd results all of the alpha settings of the children were being removed and the bitmap was glitching and showing the contents of the masked object that was above it. The problem was that my alpha value for fully opaque was 100 (as in AS2) not 1 (as per AS3). It took me ages to work this out so hopefully this helps someone else.

    Read the article

  • ListView in ArrayAdapter order get's mixed up when scrolling

    - by Dan B
    Hi, I have a ListView in a custom ArrayAdapter that displays an icon ImageView and a TextView in each row. When I make the list long enough to let you scroll through it, the order starts out right, but when I start to scroll down, some of the earlier entries start re-appearing. If I scroll back up, the old order changes. Doing this repeatedly eventually causes the entire list order to be seemingly random. So scrolling the list is either causing the child order to change, or the drawing is not refreshing correctly. What could cause something like this to happen? I need the order the items are displayed to the user to be the same order they are added to the ArrayList, or at LEAST to remain in one static order. If I need to provide more detailed information, please let me know. Any help is appreciated. Thanks.

    Read the article

  • viewDidLoad never called in Sub-classed UIViewController

    - by Steve
    I've run into some trouble with loading a sub-classed UIViewController from a nib. My viewDidLoad function is never called. The super-class has no nib, but the sub-classes each have their own. i.e. @interface SuperClass : UIViewController { } @end @interface SubClass : SuperClass{ } @end @implementation SubClass - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { } return self; } - (void)viewDidLoad{ // Never called } The view is loaded from a nib as follows: SubClass *scvc = [[SubClass alloc] initWithNibName:@"SubClass" bundle:nil]; [self.navigationController pushViewController:scvc animated:YES]; [scvc release]; There is a nib file with this name and it has it's file owner's class set properly. viewDidLoad is not called in the child or super. Any ideas?

    Read the article

  • Unable to set mouse cursor JLayeredPane

    - by Ones3k2
    I'm running into a problem that I can't seem to figure out nor find the answer anywhere on the web. I've got a JLayeredPane and when it only has one child Panel I am able to correctly set the cursor using setCursor(). The cursor shows up and everything is fine. But when I add an additional JPanel into the JLayeredPane the cursor no longer shows up for example this works: m_layeredPane = new JLayeredPane(); m_layeredPane.setLayout(new WBLayoutManager()); m_layeredPane.add(m_mediaPanel, new Integer(0)); // m_layeredPane.add(m_whiteboardPanel, new Integer(1)); m_layeredPane.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); // WORKS but this doesn't: m_layeredPane = new JLayeredPane(); m_layeredPane.setLayout(new WBLayoutManager()); m_layeredPane.add(m_mediaPanel, new Integer(0)); m_layeredPane.add(m_whiteboardPanel, new Integer(1)); m_layeredPane.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); // FAILS Anyone know how i can get custom cursors working within a JLayeredPane

    Read the article

  • How to detect popup of a sub-menu of a popup menu (and how to populate it dynamically)?

    - by Heinrich Ulbricht
    Hi everyone, I have a popup menu which contains several menu items and one of them can have child items. This entry has a little arrow on the right and when you hover your mouse over it, a sub-menu will open. Now I want to populate this sub-menu at runtime, but only if the user actually opens it. If the user never opens the sub-menu, it will be empty (maybe contain a placeholder). How could I accomplish this? Is it even possible to modify a popup-menu when it is already visible? Thanks for your help!

    Read the article

  • Identifying which value of a multi-row inserts fails foreign key constraint

    - by Jonathan
    I have a multi-row insert that looks something like: insert into table VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9); Assume the first attribute (1, 4, 7) is a foreign key to another table and assume that this referenced table does not have the value '4'. A MySQLExeption is thrown with error code 1452. EXCEPTION: Cannot add or update a child row: a foreign key constraint fails (dbName/tableName, CONSTRAINT id FOREIGN KEY (customer_id) REFERENCES referencedTable (customer_id)) Is there a way to identify which value caused the error? I would love to give my user an error message that said something like: Error: '4' does not exist in the referenced table. I am using the .NET mysql connector to execute the insert. Thanks- Jonathan

    Read the article

  • Is there a way to optimize this update query?

    - by SchlaWiener
    I have a master table called "parent" and a related table called "childs" Now I run a query against the master table to update some values with the sum from the child table like this. UPDATE master m SET quantity1 = (SELECT SUM(quantity1) FROM childs c WHERE c.master_id = m.id), quantity2 = (SELECT SUM(quantity2) FROM childs c WHERE c.master_id = m.id), count = (SELECT COUNT(*) FROM childs c WHERE c.master_id = m.id) WHERE master_id = 666; Which works as expected but is not a good style because I basically make multiple SELECT querys on the same result. Is there a way to optimize that? (Making a query first and storing the values is not an option. I tried this: UPDATE master m SET (quantity1, quantity2, count) = ( SELECT SUM(quantity1), SUM(quantity2), COUNT(*) FROM childs c WHERE c.master_id = m.id ) WHERE master_id = 666; but that doesn't work.

    Read the article

  • Not able to override CSS within IFrame

    - by Madhur Ahuja
    I am using disqus comments for my jekyll blog with some CSS styles overriden in my stylesheet and used to work perfectly. Recently, disqus has introduced a new UI for their comments system which has completely broken the font colors. Since my site has dark background, I am trying to apply styles based on new disqus HTML structure generated. However, it seems that none of my styles get applied. It seems that is because disqus is loaded within iframe. Any ideas how can I fix the font colors. Example of the post: http://www.madhur.co.in/blog/2012/03/27/codeplexmovegit.html UPDATE Based on this question How to apply CSS to iFrame? it seems that you cannot style a child IFrame cross domain. I am wondering how it used to work earlier. Disqus even has documentation on it http://docs.disqus.com/help/69/

    Read the article

  • WPF Dispatcher {"The calling thread cannot access this object because a different thread owns it."}

    - by user359446
    first I need to say that I´m noob with WPF and C#. Application: Create Mandelbrot Image (GUI) My disptacher works perfektly this this case: private void progressBarRefresh(){ while ((con.Progress) < 99) { progressBar1.Dispatcher.Invoke(DispatcherPriority.Send, new Action(delegate { progressBar1.Value = con.Progress; } )); } } I get the Message (Title) when tring to do this with the below code: bmp = BitmapSource.Create(width, height, 96, 96, pf, null, rawImage, stride); this.Dispatcher.Invoke(DispatcherPriority.Send, new Action(delegate { img.Source = bmp; ViewBox.Child = img; //vllt am schluss } )); I will try to explain how my program works. I created a new Thread (because GUI dont response) for the calculation of the pixels and the colors. In this Thread(Mehtod) I´m using the Dispatcher to Refresh my Image in the ViewBox after the calculations are ready. When I´m dont put the calculation in a seperate Thread then I can refresh or build my Image.

    Read the article

  • How can I dynamically clear all controls in a user control?

    - by Michael
    Is it possible to dynamically (and generically) clear the state of all of a user control's child controls? (e.g., all of its TextBoxes, DropDrownLists, RadioButtons, DataGrids, Repeaters, etc -- basically anything that has ViewState) I'm trying to avoid doing something like this: foreach (Control c in myUserControl.Controls) { if (c is TextBox) { TextBox tb = (TextBox)c; tb.Text = ""; } else if (c is DropDownList) { DropDownList ddl = (DropDownList)c; ddl.SelectedIndex = -1; } else if (c is DataGrid) { DataGrid dg = (DataGrid)c; dg.Controls.Clear(); } // etc. } I'm looking for something like this: foreach (Control c in myUserControl.Controls) c.Clear(); ...but obviously that doesn't exist. Is there any easy way to accomplish this dynamically/generically?

    Read the article

  • The node to be inserted is from a different document context

    - by BDotA
    When I am Calling AppendChild, I get this error: The node to be inserted is from a different document context." static public XmlNode XMLNewChildNode(XmlNode oParent, string sName, string sNamespaceURI, string sNodeType) { XmlNode oNode = moDoc.CreateNode(sNodeType, sName, sNamespaceURI); oParent.AppendChild(oNode); return oNode; } this is a code that is converted from its VB 6.0 version which was this: please ignore the optional parametes, I have overloads for them in C# version: Public Function XMLNewChildNode(ByVal oParent As IXMLDOMNode, ByVal sName As String, Optional ByVal sNamespaceURI As String = "", Optional ByVal sNodeType As String = "element") As IXMLDOMNode '**************** DESCRIPTION ******************* 'Create a new Child Node for passed Parent. '***************** VARIABLES ******************** Dim oNode As IXMLDOMNode '************************************************ Set oNode = moDoc.createNode(sNodeType, sName, sNamespaceURI) Call oParent.appendChild(oNode) Set XMLNewChildNode = oNode End Function so anything is different in VB 6.0 and C# for working with XMLs?

    Read the article

  • Databinding multiple tables linq query to gridview?

    - by Curtis White
    My question is how can I display a linq query in a gridview that has data from multiple tables AND allow the user to edit some of the fields or delete the data from a single table? I'd like to do this with either a linqdatasource or a linq query. I'm aware I can set the e.Result to the query on the selecting event. I've also been able to build a custom databound control for displaying the linq relations (parent.child). However, I'm not sure how I can make this work with delete? I'm thinking I may need to handle the delete event with custom code.

    Read the article

  • Disable the mouse click event of a button placed inside a listbox item

    - by Malcolm
    I have a button placed inside a listbox item and i have style defined fro that button where i have two images and on mouse hover i change the image. Now the problem is I am handling the listbox mouse event and when click the button the listbox mouse event doesn't fires. I tried to make the property of button ishittestvisisble=false And now if i click on button the listbox mouse event fires but the problem is the two images placed inside the styling of button don't apply as they are the child of button and by default their ishittestvisible also turn out to be false. So any suggestion or idea will be helpfull ....tx in advance...

    Read the article

  • Limit JavaScript and CSS files on ASP.NET MVC 2 Master Page based on Model and View content

    - by Zack Peterson
    I want to include certain .js and .css files only on pages that need them. For example, my EditorTemplate DateTime.ascx needs files anytimec.js and anytimec.css. That template is applied whenever I use either the EditorFor or EditorForModel helper methods in a view for a model with a DateTime type value. I've put this condition into the <head> section of my master page. It checks for a DateTime type property in the ModelMetadata. <% if (this.ViewData.ModelMetadata.Properties.Any(p => p.ModelType == typeof(DateTime))) { %> <link href="../../Content/anytimec.css" rel="stylesheet" type="text/css" /> <script src="../../Scripts/anytimec.js" type="text/javascript"></script> <% } %> This has two problems: Fails if I have nested child models of type DateTime Unnecessarily triggered by views without EditorFor or EditorForModel methods (example: DisplayForModel) How can I improve this technique?

    Read the article

  • help with DOMDocument class in php

    - by noname
    here is my xml DOM. <entities> <entity id="7006276"> <title>xxx</title> <entities> <entity id="7877579"> <title>xxx</title> <entities> i want to get the 'entity' with id 7006276 so i could access its child 'entities' to create some 'entity' elements for it. i have tried: $xmlElementById = $this->DOMDocument_object->getElementById('7006276'); but it doesnt seem to work. any idea how i get it so i can create more 'entity' elements?

    Read the article

  • A table that has relation to itself issue

    - by Mostafa
    Hi , I've defined table with this schema : CREATE TABLE [dbo].[Codings]( [Id] [int] IDENTITY(1,1) NOT NULL, [ParentId] [int] NULL, [CodeId] [int] NOT NULL, [Title] [nvarchar](50) COLLATE Arabic_CI_AI NOT NULL, CONSTRAINT [PK_Codings] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] And fill it up with data like this : Id ParentId CodeId Title ----------- ----------- ----------- ---------- 1 NULL 0 Gender 2 1 1 Male 3 1 2 Female 4 NULL 0 Educational Level 5 4 1 BS 6 4 2 MS 7 4 3 PHD Now , I'm looking for a solution , in order , When i delete a record that is parent ( like Id= 1 or 4 ), It delete all child automatically ( all records that their ParentId is 1 or 4 ) . I supposed i can do it via relation between Id and Parent Id ( and set cascade for delete rule ) , But when i do that in MMS , the Delete Rule or Update Rule in Properties is disabled . My question is , What can i do to accomplish this ? Thank you

    Read the article

  • problem in counting children category

    - by moustafa
    I have this table: fourn_category (id , sub) I am using this code to count: function CountSub($id){ $root = array($id); $query = mysql_query("SELECT id FROM fourn_category WHERE sub = '$id'"); while( $row = mysql_fetch_array( $query, MYSQL_ASSOC ) ){ array_push($root,$row['id']); CountSub($row['id']); } return implode(",",$root); } It returns the category id as 1,2,3,4,5 to using it to count the sub by IN() But the problem is that it counts this: category 1 category 2 category 3 category 4 category 5 Category 1 has 1 child not 4. Why? How can I get all children's trees?

    Read the article

  • If you delete a DOM element, do any events that started with that element continue to bubble?

    - by Matt
    What behavior should I expect if I delete a DOM element that was used to start an event bubble, or whose child started the event bubble - will it continue to bubble if the element is removed? For example - lets say you have a table, and want to detect click events on the table cells. Another piece of JS has executed an AJAX request that will eventually replace the table, in full, once the request is complete. What happens if I click the table, and immediately after the table gets replaced by a successful completion of an AJAX request? I ask because I am seeing some behavior where the click events don't seem to be bubbling - but it is hard to duplicate. I am watching the event on a parent element of the table (instead of attaching the event to every TD), and it just doesn't seem to reach it sometimes.

    Read the article

  • Linq to SQL Azure genrating Error "Specified cast is not valid."

    - by Rabbi
    B"H I have an application that has been working for months using Linq to SQL connecting to a SQLExpress. I tried migrating it to SQL Azure. I copied the structure and data using the Sync Framework. I viewed the data in SQL Azure using SSMS 2008 R2 and it seams to be exactly what I have in my Sql Server. However when I try to use Linq to SQL against it I get an error "Specified cast is not valid." I seams to be happening any time I get child records. i.e. whenever I fill (the first time I access) an entity set. It seams to be happening after the data returns and when Linq tries to put it into the objects. remember, the application is working perfectly against sqlexpress, even when accessed across the internet or vpn.

    Read the article

  • Initiate a PHP class where class name is a variable

    - by ed209
    I need some help with an error I have not encountered before and can't seem to find anywhere. In a PHP mvc framework (just from a tutorial) I have the following: // Initiate the class $className = 'Controller_' . ucfirst($controller); if (class_exists($className)) { $controller = new $className($this->registry); } $className is showing the correct class name (case is also correct). But when I run it I get this in the apache error log (no php error) [Wed Mar 31 10:34:12 2010] [notice] child pid 987 exit signal Segmentation fault (11) Process id is different on every call. I am running PHP 5.3.0 on os x 10.6. This site seems to work on 5.2.11 on another Mac. Not really sure where to go next to debug it. I guess it could be an apache setting as much as a php bug or a problem with the code... any suggestions on where to look next?

    Read the article

  • JQuery invert table selection

    - by Lars Tackmann
    I have page part like this <div id="inbox"> <h1>Headline</h1> <p>First paragraph</p> <table> <tbody> <tr> <td>table stuff</td> </tr> </tbody> </table> <p>Second paragraph</p> </div> I want to assign a handler to everything within the #inbox div that is not a part (a child) of the table. I tried to do something like $('#inbox:not(:has(table))').click(function(){ alert('hello inbox'); }); But that does not work, so how do I invert the selection of the table inside the #inbox ?

    Read the article

  • How to dismiss modal view controller from UITabBarController

    - by user563697
    Currently im developing an iPhone Game...When app loaded a login page is seen...when logged in...from login view controller a welcome screen view controller with tabbar(UITabbarcontroller iVar declared inside and connected to tabbarcontroller with interface builder) is presented(using presentModalViewCotroller)..There the first tab is dealing with account ..loaded from accountController NIb and view controller...inside which there's a logout button...when clicked i need to go to login page under loginview controller... Inside logout button click action method...i had coded like this [self dismissModalViewControllerAnimated:NO]; but on button click nothing happening... first : parent--loginviewcontroller child--welcomescreen view controller Inside welcome screen,in account tab,on logout button click: how could i dismiss the above MVC.... can anyone give me a solution as soon as possible...its urgent...

    Read the article

< Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >