Search Results

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

Page 26/391 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • wcf generated classes and validation application block attributes

    - by Shaboboo
    Hi, I'm new to the validation application block and trying to use it with wcf... I have a wcf service that has data objects with validation rules defined with attributes, using the validation application block . On my client side (WPF), I have a service reference. When I update the service reference the generated classes do not have the validation rules attributes in them. How can I get the rules from the service? Am I missing some step, or is it not possible?

    Read the article

  • How to free memory from a list of classes

    - by Jason Rowe
    Say I have two classes created work and workItem. CWorker *work = new CWorker(); CWorkItem *workItem = new CWorkItem(); The work class has a public list m_WorkList and I add the work item to it. work->m_WorkList.push_back(workItem); If I just delete work if(work != NULL) delete work; Do I need to loop through the list in the destructor like the following? Any better way to do this? Could I use clear instead? while(m_WorkList.size()) { CWorkItem *workItem = m_WorkList.front(); m_WorkList.pop_front(); if(workItem) delete workItem; }

    Read the article

  • STL Vectors, pointers and classes

    - by anubis9
    Hey! Let's say i have 2 classes: class Class1 { public: std::vector<CustomClass3*> mVec; public: Class1(); ~Class1() { //iterate over all the members of the vector and delete the objects } }; class InitializerClass2 { private: Class1 * mPtrToClass1; public: InitializerClass2(); void Initialize() { mPtrToClass1->mVec.push_back(new CustomClass3(bla bla parameters)); } }; Will this work? Or the memory allocated in the InitializerClass2::Initialize() method might get corrupted after the method terminates? Thanks!

    Read the article

  • Design from scratch - building classes

    - by Tony
    Hi All, I've started a new project where I'm writing a WPF business application, but I'm having trouble with the design. The database was easy to put together, but I'm not sure how I have to go about the designing the application itself. The main thing that I find hard is the code design. I've decided that the MVVM pattern is very applicable for this application, but how do I go about deciding what classes to build and how things go from there? Does anyone have some guidelines I could use? This is a standard business application that just stores and retrieves data. Some data queries will also need to be performed.

    Read the article

  • Unit Testing Model Classes that inherit from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • How do you keep yourself and your co-workers from creating huge classes

    - by PieterG
    Stackoverflow users, How do you keep yourself from creating large classes with large bodied methods. When deadlines are tight, you end up trying to hack things together and it ends up being a mess which would need to be refactored. For me, the one way was to start with test driven development and that lends itself to good class design as well as the SRP (Single Responsibility Principle). I also see developers just double clicking on controls and typing out line after line in the event method that gets fired. What are your suggestions?

    Read the article

  • A code using SharePoint classes doesn't run on systems not having SharePoint installed

    - by Manish
    I have a window application which uses SP classes to create a site. I works fine on a system having Windows Server 2003 R2 with sharepoint installed. But it doesn't work on a system having XP installed and SharePoint not installed. The fact is that both of these systems are on a intranet. So I assumed that the NON-SP system would be able to run the code and create a site on the system having SP installed if all the required parameters (like serverLocation, domain, username, password) are provided. I did copied the DLLs to these NON-SP system and referenced them to build the project: Microsoft.SharePoint.dll microsoft.sharepoint.portal.dll Microsoft.SharePoint.Publishing.dll But this too didn't worked. What am I missing? Is my assumption wrong?

    Read the article

  • PHP protected classes and properties, protected from whom?

    - by Andrew Heath
    I'm just getting started with OOP PHP via PHP Object-Oriented Solutions and am a little curious about the notion of protection in OOP. The author clearly explains how protection works, but the bit about not wanting others to be able to change properties falls a bit flat. I'm having a hard time imagining a situation where it is ever possible to prevent others from altering your classes, since they could just open up your class.php and manually tweak whatever they pleased seeing as how PHP is always in plaintext. Caution: all of the above written by a beginner with a beginner's understanding of programming...

    Read the article

  • Specifying different page base classes for different directories in your web.config file

    - by gbinflames
    I have a website (coded in vb.net) with an "admin" section (the admin section being a folder in the actual site)... So in every page of the site I'm using my own custom class as the page base (which has been set in the web.config file) but I want to inherit from different class for the files in the "admin" folder... Is there any way to inherit different classes for pages in different folders using the web.config or some other equally as global method? (meaning some other way than inheriting on a per page basis.)

    Read the article

  • Help with these warnings. [inheritance].

    - by sil3nt
    Hello there. I have a set of code, which mimics a basic library cataloging system. There is a base class named items, in which the the general id,title and year variables are defined and 3 other derived classes (DVD,Book and CD). Base [Items] Derived [DVD,Book,CD]. The programs runs, however I get the following warnings, I'm not sure how to fix these. "C:\Program Files\gcc\bin/g++" -Os -mconsole -g -Wall -Wshadow -fno-common mainA4.cpp -o mainA4.exe In file included from mainA4.cpp:5: a4.h: In constructor `DVD::DVD(int, std::string, int, std::string)': a4.h:28: warning: `DVD::director' will be initialized after a4.h:32: warning: base `Items' a4.h:32: warning: when initialized here a4.h: In constructor `Book::Book(int, std::string, int, std::string, int)': a4.h:48: warning: `Book::numPages' will be initialized after a4.h:52: warning: base `Items' a4.h:52: warning: when initialized here a4.h: In constructor `CD::CD(int, std::string, int, std::string, int)': a4.h:66: warning: `CD::numSongs' will be initialized after a4.h:70: warning: base `Items' a4.h:70: warning: when initialized here Exit code: 0

    Read the article

  • Multiple classes in a Python module

    - by ralphL
    I'm very new to Python (I'm coming from a JAVA background) and I'm wondering if anyone could help me with some of the Python standards. Is it a normal or "proper" practice to put multiple class in a module? I have been working with Django and started with the tutorials and they place their database model classes in the same module. Is this something that is normally done or should I stick with 1 class per module? Is their a reason I would do one over the other? Hope I'm being clear and not to generic. Thanks to everyone in advance!

    Read the article

  • Adding classes to all form widgets in symfony

    - by rlahay
    Hi everyone, I am trying to find a better way to assign classes to form elements in symfony. Currently, I can't seem to get away from assigning each one manually. ie: $this->widgetSchema['title']->setAttribute("class","fieldInput"); $this->widgetSchema['tag_line']->setAttribute("class","fieldInput"); $this->widgetSchema['description']->setAttribute("class","fieldInput"); // etc Things I tried without success 1) looping through $this-widgetSchema, treating it as an array and setting attributes to each key 2) $this-widgetSchema-setAttribute() but this only applied the class to the label that was generated, not the form element There must be a way to hit all the fields without specifically directing them? Can anyone point me in the right direction?

    Read the article

  • Actionscript classes to 1 SWC file

    - by Daryl
    I'm using Flash Builder 4 (the version after Flex Builder 3, so very similar to Flex Builder 3) and have a bunch of actionscript classes that I frequently need to reference. I have them in a separate folder/package to keep things clean. I know that it's possible to create a SWC from these actionscript files. My question is how do I do it in Flash Builder 4 or Flex Builder 3. Do I need other tools? My objective is just to use the SWC in the project and keep things clean instead of dragging around all these files.

    Read the article

  • Unit Testing Model Classes that derive from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • SQLAlchemy introspection of ORM classes/objects

    - by Adam Batkin
    I am looking for a way to introspect SQLAlchemy ORM classes/entities to determine the types and other constraints (like maximum lengths) of an entity's properties. For example, if I have a declarative class: class User(Base): __tablename__ = "USER_TABLE" id = sa.Column(sa.types.Integer, primary_key=True) fullname = sa.Column(sa.types.String(100)) username = sa.Column(sa.types.String(20), nullable=False) password = sa.Column(sa.types.String(20), nullable=False) created_timestamp = sa.Column(sa.types.DateTime, nullable=False) I would want to be able to find out that the 'fullname' field should be a String with a maximum length of 100, and is nullable. And the 'created_timestamp' field is a DateTime and is not nullable.

    Read the article

  • Set two classes from array

    - by Thomas
    I want to change the classes on every third output from a query: <?php $style_classes = array('box','box','box no_right_margin'); $style_index = 0; ?> I set this on the div: <div <?php $k = $style_index%4; echo "class=$style_classes[$k]"; $style_index++; ?>> On the third div I want the class to look like this: <div class="box no_right_margin"> Right now it looks like: <div class="box" no_right_margin>

    Read the article

  • Finding the average of two number using classes and methods

    - by Have alook
    I want to use methods inside class. Q: find the average of two number using classes and methods. import java.util.*; class aaa { int a,b,sum,avrg; void average() { System.out.println("The average is ="+avrg); avrg=(sum/2); } } class ave { public static void main(String args[]){ aaa n=new aaa(); Scanner m=new Scanner(System.in); System.out.println("write two number"); n.a=m.nextInt(); n.b=m.nextInt(); n.average(); } }

    Read the article

  • Service Contracts with Message causes duplicate proxy classes

    - by jaklucky
    Hi, I have a service contract with Message as shown below. [OperationContract] Message MyMethodWithMessage(Message myMsgParam); Everything works fine. I could host my services. But when I try to create proxies through "Add Service References", I am getting the duplicate proxy classes. If I take out the above OperationContract and re run my services and try to create proxies, then "Add Service References" does not provide duplicate proxies. I am really confused about this!!! Any help is greatly appreciated... Thank you, Suresh

    Read the article

  • Need to map classes to different databases at runtime in Hibernate

    - by serg555
    I have MainDB database and unknown number (at compile time) of UserDB_1, ..., UserDB_N databases. MainDB contains names of those UserDB databases in some table (new UserDB can be created at runtime). All UserDB have exactly the same table names and fields. How to handle such situation in Hibernate? (database structure cannot be changed). Currently I am planning to create generic User classes not mapped to anything and just use native SQL for all queries: session.createSQLQuery("select * from " + db + ".user where id=1") .setResultTransformer(Transformers.aliasToBean(User.class)); Is there anything better I can do? Ideally I would want to have mappings for UserDB tables and relations and use HQL on required database.

    Read the article

  • WPF: DataGrid Custom. ColumnDesign with my own classes

    - by user437899
    Hi, iam looking for a datagrid which contains objects from my class. class user { string name; int ID; ... } i tried AutoGenerateColumns = true. this will add columns (name, ID, ... like the properties of my class) but i want a different design. not all attributes from the object shold be shown and the columnheader shouldn't be generated from the variablenames... if i build a custom. column-design, i cant add my objects / they will not be displayed. is it possible to define my own columns according to my objects/class. i read about databindings, but i have no idea how i can bind objects/classes in WPF. (in Visual Studio i cant choose my class as datacontext)

    Read the article

  • Doubt in abstract classes

    - by mohit
    public abstract class Person { private String name; public Person(String name) { this.name = name; System.out.println("Person"); } public String getName() { return name; } abstract public String getDescription(); } public class Student extends Person { private String major; public Student(String name, String major) { super(name); this.major = major; } public String getMajor() { return major; } @Override public String getDescription() { return "student" + super.getName() + " having" + major; } } public class PersonTest { public static void main(String[] args) { Person person = new Student("XYZ", "ABC"); System.out.println(person.getDescription()); } } Ques: We cannot create objects of abstract classes, then why Person Constructor has been invoked, even its an abstract class?

    Read the article

  • Unit Testing Model Classes that inherits from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • Android source referencing missing classes

    - by jqpubliq
    I cloned some of the trees from the Android Open Source Project to take a look at the code, but I can't build them because they reference classes which don't seem to exist. For instance, the music application here references android.media.MediaFile which according to the package summary does not exist, as well as things like ArrayListCursor which has an old javadoc around but is absent in current documentation. So is the open source project disjoint from the released SDK? Also, is there a way to build these open source packages with the current SDK? Thanks, -JQP

    Read the article

  • Managing Data Dependecies of Java Classes that Load Data from the Classpath at Runtime

    - by Martin Potthast
    What is the simplest way to manage dependencies of Java classes to data files present in the classpath? More specifically: How should data dependencies be annotated? Perhaps using Java annotations (e.g., @Data)? Or rather some build entries in a build script or a properties file? Is there build tool that integrates and evaluates such information (Ant, Scons, ...)? Do you have examples? Consider the following scenario: A few lines of Ant create a Jar from my sources that includes everything found on the classpath. Then jarjar is used to remove all .class files that are not necessary to execute, say, class Foo. The problem is that all the data files that class Bar depends upon are still there in the Jar. The ideal deployment script, however, would recognize that the data files on which only class Bar depends can be removed while data files on which class Foo depends must be retained. Any hints?

    Read the article

  • Linker Error: iPhone Unit Test Bundle referencing App classes

    - by ohhorob
    Starting with an app already in development, I have carried out the instructions in the iPhone Development Guide – Unit Testing Applications I can successfully include and use my App's classes in Application-style tests that run on the device, and output their results to the console. If I add the following line of code: STAssertTrue([viewController isKindOfClass:[LoginViewController class]], @"Top view controller is not LoginViewController"); The following build error is generated: Undefined symbols: "_OBJC_CLASS_$_LoginViewController", referenced from: __objc_classrefs__DATA@0 in LoginViewTest.o ld: symbol(s) not found collect2: ld returned 1 exit status I can provide more configuration information for the project and the Testing target, but the setup works file without the [LoginViewController class] line in the test source. Without that line, I can reference the class, use it's properties and send it messages successfully. Is there a linking build setting, or bundle loading option that is required when attempting to use an App class in this fashion? Or should I find another type of test to confirm that the class of an object is the expected one?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >