Hello World in PowerShell

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in PowerShell.

Note: PowerShell commands also have the ability to be run in a script with the .ps1 extension but running scripts are disabled by default for security purposes. Firstly, you will need to set the Execution Policy. The cmdlet Get-ExecutionPolicy will show you that the initial policy is set to ‘Restricted’. This will prevent scripts from running. You can change it with the Set-ExecutionPolicy cmdlet. There are four options Restricted, Remote-signed, Signed and Unrestricted. We recommend Remote-Signed as it will allow you to run the scripts that you have created locally and still keep your machine secure.

So, just type

Now you can use notepad to create your first script. In Notepad type:

This will need to be saved in a file called something like HelloWorld.ps1.

Then from a PowerShell console type

The reason you need the .\ is because a PowerShell security feature ensures that you are targeting a specific script in a specific location,. And that’s all there is to it.

Hello World in Perl

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in Perl. It’s quite similar to Bash, but note the differences carefully!

Create a text file called hello_world.pl containing the following code:

Navigate to a directory where your hello_world.pl is located and make the file executable:
Now you are ready to execute your first perl script:

Hello World in Bash

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in Bash.

Create a text file called hello_world.sh containing the following code:

Navigate to a directory where your hello_world.sh is located and make the file executable:
Now you are ready to execute your first bash script:

Hello World in Javascript

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” to the browser in Javascript.

 

Top 5 Databases for Web Developers

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

When listening to developers talk about databases you will usually hear buzz words like robust, scalable, efficient, etc. Discussions will focus on the power of the DBMS (Database Management System) and how it integrates with other technologies. In our case, however, we don’t really care about most of those things. Instead we are going to be looking at the cost of getting started, tools, the user interface and availability of help, especially help for the beginner.

In the following list we’ll talk briefly about each DBMS, give you some pros and cons, and show you how to download and get started with each of them.

Continue reading

Modelling for Distributed Network Systems

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

The attached sample chapter from Distributed Network Systems: From Concepts to Implementations (Jia, W. and Zhou, W.,2005) is designed to introduce the client-server model and its role in the development of distributed network systems.

The chapter discusses the cooperation between clients and servers/group servers in distributed network systems, and addresses extensions to the client-server model. Service discovery, which is of crucial importance for achieving transparency in distributed network systems, is also elaborated in this chapter.

Custom Excerpt Length in WordPress

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Define how many words to return when using the_excerpt();.

 

Post Thumbnails in WordPress RSS Feed

Watch out! This tutorial is over 2 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Include the post thumbnail in your RSS feed.