Nvim recognizes the following events. Names are case-insensitive.
BufAdd
Just after creating a new buffer which is
added to the buffer list, or adding a buffer
| import 'dart:ffi'; | |
| import 'dart:io'; | |
| import 'dart:typed_data'; | |
| import 'package:sqlite3/sqlite3.dart'; | |
| import 'package:sqlite3/src/ffi/implementation.dart'; | |
| void main() { | |
| final lib = DynamicLibrary.open('cr-sqlite/core/dist/sqlite3'); | |
| final sqlite3 = FfiSqlite3(lib); |
| ---Utility for keymap creation. | |
| ---@param lhs string | |
| ---@param rhs string|function | |
| ---@param opts string|table | |
| ---@param mode? string|string[] | |
| local function keymap(lhs, rhs, opts, mode) | |
| opts = type(opts) == 'string' and { desc = opts } | |
| or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr }) | |
| mode = mode or 'n' | |
| vim.keymap.set(mode, lhs, rhs, opts) |
| import pandas as pd | |
| import json | |
| import glob | |
| import os | |
| from pathlib import Path | |
| import re | |
| import datetime | |
| from datetime import timezone | |
| import pytz |
| module.exports = { | |
| /** | |
| * Print Width | |
| * https://prettier.io/docs/en/options.html#print-width | |
| * | |
| * Specify the line length that the printer will wrap on. | |
| * | |
| * printWidth: <int> | |
| * default: 80 | |
| */ |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| -- Reasonably efficient pagination without OFFSET | |
| -- SQLite version (Adapted from MS SQL syntax) | |
| -- Source: http://www.phpbuilder.com/board/showpost.php?p=10376515&postcount=6 | |
| SELECT foo, bar, baz, quux FROM table | |
| WHERE oid NOT IN ( SELECT oid FROM table | |
| ORDER BY title ASC LIMIT 50 ) | |
| ORDER BY title ASC LIMIT 10 |