Search Results

Search found 8397 results on 336 pages for 'implementation'.

Page 137/336 | < Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >

  • Performance - FunctionCall vs Event vs Action vs Delegate

    - by hwcverwe
    Currently I am using Microsoft Sync Framework to synchronize databases. I need to gather information per record which is inserted/updated/deleted by Microsoft Sync Framework and do something with this information. The sync speed can go over 50.000 records per minute. So that means my additional code need to be very lightweight otherwise it will be a huge performance penalty. Microsoft Sync Framework raises an SyncProgress event for each record. I am subscribed to that code like this: // Assembly1 SyncProvider.SyncProgress += OnSyncProgress; // .... private void OnSyncProgress(object sender, DbSyncProgressEventArgs e) { switch (args.Stage) { case DbSyncStage.ApplyingInserts: // MethodCall/Delegate/Action<>/EventHandler<> => HandleInsertedRecordInformation // Do something with inserted record info break; case DbSyncStage.ApplyingUpdates: // MethodCall/Delegate/Action<>/EventHandler<> => HandleUpdatedRecordInformation // Do something with updated record info break; case DbSyncStage.ApplyingDeletes: // MethodCall/Delegate/Action<>/EventHandler<> => HandleDeletedRecordInformation // Do something with deleted record info break; } } Somewhere else in another assembly I have three methods: // Assembly2 public class SyncInformation { public void HandleInsertedRecordInformation(...) {...} public void HandleUpdatedRecordInformation(...) {...} public void HandleInsertedRecordInformation(...) {...} } Assembly2 has a reference to Assembly1. So Assembly1 does not know anything about the existence of the SyncInformation class which need to handle the gathered information. So I have the following options to trigger this code: use events and subscribe on it in Assembly2 1.1. EventHandler< 1.2. Action< 1.3. Delegates using dependency injection: public class Assembly2.SyncInformation : Assembly1.ISyncInformation Other? I know the performance depends on: OnSyncProgress switch using a method call, delegate, Action< or EventHandler< Implementation of SyncInformation class I currently don't care about the implementation of the SyncInformation class. I am mainly focused on the OnSyncProgress method and how to call the SyncInformation methods. So my questions are: What is the most efficient approach? What is the most in-efficient approach? Is there a better way than using a switch in OnSyncProgress?

    Read the article

  • How to design the application to conform to the n-tier architecture? (Winform sample in .net with li

    - by AlexRednic
    Rather a simple question. But the implications are vast. Over the last few weeks I've been reading a lot of material about n-tier architecture and it's implementation in the .NET world. The problem is I couldn't find a relevant sample for Winforms with Linq (linq is the way to go for BLL right?). How did you guys manage to grasp the n-tier concept? Books, articles, relevant samples etc.

    Read the article

  • Thread pool stack security issue

    - by elmatador
    In a naive implementation of a thread pool, can a piece of code that is being executed read the data left by some previous code on the stack (if it was running on the same thread instance)? Also, are there any other inherent security issues connected to thread pools?

    Read the article

  • Can anyone provide Java program for btree or b+tree???

    - by rohit
    Hi, I am doing a project in which i require btree or b+tree data structure. but its not an important part of project. it would take my time to write a code for it. I googled it but didn't get anything.... So, can anyone provide java code for btree or b+tree implementation (with insert, delete, search algorithms)?????? it should accept string as input and form btree or b+tree of these string.

    Read the article

  • How to set/check cookies in iPhone app?

    - by Channing
    Hi, I am trying to set a cookie and also check if it is there, does anybody have any sample code for this? All I found was this, but it would be helpful if I could see an implementation example. http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSHTTPCookieStorage_Class/Reference/Reference.html

    Read the article

  • Collection, which method is used to authorize an add of an element ?

    - by Duke Vador
    We find a lot of concrete subclasses under Collection. While trying to add an element in a concrete collection, this collection will use a method to determine if it can accept to store the element (and eventually that this element is not already in the collection). It could use equals(), hashCode() or compareTo() of the element. Is it possible to find a summary about which method is used by each implementation of Collection ? Thanks a lot for your answers.

    Read the article

  • ConcurrenctBag(Of MyType) Vs List(Of MyType)

    - by Ben
    What is the advantage of using a ConcurrentBag(Of MyType) against just using a List(Of MyType)? The MSDN page on the CB (http://msdn.microsoft.com/en-us/library/dd381779(v=VS.100).aspx) states that ConcurrentBag(Of T) is a thread-safe bag implementation, optimized for scenarios where the same thread will be both producing and consuming data stored in the bag So what is the advantage? I can understand the advantage of the other collection types in the Concurrency namespace, but this one puzzled me. Thanks.

    Read the article

  • BlockingQueue decorator that logs removed objects

    - by scompt.com
    I have a BlockingQueue that's being used in a producer-consumer situation. I would like to decorate this queue so that every object that's taken from it is logged. I know what the straightforward implementation would look like: simply implement BlockingQueue and accept a BlockingQueue in the constructor to which all of the methods would delegate. Is there another way that I'm missing? A library perhaps? Something with a callback interface?

    Read the article

  • Add 'Current' property to ASP.NET control

    - by Alex
    Hi! I have some control. I add one instance of this control to every Page in OnInit event and I want to access this control in other places in this way: Sample.Current public class Sample : Control { public static Sample Current { get { // ??? } } } Can you tell me what is the best way to do this property implementation?

    Read the article

  • Can you suggest some UI related flex 3 interview questions for a senior pos?

    - by mohan talluri
    Our Company is looking for a sr.flex developer. As part of interview process customized UI understanding and implementation is also included. I am Usability&design Lead for the same product team have some understanding of flex 3 but am not sure if pure UI/usability questions can be answered by flex developer. So can you suggest some UI related questions to see if he/she has competency to refer a prototype(html/mockup's) and build the same UI in flex.

    Read the article

  • Exporting an Environment Variable in Ruby

    - by wilhelmtell
    How do I export an environment variable from within a Ruby script to the parent shell? For example, implementing a naïve implementation of the /usr/bin/read utility: #!/usr/bin/ruby varname = ARGV[0] ENV[varname] = STDIN.gets # but have varname exported to the parent process

    Read the article

  • C++ header files and variable scope

    - by MrDatabase
    I want to organize my c++ variables and functions in the following way: function prototypes in a header file "stuff.h", function implementation in "stuff.cpp", then say #include "stuff.h" in main.cpp (so I can call functions implemented in stuff.cpp). So far so good. Now I want to declare some variables in stuff.cpp that have global scope (so I can modify the variables in functions implemented in stuff.cpp and main.cpp). This doesn't seem to work. How can I do this?

    Read the article

  • What does the length attribute do when set on the @Column JPA annontation?

    - by James McMahon
    What exactly does setting the length on a column do in JPA? @Column(name = "middle_name", nullable = false, length = 32) public String getMiddleName() { return this.middleName; } I understand that you can use the annotations to generate the database schema based on the entity objects, but does length do any sort of check or truncation when persistence happens, or it solely used for schema creation? I also realize that JPA can sit on top of various implementations, the implementation I am concerned with in this case, is Hibernate.

    Read the article

  • Breadcrumb Navigation For Cocoa

    - by Till Theis
    Is there an open source implementation of a breadcrumb navigation for the Cocoa framework? Those path bars seem to gain more attraction these days (used in Transmit or Instinctiv) but the implementations I found are closed source.

    Read the article

  • How to modify TaskDialog's Show() call to be blocking and return a value when closed?

    - by JustABill
    I'm using the WindowsAPICodePack's TaskDialog implementation, but it bugs me that I have to listen to click handlers on its buttons for even the more basic implementations. I'd like to convert/wrap it so that like the old MessageBox it blocks until closed and then returns a value based on what was done. Is there anything I can read for the basics on how to do this? I just have no idea where to even start, as I am admittedly not that familiar with the Win32 underpinnings.

    Read the article

  • Question about fwrite API

    - by michael
    Hi, In C++, there is a fwrite() which writes a buffer to a file on disk: http://www.cplusplus.com/reference/clibrary/cstdio/fwrite/ Can you please tell me if there is any buffer inside that fwrite implementation? i.e. if I call fwrite() multiple times (say 10 times), does it actually invoke file i/o 10 different times? Thank you.

    Read the article

  • How to retreive Bundle Version in a label from project test-Info.plist in iphone?

    - by aman-gupta
    Hi, Here I m pasting my codes where i want to retrive Bundle version from my test-Info.plist. // // testAppDelegate.h // test // // Created by Fortune1 on 20/04/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> @class testViewController; @interface testAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; testViewController *viewController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet testViewController *viewController; @end ////////////// // // testAppDelegate.m // test // // Created by Fortune1 on 20/04/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "testAppDelegate.h" #import "testViewController.h" @implementation testAppDelegate @synthesize window; @synthesize viewController; - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after app launch [window addSubview:viewController.view]; [window makeKeyAndVisible]; } - (void)dealloc { [viewController release]; [window release]; [super dealloc]; } @end ///////////////////// // // testViewController.h // test // // Created by Fortune1 on 20/04/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> @interface testViewController : UIViewController { UILabel *label; } @property(nonatomic,retain) IBOutlet UILabel *label; @end /////////////////////// // // testViewController.m // test // // Created by Fortune1 on 20/04/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "testViewController.h" @implementation testViewController @synthesize label; /* // The designated initializer. Override to perform setup that is required before the view is loaded. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } */ /* // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView { } */ - (void)viewDidLoad { [super viewDidLoad]; NSString *path = [[NSBundle mainBundle] pathForResource:@"test-info" ofType:@"plist"]; NSString *versionString = [NSString stringWithFormat:@"v%d", [plistData objectForKey:@"Bundle version"]]; label.text = versionString; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end But still I got null value where i m wrong please help me out Thanks in advance

    Read the article

< Previous Page | 133 134 135 136 137 138 139 140 141 142 143 144  | Next Page >