Search Results

Search found 4350 results on 174 pages for 'chilly child'.

Page 78/174 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Get class of caller's method (via inspect) in Python (alt: super() emulator)

    - by Slava Vishnyakov
    Is it possible to get reference to class B in this example? class A(object): pass class B(A): def test(self): test2() class C(B): pass import inspect def test2(): frame = inspect.currentframe().f_back cls = frame.[?something here?] # cls here should == B (class) c = C() c.test() Basically, C is child of B, B is child of A. Then we create c of type C. Then the call to c.test() actually calls B.test() (via inheritance), which calls to test2(). test2() can get the parent frame frame; code reference to method via frame.f_code; self via frame.f_locals['self']; but type(frame.f_locals['self']) is C (of course), but not B, where method is defined. Any way to get B?

    Read the article

  • TabBar implementation issue in iphone

    - by iPhoneDev
    Hi, My project is navigation based template and it was running fine until I made changes in some child view. I need to add 4 Tab in some child view. So what I did is create a TabBarController programmatically on ViewDidLoad as: // (void)viewDidLoad { [super viewDidLoad]; helpView = [[HelpView alloc] initWithNibName:@"HelpView" bundle:nil]; settingView = [[SettingView alloc] initWithNibName:@"SettingView" bundle:nil]; tabBarController = [[UITabBarController alloc] init]; tabBarController.viewControllers = [NSArray arrayWithObjects:helpView,settingView,nil]; [self.view addSubview:[tabBarController view]]; } I am able to add two view in tab bar but not Tab Title. Please let me know what I am missing to display Title on tab button. ( Is a NavigationBased project) Thanks

    Read the article

  • Google App Engine : PolyModel + SelfReferenceProperty

    - by rvandervort
    Is a PolyModel-based class able to be used as a SelfReferenceProperty ? I have the below code : class BaseClass(polymodel.PolyModel): attribute1 = db.IntegerProperty() attribute2 = db.StringProperty() class ParentClass(BaseClass): attribute3 = db.StringProperty() class ChildClass(BaseClass): parent = SelfReferenceProperty(collection_name = 'children') p = ParentClass() p.attribute1 = 1 p.attribute2 = "Parent Description" p.attribute3 = "Parent additional data" p.put() c = ChildClass() c.attribute1 = 5 c.attribute2 = "Child Description" c.parent = p.key() c.put() I execute this code and check the datastore via the development server's admin interface. The parent instance is saved to the datastore class = 'BaseClass,ParentClass', but the child is not. There is no error output to the browser (debug is turned on) and nothing in the launcher's log for my app. Is this possible to do ?

    Read the article

  • IE 8 html parsing error message.

    - by user48408
    I'm experiencing the problem outlined in this kb article. http://support.microsoft.com/kb/927917 . Sorry I can't hyperlink cos i don't have enough points! "This problem occurs because a child container HTML element contains script that tries to modify the parent container element of the child container. The script tries to modify the parent container element by using either the innerHTML method or the appendChild method." The problem I'm having diagnosing the source of my problem is 2 fold: 1) This is only happening on some client machines (All are running IE8) and not others. How/Why only some? 2) I don't have any scripts which modify the innerHTML or call appendChild on any dom elements. I do have server side code which modify properties on asp .net server controls. (Essentially all thats happening is a panel control with some more controls is being made visbile or invisible on a button click), would these in turn then set the innerHTML property of the client rendered control(?)

    Read the article

  • collapsible grid in Silverlight 4

    - by prince23
    hi, I want to create a collapsible grid in Silverlight 4. once user clicks on row of the datagrid if that row has any child row it should be shown. if again user clicks the same row should hide the child row what was shown eariler. right now i am able to show data in datagrid once the user clicks any row i am able get the id of the row what i have clicked and go to DB and get the result. but how will i again bind the new datatable to datagrid agin. below the row what i have clciked private void dgData2_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (dgData2.SelectedIndex >= 0) { //Get Selected Row var element = (TextBlock)dgData2.Columns[0].GetCellContent(dgData2.SelectedItem); } } i am new to silverlight please let me know any code that can help e out Thanks in advance for any help prince

    Read the article

  • super() in Python 2.x without args

    - by Slava Vishnyakov
    Trying to convert super(B, self).method() into a simple nice bubble() call. Did it, see below! Is it possible to get reference to class B in this example? class A(object): pass class B(A): def test(self): test2() class C(B): pass import inspect def test2(): frame = inspect.currentframe().f_back cls = frame.[?something here?] # cls here should == B (class) c = C() c.test() Basically, C is child of B, B is child of A. Then we create c of type C. Then the call to c.test() actually calls B.test() (via inheritance), which calls to test2(). test2() can get the parent frame frame; code reference to method via frame.f_code; self via frame.f_locals['self']; but type(frame.f_locals['self']) is C (of course), but not B, where method is defined. Any way to get B?

    Read the article

  • Will Django user permissions work for models with inline tabular forms of other models?

    - by stinkypyper
    I am setting up DJango admin to make a model editable. On the same page I have tabular inline of a child model. Everything works as expected. Now I want to restrict permission on the tabular inline child form. Specifically remove update and delete permissions on it. I have tried removing the permissions for the admin user using the 'user permissions' of that user. However, it does not work. Does DJango respect the user permissions in regards to inline model forms?

    Read the article

  • iOS 6&7: Storyboard, master detail ViewController when detailViewController is dynamic

    - by Cam
    I'm building an app for iPhone, I want to use storyboard in XCode to do a simple selection from a tableView (let's call it master table view controller with couple rows) then through navigation it goes to next page and shows a detail view for that selection. I have in my code a base class representing my detailViewController, and have 2-3 driver classes of this base class representing what I want to show in detail view controller in second page, can someone give me an idea how to set destination viewController (detailViewController) dynamically to one of my child class based on the selected row in master view controller using storyboard? Usually you assign a class to destination class in storyboard for your detail view controller with using segue, but since my destination class could be a different (child class) how you set this in storyboard? Thank you, Kam

    Read the article

  • How do I get element's className inside loop of elements?

    - by crosenblum
    I am doing a loop of all elements inside a div, and I now need to get the classname of the element that I am looping by. Then i can check if the current element's class is one, I need to do something with... // var children = parent.childNodes, child; var parentNode = divid; // start loop thru child nodes for(var node=parentNode.firstChild;node!=null;node=node.nextSibling){ var myclass = (node.className ? node.className.baseVal : node.getAttribute('class')); } But this code for getting the classname only get's null values. Any suggestions?

    Read the article

  • MooTools - Programmatically fired events not working with event delegation

    - by Anurag
    Would really appreciate if anyone can help me figure out why I am unable to fire events programmatically when using event delegation in MooTools (from the Element.Delegation class). There is a parent <div> that has a change listener on some child <input> elements. When the change event is triggered by user actions, the handler on the parent div gets triggered, but when I fire it programmatically with fireEvent on any child input, nothing happens. The basic setup is: html <div id="listener"> <input type="text" id="color" class="color" /> ????????????????????????????????????????????????????????????????</div>??????????? js $("listener").addEvent("change:relay(.color)", function() { alert("changed!!"); }); $("color").fireEvent("change"); // nothing happens The event handler on the parent div does not get called. Any help is appreciated. Cheers!

    Read the article

  • Scrum for Team System 2010 - How to use story points instead of Hours

    - by dretzlaff17
    I have installed TFS 2010 using the Scrum for Team System v3. The work item templates want you to enter a Project Backlog Item that includes story points, then you need to add linked tasks as a child of the PBI. It is at the task level where you can assign team individuals, update estimated hours left, etc. What is the importance of the Story Points used at the PBI item if individual tasks are using hours? Has anyone customized this template so that the child work item tasks use story point burn downs instead of hours? Also, I would be nice to have the total number of story points from each individual task roll up into the PBI item as a read only field for total story points. Thanks for your time.

    Read the article

  • Android - LinearLayout Horizontal with wrapping children

    - by kape123
    Is there a property to set for Android's LinearLayout that will enable it to properly wrap child controls? Meaning - I have changeable number of children and would like to lay out them horizontally like: Example: Control1, Control2, Control3, ... I do that by setting: ll.setOrientation(LinearLayout.HORIZONTAL); foreach (Child c in children) ll.addView(c); However, if I have large number of children, last one gets cuts off, instead of going to next line. Any idea how this can be fixed?

    Read the article

  • Binding a combobox in XAML to a childwindow property

    - by AlexB
    Hi, I want to display a child window that contains a combobox with several values coming from one of the child window's property: public partial class MyChildWindow : ChildWindow { private ObservableCollection<MyClass> _collectionToBind = // initialize and add items to collection to make sure it s not empty... public ObservableCollection<MyClass> CollectionToBind { get { return _collectionToBind; } set { _collectionToBind = value; } } } How do I bind in XAML my combobox to the ComboBoxContent collection (both are in the same class)? I've tried several things such as: <ComboBox x:Name="linkCombo" ItemsSource="{Binding Path=CollectionToBind }" DisplayMemberPath="Description"> I've only been able to bind it in the code behind file and would like to learn the XAML way to do it. Thank you!

    Read the article

  • double fork using vfork

    - by Oren S
    HI I am writing a part of a server which should dispatch some other child processes. Because I want to wait on some of the processes, and dispatch others without waiting for completion, I use double fork for the second kind of processes (thus avoiding the zombie processes). Problem is, my server holds a lot of memory, so forking takes a long time (even the copy-on-write fork used in Linux which copies only the paging tables) I want to replace the fork() with vfork(), and it's easy for the second fork (as it only calls execve() in the child), but I couldn't find any way I can replace the first one. Does anyone know how I can do that? Thanks! The server is a linux (RH5U4), written in C++.

    Read the article

  • LINQ to SQL - Grouping categories by parentId

    - by creativeincode
    I am trying to construct a navigation menu using a Categories table from my db. I have a similar layout as below in Categories table. public List<Category> CategoryData = new List(new Category[] { new Category{ CategoryId = 1, Name = "Fruit", ParentCategoryId = null}, new Category{ CategoryId = 2, Name = "Vegetables", ParentCategoryId = null}, new Category{ CategoryId = 3, Name = "Apples", ParentCategoryId = 1}, new Category{ CategoryId = 4, Name = "Bananas", ParentCategoryId = 1}, new Category{ CategoryId = 5, Name = "Cucumber", ParentCategoryId = 2}, new Category{ CategoryId = 6, Name = "Onions", ParentCategoryId = 2} ); } The above should return something like Fruit (parent) "===Apples, Bananas (child) Vegetables (parent) "===Cucumber, Onions (child) I need to be able to pass this as some kind of 'grouped' (grouped by parentid) collection to my View. How to do this?

    Read the article

  • Environment variable (NLS_LANG) value altered in Java process?

    - by Ralkie
    This was noticed in some legacy Java application (jre1.4 on HP-UX). Parent process (shell script S1) is starting Java process, which on its own is starting child process (shell script S2). Schematically it's: S1 Java S2. NB! Java application connects to Oracle DB using OCI driver. What is strange here is that process running S1 has environment variable NLS_LANG set to american_america.BLT8MSWIN1257, Java spawns S2 using: Runtime.getRuntime().exec(cmd); and S2 shows that NLS_LANG is set to american_america.UTF8 (!) This happens on some limited-access environment (production), I was not able to reproduce same problem on linux with jre 1.5. AFAIK, Java process should inherit environment from its parrent (S1) and should pass all environment variables to its child S2 (since single argument exec call was used). However, it does not seem to be the case. Any ideas why NLS_LANG appears to be altered?

    Read the article

  • IE JavaScript Mystery

    - by William Calleja
    I have the following JavaScript function function headerBanner(){ var current = $('.bannerImages img:nth-child('+bannerIndex+')').css('display', 'none'); if(bannerIndex== $('.bannerImages img').size()){ bannerIndex= 1; }else{ bannerIndex= (bannerIndex*1)+1; } var next = $('.bannerImages img:nth-child('+bannerIndex+')').css('display', 'block'); } In every browser on the planet, with the exception of IE (8, 7 or less), the above code is working correctly. In Internet Explorer it's going through it and having no effect. I've put alerts at every line of the function and they all fire, even in IE, but the banner simply doesn't change. Is there any reason as to why this is so?

    Read the article

  • Get class of caller's method (via inspect) in Python; or: super(Class,self).method() replacement wit

    - by Slava Vishnyakov
    Is it possible to get reference to class B in this example? class A(object): pass class B(A): def test(self): test2() class C(B): pass import inspect def test2(): frame = inspect.currentframe().f_back cls = frame.[?something here?] # cls here should == B (class) c = C() c.test() Basically, C is child of B, B is child of A. Then we create c of type C. Then the call to c.test() actually calls B.test() (via inheritance), which calls to test2(). test2() can get the parent frame frame; code reference to method via frame.f_code; self via frame.f_locals['self']; but type(frame.f_locals['self']) is C (of course), but not B, where method is defined. Any way to get B?

    Read the article

  • Perl CGI script to not wait for a subprocess to complete

    - by Tyug
    Is it possible to continue displaying a CGI script's HTML without waiting for a child process to complete, yet the child process should stay alive when the CGI script is complete. Here's what I have, -- Display HTML page # html page set up... so header/other stuff #the -c, -h are params are just params system("perl subprocess.pm -c params -h 1 &"); #actually print the html page setup ... For some weird reason, it waits for the subprocess to finish before it outputs the html page even though I included the asynchronous system call for linux. It doesn't render the page immediately. Is it possible to print the html page without waiting for the subprocess to finish?

    Read the article

  • Correct (pretty) window redraw during the creation

    - by Coder
    Does anyone know what is a correct way to redraw window during lengthy initialization operations? Say I have HWND with NULL brush, and it does some not so quick child window initialization (Window initialization is not so quick on Vista and 7, especially on netbooks, even with threaded app). With this config window stays black for half a second on slower laptops. But if I supply window color brush, it seems that there are some sort of child controls or something that draws black squares on top of it, which also seems ugly. Even though the controls are created without WS_VISIBLE initially. Oh, the window has the WS_EX_COMPOSITED style, which should do the double buffering to avoid flicker. But it still behaves ugly. Are there any other tricks I've forgotten, missed?

    Read the article

  • Json to treeview (<ul>)

    - by Pieter
    Hi I get the following data back from my WCF Data Service (I cut out the metadata) { "d" : [ {"CodeId": 6, "Title": "A Child Sub Item", "Parent":}, {"CodeId": 5, "Title": "Another Root Item", "Parent": -1}, {"CodeId": 4, "Title": "Child Item", "Parent": 2}, {"CodeId": 2, "Title": "Root Item", "Parent": -1} ] } I am trying to get this into a <ul> style tree with Parent = -1 as root and then the rest as sub items of their parent id's. Can anyone help me please, preferably in jQuery? I will use this in jstree if someone knows of a better way to do this. Thanks

    Read the article

  • looping through an object (tree)

    - by Val
    Is there a way (in jquery or javascript) to loop through each object and it's children and gandchildren and so on. if so... can i also read their name? example foo :{ bar:'', child:{ grand:{ greatgrand: { //and so on } } } } so the loop should do something like this... loop start if(nameof == 'child'){ //do something } if(nameof == 'bar'){ //do something } if(nameof =='grand'){ //do something } loop end I know this is stupid code but i tried to make it understandable :) btw this is for a jquery UI, as i am clueless how to go on about this. thanks

    Read the article

  • How can I also add class to the last list for the second list block in IE?

    - by user244394
    Hi All I have 2 list and i want to add a class ="last" to the list item 5 for both. they seem to work fine on firefox. it add green to both list item 5. But in IE7 it adds only the first list item 5, not the second How can I also add class last it to the second list block as well for IE? .last{background-color: green} jQuery( document ).ready( function () { // Add first and last menu item classes $('ul.menu li:first-child').addClass( 'first_item' ); $('#menu li:last-child').addClass( 'last' ); }); list item 1 list item 2 list item 3 list item 4 list item 5 list item 1 list item 2 list item 3 list item 4 list item 5

    Read the article

  • Avoid warning 'Unreferenced Formal Parameter'

    - by bdhar
    I have a super class like this: class Parent { public: virtual void Function(int param); }; void Parent::Function(int param) { std::cout << param << std::endl; } ..and a sub-class like this: class Child : public Parent { public: void Function(int param); }; void Child::Function(int param) { ;//Do nothing } When I compile the sub-class .cpp file, I get this error warning C4100: 'param' : unreferenced formal parameter As a practise, we used to treat warnings as errors. How to avoid the above warning? Thanks.

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >