Search Results

Search found 2 results on 1 pages for 'totallymike'.

Page 1/1 | 1 

  • PHP Installer Script

    - by totallymike
    I'm looking to create a fully functional installer for a slightly complicated web application using PHP. Basically, you go to URL/setup.php and you are asked a series of questions, and during the process a database is set up and a config file is populated according to the answers given. A good example of this is how Wordpress handles its install procedure, as well as any number of PHP applications. My question to you, oh great internet, is this: This technique is so prevalent that surely not everyone is re-inventing the wheel, is there a place I can go to find a basic walkthrough (not code, just a description) of the technique. Either that or a good book which outlines if not this specific technique, then the fundamentals relevant to this? I can bang out something ugly and probably make it work myself, but if there's a best known method I'd like to find it. Far more important than having a working function is to have a description of what's going on from step to step. I'd like to have the installer, but I really want to learn how it's done. Thanks, Mike

    Read the article

  • How to get REALLY fast python over a simple loop

    - by totallymike
    I'm working on a spoj problem, INTEST. The goal is to specify the number of test cases (n) and a divisor (k), then feed your program n numbers. The program will accept each number on a newline of stdin and after receiving the nth number, will tell you how many were divisible by k. The only challenge in this problem is getting your code to be FAST because it k can be anything up to 10^7 and the test cases can be as high as 10^9. I'm trying to write it in python and having trouble speeding it up. Any ideas? import sys first_in = raw_input() thing = first_in.split() n = int(thing[0]) k = int(thing[1]) total = 0 i = 0 for line in sys.stdin: t = int(line) if t % k == 0: total += 1 print total

    Read the article

1