Search Results

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

Page 51/336 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • NullTransport for WCF

    This article describes design, implementation and the usage of the custom in-process transport for Microsoft Windows Communication Foundation (WCF) model.

    Read the article

  • WS-Eventing for WCF (Indigo)

    This article describes the design, implementation and usage of the WS-Eventing for distributed applications driven by new MS communication model WCF (Windows Communication Foundation)

    Read the article

  • Should I implement an interface directly or have the superclass do it?

    - by c_maker
    Is there a difference between public class A extends AbstractB implements C {...} versus... public class A extends AbstractB {...} AbstractB implements C {...} I understand that in both cases, class A will end up conforming to the interface. In the second case, AbstractB can provide implementation for interface methods in C. Is that the only difference? If I do NOT want to provide an implementation for any of the interface methods in AbstractB, which style should I be using? Does using one or the other have some hidden 'documentation' purpose?

    Read the article

  • How is this "interface"-like structure/pattern called?

    - by Sebastian Negraszus
    Let's assume we have an XmlDoc class that contains basic functionality for dealing with an XML data structure and saving/loading data to/from a file. Now we have several subclasses, A, B and C. They all inherit from XmlDoc and add component-specific methods for setting and getting lots of data. They are like "interfaces" but also add an implementation for the signatures. Finally, we have an ABCDoc class that joins all the "interfaces" via virtual multiple inheritence and adds some ABCDoc-specific stuff, such as using XMLDoc-methods to set an appropriate doc type. We may also have an ADoc class for only saving A data. How is this pattern called? "Interface" is not really the right word since interfaces usually do not contain an implementation. Bonus points for C++ code conventions.

    Read the article

  • Creating a Lazy Sequence of Directory Descendants in C#

    My dear friend Craig Andera posted an implementation of a function that descends into a directory in a "lazy" manner, i.e. you get the first descendant back right away and not after all descendants have been calculated. His implementation was in Clojure, a Lisp variant that runs on the Java VM: (import [java.io File])(defn dir-descendants [dir]  (let [children (.listFiles (File. dir))]    (lazy-cat      (map (memfn getPath) (filter (memfn isFile) children))...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Is ROA a specific form of SOA?

    - by JohnDoDo
    I have read somewhere that ROA (Resource Oriented Architecture) is SOA (Service Oriented Architecture) with specific constraints added. SOA is the abstract term and that ROA is an implementation of SOA with all of the constraints of RESTful services (SOA = concept, ROA = concept + implementation details). I also had my share of posts saying that ROA is REST and that SOA is SOAP and going into the same more or less pertinent comparisons between the two (SOAP and REST that is) etc etc. So just to clear up my confusion: Is ROA a specific form of doing SOA?

    Read the article

  • Base on User Drawing Create Polygon Body as well Image

    - by Siddharth
    In my game, I want to provide a user with drawing feature. By free hand drawing user create a polygon shape. So in my game implementation I have to create body for all found vertices and I have to generate image based on that polygon shape. So my problem is how to create image that match the user provided vertices. In cocos2d I listen that there is an implementation of something like Image Masking. But I don't understand how that thing I implement in andengnine. Please provide any guidance on how to create image same as user generated polygon shape.

    Read the article

  • Moving from mock to real objects?

    - by jjchiw
    I'm like doing TDD so I started everything mocking objects, creating interface, stubbing, great. The design seems to work, now I'll implement the stuff, a lot of the code used in the stubs are going to be reused in my real implementation yay! Now should I duplicate the tests to use the real object implementation (but keeping the mocks object of the sensitive stuff like Database and "services" that are out of my context (http calls, etc...)) Or just change the mocks and stubs of the actual tests to use the real objects....... So the question is that, keep two tests or replace the stubs, mocks? And after that, I should keep designing with the mocks, stubs or just go with real objects? (Just making myself clear I'll keep the mock object of the sensitive stuff like database and services that are out of my context, in both situations.)

    Read the article

  • What to do if I hate C++ header files?

    - by BlaXpirit
    I was always confused about header files. They are so strange: you include .h file which doesn't include .cpp but .cpp are somehow compiled too. NOTE: I UNDERSTAND EVERYTHING ABOUT THE HEADERS, PLEASE DON'T TELL ME I'M STUPID OR SHOULD USE OTHER LANGUAGE Recently I joined a team project, and of course, both .h and .cpp are used. I understand that this is very important, but I can't live with copy-pasting every function declaration in each of multiple classes we have. How do I handle the 2-file convention efficiently? Are there any tools to help with that, or automatically change one file that looks like example below to .h and .cpp? (specifically for MS VC++ 2010) class A { ... Type f(Type a,Type b) { //implementation here, not in another file! } ... }; Type f(Type a) { //implementation here } ...

    Read the article

  • Detect rotated rectangle collision

    - by handyface
    I'm trying to implement a script that detects whether two rotated rectangles collide for my game. I used the method explained in the following article for my implementation in Google Dart. 2D Rotated Rectangle Collision I tried to implement this code into my game. Basically from what I understood was that I have two rectangles, these two rectangles can produce four axis (two per rectangle) by subtracting adjacent corner coordinates. Then all the corners from both rectangles need to be projected onto each axis, then multiplying the coordinates of the projection by the axis coordinates (point.x*axis.x+point.y*axis.y) to make a scalar value and checking whether the range of both the rectangle's projections overlap. When all the axis have overlapping projections, there's a collision. First of all, I'm wondering whether my comprehension about this algorithm is correct. If so I'd like to get some pointers in where my implementation (written in Dart, which is very readable for people comfortable with C-syntax) goes wrong. Thanks!

    Read the article

  • IronRuby 1.0 et IronPython 2.6.1, les implémentations de Ruby et de Python pour .NET sont disponible

    IronRuby 1.0 et IronPython 2.6.1 Les implémentations de Ruby et de Python pour .NET sont disponibles L'univers de .NET s'enrichit encore un peu plus avec l'arrivée de IronRuby 1.0. Comme l'explique très bien Thibaut Barrère sur son blog Développez, « IronRuby, c'est tout simplement ?Ruby pour .Net? » ou plus exactement « une implémentation de Ruby s'appuyant sur le runtime .Net. Le but affiché de ce projet est de fournir une implémentation de qualité, compatible Ruby 1.8.x, tout en permettant un bon niveau d'inter-opérabilité avec les librairies .Net ». Longtemps en projet, IronRuby 1.0 vient donc de sortir officiellement aujourd'hui en deux versions différent...

    Read the article

  • Overriding Object.Equals() instance method in C#; now Code Analysis / FxCop warning CA2218: "should

    - by Chris W. Rea
    I've got a complex class in my C# project on which I want to be able to do equality tests. It is not a trivial class; it contains a variety of scalar properties as well as references to other objects and collections (e.g. IDictionary). For what it's worth, my class is sealed. To enable a performance optimization elsewhere in my system (an optimization that avoids a costly network round-trip), I need to be able to compare instances of these objects to each other for equality – other than the built-in reference equality – and so I'm overriding the Object.Equals() instance method. However, now that I've done that, Visual Studio 2008's Code Analysis a.k.a. FxCop, which I keep enabled by default, is raising the following warning: warning : CA2218 : Microsoft.Usage : Since 'MySuperDuperClass' redefines Equals, it should also redefine GetHashCode. I think I understand the rationale for this warning: If I am going to be using such objects as the key in a collection, the hash code is important. i.e. see this question. However, I am not going to be using these objects as the key in a collection. Ever. Feeling justified to suppress the warning, I looked up code CA2218 in the MSDN documentation to get the full name of the warning so I could apply a SuppressMessage attribute to my class as follows: [SuppressMessage("Microsoft.Naming", "CA2218:OverrideGetHashCodeOnOverridingEquals", Justification="This class is not to be used as key in a hashtable.")] However, while reading further, I noticed the following: How to Fix Violations To fix a violation of this rule, provide an implementation of GetHashCode. For a pair of objects of the same type, you must ensure that the implementation returns the same value if your implementation of Equals returns true for the pair. When to Suppress Warnings ----- Do not suppress a warning from this rule. [arrow & emphasis mine] So, I'd like to know: Why shouldn't I suppress this warning as I was planning to? Doesn't my case warrant suppression? I don't want to code up an implementation of GetHashCode() for this object that will never get called, since my object will never be the key in a collection. If I wanted to be pedantic, instead of suppressing, would it be more reasonable for me to override GetHashCode() with an implementation that throws a NotImplementedException? Update: I just looked this subject up again in Bill Wagner's good book Effective C#, and he states in "Item 10: Understand the Pitfalls of GetHashCode()": If you're defining a type that won't ever be used as the key in a container, this won't matter. Types that represent window controls, web page controls, or database connections are unlikely to be used as keys in a collection. In those cases, do nothing. All reference types will have a hash code that is correct, even if it is very inefficient. [...] In most types that you create, the best approach is to avoid the existence of GetHashCode() entirely. ... that's where I originally got this idea that I need not be concerned about GetHashCode() always.

    Read the article

  • Shawn Wildermuth violating MVVM in MSDN article?

    - by rasx
    This may be old news but back in March 2009, Shawn Wildermuth, his article, “Model-View-ViewModel In Silverlight 2 Apps,” has a code sample that includes DataServiceEntityBase: // COPIED FROM SILVERLIGHTCONTRIB Project for simplicity /// <summary> /// Base class for DataService Data Contract classes to implement /// base functionality that is needed like INotifyPropertyChanged. /// Add the base class in the partial class to add the implementation. /// </summary> public abstract class DataServiceEntityBase : INotifyPropertyChanged { /// <summary> /// The handler for the registrants of the interface's event /// </summary> PropertyChangedEventHandler _propertyChangedHandler; /// <summary> /// Allow inheritors to fire the event more simply. /// </summary> /// <param name="propertyName"></param> protected void FirePropertyChanged(string propertyName) { if (_propertyChangedHandler != null) { _propertyChangedHandler(this, new PropertyChangedEventArgs(propertyName)); } } #region INotifyPropertyChanged Members /// <summary> /// The interface used to notify changes on the entity. /// </summary> event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged { add { _propertyChangedHandler += value; } remove { _propertyChangedHandler -= value; } } #endregion What this class implies is that the developer intends to bind visuals directly to data (yes, a ViewModel is used but it defines an ObservableCollection of data objects). Is this design diverging too far from the guidance of MVVM? Now I can see some of the reasons why Shawn would go this way: what Shawn can do with DataServiceEntityBase is this sort of thing (which is intimate with the Entity Framework): // Partial Method to support the INotifyPropertyChanged interface public partial class Game : DataServiceEntityBase { #region Partial Method INotifyPropertyChanged Implementation // Override the Changed partial methods to implement the // INotifyPropertyChanged interface // This helps with the Model implementation to be a mostly // DataBound implementation partial void OnDeveloperChanged() { base.FirePropertyChanged("Developer"); } partial void OnGenreChanged() { base.FirePropertyChanged("Genre"); } partial void OnListPriceChanged() { base.FirePropertyChanged("ListPrice"); } partial void OnListPriceCurrencyChanged() { base.FirePropertyChanged("ListPriceCurrency"); } partial void OnPlayerInfoChanged() { base.FirePropertyChanged("PlayerInfo"); } partial void OnProductDescriptionChanged() { base.FirePropertyChanged("ProductDescription"); } partial void OnProductIDChanged() { base.FirePropertyChanged("ProductID"); } partial void OnProductImageUrlChanged() { base.FirePropertyChanged("ProductImageUrl"); } partial void OnProductNameChanged() { base.FirePropertyChanged("ProductName"); } partial void OnProductTypeIDChanged() { base.FirePropertyChanged("ProductTypeID"); } partial void OnPublisherChanged() { base.FirePropertyChanged("Publisher"); } partial void OnRatingChanged() { base.FirePropertyChanged("Rating"); } partial void OnRatingUrlChanged() { base.FirePropertyChanged("RatingUrl"); } partial void OnReleaseDateChanged() { base.FirePropertyChanged("ReleaseDate"); } partial void OnSystemNameChanged() { base.FirePropertyChanged("SystemName"); } #endregion } Of course MSDN code can seen as “toy code” for educational purposes but is anyone doing anything like this in the real world of Silverlight development?

    Read the article

  • Profile Provider for ASP.NET That Stores Profile Info in File System

    - by LBushkin
    Does anyone know of an open source implementation of an ASP.NET ProfileProvider that stores user profile information in the file system? I would prefer to avoid writing my own if a decent implementation already exists - while the API doesn't look to complicated, I'd rather not re-invent the wheel (so to speak). Hopefully this doesn't matter, but I am using .NET 3.5 with ASP.MVC 1.0. Thanks in advance.

    Read the article

  • Another design-related C++ question

    - by Kotti
    Hi! I am trying to find some optimal solutions in C++ coding patterns, and this is one of my game engine - related questions. Take a look at the game object declaration (I removed almost everything, that has no connection with the question). // Abstract representation of a game object class Object : public Entity, IRenderable, ISerializable { // Object parameters // Other not really important stuff public: // @note Rendering template will never change while // the object 'lives' Object(RenderTemplate& render_template, /* params */) : /*...*/ { } private: // Object rendering template RenderTemplate render_template; public: /** * Default object render method * Draws rendering template data at (X, Y) with (Width, Height) dimensions * * @note If no appropriate rendering method overload is specified * for any derived class, this method is called * * @param Backend & b * @return void * @see */ virtual void Render(Backend& backend) const { // Render sprite from object's // rendering template structure backend.RenderFromTemplate( render_template, x, y, width, height ); } }; Here is also the IRenderable interface declaration: // Objects that can be rendered interface IRenderable { /** * Abstract method to render current object * * @param Backend & b * @return void * @see */ virtual void Render(Backend& b) const = 0; } and a sample of a real object that is derived from Object (with severe simplifications :) // Ball object class Ball : public Object { // Ball params public: virtual void Render(Backend& b) const { b.RenderEllipse(/*params*/); } }; What I wanted to get is the ability to have some sort of standard function, that would draw sprite for an object (this is Object::Render) if there is no appropriate overload. So, one can have objects without Render(...) method, and if you try to render them, this default sprite-rendering stuff is invoked. And, one can have specialized objects, that define their own way of being rendered. I think, this way of doing things is quite good, but what I can't figure out - is there any way to split the objects' "normal" methods (like Resize(...) or Rotate(...)) implementation from their rendering implementation? Because if everything is done the way described earlier, a common .cpp file, that implements any type of object would generally mix the Resize(...), etc methods implementation and this virtual Render(...) method and this seems to be a mess. I actually want to have rendering procedures for the objects in one place and their "logic implementation" - in another. Is there a way this can be done (maybe alternative pattern or trick or hint) or this is where all this polymorphic and virtual stuff sucks in terms of code placement?

    Read the article

  • How to find the type of shopping cart used to implement in website

    - by harigm
    Is there way to identify which shopping cart open source technology has been used to implemente for any given website? For example: if you are looking at shopping.yahoo.com,shopping.rediff.com can we tell which Shopping cart tool they have used for Example : zen cart, os commerce , magento etc.... I am trying to idenify the website which has zen cart implementation or magento implementation?

    Read the article

  • Implementing Custom CacheDependency to invalidate ASP.Net cache item

    - by Ajay
    Hi, I want to implement my own customCacheDependency class by deriving base CacheDependency, as provided SqlCacheDependency is not suitable for my case. (thousands of cache items, and there will so many subscriptions in SQL as well as issues with registration in ASP.Net) I want to use this in ASP.Net VirtualPathProvider's our custom implementation, so I can pass this CustomCacheDependecy to notify the asp.net that file content in the DB has changed. Can some one point me to any custom implementation of CacheDependency (preferably using MessageQueue)? Thanks & Regards, Ajay

    Read the article

  • What does template<class key, class type> mean before a method in C++?

    - by zengr
    Hi, I have got this code and I am trying to understand the convention followed, all the method defined in the .cpp file have template<class KeyType, class DataType> written before them. What does that mean? Example: //Constructor template<class key, class type> MyOperation<key, type>::MyOperation() { //method implementation } //A method template<class key, class type> MyOperation<key, type>::otherOperation() { //method implementation } Thanks

    Read the article

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