Javascript Onclick Example

The aim of this example is to show you how to handle the onclick event. A JavaScript can be executed when an event occurs, like when a user clicks on an HTML element. To execute code when a user clicks on an element, we can add JavaScript code to an HTML onclick event attribute . The onclick event fires on ...

Read More »

Python Array Example

Let’s talk about arrays in Python 3.4. Arrays are a way of grouping basic values (characters, integers, floating point numbers), they are sequence types and behave almost like lists, except that all the items in an array must be of the same type. Also, arrays are mutable, ordered and indexed. 1. The Basics You probably know lists in Python, and ...

Read More »

jQuery Select Option Example

The aim of this example is to explain and use various jQuery selectors and methods related to manipulation the select dropdown element of HTML. The <select> element is used to create a drop-down list. The <option> tags inside the element define the available options in the list. These basic HTML elements are the ones we’ll apply special selector and/or methods ...

Read More »

Promises in AngularJS. Part II. $q service.

I have already blogged about Promises in AngularJS 1.x. This is the second part which describes the Angular’s $q service. The $q service can be used in two different ways. The first way mimics the Q library for creating and composing asynchronous promises in JavaScript. The second way mimics the ECMAScript 2015 (ES6) style. Let’s begin with the first way. ...

Read More »

Understanding the Docker Ecosystem

Attend any tech-related event or read any tech-related article over the past 18 months, and you will likely have heard of Docker and have an inkling of what it is and does. In short, Docker builds upon concepts of the past but packages them better. Docker is a tool for creating ‘containers’ that can hold just what you need for ...

Read More »

Gamify your learning goals

Learning a new programming language or framework is hard work, even if you love doing it. You can’t get around this: to complete a course or a side project, you have to put your head down and do the work to reach the finish line. How do you motivate yourself when there are so many interesting skills and projects catching ...

Read More »

Javascript Textarea Example

If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use a text-area field for the argumentation. It is a highly convenient feature of Javascript, and if you now want to add it to your own website, I would completely agree. But how can ...

Read More »

A Deep Dive into Ruby Scopes

The Ruby language was designed with a pure object-oriented approach. In Ruby, everything is an object. Object-oriented design provides encapsulation for properties and actions. Encapsulation’s purpose is to protect methods and data from outside interference and misuse. With encapsulation, everything has certain scopes from which they may be utilized. Several categories of scope in Ruby are global, instance, and local ...

Read More »