update

Flutter, sqflite, and escaping quotes with SQL INSERT and UPDATE statements alvin October 3, 2019 - 5:17pm

When you want to do a SQL INSERT or UPDATE using the Flutter sqflite package, I’ve found that it’s best to use their insert and update methods (as shown below) so you don’t have to worry about escaping single- and double-quotes. This is similar to the reason why Java developers switched from Statement to PreparedStatement way back in the late 1900s.

As an example, given this SQLite database table:

How to install and update Drupal 7 modules from the command line with Drush

As a note to self, I learned today that you can install Drupal 7 modules from the command line with this Drush command:

drush en module_name

such as:

drush en smtp

You can also update Drupal 7 modules with Drush. For instance, I just ran these commands on a Drupal 7 website:

drush up ctools
drush up context
drush up file_entity
drush up media
drush up rules

Scala List class: methods, examples, and syntax

This page contains a large collection of examples of how to use the methods on the Scala List class.

The Scala List class as an immutable, linear, linked-list class. It’s very efficient when it makes sense for your algorithms to (a) prepend all new elements, (b) work with it in terms of its head and tail elements, and (c) use functional methods that traverse the list from beginning to end, such as filter, map, foldLeft, reduceLeft.

Scala Seq class: methods, examples, and syntax

This page contains a large collection of examples of how to use the methods on the Scala Seq class.

Important note about Seq, IndexedSeq, and LinearSeq

As an important note, I use Seq in the following examples to keep things simple, but in your code you should be more precise and use IndexedSeq or LinearSeq where appropriate. As the Seq class Scaladoc states: