Modelling for Distributed Network Systems

Watch out! This tutorial is over 8 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 8 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();.

//custom excerpt length
function itlc_custom_excerpt_length( $length ) {
	//the amount of words to return
	return 20;
}
add_filter( 'excerpt_length', 'itlc_custom_excerpt_length');

 

Post Thumbnails in WordPress RSS Feed

Watch out! This tutorial is over 8 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.

// Put post thumbnails into rss feed
function itlc_feed_post_thumbnail($content) {
	global $post;
	if(has_post_thumbnail($post->ID)) {
		$content = '' . $content;
	}
	return $content;
}
add_filter('the_excerpt_rss', 'itlc_feed_post_thumbnail');
add_filter('the_content_feed', 'itlc_feed_post_thumbnail');

 

Can you ride a pig? Minecraft Server on Raspberry Pi

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

Written in C++ (rather than Java like Minecraft itself) Cuberite is a Free and Open Source (FOSS) Minecraft-compatible Game Server. It is designed with performance, configurability, and extensibility in mind, and also aims to accurately recreate most vanilla features.

Continue reading

Customise WordPress Admin Footer

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

Change the message that appears in the admin footer, why not give yourself a credit for the theme?

// Customise the footer in admin area
function itlc_footer_admin () {
	echo 'Theme designed and developed by <a href="#" target="_blank">YourNameHere</a> and powered by <a href="http://wordpress.org" target="_blank">WordPress</a>.';
}
add_filter('admin_footer_text', 'itlc_footer_admin');

 

Hello World in C

Watch out! This tutorial is over 8 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 C.

#include<stdio.h>

main()
{
    printf("Hello World");

}

 

Hello World in PHP

Watch out! This tutorial is over 8 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 PHP.

<?php

echo "Hello World";

?>