Articles

Scala Variables

By: Stephen Patrick | 02 Aug 2016 | Category: Scala Language Basics

Scala Variables

Scala allows us to define variables in a number of different ways. Scala allows us to define different kinds of variables namely val and var. A val can be considered similar to a Java final variable in that once it is assigned it cannot be reassigned. A var can be considered as a Java non final variable.

Read More

Scala Data Types

By: Stephen Patrick | 02 Aug 2016 | Category: Scala Language Basics

Scala Data Types

Scala provides support for different data types. One major difference when compared to Java is that all Scala Data types are objects. In Java when we use primitive types such as int they can be converted to their wrapper object type and vice a versa through a process known as boxing and unboxing.

Read More

Scala Setup

By: Stephen Patrick | 02 Aug 2016 | Category: Scala Introduction

Scala Setup

Scala can be installed both on Windows, and Unix type Systems. In order to install Scala Java must be installed.

Read More

Scala Introduction

By: Stephen Patrick | 02 Aug 2016 | Category: Scala Introduction

Scala Introduction

Scala is a general purpose programming language. It provides features of both object orientated, and functional programming and it blends the two paradigms into a single language. In this sense we can use object orientated features to build a system composed of objects and at the same time take advantage of the features provided by a functional language.

Read More

PowerShell: Monitor Files For Changes

By: Stephen Patrick | 28 Jul 2016 | Category: PowerShell File Processing

PowerShell: Monitor Files For Changes

We can use PowerShell to monitor files for changes. The Get-Content Cmdlet provides the Wait parameter. The wait parameter will monitor the end of a file for any changes. This task can be useful in a number of situations such as monitoring a log file for changes.

Read More

Javascript Accessor Properties

By: Stephen Patrick | 28 Jul 2016 | Category: JavaScript Object Orientation

Javascript Accessor Properties

As mentioned, we can add properties to an object as an own property added to the object itself, or to the object prototype. JavaScript provides us with another type of property called an accessor property. This property can be likened to a property in c# .net.

Read More

PowerShell: Find Files Modified After Date

By: Stephen Patrick | 27 Jul 2016 | Category: PowerShell File Processing

PowerShell: Find Files Modified After Date

We can use PowerShell to find files modified after a certain date. This task can be useful to find recently modified files on a system. We can use the Get-ChildItem cmdlet to perform this task. The Get-ChildItem CmdLet provides the Recurse parameter which allows us to search in child directories.

Read More

JavaScript: Object Properties

By: Stephen Patrick | 27 Jul 2016 | Category: JavaScript Object Orientation

JavaScript: Object Properties

We can add properties to objects. Properties, allow us to give a name to a value we wish to store on the object. We can add both data and behavior to our objects. Properties can also be added to an object at run-time.

Read More

JavaScript: Object Literals

By: Stephen Patrick | 21 Jul 2016 | Category: JavaScript Object Orientation

JavaScript: Object Literals

JavaScript also allows us to create objects via object literal notation. This notation does not use a constructor function. Moreover, defining a variable with object literal notation does not require the use of the new keyword. As previously mentioned when we create an object using a constructor function we use the new keyword. The new keywords creates a new reference type.

Read More

JavaScript: Scope Revisited

By: Stephen Patrick | 20 Jul 2016 | Category: JavaScript Code Organization

JavaScript: Scope Revisited

As we mentioned when working with JavaScript variables exist within a scope. Within a scope we can create named data types, such as objects, arrays, functions and variables. We can also create unnamed data types for example anonymous functions. We also mentioned the scope is the domain in which data types, variables, functions etc exist and can be referenced. Scope can also be arranged hierarchically.

Read More

JavaScript: Object Orientation

By: Stephen Patrick | 20 Jul 2016 | Category: JavaScript Object Orientation

JavaScript: Object Orientation

JavaScript supports object orientated features. JavaScript is not a traditional object orientated language as it is a prototypical language. A prototypical language does not make a distinction between classes and objects as is with programming languages such as Java and C#. An object in JavaScript has a prototype property.

Read More

Asp.Net MVC CSV Content

By: Stephen Patrick | 19 Jul 2016 | Category: Asp.Net MVC Content Types

Asp.Net MVC CSV Content

Asp.net MVC enables us to return responses for different content types. We will quickly look at how to export CSV content. There are different approaches to achieving this goal.

Read More

JavaScript Functions Are Objects

By: Stephen Patrick | 19 Jul 2016 | Category: JavaScript Functions

JavaScript Functions Are Objects

Functions in JavaScript are different to other programming languages such as Java. Functions in JavaScript are objects. In fact functions in JavaScript allow you to create new objects similar in some respects (but not the same) to classes in Java, C# etc.

Read More

PowerShell: File Comparison

By: Stephen Patrick | 19 Jul 2016 | Category: PowerShell File Processing

PowerShell: File Comparison

A very common task is to compare two files for differences. We may perform this task as part of a post install verification process. PowerShell provides a couple of Cmdlets that aid with this activity.

Read More

JavaScript Scope

By: Stephen Patrick | 19 Jul 2016 | Category: JavaScript Functions

JavaScript Scope

Javascript allows us to define variables and functions. The location of where and how we define determines how that item can be used. Javascript has a global scope. Global scope is the top level or root scope any variable, function etc that is defined at global scope can be referenced, from a child scope or a variable at the same scope.

Read More

Go: Create A Shared Library

By: Stephen Patrick | 13 Jul 2016 | Category: Go Introduction

Go: Create A Shared Library

Previously, we looked at what was involved to create a Go executable. The other type of program that we can create is a shared library.

As we did previously create a new folder (package) in the src directory. Name the folder hellolib. Within this folder create a new file named hello.go with the below code.

Read More

PowerShell: Creating Files

By: Stephen Patrick | 13 Jul 2016 | Category: PowerShell File Processing

PowerShell: Creating Files

Sometimes we find the need to create files. We can create files with PowerShell. There are a number of different ways to create a file. We will look at some of the mechanisms here.

Read More

JavaScript Function Arguments

By: Stephen Patrick | 13 Jul 2016 | Category: JavaScript Functions

JavaScript Function Arguments

JavaScript allows to define functions that take no arguments. We can also define functions that take arguments. JavaScript allows us to pass values to functions as arguments. We can define our function to take arguments by placing one or more variables in the function definition parentheses.

Read More

JavaScript Anonymous Functions

By: Stephen Patrick | 13 Jul 2016 | Category: JavaScript Functions

JavaScript Anonymous Functions

An anonymous function is a function without a name. Anonymous functions are useful in a number of scenarios. We can create them when needed such as passing them as a callback function to receive notification of a task. We can also assign them to a variable to be used later. For example, we can use an anonymous functions as a callback.

Read More

JavaScript Functions

By: Stephen Patrick | 13 Jul 2016 | Category: JavaScript Functions

JavaScript Functions

We can consider JavaScript as a functional language. In fact all functions in JavaScript are first class objects, and can be treated as such. Functions can be assigned to variables, passed to and returned from functions. Functions can also be defined as literals.

Read More

Popular Articles