Search Results

Search found 11306 results on 453 pages for 'methods'.

Page 11/453 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • constructor should not call methods

    - by Stefano Borini
    I described to a colleague why a constructor calling a method is an antipattern. example (in my rusty C++) class C { public : C(int foo); void setFoo(int foo); private: int foo; } C::C(int foo) { setFoo(foo); } void C::setFoo(int foo) { this->foo = foo } I would like to motivate better this fact through your additional contribute. If you have examples, book references, blog pages, or names of principles, they would be very welcome. Edit: I'm talking in general, but we are coding in python.

    Read the article

  • Constructor should generally not call methods

    - by Stefano Borini
    I described to a colleague why a constructor calling a method can be an antipattern. example (in my rusty C++) class C { public : C(int foo); void setFoo(int foo); private: int foo; } C::C(int foo) { setFoo(foo); } void C::setFoo(int foo) { this->foo = foo } I would like to motivate better this fact through your additional contribute. If you have examples, book references, blog pages, or names of principles, they would be very welcome. Edit: I'm talking in general, but we are coding in python.

    Read the article

  • Methods to access US Netflix from Chromecast?

    - by lfk
    I need to access US Netflix using Chromecast but changing router configuration is not an option (I don't have access to the wireless router). On my laptop I use VPN, so one option is to use my laptop as a hotspot, but I don't always have cable connection for my laptop. Besides I was hoping to need only my iPad to use the Chromecast. Is there any other way or should I return the Chromecast while I still can?

    Read the article

  • Lookup table display methods

    - by DAXShekhar
    public static client str lookupTableDisplayMethod(str _tableId) {     SysDictTable        dictTable   = new SysDictTable(str2int(_tableId));     ListEnumerator      enum;     Map                 map         = new Map(Types::String, Types::String);     ;     if (dictTable &&         dictTable.rights() > AccessType::NoAccess)     {         enum = dictTable.getListOfDisplayMethods().getEnumerator();         while (enum.moveNext())         {             map.insert(enum.current(), enum.current());         }     }     return pickList(map, "Display method", tableid2pname(_tableId)); }

    Read the article

  • Whether to separate out methods or not

    - by Skippy
    I am new to java and want to learn best coding practices and understand why one method is better than another, in terms of efficiency and as the coding becomes more complicated. This is just an example, but I can take the principles from here to apply elsewhere. I have need an option to display stuff, and have put the method stuff separately from the method to ask if the user wants to display the stuff, as stuff has a lot of lines of code. For readability I have done this: public static void displayStuff () { String input = getInput ("Display stuff? Y/N \n"); if (input..equalsIgnoreCase ("Y")) { stuff (); } else if (input.equalsIgnoreCase ("N")) { //quit program } else { //throw error System.out.print("Error! Enter Y or N: \n"); } } private static String stuff () { //to lots of things here return stuff (); } Or public static void displayStuff () { String input = getInput ("Display stuff? Y/N \n"); if (input..equalsIgnoreCase ("Y")) { //to lots of things here stuff; } else if (input.equalsIgnoreCase ("N")) { //quit program } else { //throw error System.out.print("Error! Enter Y or N: \n"); } } Is it better to keep them together and why? Also, should the second method be private or public, if I am asking for data within the class? I am not sure if this is on topic for here. please advise.

    Read the article

  • Techniques and methods to improve and speedup development

    - by Jlouro
    I just got a new project. It’s a WinForm app. And it’s interesting because I will have the possibility to learn how fish farms work and are managed. I will have to develop touch interfaces, and use datasnap to communicate and sync data between farm and office. The development will be done in DELPHI win32, still not sure about the database, but maybe SQLlite. So now comes the difficult part of the project, building it. I am just finishing one. It took me a lot of time to do it and I am a bit “burned out”. I will have time to relax, not much, but a few days. What I am looking is some tips and tricks and possibly tools to be able to speed up the development. It must be up and running in 2 months. So what tricks do you use to speed up things?

    Read the article

  • Using "prevent execution of method" flags

    - by tpaksu
    First of all I want to point out my concern with some pseudocode (I think you'll understand better) Assume you have a global debug flag, or class variable named "debug", class a : var debug = FALSE and you use it to enable debug methods. There are two types of usage it as I know: first in a method : method a : if debug then call method b; method b : second in the method itself: method a : call method b; method b : if not debug exit And I want to know, is there any File IO or stack pointer wise difference between these two approaches. Which usage is better, safer and why?

    Read the article

  • overriding implemented base class methods

    - by user793468
    I read somewhere that the chain of inheritance breaks when you alter a behavior from derived class. What does "altering a behavior" mean here? Is overriding an already implemented method in base class considered as "altering behavior"? Or, does the author mean altering method signatures and the output? Also, I ready Duplicating code is not a good practice, and its a maintenance nightmare. Again, does overriding an already implemented method in base class considered "Duplicating code"? If not, what would be considered as "Duplicating code"? I

    Read the article

  • Can data classes contain methods for validation?

    - by Arturas M
    OK, say I have a data class for a user: public class User { private String firstName; private String lastName; private long personCode; private Date birthDate; private Gender gender; private String email; private String password; Now let's say I want to validate email, whether names are not empty, whether birth date is in normal range, etc. Can I put that validation method in this class together with data? Or should it be in UserManager which in my case handles the lists of these users?

    Read the article

  • Top 6 Methods of Link Building

    Link building is single most important strategy for effective search engine optimization. With tons of websites being added to the World Wide Web everyday, it is very important to keep your website popular by creating high value back links. Beginners commit very obvious mistakes in their link building practices which can be easily avoided if one follows the recommendations.

    Read the article

  • calling methods if previous call success

    - by New Developer
    I my c# program I have to perform 5 steps(tasks) sequentially. basically these five should execute one after the other only the previous task performed is success. Currently I have done it in following style. But this is not very good code style to follow. var isSuccess=false; isSuccess=a.method1(); if(isSuccess) isSuccess=a.method2(); if(isSuccess) isSuccess=a.method3(); if(isSuccess) isSuccess=a.method4(); if(isSuccess) isSuccess=a.method5(); How can I re factor this code. What is the best way I can follow?

    Read the article

  • 3 Vital Off-Page SEO Methods

    Gathering backlinks is at the crux of the off-page SEO challenge conundrum. HTML is a frustrating challenge as well, but if technical knowledge is not your forte then here are some off-page SEO tips for you:

    Read the article

  • Effective Methods to Combat Cyber Stalking

    Cyber stalking can be a very frightening experience. Often individuals who are the victims of this occurrence feel invaded and unsafe even in their own home. A large number of people use the internet... [Author: Ed Opperman - Computers and Internet - June 14, 2010]

    Read the article

  • Different Methods of Link Building

    If you have created a new website, you must be very anxious to see it on search engine results. But submitting it to search engines alone will not help. You will need to optimize your website for search engines.

    Read the article

  • Get the Most Out of Top Link Building Methods

    You have to keep your eyes and ears open to see any link building opportunity that might have come your way. Mere awareness of your competitors' strategy can help you know certain things which no other SEO book on the web can tell you about.

    Read the article

  • Free Traffic Generation Methods Through SEO

    Traffic is King, as they say. You can either opt for paid traffic or free traffic. Paid Traffic involves paid advertising such as Pay-Per-Click, or link sponsorship on authority sites. The other way is free traffic, which you achieve using various resources.

    Read the article

  • Methods Of Blocking Or Preventing Blog Spamming

    Spam in blogs or comment spam are known as one of the most widely used forms of spamdexing in SEO or search engine optimization. This technique involves the use of blogs in which a spammer would manu... [Author: Margarette Mcbride - Web Design and Development - May 05, 2010]

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >