Search Results

Search found 9771 results on 391 pages for 'equivalence classes'.

Page 90/391 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • polymorphism and interfaces

    - by mixm
    if i have two classes x and y, both extend class w. and x implementing interface z. if i have methods doSomething(w object) and doSomething(x object), what would happen if i call doSomething(x)? edit: im implementing this on java, more specifically on android. im asking this because some classes which implement a specific interface mostly does the same thing when doSomething() is called. but there are special cases which i would like to single out.

    Read the article

  • VS2005 COMPLITION PROBLEM WITH SETTINGS

    - by vijay.j
    Hi all i am trying to integrating PJNSMTPCONNECTION CLASSES in my project,they say that those classes donot uses mfc. MY project is with the setting like MT, and using standard library linking, when i try to complie i am getting CSTRING not defined and fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include if i include afx.h and remove windows.h, i am getting iDLLMain aleardy defined like errors

    Read the article

  • Java Interfaces/Implementation naming convention

    - by Amir Rachum
    How do you name different classes / interfaces you create? Sometimes I don't have implementation information to add to the implementation name - like interface FileHandler and class SqlFileHandler. hen this happens I usually name the interface in the "normal" name, like Truck and name the actual class TruckClass. How do you name interfaces and classes in this regard?

    Read the article

  • Xcode C++ debugging

    - by mousebird
    I'm looking for a way to have the Xcode IDE pick up on the contents of my weird Boost template classes. Basically, classes complex enough that Xcode can't display their contents correctly. Is there something like the Objective C -description method or toString() in Java that Xcode will look for? At the moment I'm just implementing print() methods and invoking them in gdb, but that's likely to confuse other developers.

    Read the article

  • mouse wheel operates on scrollbar

    - by basicblock
    If a SWF file or even a component within it has scrollbars, wouldn't it make sense that if the user is hovered over that area (it's in focus) and uses the mouse wheel, that this movement would automatically translate to the scrollbar moving. Any ideas how this is done, the events or classes used for this? I'm open to outside components or classes too. I haven't started yet, but I'll do an item renderer because it's easy to give it scrollbar.

    Read the article

  • Changing the highlight color of text in Flash with ActionScript 2.

    - by Zachary Lewis
    I've got several input text fields, and my design requirement is to have gold text on a black background that, when highlighted, is black text on a gold background; however, Flash's default selected text highlight color scheme is white text on a black background and there is no way to change this. Does anyone have any workarounds that are easy to implement and don't require additional classes (the design requests minimal outside classes).

    Read the article

  • need a project design tool

    - by santosh
    I am looking for simple and easy to use tools through which I can get project's visual picture of folder/file tree stucture , its classes, functions and objects, relations between classes and files.

    Read the article

  • Current tasks count at Appengine Task Queue

    - by splix
    Are there any ways to get count of current unfinished tasks at Google Appengine development server? I need it for making my integration test. I found a way to get this when running it local (just in mem), as described at appengine docs. But when i'm running it as a standalone server, from maven, this doesn't work. Just because library appengine-testing conflicts with Appengine SDK classes, and i can't use those classes together, when running sdk dev server.

    Read the article

  • WSDL file generated on the fly?

    - by Valer
    Hi everybody, for a web service, depending on a XML file, there are a couple af classes in C# generated. Depending on these classes, there is at compile time then the WSDL file generated. Is there a possibility at runtime to simply replace the XML file and to have the WSDL file generated on the fly? Best regards, Valer

    Read the article

  • Local active directory access and management for development?

    - by Huck
    Hi everybody, In an application we are developpment, we are accessing Active Directory users and groups using the .Net DirectoryEntry and DirectorySearcher classes. Managing the test groups and users during development is getting tedious. I am wondering if there was an easy way to setup a simple local AD in which we could easily create / delete users and assign them or remove them from groups as we want with the DirectoryEntry / DirectorySearcher classes? Thanks.

    Read the article

  • IBOutlet on properties and exposition of the class

    - by Espuz
    Apple, for memory management issues, recommend defining outlets on properties, not in the attribute declaration. But, as far as I know, declaring properties exposes the class to external classes, so this could be dangerous. On UIViewController we have the main view definition and the logic, so MVC is slightly cheated in this cases. What is the beteer approach, Apples's recommendation for memory-management or armored classes?

    Read the article

  • PHP 5.3: Late static binding doesn't work for properties when defined in parent class while missing in child class

    - by DavidPesta
    Take a look at this example, and notice the outputs indicated. <?php class Mommy { protected static $_data = "Mommy Data"; public static function init( $data ) { static::$_data = $data; } public static function showData() { echo static::$_data . "<br>"; } } class Brother extends Mommy { } class Sister extends Mommy { } Brother::init( "Brother Data" ); Sister::init( "Sister Data" ); Brother::showData(); // Outputs: Sister Data Sister::showData(); // Outputs: Sister Data ?> My understanding was that using the static keyword would refer to the child class, but apparently it magically applies to the parent class whenever it is missing from the child class. (This is kind of a dangerous behavior for PHP, more on that explained below.) I have the following two things in mind for why I want to do this: I don't want the redundancy of defining all of the properties in all of the child classes. I want properties to be defined as defaults in the parent class and I want the child class definition to be able to override these properties wherever needed. The child class needs to exclude properties whenever the defaults are intended, which is why I don't define the properties in the child classes in the above example. However, if we are wanting to override a property at runtime (via the init method), it will override it for the parent class! From that point forward, child classes initialized earlier (as in the case of Brother) unexpectedly change on you. Apparently this is a result of child classes not having their own copy of the static property whenever it isn't explicitly defined inside of the child class--but instead of throwing an error it switches behavior of static to access the parent. Therefore, is there some way that the parent class could dynamically create a property that belongs to the child class without it appearing inside of the child class definition? That way the child class could have its own copy of the static property and the static keyword can refer to it properly, and it can be written to take into account parent property defaults. Or is there some other solution, good, bad, or ugly?

    Read the article

  • Multitenant NHibernate application with with separate SQL Server schema for each tenant

    - by Branko
    I am writing a new multi-tenant WCF RIA application. I plan to have a shared database with separate SQL Server schema for each tenant. I would like to use NHibernate for object-ralational mapping. Configuration of SQL Server schema in mapping classes doesn't help because it is static and would need one set of mapping classes for each tenant. Is it possible to dynamically configure ISession which SQL Server schema should be used for mapping objects to tables?

    Read the article

  • How to prevent inheritance for some methods?!

    - by Dr TJ
    Hi How can I prevent inheritance of some methods or properties in derived classes?! public class BaseClass : Collection { //Some operations... //Should not let derived classes inherit 'Add' method. } public class DerivedClass : BaseClass { public void DoSomething(int Item) { this.Add(Item); // Error: No such method should exist... } }

    Read the article

  • Easy XML Serializer for Java

    - by sdoca
    I'm looking for a way to serialize Java objects into XML for use by a RESTful web service. I don't have an XSD. I have looked at the following: JAXB - fairly heavy weight with annotations required on classes and also an ObjectFactory class and/or a jaxb.index file Simple - requires annotations but no other config classes/files. Unfortunately it can't serialize Sets. XStream - no annotations etc. required, but doesn't support generics Does anyone else have any suggestions?

    Read the article

  • How to implement IDisposable properly

    - by Vince
    Hi, I've seen so much C# code in my time as a developer that attempt to help the GC along by setting variables to null or calling Dispose() on classes (DataSet for example) within thier own classes Dispose() method that I've been wondering if there's any need to implement it in a managed environment. Is this code a waste of time in its design pattern? class MyClass : IDisposable { #region IDisposable Members public void Dispose() { otherVariable = null; if (dataSet != null) dataSet.Dispose(); } #endregion }

    Read the article

  • Good book with C# *and* VB examples?

    - by Rap
    I'm teaching some .Net classes and want to give the students some good books to read during and after the class. Some will prefer VB and other will like C# so the books need to give examples in both languages. I need one book each for these classes: Intro to .Net (Windows apps and ASP.NET together) Intermediate/advanced Windows apps Intermediate/advanced Web apps WPF/Silverlight/XAML WCF WF LINQ Can anyone recommend a book for each category with examples in both C# and VB?

    Read the article

  • Are Objective-C initializers allowed to share the same name?

    - by NattKatt
    I'm running into an odd issue in Objective-C when I have two classes using initializers of the same name, but differently-typed arguments. For example, let's say I create classes A and B: A.h: #import <Cocoa/Cocoa.h> @interface A : NSObject { } - (id)initWithNum:(float)theNum; @end A.m: #import "A.h" @implementation A - (id)initWithNum:(float)theNum { self = [super init]; if (self != nil) { NSLog(@"A: %f", theNum); } return self; } @end B.h: #import <Cocoa/Cocoa.h> @interface B : NSObject { } - (id)initWithNum:(int)theNum; @end B.m: #import "B.h" @implementation B - (id)initWithNum:(int)theNum { self = [super init]; if (self != nil) { NSLog(@"B: %d", theNum); } return self; } @end main.m: #import <Foundation/Foundation.h> #import "A.h" #import "B.h" int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; A *a = [[A alloc] initWithNum:20.0f]; B *b = [[B alloc] initWithNum:10]; [a release]; [b release]; [pool drain]; return 0; } When I run this, I get the following output: 2010-04-26 20:44:06.820 FnTest[14617:a0f] A: 20.000000 2010-04-26 20:44:06.823 FnTest[14617:a0f] B: 1 If I reverse the order of the imports so it imports B.h first, I get: 2010-04-26 20:45:03.034 FnTest[14635:a0f] A: 0.000000 2010-04-26 20:45:03.038 FnTest[14635:a0f] B: 10 For some reason, it seems like it's using the data type defined in whichever @interface gets included first for both classes. I did some stepping through the debugger and found that the isa pointer for both a and b objects ends up the same. I also found out that if I no longer make the alloc and init calls inline, both initializations seem to work properly, e.g.: A *a = [A alloc]; [a initWithNum:20.0f]; If I use this convention when I create both a and b, I get the right output and the isa pointers seem to be different for each object. Am I doing something wrong? I would have thought multiple classes could have the same initializer names, but perhaps that is not the case.

    Read the article

  • Where to put common setUp-code for differen testclasses?

    - by Benedikt
    I have several different test classes that require that certain objects are created before those tests can be run. Now I'm wondering if I should put the object initialization code into a separate helper class or superclass. Doing so would surely reduce the amount of duplicate code in my test classes but it would also make them less readable. Is there a guideline or pattern how to deal with common setUp-code for unit tests?

    Read the article

  • Python combinations no repeat by constraint

    - by user2758113
    I have a tuple of tuples (Name, val 1, val 2, Class) tuple = (("Jackson",10,12,"A"), ("Ryan",10,20,"A"), ("Michael",10,12,"B"), ("Andrew",10,20,"B"), ("McKensie",10,12,"C"), ("Alex",10,20,"D")) I need to return all combinations using itertools combinations that do not repeat classes. How can I return combinations that dont repeat classes. For example, the first returned statement would be: tuple0, tuple2, tuple4, tuple5 and so on.

    Read the article

  • DI and Singleton Pattern in one implementation

    - by Tony
    I want to refactor some code using the Windsor IOC/DI framework, but my issue is that I have some Singleton classes and Factory pattern classes and I am not sure that one can implement a Singleton or Factory using DI. Has anyone any ideas if that is possible and how?

    Read the article

  • Is it correct or incorrect for a Java JAR to contain its own dependencies?

    - by 4herpsand7derpsago
    I guess this is a two-part question. I am trying to write my own Ant task (MyFirstTask) that can be used in other project's build.xml buildfiles. To do this, I need to compile and package my Ant task inside its own JAR. Because this Ant task that I have written is fairly complicated, it has about 20 dependencies (other JAR files), such as using XStream for OX-mapping, Guice for DI, etc. I am currently writing the package task in the build.xml file inside the MyFirstTask project (the buildfile that will package myfirsttask.jar, which is the reusable Ant task). I am suddenly realizing that I don't fully understand the intention of a Java JAR. Is it that a JAR should not contain dependencies, and leave it to the runtime configuration (the app container, the runtime environment, etc.) to supply it with the dependencies it needs? I would assume if this is the case, an executable JAR is an exception to the rule, yes? Or, is it the intention for Java JARs to also include their dependencies? Either way, I don't want to be forcing my users to be copying-n-pasting 25+ JARs into their Ant libs; that's just cruel. I like the way WAR files are set up, where the classpath for dependencies is defined under the classes/ directory. I guess, ultimately, I'd like my JAR structure to look like: myfirsttask.jar/ com/ --> the root package of my compiled binaries config/ --> config files, XML, XSD, etc. classes/ --> all dependencies, guice-3.0.jar, xstream-1.4.3.jar, etc. META-INF/ MANIFEST.MF I assume that in order to accomplish this (and get the runtime classpath to also look into the classes/ directory), I'll need to modify the MANIFEST.MF somehow (I know there's a manifest attribute called ClassPath, I believe?). I'm just having a tough time putting everything together, and have a looming/lingering question about the very intent of JARs to begin with. Can someone please confirm whether Oracle intends for JARs to contain their dependencies or not? And, either way, what I would have to do in the manifest (or anywhere else) to make sure that, at runtime, the classpath can find the dependencies stored under the classes/ directory? Thanks in advance!

    Read the article

  • C# ISerializable question

    - by 5YrsLaterDBA
    I am planning to use serialization to do clone. I have to make my class ISerializable. But how about its super classes and all referenced variable classes? do I need to make them all ISerializable? If I use ISerializable. I have to implement the GetObjectData(), what I should put inside that method? leave it empty is ok?

    Read the article

  • C# class type - How to determine whether it is a standard .net framework class

    - by HorstWalter
    C# / .net framework What is the most reliable way to determine whether a class (type) is a class provided by the .net framework and not any of my classes or 3rd party library classes. I have tested some approaches The namespace, e.g. starting with "System." The Codebase of the assembly, where the dll is located All this "feels" a little clumsy though it works. Question: What is the easiest and most reliable way to determine this?

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >