Search Results

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

Page 187/391 | < Previous Page | 183 184 185 186 187 188 189 190 191 192 193 194  | Next Page >

  • Best practice - Accessing preferences globally

    - by JK
    User preferences for my app is store in NSUserDefaults. This includes a "theme" preference, which needs to be accessed frequently by multiple classes. I would prefer not to call "[[NSUserDefaults standardUserDefaults] objectForKey:..." repeatedly as it makes for inconcise code and I assume will incur overhead. What is the preferred and most concise method for accessing preferences in any class?

    Read the article

  • Is it ok to throw NotImplemented exception in virtual methods?

    - by Axarydax
    I have a base class for some plugin-style stuff, and there are some methods that are absolutely required to be implemented. I currently declare those in the base class as virtual, for example public virtual void Save { throw new NotImplementedException(); } and in the descendand I have a public override void Save() { //do stuff } Is it a good practice to throw a NotImplementedException there? The descendand classes could for example be the modules for handling different file formats. Thanks

    Read the article

  • XDocument.Save to specific directory?

    - by Ignacio
    Hi, I'm using this XML classes for the first time and can't find this piece of info. I'm doing: xmlDoc = new XDocument(new XDeclaration("1.0", "utf-8", "yes")); xmlDoc.Add(new XElement("Images")); xmlDoc .Save("C:\\Backup\\images.xml"); But doesn't work. It only works if I use just the filename, like "images.xml", but of course, the file gets saved on the execution path.

    Read the article

  • group object with equal collections

    - by Jeroen
    Hi, Suppose 2 classes, Person and Pet. Each person has a collection of 1 or more pets. How do i group the Person in to a collection where they share the same pets. Example: Person 1: Cat, Dog, Spider Person 2: Cat, Spider, Snake Person 3: Dog Person 4: Spider, Cat, Dog Person 5: Dog What i want as a result is this: Group 1: Person 1, Person 4 Group 2: Person 3, Person 5 Group 3: Person 2 How do i achieve this using LINQ?

    Read the article

  • Extending Eclipse product

    - by zeroin23
    A spawn off of an existing eclipse product is required for customization for a client. (hence parallel product development) The intention was to use Eclipse Fragment, but "Fragments are additive, they cannot override content found in the host." how can we maintain one set of codes in the svn, yet allow customization by overriding some classes?

    Read the article

  • C++ Newbie Question

    - by JavaMan
    I am from a Java background and is learning C++. I encountered the following C++ code: String source = String::New("'Hello' + ', World'"); As what I understand so far, this should be a call to static member function 'New' of class 'String'. But, I've searched through the whole header file defining 'String', there is not any static member named 'New' in the String class or its super classes. Is there any special meaning attached to String class or the New member function in C++?

    Read the article

  • Conditionally Delete in Ant

    - by kunjaan
    I want to delete the directory if the property "delete-compiled-dir" is set to true. Right now I have <target name="deleted-after-compilation" depends="compile,jar"> <condition property="${delete-compiled-dir}" value="true"> <delete dir="${compilation-dir}" /> </condition> <echo> Deleting Compiled Directory Classes </echo> </target>

    Read the article

  • good c++ documentation design example?

    - by Eye of Hell
    Hello. I'm tuning documentation generator for internal purpose that generates HTML documentation for C++ classes and methods. Is it any example available of good HTML documentation design? MSDN ( like this ) looks kinda outdated, same is doxygen / javadoc / sphinx results. Anyone ever see an documentation that looks REALLY good?

    Read the article

  • How can I add imports to an "eval"ed piece of clojure code?

    - by Zubair
    I would like to evaluate some clojure code entered by users interactively, and I would like to "use" certain namespaces and "import" certain Java classes as well. I end up running the code using: (defn execute-command [string-command] let [ code-with-context (add-code-context string-command) result (eval(read-string code-with-context)) ] result ) My question is how can I program "add-code-context" to add the required context to the code in "string-command"?

    Read the article

  • information hiding in python

    - by ali
    in python tutorial added that python cannot hide its attributes from other classes. some thing such as private data in C++ or java..But also i know that we can use _ or __ to set some variables as privated one but it is not enogh. I think it is a week if it is not any thing to do it.

    Read the article

  • JPA and hibernate for Flex

    - by dejaninic
    I'm using JPA but I'm not sure how to use it for relation between two classes. I need to connect them @OneToMany. I have done this before but forgot. Is there any good tutorial for this or an example that is easy to understand. By the way this is a Flex application where I'm using BlazeDS for connection between Java and Flex.

    Read the article

  • how to use cpp source for 2 projects

    - by joels
    I'm not sure if I am going about this the right way. I am making some c++ classes to use in 2 apps. I am going to have to compile them to be used in a Cocoa app and later be compiled for use with fastcgi. Should I create a dynamic library?

    Read the article

  • Java serialization problem

    - by stefan89
    I have two classes X and Y, like this: class X implements Serializable { int val1; Y val2; } class Y implements Serializable { int val; } I want to transmit an object of type X from a client to server but i can't because the class X has a field of type Y. I replaced the field of type Y with a field of type X in class X and it works.

    Read the article

  • organizing unit test

    - by soulmerge
    I have found several conventions to housekeeping unit tests in a project and I'm not sure which approach would be suitable for our next PHP project. I am trying to find the best convention to encourage easy development and accessibility of the tests when reviewing the source code. I would be very interested in your experience/opinion regarding each: One folder for productive code, another for unit tests: This separates unit tests from the logic files of the project. This separation of concerns is as much a nuisance as it is an advantage: Someone looking into the source code of the project will - so I suppose - either browse the implementation or the unit tests (or more commonly: the implementation only). The advantage of unit tests being another viewpoint to your classes is lost - those two viewpoints are just too far apart IMO. Annotated test methods: Any modern unit testing framework I know allows developers to create dedicated test methods, annotating them (@test) and embedding them in the project code. The big drawback I see here is that the project files get cluttered. Even if these methods are separated using a comment header (like UNIT TESTS below this line) it just bloats the class unnecessarily. Test files within the same folders as the implementation files: Our file naming convention dictates that PHP files containing classes (one class per file) should end with .class.php. I could imagine that putting unit tests regarding a class file into another one ending on .test.php would render the tests much more present to other developers without tainting the class. Although it bloats the project folders, instead of the implementation files, this is my favorite so far, but I have my doubts: I would think others have come up with this already, and discarded this option for some reason (i.e. I have not seen a java project with the files Foo.java and FooTest.java within the same folder.) Maybe it's because java developers make heavier use of IDEs that allow them easier access to the tests, whereas in PHP no big editors have emerged (like eclipse for java) - many devs I know use vim/emacs or similar editors with little support for PHP development per se. What is your experience with any of these unit test placements? Do you have another convention I haven't listed here? Or am I just overrating unit test accessibility to reviewing developers?

    Read the article

  • How to use tags in iPhone application code ?

    - by srikanth rongali
    I need to access the [indexPath row] outside the tableView method. I need to use it in my own method in same class and other classes also. How can I do it. If the cell in the table view have buttons, By selecting the buttons how can I say which row was selected ? I think of using the tags. But, I do not know much about tags. Thank you.

    Read the article

  • Why do I get so many errors building my Android project with Ant?

    - by synic
    Now that I sort of know my way around the SDK/API, I've switched from Eclipse back to my favorite text editor, which means I have to use ant to build my project, however: It seems every other time I compile the project, a lot of drawables get corrupted, resources lose their ids (resulting in NPEs in the code), or classes throw "Verify Errors". The only way to fix this is by removing the bin and gen folders, and recompiling, which is obviously annoying. Is there any way to avoid this? btw, I'm using ant 1.7.1, java version "1.6.0_20"

    Read the article

< Previous Page | 183 184 185 186 187 188 189 190 191 192 193 194  | Next Page >