To list mounted volumes use the following command in the Terminal (Applications > Utilities):
ls -la /Volumes/
For instance, our SD card is mounted as NO NAME
.
Let's check extended attributes
To list mounted volumes use the following command in the Terminal (Applications > Utilities):
ls -la /Volumes/
For instance, our SD card is mounted as NO NAME
.
Let's check extended attributes
-- Top 10 largest tables in a MySQL database | |
-- MySQL 5.7.29 | |
SELECT | |
table_schema AS `Database`, | |
table_name AS `Table`, | |
ROUND((data_length + index_length) / 1024 / 1024, 2) AS `Size (MB)`, | |
ROUND(data_length / 1024 / 1024, 2) AS `Data Size (MB)`, | |
ROUND(index_length / 1024 / 1024, 2) AS `Index Size (MB)`, | |
table_rows as 'Rows' |
<?php | |
declare(strict_types=1); | |
function simpleGenerator() { | |
echo "The generator begins\n"; | |
for ($i = 0; $i < 3; ++$i) { | |
yield $i; | |
echo "Yielded $i\n"; |
<?php | |
use Drupal\Core\File\FileSystemInterface; | |
$directory = '/path/to/processed'; | |
\Drupal::service('file_system') | |
->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY); | |
\Drupal::service('file_system') |
To extend the standard user registration form, use
namespace Drupal\your_module\Form;
use Drupal\Core\Form\FormStateInterface;
use Drupal\user\RegisterForm;
class YourRegisterForm extends RegisterForm {
public function buildForm(array $form, FormStateInterface $form_state) {
We are going to replace "Make it at least 8 characters" from the user
core modules (core/modules/user/user.module
) with "Make it at least 12 characters".
/**
* Implements hook_element_info_alter().
*/
function <your_module>_element_info_alter(array &$types): void
{
if (isset($types['password_confirm'])) {
$types['password_confirm']['#process'][] = 'users_form_process_password_confirm';