Search Results

Search found 4835 results on 194 pages for 'practice'.

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

  • how and when to update a mysql index?

    - by fayer
    im using this sql query to create an index: $query = "CREATE INDEX id_index2 ON countries(geoname_id, name)"; but how do i update the index when new entries are added? should i run a php script with the update query in CRON and run it every night? is this best practice for automated index updating?

    Read the article

  • buttons and menu items in cocos2d/objective-c

    - by peter61
    In my app, I'd like a method called whenever the user taps the screen (anywhere on the screen). Normally, I'd make a transparent UIButton that covers the whole screen. If I'm using the cocos2d framework, what's the best way to do this? Is it good practice to still use UIButtons? I've been reading about MenuItems but haven't found an easy way to make one giant fully transparent menu item? Thanks.

    Read the article

  • how to make functions global?

    - by fayer
    i'm trying to follow DRY and i've got some functions i have to reuse. i put them all as static functions in a class and want to use them in another class. what is the best way to make them available to a class. cause i can't extend the class, its already extended. should/could i use composition? what is best practice? thanks!

    Read the article

  • quoting HTML attribute values

    - by Flavius
    Hi I know the spec allows both ' and " as delimiters for attribute values, and I also know it's a good practice to always quote. However I consider " being the cleaner way, maybe it's just me having grown up with C and C++' syntax. What is the cleanest way of quoting attribute values and why? Please no subjective answers.

    Read the article

  • javascript string difference

    - by Konrad
    What is the difference (if any) between the javascript strings defined below? var str1 = "Somestring"; var str2 = 'Somestring'; "" and '' mean two very different things to me predominantly writing code in C++ :-) EDIT: If there is no difference why are there two ways of achieving the same thing and which is considered better practice to use and why. Thanks!

    Read the article

  • Do I need to cast the result of strtol to int?

    - by Kristo
    The following code does not give a warning with g++ 4.1.1 and -Wall. int octalStrToInt(const std::string& s) { return strtol(s.c_str(), 0, 8); } I was expecting a warning because strtol returns a long int but my function is only returning a plain int. Might other compilers emit a warning here? Should I cast the return value to int in this case as a good practice?

    Read the article

  • plain old system.out question

    - by mac
    I was looking at someone's code and saw that he repeatedly declared PrintStream out = System.out; and later called out.println("blah"); I actually thought this was kind of neat. Is this a common practice? Was he just being fancy?

    Read the article

  • Python: How should I make instance variables available?

    - by swisstony
    Suppose I have: class myclass: def __init__(self): self.foo = "bar" where the value of foo needs to be available to users of myclass. Is it OK to just read the value of foo directly from an instance of myclass? Should I add a get_foo method to myclass or perhaps add a foo property? What's the best practice here?

    Read the article

  • (android) rows of buttons that take up the entire width of the screen

    - by user558043
    I am trying to make 3 rows of 4 buttons each that will take up the entire width of the screen. I have tried Linear Layout but have trouble adding a second row and from what I have read nesting Linear Layouts is bad practice. I tried to use relative layout several times but I cannot manage to get the buttons to fill the width of the screen because it ignores layout_weight, I then tried nesting linear layout in relative layout but layout_weight is still ignored. What is the best way to accomplish this?

    Read the article

  • Rails: Serializing objects in a database?

    - by keruilin
    I'm looking for some general guidance on serializing objects in a database. What are serialized objects? What are some best-practice scenarios for serializing objects in a DB? What attributes do you use when creating the column in the DB so you can use a serialized object? How to save a serialized object? And how to access the serialized object and its attributes? (Using hashes?)

    Read the article

  • Checking for updates at startup

    - by chris
    Let's consider a WPF client-server application. What is the best practice to create the client, so that every time it is launched, it checks for updates and if any available, update the client application?

    Read the article

  • Best way to install web applications (e.g. Jira) on Unixes?

    - by gineer
    Can you throw some points on how it is a best way, best practice to install web application on Unixes? Like: where to place app and its bases and so for, how to configure to be secure and easy to backup, etc For example I know such suggestion -- to set uniq user for each app. App in question is Jira on FreeBSD, but more general suggestions are also welcomed.

    Read the article

  • Should I create a new extension for an xml file?

    - by macleojw
    I'm working with a data model stored in XML files. I want to create some metadata for the model and store it alongside, but would like to be able to distinguish between the two. The data model is imported into some software from time to time and we don't want it to try to import the meta data files. To get round this, I've been thinking of creating a new extension for the metadata xml files (say .mdml). Is this good practice?

    Read the article

  • Is it better to create methods with a long list of parameters or wrap the parameters into an object?

    - by GigaPr
    Hi, Is it better(what is the best practice) to create methods with a long list of parameters or wrap the parameters into an object? I mean lets say i have a Client data type with a long list of properties and i want to update all the properties at once. is it better to do something like public int Update(int id, string name, string surname, string streetAddress, string streetAddress2, string postcode, string town, string city, string nationality, string age, string gender,string job){ } or wrap all the properties in a object and do something like public int Update(Client client){} thanks

    Read the article

  • Web hosting a setup where both Windows and Linux are required

    - by lk
    I have a system where a website needs to be hosted on a Linux machine while a backend application that the site talks to needs to reside on Windows. Is there any "common practice" for such hosting? Note - both of the systems are mine so there is the dilemma of whether to have the machines physically located together to avoid delay for calls over the net.

    Read the article

  • Should I use more than one CSS sheet?

    - by Robert
    I am updating a website to add some mobile friendly pages. At the moment we have one big css page with everything in. My idea is to put all the mobile specific css into a separate file and then link both sheets. The mobile css will overide anything in the default css (bigger buttons etc). Im quite new to css, what is the best practice?

    Read the article

  • Functional Programming Equivalent of Design Patterns Book?

    - by JasonFruit
    Is there a functional-programming equivalent to the Gang of Four Design Patterns book? That is, is there a book that explains and gives examples of how commonly-needed code structures are implemented functionally? I think seeing that would give me a better idea of how to go about using in practice the functional concepts whose theory I understand.

    Read the article

  • Frequent Functions: How to Structure?

    - by cam
    How should one structure their frequently used non-important functions (conversions, etc) in C# since everything must be contained in an object? Usually I take all these functions and put them in a static Utility class. Is this a good practice? How do most developers do it?

    Read the article

  • Linux network programming. What can I start with?

    - by Negai
    Hi everyone! I've recently got interested in Linux network programming and read quite a bit (Beej's Guide to Network Programming). But now I'm confused. I would like to write something to have some practice, but I don't know what exactly. Could please recommend me a couple of projects to start with? Thanks.

    Read the article

  • Where to put SVN repository directory in Linux?

    - by alexloh
    I am setting up a new SVN server on Ubuntu Linux. Where is a good place (best practice) to put the repositories? Should I create a new user? The server will be accessed via http:// so no need to create user accounts etc (as was the case for svn://). Many thanks in advance

    Read the article

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