Search Results

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

Page 75/174 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • Can operator= may be not a member?

    - by atch
    Having construction in a form: struct Node { Node():left_(nullptr), right_(nullptr) { } int id_; Node* left_; Node* right_; }; I would like to enable syntax: Node parent; Node child; parent.right_ = child; So in order to do so I need: Node& operator=(Node* left, Node right); but I'm getting msg that operator= has to be a member fnc; Is there any way to circumvent this restriction?

    Read the article

  • Global Entity Framework Context in WPF Application

    - by OffApps Cory
    Good day, I am in the middle of development of a WPF application that is using Entity Framework (.NET 3.5). It accesses the entities in several places throughout. I am worried about consistency throughout the application in regard to the entities. Should I be instancing separate contexts in my different views, or should I (and is a a good way to do this) instance a single context that can be accessed globally? For instance, my entity model has three sections, Shipments (with child packages and further child contents), Companies/Contacts (with child addresses and telephones), and disk specs. The Shipments and EditShipment views access the DiskSpecs, and the OptionsView manages the DiskSpecs (Create, Edit, Delete). If I edit a DiskSpec, I have to have something in the ShipmentsView to retrieve the latest specs if I have separate contexts right? If it is safe to have one overall context from which the rest of the app retrieves it's objects, then I imagine that is the way to go. If so, where would that instance be put? I am using VB.NET, but I can translate from C# pretty good. Any help would be appreciated. I just don't want one of those applications where the user has to hit reload a dozen times in different parts of the app to get the new data. Update: OK so I have changed my app as follows: All contexts are created in Using Blocks to dispose of them after they are no longer needed. When loaded, all entities are detatched from context before it is disposed. A new property in the MainViewModel (ContextUpdated) raises an event that all of the other ViewModels subscribe to which runs that ViewModels RefreshEntities method. After implementing this, I started getting errors saying that an entity can only be referenced by one ChangeTracker at a time. Since I could not figure out which context was still referencing the entity (shouldn't be any context right?) I cast the object as IEntityWithChangeTracker, and set SetChangeTracker to nothing (Null). This has let to the current problem: When I Null the changeTracker on the Entity, and then attach it to a context, it loses it's changed state and does not get updated to the database. However if I do not null the change tracker, I can't attach. I have my own change tracking code, so that is not a problem. My new question is, how are you supposed to do this. A good example Entity query and entity save code snipped would go a long way, cause I am beating my head in trying to get what I once thought was a simple transaction to work. Any help would elevate you to near god-hood.

    Read the article

  • Can a ScatterViewItem dynamically resize to fit its content?

    - by Brett
    We're hosting a control inside of a ScatterViewItem that dynamically changes its size at runtime as a result of having various sub-elements added, removed, and/or collapsed. We would like to have the hosting ScatterViewItem resize as well to properly fit its child controls, but we're having a hard time making this happen. We've tried a number of different things and the closest we've come is hooking into the child control's SizeChanged event and explicitly setting the ScatterViewItem's Width and Height, but this approach still has issues. When you define a ScatterViewItem and its content in XAML, the ScatterViewItem is sized appropriately. We would like to force the same behavior at runtime when its content changes size. Any help would be greatly appreciated. Thanks!

    Read the article

  • android circulate gallery iteration with 10 items.

    - by Faisal khan
    I am using the following customize gallery. I am having static 10 images, i want circulatery gallery which should circlate always should never ends after last item it should auto start by 1 or after first it should auto start from end. public class SizingGallery extends Gallery{ public SizingGallery(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); ImageView selectedChild = (ImageView)getSelectedView(); ImageView iv =(ImageView)child; BrowseMapCategoryRow cr = (BrowseMapCategoryRow)iv.getTag(); if (iv == selectedChild) { selectedChild.setImageResource(cr.getSelectedImgSrc()); }else{ iv.setImageResource(cr.getUnSelectedImgSrc()); } return true; } @Override protected int getChildDrawingOrder(int childCount, int i) { return super.getChildDrawingOrder(childCount, i); } }

    Read the article

  • How to hide cmd.exe console?

    - by karikari
    I put this below code inside my *.dll for Internet Explorer. FILE *child = _popen("java -jar c:\\simmetrics.jar c:\\chtml.txt c:\\thtml.txt > c:\\output.txt", "r"); fclose(child); My problem is, when I run my Internet Explorer, the will be a cmd.exe console open too. I don't want the console to suddenly appear when I run my browser. How can I avoid this or hide it or not to execute it at all)?

    Read the article

  • Adding view to UIScrollView and toggling scrolling/interacting

    - by Peter Hajas
    Hi all! I have a UIScrollView in my project. I have a view controller I would like to add as a child of the UIScrollview. Would I just do that like this: [scrollView addSubview:theViewController.view]; or is there a better way? (theView is a view, not the TV show) Furthermore, I would like to be able to use a UIButton in scrollView's parent view controller to toggle whether or not the user is scrolling with scrollView and NOT interacting with theView or NOT scrolling with scrollview and interacting with theView. Should I just have that set the property: scrollView.userInteractionEnabled = NO; or would that disable interaction with theView because it's a child? Thanks for your help!

    Read the article

  • Behavior of a pipe after a fork()

    - by Steve Melvin
    When reading about pipes in Advanced Programming in the UNIX Environment, I noticed that after a fork that the parent can close() the read end of a pipe and it doesn't close the read end for the child. When a process forks, does its file descriptors get retained? What I mean by this is that before the fork the pipe read file descriptor had a retain count of 1, and after the fork 2. When the parent closed its read side the fd went to 1 and is kept open for the child. Is this essentially what is happening? Does this behavior also occur for regular file descriptors?

    Read the article

  • Apache on linux and i18n : spawning processes or threads ?

    - by Jerome WAGNER
    Hello, I would like to understand better exactly what is going on when Apache on linux receive an HTTP request in a process pre-fork model. Let's say we have 20 Apache child processes waiting. When I receive an HTTP request, is it true to say that 1 child process will be chosen to handle the request and that this process won't handle another request from another user until the first one is finished ? I am asking the question because of a PHP limitation that states : The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale(). Thanks Jerome Wagner

    Read the article

  • Placing figure in top-right corner of another

    - by Ivan Dubrov
    I want child figure (org.eclipse.draw2d.Figure) to be relative to the top-right corner of the parent (I want place some small icon, which will be ImageFigure, to be 12 pixels from top and right borders). Is there an existing layout manager that can layout child this way? The org.eclipse.draw2d.XYLayout is not capable of measuring position relative to corner other than top-left. Of course, I can: Write layout manager myself Layout children figure every time bounds are changed for the parent (in parent layout() method). However, I would like to know if some existing layout manager provides that functionality.

    Read the article

  • [AS2] Button Problem

    - by Adam Kiss
    problem hello, I have Button (with no name), which has a MovieClip child. this movie_clip called ax_kr has XX frames, each containing one image. Now, upon loading flash or frame containg this button (actually, 43 of them), I would like to tell to each button, that in your ax_kr MovieClip, load frame YY - first one would load frame 2, second frame 3, third frame 4 etc. etc. Or is there anyway to use one generic MovieClip/Button with that ax_kr MovieClip as child with frame xy as active and two more actions? (on RollOver, another MC on stage goes to frame xy (same as ax_kr has) and on Click, another MC on stage goes to frame xy (still the same number)) I did previously in as3 and find it quite okay, but now I have to enhance old as2 application and I feel like I should just kill myself.

    Read the article

  • TreeView Databinding

    - by Anu
    Hi,I want to add items in treeviewi n WPF.I have function as public void SetTree(string Title,int Boxtype,int BoxNo ) { sBoxType = "Group"; TreeList items = TreeList.Load(Title, sBoxType, BoxNo); DataContext = items; } XAML Code of TreeView: <TreeView Margin="16,275,18,312" x:Name="treeView1" ItemsSource="{Binding}" ItemTemplate="{StaticResource TreeItemTemplate}"> </TreeView> <DataTemplate x:Key="TreeItemTemplate"> <WrapPanel> <TextBlock Text="{Binding Path=Title}" /> <TextBlock Text="{Binding Path=Box}" /> </WrapPanel> </DataTemplate> Actually i wan to TreeView ot display lik +Group (header) Controllersgroup 5 (Child items). As multicolumn child items.But it dislay like Controllersgroup5

    Read the article

  • nested sortable table rows jquery

    - by FLY
    Hi, I am trying to sort rows of a table, and put them as 'child' elements of a table row I found this: http://code.google.com/p/nestedsortables/ this works with ul li lists, but i want to build it for a table. <table> <thead> <th>tablehead</th> </thead> <tbody> <tr><td>somevalue</td></tr> <tr><td>somevalue2</td></tr> </tbody> </table> so yeah you can use jquery.sortable() and sort the rows, but i want 'somevalue' to be become a child element of 'somevalue2' if you drag 'somevalue' over 'somevalue2' I don't know if it is posible with a table. can anyone help me? Thnx!

    Read the article

  • Different url scheme for Zend Framework

    - by ChrisRamakers
    For our CMS we have a site manager that defines the site's tree structure (sitemap if you want to call it that). A possible url is www.example.com/our-team/developers/chris/ which would map in the tree structure to the node chris, child old developers which is in turn a child of out-team. All this is in place and working the the wonderfully implemented Nested Set behavior in doctrine. The only thing is that i'm struggling to get it working in the front end of our website. By default Zend framework's request object expects controller/action/key/value/key/value/... URI scheme but that isn't quite fitting my needs, i would like to skip the whole controller, action and key part and restrict to values. Something like value1/value2/value3/value4/... Anyone has an idea how to accomplish this?

    Read the article

  • Single specific string replace method Objective C

    - by Sam
    Hi guys, I wanted to know if theres a single method or way that will help me replace strings for specific characters. like MALE - M FEMALE - F CHILD - P The longer way out is this.. [str stringByreplacingOccurencesOfString:@"MALE" withString:@"M"]; [str stringByreplacingOccurencesOfString:@"FEMALE" withString:@"F"]; [str stringByreplacingOccurencesOfString:@"CHILD" withString:@"P"]; I was wondering if theres another way in which i can reduce lines of code here, specially when there are alots of things to replace. thanks. this is for iPhone OS.

    Read the article

  • How to call a wpf singleton service within a wpf singleton service without hanging?

    - by Michael Hedgpeth
    I have two services, one that calls another. Both are marked as singletons as follows: [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)] public class Service : IService And I set these up with a ServiceHost as follows: ServiceHost serviceHost = new ServiceHost(singletonElement); serviceHost.Open(); When the parent service tries to call the child service on the same machine, the parent service hangs, waiting for the child service. I'm already considering moving away from the singleton model, but is there anything wrong with my approach? Is there an explanation for this behavior and a way out of it?

    Read the article

  • WCF over named pipes

    - by Christoph
    Hi I have a problem with following scenario: There is a windows service running which spawns several processes. These processes open a WCF service host over a named pipe binding. Now the parent windows service tries to ping (connect) to the child processes using the wcf proxy over the well known named pipe. This, however fails saying: "Endpoint not found" If I run the parent process as a console application it works fine. Any ideas? I was thinking about permissions but the child processes should inherit the permission of the service, besides they are in the same session as well. thanks, Christoph

    Read the article

  • Add mask to input

    - by Lodewijk Wensveen
    I'm trying to achieve the seemingly impossible task of adding an mask to a input field. I have the following code: function addActivationCode(){ newRow = jQuery("div.activationcode:last-child").clone(); newRow.insertAfter(jQuery("div.activationcode:last-child")); newRow.attr("id", "coderow-" + Math.round(Math.random() * 10000)); newRow.find("input").val(""); find("input").mask("9999-9999-9999-9999"); newRow.find("a.coderemove").attr("onclick", "removeActivationCode('" + newRow.attr("id") + "'); return false;"); } function removeActivationCode(id){ jQuery("div#" + id).remove(); } Now I to get the .mask working on my input fields, so far I've only got it working on the new row I'm making and not on the original one. Can anyone help me out?

    Read the article

  • WPF: Is ListBox or Panel responsible for mouse wheel navigation?

    - by HDW
    I have a custom ListBox which uses a custom Panel as ItemsHost. I want to have control over mouse wheel input, so that turning the wheel changes the single selected item. I believe that the best method to do so is to handle the OnPreviewMouseWheel event (although this is only have what I want since it doesn't provide horizontal wheel data). Now the big question: Is there a best practice where to handle OnPreviewMouseWheel? In ListBox (which by default doesn't have a clue about the arrangement of the Panel's child elements) or in Panel (which by default doesn't have a clue about the "IsSelected" property of it's child elements)?

    Read the article

  • How to cancel drop event in YUI drag & drop utility?

    - by gk
    We are using drag & drop utility between one source and multiple targets. We have a restriction that one of the target can only have one child element while the other ones can have multiple items. I have tried subscribing dragDropEvent of the proxy item and returning false in case the destination target has multiple child elements, with out much luck. var m = new YAHOO.example.DDList("dli" + j, 'documentSelection'); m.subscribe('dragDropEvent', function(e){ if (e.info == 'ulMasterDocument' && $('#ulMasterDocument').children().length > 1){ e.event.canceBubble = true; return false; } return true; }); Is this code correct? Or do i need to subscribe some other event? Thanks

    Read the article

  • C: sprintf and recursion

    - by Shinka
    In C, is it possible to use recursion within the sprintf function ? For some reason I get a segmentation fault when I do it: inline char *TreeNode_toString(const TreeNode *node) { char *out; if(TreeNode_isExternal(node)) // If the node has no children... { sprintf(out, "%s:%.2f", node->name, node->distance); } else // The node is strictly binary, so it will have two non-null children { char *l = TreeNode_toString(node->l); // l = left child char *r = TreeNode_toString(node->r); // r = right child sprintf(out, "(%s,%s):%.2f", l, r, node->distance); } return out; }

    Read the article

  • Init modules in apache2

    - by user306963
    Hello, I used to write apache modules in apache 1.3, but these days I am willing to pass to apache2. The module that I am writing at the moment has is own binary data, not a database, for performance purposes. I need to load this data in shared memory, so every child can access it without making his own copy, and it would be practical to load/create the binary data at startup, as I was used to do with apache 1.3. Problem is that I don't find an init event in apache2, in 1.3 in the module struct, immediatly after STANDARD_MODULE_STUFF you find a place for a /** module initializer */, in which you can put a function that will be executed early. Body of the function I used to write is something like: if ( getppid == 1 ) { // Load global data here // this is the parent process void* data = loadGlobalData( someFilePath ); setGlobalData( config, data ); } else { // this is the init of a child process // do nothing } I am looking for a place in apache2 in where I can put a similar function. Can you help? Thanks Benvenuto

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >