Python Polymorphism

Introduction

Polymorphism is yet another important aspect of Object Oriented Programming. No Warcraft fans, it doesn’t have anything to do with turning people into sheep. That’d be much cooler. Instead, Polymorphism allows methods and functions to use classes with similar functionality in the same way.

Polymorphism cuts down on the amount of code that you need to write by eliminating redundancy in a logical and meaningful way. It relies on you, the programmer, to be clever in your design and harness similarities in objects.

Read more

Perl script to retrieve an external IP address

This simple perl script will print your external IP address assigned by you internet provider ( great for someone with dynamic IP address ).

First, we download a html file from ipchicken.com and then phrase this file to match for IP address in format X.X.X.X using regular expression.

Next, the script removes all unnecessary characters and prints your external IP address on the terminal. Lastly, the script removes previously downloaded index.html file.

Read more

zenity-logo

How to use graphical widgets in bash scripts with zenity

Zenity is a very useful utility which let us create graphical user interfaces for our shell scripts. Several widgets exists, and can be used by invoking the program with the respective options. The widgets are based on the GTK toolkit, and return the result of the user interaction either on the standard output or as a return code.

In this tutorial you will learn:

  • What are the general zenity options
  • What are the some of the most useful available widgets and how to use them

Read more

javascript-logo

How to use arrow functions in Javascript

The arrow functions syntax was introduced with ECMAScript6: by using this new syntax, in some (but not all) cases, we can produce more concise and readable code, especially when our function contains only one expression. In this tutorial we will see how we can define an arrow function, what are the differences with standard functions and what are the cases in which the use of arrow functions is not appropriate.

In this tutorial you will learn:

  • What is an arrow function.
  • How an arrow function is defined.
  • The differences between arrow functions and standard functions.
  • The cases in which arrow functions cannot be used.

Read more

php-curl

How to perform web requests with PHP using the cURL extension

The open source libcurl is client-side URL transfer library which supports a lot of protocols like FTP, HTTP, HTTPS  and works on a multitude of platforms. The PHP cURL module let us access the functionalities provided by the library from the PHP programming language. In this tutorial we will see how to install the module and how to use it to perform simple requests.

In this tutorial you will learn:

  • How to install the cURL module
  • The basic steps to follow to initialiaze a cURL session and perform a request
  • How to perform a GET request with PHP cURL
  • How to perform a POST request with PHP cURL

Read more

How to check Bash version

Objective

This article will provide you with the information on how to check bash version on your operating system.

Operating System and Software Versions

  • Operating System: – Distribution Agnostic

Requirements

No special prerequisites are required is required.

Read more

Introduction to Ebay API with python: Obtaining keys and accessing the sandbox - Part 1

Introduction to Ebay API with Python: Obtaining keys and accessing the sandbox – Part 1

Ebay is one of the biggest ecommerce sites. Many people use it to search and buy products, and many stores use it to enlarge their audience and expand their business range.

If we want to operate programmatically on Ebay, for example to mass create or modify a set of items, or quickly confront prices, we must use the dedicated application programming interfaces. In this tutorial we will see how to prepare our working environment in order to use python to interact with the Ebay APIs.

In this tutorial you will learn:

  • How to create an Ebay developer account and generate APIs keys
  • What is the Ebay sandbox and how create a sandbox user.
  • How to obtain the Ebay python SDK.

Read more

mariadb-mysql

Introduction to MySQL/MariaDB database SQL views

A database view is nothing but a virtual table, which does not contains data itself, but references data contained in other tables. Views are basically the result of stored queries which can vary on complexity and can be used, for example, to hide data from users, allowing access only on selected columns of a table, or simply to provide a different point of view on the existing data. In this tutorial we will see how to create, update, alter and drop a view on a MySQL, MariaDB database.

In this tutorial you will learn:

  • What is a view
  • How to create a view
  • How to update a view
  • How to alter a view
  • How to drop a view

Read more

Introduction to Ebay API with python: The Finding API - Part 2

Introduction to Ebay API with Python: The Finding API – Part 2

In the previous article we saw how to perform the preliminary steps to prepare our working environment, create an Ebay developer and a sandbox account and generate the keys and credentials needed to execute API calls. In this new chapter we will create our first request and perform our first call focusing on the “Finding API”

In this tutorial you will learn:

  • What are the possible “Finding API” calls;
  • What are the parameters you can use to customize you call;
  • How to build a request with the python SDK;
  • How to perform an API call;

Read more