Home » Search results for 'javascript object'

Using the Python ‘accumulate()’ Function to Aggregate Data, With Examples

Python accumulate()

This article will detail how to use the ‘accumulate()’ function in Python and provide some easy-to-follow example code. The accumulate() function in Python will process an iterable (iterables are things like lists, dictionaries, sets, or tuples – collections containing items which can be looped over) – returning the accumulated sum of the value of each item or running a given function on each item. The value of the accumulated value is stored for each step and returned with the result. The syntax and code in this article are written for … Read more

Home » Search results for 'javascript object'

Raspberry Pi & Python Powered Tank Part III: More Tank

Python Powered Tank Part III More Tank

This was only meant to be a two-parter, but I couldn’t leave well enough alone. Raspberry Pi & Python Powered Tank Part III is an update with better Python code and an improved design. I’ve gone back to fix the biggest issues that were left after Part II. I’ve omitted a bit of the mucking about in this article to keep it focused on what worked. How Did We Get Here? If you haven’t yet checked out the full build process, here are the previous … Read more

Home » Search results for 'javascript object'

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 'javascript object'

PHP var_dump() Function [With Examples]

PHP var dump Function

The PHP programming language includes various built-in variable types and allows you to create your own complex object classes. Third-party packages also come with their own object classes. So it’s useful to find out what type of variable a variable is, its value, and the type/value of any properties or values the variable may contain. The PHP var_dump() function returns a given variable or value’s properties, including the value and type. It works through the variable’s properties or value recursively doing the same. Read on to learn … Read more

Categories PHP

Home » Search results for 'javascript object'

PHP strtotime() Function – Converting Text to Timestamp [With Examples]

PHP strtotime

The PHP strtotime() function takes a string containing text and converts it to a Unix Timestamp. Find out how to use this function in this guide. A Unix timestamp is a number representing the number of seconds since 00:00:00 UTC on 1 January 1970. From it, you can build more complex Date/Time objects which can readily provide Dates/Minutes/Hours/Seconds or other information about the supplied time. strtotime Syntax strtotime ($datetime , $baseTimestamp) Note that: $datetime is your supplied text string (possibly) containing a date strtotime() supports the English language only See … Read more

Categories PHP

Home » Search results for 'javascript object'

Python List ‘sort()’ Method – Sorting Lists in Python Easily

Sorting Lists in Python Easily

In Python, there’s an easy way to sort lists: using the sort() method. This tutorial explains how to use sort(), with examples. We’ve covered the following in Python: Removing list items Checking if items are in lists Finding items in lists Now it’s time to find out how to sort a list. Syntax for the sort() Method list.sort(reverse=True|False, key=sortFunction) Note that: ‘reverse’ should be a True/False boolean value and is optional reverse=True will sort the list descending The default is reverse=False True/False values case sensitive in Python! … Read more