Teach the web Your browser may lack functionality needed by Webmaker to function properly. Please upgrade your browser for an improved experience. Welcome to Webmaker! That username is taken You must choose a username Invalid username. All usernames must be between 1-20 characters, and only include "-", "_" and alphanumeric characters You must agree to our terms and conditions. Let's teach the web! We've got creative ways to help anyone teach web literacy, digital skills and making. Apache 2 Basic Configuration on Unix-Like Systems In a previous post, we had a look at the Apache HTTP server, what it is, and how it works. Today, we'll handle some of the most important Apache configuration directives, look at what they are for, and learn how to edit them, in order to mold the way our server works to our liking. The Apache server is a service that runs in the background, waiting for requests from clients connecting to the ports it listens to, in order to take action. Apache either responds to those requests, or leaves related notes in its log files. ServerName The ServerName directive is used to set the host name of the server; this is how the server identifies itself. Apache has a great number of directives which you can set and manipulate in order to set your server’s behavior. If the ServerName directive is not specified, the server tries to obtain it by performing a reverse DNS look-up on its IP address. You will have to use the IP address of your machine if you don't yet have a registered domain name. Listen
Learn Web Development with the Ruby on Rails Tutorial Michael Hartl Contents Foreword My former company (CD Baby) was one of the first to loudly switch to Ruby on Rails, and then even more loudly switch back to PHP (Google me to read about the drama). Though I’ve worked my way through many Rails books, this is the one that finally made me “get” it. The linear narrative is such a great format. Enjoy! Derek Sivers (sivers.org) Founder, CD Baby Acknowledgments The Ruby on Rails Tutorial owes a lot to my previous Rails book, RailsSpace, and hence to my coauthor Aurelius Prochazka. I’d like to acknowledge a long list of Rubyists who have taught and inspired me over the years: David Heinemeier Hansson, Yehuda Katz, Carl Lerche, Jeremy Kemper, Xavier Noria, Ryan Bates, Geoffrey Grosenbach, Peter Cooper, Matt Aimonetti, Gregg Pollack, Wayne E. About the author Michael Hartl is the author of the Ruby on Rails Tutorial, the leading introduction to web development with Ruby on Rails. Copyright and license Welcome to the Ruby on Rails Tutorial.
Now You See It // The Blog of Author Cathy N. Davidson » Why Web Literacy Should Be Part of Every Education Teaching our kids to code will make them uniquely prepared to fully contribute to the world. Like reading, writing, and arithmetic, web literacy is both content and activity. You don’t just learn “about” reading: you learn to read. You don’t just learn “about” arithmetic: you learn to count and calculate. Our Information Age began, for all intents and purposes, in April of 1993 when the Mosaic 1.0 browser made the World Wide Web available–for free–not just for use but for contribution and participation by anyone with access to the Internet. No one would have believed that peers could contribute knowledge and advice, helping one another to learn through YouTube videos, Wikipedia, or other sites. Why haven’t we had an educational revolution that takes advantage of this human quality that we now have proof exists? Web literacy explains the world we live in and gives us the tools to contribute to that world. Right now kids can go online outside of school all they want.
Python / Functions Python: Functions Python/Functions at YouTube slides PDF Hello, and welcome to the eighth episode of the Software Carpentry lecture on Python. In this episode, we'll show you how functions work, and how to define new functions of your own. First, a bit of design philosophy. Instead, languages should make it easy for people to create what they need to solve their specific problems. Every language does this by allowing programmers to define functions that carry out new higher-level operations. Which leads some people to regard programming as the act of creating a mini-language in which the solution to the original problem is trivial. In Python, we define new functions using the keyword def. For example, here's a function that does nothing but return a particular string to its caller. To call it, we just use the function's name, followed in this case by empty parentheses. To make functions more useful, we can give them parameters. Let's have a closer look at what happens when we call it.
Ruby Tutorial Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This tutorial gives a complete understanding on Ruby. This reference has been prepared for the beginners to help them understand the basic to advanced concepts related to Ruby Scripting languages. Before you start doing practice with various types of examples given in this reference, I'm making an assumption that you are already aware about what is a computer program and what is a computer programming language. For most of the examples given in this tutorial, you will find Try it option, so just make use of it and enjoy your learning. Try following example using Try it option available at the top right corner of the below sample code box: #! 1 - Ruby Quick Reference Guide A quick Ruby reference guide for Ruby Programmers. Ruby Quick Reference Guide 2 - Ruby Built-In Useful Functions Ruby Built-In Useful Functions
2.2. Declaring Functions Python has functions like most other languages, but it does not have separate header files like C++ or interface/implementation sections like Pascal. When you need a function, just declare it, like this: def buildConnectionString(params): Note that the keyword def starts the function declaration, followed by the function name, followed by the arguments in parentheses. Multiple arguments (not shown here) are separated with commas. Also note that the function doesn't define a return datatype. The argument, params, doesn't specify a datatype. 2.2.1. An erudite reader sent me this explanation of how Python compares to other programming languages: statically typed language A language in which types are fixed at compile time. dynamically typed language A language in which types are discovered at execution time; the opposite of statically typed. strongly typed language A language in which types are always enforced. weakly typed language
Codecademy Labs PythonBooks - Learn Python the easy way ! 2.1.4 String manipulation | GEOG 485: GIS Programming and Automation Printer-friendly version You've previously learned how the string variable can contain numbers and letters and represent almost anything. When using Python with ArcGIS, strings can be useful for storing paths to data and printing messages to the user. There are also some geoprocessing tool parameters that you'll need to supply with strings. Python has some very useful string manipulation abilities. Concatenating strings To concatenate two strings means to append or add one string on to the end of another. You may need to concatenate strings when working with path names. The following example, modified from one in the ArcGIS Help, demonstrates this concept. String concatenation is occurring in this line: outputPath = resultsFolder + featureClass. The above example shows that string concatenation can be useful in looping. Casting to a string Sometimes in programming you have a variable of one type that needs to be treated as another type. Now try to run it. Readings
Python String Manipulation We already saw a brief introduction to the Python string type. In this section we will try to further explore how strings can be used in this language. Length of a String Finding the length of a string is done using the built-in function len(): Strings Are Immutable Strings in Python are immutable i.e. they cannot be changed once created. Concatenation and Substrings Concatenation of strings in Python is done using the plus operator. We can use * as a short hand notation for concatenating a string with itself multiple times: Other types such as ints and floats are not forced into strings when on either side of the concatenation operator: Output: => TypeError: unsupported operand type(s) for +: 'int' and 'str' We can, however, convert the int into a string and then perform the concatenation: Similarly we can use str() to convert floats (and other types) to a string. Single characters can be read from a string using the indexing operator (brackets, []). Format Strings String Methods
Python Programming Exercises - Free PDF downloads Sponsored High Speed Downloads Python programming | exercises - Technical University of Denmark Python programming | exercises Extra task After installing Cherrypy see that it works. Try to get the bonus-sqlobject.py from the tutorial to work. Python Programming Exercises Python Programming Exercises Control Structures 2.1 Write a program that inputs a 4 digit year and then calculates whether or not it is a leap year. A Python Book: Beginning Python, Advanced Python, and Python ... 3.5.3 if: statement exercises.....154 3.5.4 for: statement exercises ... oriented programming, Python enables us to write clear, logical applications for ... Python programming exercises , I - UZH - GC3: Grid Computing ... Grid Computing Competence Center Python programming exercises, I Riccardo Murri Grid Computing Competence Center, Organisch-Chemisches Institut, University of Zurich Python course in Bioinformatics - Donald Bren School of ... Programming in Python – Exercises - NeuralEnsemble Python for Rookies
Getting the Hang of GitHub A project is always more fun when you've got friends working with you, but how can do it when working on a coding project? I'll keep my keyboard to myself, thanks. Enter GitHub. Disclaimer This tutorial will assume that you're familiar with Git, arguably the best distributed version control software there is. Getting Started Of course, you'll need a GitHub account if you're to experience any of the social coding goodness. Creating an Account There are several different plans you can use, depending on your needs. Open up your terminal and type this: ssh-keygen -t rsa -C "your@email.com". Warming up to the Interface When you first log in, you'll see the dashboard; it's something like this: In the top right corner, you can see a toolbar with options for controlling your account. The main panel offers a number of actions; later, it will be used to keep you up to date on projects you're interested in. It's all about Repos Creating a repository is pretty simply. Commits Network Graphs Fork Queue
Python Fundamentals Tutorial : Variables A variable in Python is defined through assignment. There is no concept of declaring a variable outside of that assignment. >>> ten = 10 >>> ten 10 In Python, while the value that a variable points to has a type, the variable itself has no strict type in its definition. >>> ten = 10 >>> ten 10 >>> ten = 'ten' >>> ten 'ten' >>> 'Day ' + 1 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: cannot concatenate 'str' and 'int' objects This behavior is different from some other loosely-typed languages. d8> 'Day ' + 1 Day 1 In Python, however, it is possible to change the type of an object through builtin functions. >>> 'Day ' + str(1) 'Day 1' This type conversion can be a necessity to get the outcome that you want. By converting one of the operands to a float, Python will perform float division and give you the result you were looking for (at least within floating point precision). >>> float(10) / 3 3.3333333333333335 >>> 10 / float(3) 3.3333333333333335