Home » Search results for 'python attribute'

PHP $this Variable – What It Is, How To Use It [Examples]

PHP this

This article will explain the PHP $this variable – what it is, what it does, and how to use it – with code examples. PHP Objects and Classes PHP is an object-oriented programming language. Code and data can be stored in an object which represents the items your code represents with a set of properties and methods. For example, you might have objects that represent sales invoices, or cars, or pets, or people – each containing code and data relevant to the thing they represent. The properties or attributes of … Read more

Categories PHP

Home » Search results for 'python attribute'

Checking for Equality (And Inequality) in JavaScript, with Examples

Equality and Inequality JavaScript

This article will explain equality and inequality in the JavaScript Programming language, and provide code examples showing how to check if values are equal in value and type. Checking whether two values are equal can get a bit confusing in JavaScript – there is loose equality and strict equality involving types to consider. Read on to find out how testing for equality and inequality works in JavaScript. What are equality and inequality? In programming, equality is the process of checking whether two values are equal … Read more

Home » Search results for 'python attribute'

How to Create and Use Enums in JavaScript (Not TypeScript)

JavaScript Enum

This article will show you how to create and consume Enums in JavaScript. Unfortunately, javaScript does not include native support for Enums, but you can add comparable functionality yourself. Note that TypeScript, a language that builds on JavaScript, does include support for Enums natively. So we’re only looking at plain JavaScript here – not TypeScript. What is an Enum? An Enum (Enumerated Type) is a data structure containing multiple values. Each value is assigned to an identifier – and can be accessed by that identifier. Enums contain pre-defined constants … Read more

Home » Search results for 'python attribute'

TypeScript Vs JavaScript – What’s the Difference & Which Should You Use?

TypeScript Vs JavaScript

This article will discuss the differences between typescript and JavaScript, the problems they solve, and which is best to use. I really like TypeScript, and I use it a lot. It solves so many of JavaScript’s problems and makes writing good JavaScript code much easier (once you’ve learned to use TypeScript). So, this article is more about why you should use TypeScript (when you can use it), when/where you can use it, and the problems it solves. This article goes well with the following articles, giving you an … Read more

Home » Search results for 'python attribute'

MySQL vs MariaDB vs MongoDB vs PostgreSQL vs SQLite vs MS SQL – Which to Choose?

Which database to Choose

There is a lot of weird-sounding language around databases. Most of it centers on the names of the popular database software which is available. It can make it tough to choose. Each strangely named database solution offers features making it suitable for different tasks. This article should shed some light on what’s what. SQL Is a Language SQL (pronounced ESS-QUE-ELL or sequel depending on which side of the raging debate you side with). It stands for Structured Query Language. It is not a piece of software – it’s the … Read more

Home » Search results for 'python attribute'

PHP foreach Loop [With Examples]

PHP foreach Loop

Looping over arrays and iterating over an object’s attributes form the foundation of a lot of application logic. The foreach construct in PHP can do both and is a crucial tool for building your application logic. PHP foreach Syntax The syntax for a foreach construct in PHP is as follows: foreach (iterable_expression as $value) { # statement(s) } Or, if you also wish to access the array key as well: foreach (iterable_expression as $key => $value) { # statement(s) } Note that: iterable_expression is the variable or value to … Read more

Categories PHP

Home » Search results for 'python attribute'

The Zip Command in Linux: How to Zip Files and Directories

zip files and directories in linux

If you’re looking to archive your files and directories, regardless of your OS, “zip” is the format that is most popular and supported by the largest number of clients and operating systems. In this tutorial, we’ll go over how to use the applications in Linux to compress files and directories. The zip file format supports lossless data compression. Its origins go back to 1993, designed by Phil Katz of PKWARE and Gary Conway of Infinity Design Concepts. Compressing your data has multiple benefits, namely: less … Read more

Home » Search results for 'python attribute'

Track file changes using auditd

command line

Most of Linux distributions comes with Linux Auditing System that makes it possible to track file changes, file accesses as well as system calls. It’s pretty useful functionality for sysadmins who wish to know who and when accessed and/or changed sensitive files like /etc/passwd, /etc/sudoers or others. Daemon auditd that usually runs in background and starts after reboot by default logs those events into /var/log/audit.log file (or into other file if different syslog facility is specified). The common usage is to list all files which should … Read more