From Monday to Wednesday, I was teaching Python to a group of delegates at a company where I have previously taught Tcl and Expect and Perl. And this interesting diagram shows just what a contrast there is between the three languages right from the start - in terms of how data is stored into varia ....
When I travel, I'll usually grab a sandwich or fish and chips of an evening, and eat in my room; there's no great thrill in sitting alone in a hotel restaurant and there's often something on the TV (more than five channels is nice, but still surprisingly uncommon), or work to be done online. But on ....
Python functions (and methods) can be called with any number (0 or more) parameters, but the calling sequence must match the 'template' or 'function prototype' given when defining the function. Let's define a function:
def fred(a,b,c=3,d=4,e=5,f=6):
print a,b,c,d,e,f
That ....
Convention states that you can call a function with many parameters, but you return just one.
There's some truth in that statement, but of course you can often return a collection - an array, list, hash, dictionary or other composite object.
Here's a Python example ... 3 parameters in and 2 retu ....
You've got to admire the guy - Paul Clark MP, Undersecretary of State, arrived at Saturday's TravelWatch South West meeting during the chairman's introduction. And he was the first speaker. Without visual aids - with just his name and role projected all the time - he spoke for 30 minutes without any ....
In my role with Melksham Chamber of Commerce, a number of "nuggets" come my way - four recently relating to the new Wiltshire Unitary Authority and how things are changing / have changed.
1. Charity shops, which used to get 80% discount off the business rates on their premises in our area, now get ....
We have chosen to show pictures of ALL of the bedrooms at Well House Manor on the Well House Manor website. We're not unique in this, but it is not the common practise; for sure, we could have just selected our best room(s) but we know that some guests want to see where they will be staying ahead ....
In most of the languages we teach, data is held in memory on a "heap" with a "symbol table" holding the names of the variables, where they are stored, and what type of information the (currently) contain. When you write simple variables out to a file (or the screen) functions like print or puts (Tc ....
Abstract classes, Interfaces, PHP and Java
Basics.
When you design code for a number of different similar type of thing (object types, classes) you don't start from scratch in each case - you define a base class which contains all the common code, and you then create subclasses by extending the ....
Q: "How can I suppress the PHP error messages?"
Q: "I get no error messages - how can I tell what is going wrong in my PHP"
Q: "Can I replace the PHP error messages with my own"
However PHP is configured, there is no satisfying everyone ... and it's a mystery to many people who install PHP code as ....