PyInstaller
Khan Academy
CGI - Simple Common Gateway Interface Clas
CGI - Simple Common Gateway Interface Class This perl library uses perl5 objects to make it easy to create Web fill-out forms and parse their contents. This package defines CGI objects, entities that contain the values of the current query string and other state variables. CGI.pm also provides a simple function-oriented programming style for those who don't need its object-oriented features. The current version of CGI.pm is available at There are two styles of programming with CGI.pm, an object-oriented style and a function-oriented style. For example, using the object oriented style, here is how you create a simple "Hello World" HTML page: use CGI; $q = new CGI; print $q->header, $q->start_html('hello world'), $q->h1('hello world'), $q->end_html; In the function-oriented style, there is one default CGI object that you rarely deal with directly. print $q->header('text/html'); :cgi :all
7. Input and Output — Python v2.7.1 documentation
There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This chapter will discuss some of the possibilities. 7.1. Fancier Output Formatting So far we’ve encountered two ways of writing values: expression statements and the print statement. Often you’ll want more control over the formatting of your output than simply printing space-separated values. The string module contains a Template class which offers yet another way to substitute values into strings. One question remains, of course: how do you convert values to strings? The str() function is meant to return representations of values which are fairly human-readable, while repr() is meant to generate representations which can be read by the interpreter (or will force a SyntaxError if there is no equivalent syntax). Some examples: Here are two ways to write a table of squares and cubes: Basic usage of the str.format() method looks like this: '! 7.1.1. 7.2.
ariel.com.au/jokes/The_Evolution_of_a_Prog...
High School/Jr.High First year in College program Hello(input, output) begin writeln('Hello World') end. Senior year in College (defun hello (print (cons 'Hello (list 'World)))) New professional #include <stdio.h> void main(void) { char *message[] = {"Hello ", "World"}; int i; for(i = 0; i < 2; ++i) printf("%s", message[i]); printf("\n"); } Seasoned professional Master Programmer Apprentice Hacker Experienced Hacker Seasoned Hacker % cc -o a.out ~/src/misc/hw/hw.c % a.out Guru Hacker New Manager Middle Manager mail -s "Hello, world." bob@b12 Bob, could you please write me a program that prints "Hello, world."? Senior Manager % zmail jim I need a "Hello, world." program by this afternoon. Chief Executive % letter letter: Command not found. % mail To: ^X ^F ^C % help mail help: Command not found. % damn! Anonymous If you enjoyed this, you might like:
PHP Tutorial
Introduction Up until recently, scripting on the internet was something which very few people even attempted, let alone mastered. Recently though, more and more people have been building their own websites and scripting languages have become more important. What Is PHP? PHP stands for Hypertext Preprocessor and is a server-side language. Why PHP? You may be wondering why you should choose PHP over other languages such as Perl or even why you should learn a scripting language at all. Using scripts on your website allows you to add many new 'interactive' features like feedback forms, guestbooks, message boards, counters and even more advanced features like portal systems, content management, advertising managers etc. What Do I Need? As mentioned earlier, PHP is a server-side scripting language. Writing PHP Writing PHP on your computer is actually very simple. Declaring PHP PHP scripts are always enclosed in between two PHP tags. Your First Script Finishing and Testing Your Script Part 2
Regular Expression Tutorial - Learn How to
This tutorial teaches you all you need to know to be able to craft powerful time-saving regular expressions. It starts with the most basic concepts, so that you can follow this tutorial even if you know nothing at all about regular expressions yet. The tutorial doesn't stop there. It also explains how a regular expression engine works on the inside, and alert you at the consequences. This helps you to quickly understand why a particular regex does not do what you initially expected. It will save you lots of guesswork and head scratching when you need to write more complex regexes. What Regular Expressions Are Exactly - Terminology Basically, a regular expression is a pattern describing a certain amount of text. This first example is actually a perfectly valid regex. \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\. With the above regular expression pattern, you can search through a text file to find email addresses, or verify if a given string looks like an email address. Different Regular Expression Engines
The Hello World Collection
VSJ | Articles | Solving Sudoku with SQL
This article was originally published in VSJ, which is now part of Developer Fusion. One thing you are almost guaranteed to see on trains these days is at least one person (quite often more) with pencil poised, glassy-eyed, intensely focused on a Sudoku puzzle. These fascinating numbers puzzles have become exceedingly popular in the UK (and goodness knows where else). I have never been a keen puzzles enthusiast, so I was initially reluctant to check out this new craze. But seeing how people seemed to be enjoying it I finally gave it a go. You can think of a Sudoku as a square divided into 9 equal squares (blocks) and the 9 squares each further divided into 9 much smaller squares (cells). Figure 1: An example of a Sudoku puzzle The blocks make a 3 x 3 grid (i.e. 3 rows and 3 columns). A Sudoku puzzle comes with numbers already present in some of the cells. To make it even more fun for myself, I embarked on an exercise to write a program that solves Sudoku puzzles. How the program works