I hereby claim:
- I am mykola-veryha on github.
- I am veryham (https://keybase.io/veryham) on keybase.
- I have a public key ASB5olhAbNKDTEfhW4Ou4qE1k12B7LaIWBHqG9R4su4PPgo
To claim this, I am signing this object:
<?php | |
namespace Drupal\ln_follow_and_alert\Form; | |
use Drupal\Core\Batch\BatchBuilder; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; |
FROM surnet/alpine-wkhtmltopdf:3.9-0.12.5-full as wkhtmltopdf | |
FROM wodby/drupal-php:7.4-dev-4.15.3 | |
USER root | |
# Install dependencies for wkhtmltopdf | |
RUN apk add --no-cache \ | |
libstdc++ \ | |
libx11 \ | |
libxrender \ |
<?php | |
namespace Drupal\MODULE_NAME\Plugin\Filter; | |
use Drupal\filter\FilterProcessResult; | |
use Drupal\filter\Plugin\FilterBase; | |
/** | |
* Provides a filter to limit allowed HTML tags. | |
* |
<?php | |
$states = [ | |
'australia_states' => [ | |
'NSW' => 'New South Wales', | |
'QLD' => 'Queensland', | |
'SA' => 'South Australia', | |
'TAS' => 'Tasmania', | |
'VIC' => 'Victoria', | |
'WA' => 'Western Australia', |
<?php | |
/** | |
* @file | |
* Contains install, update and uninstall functions for the User module. | |
*/ | |
use Drupal\Core\Config\FileStorage; | |
use Drupal\Core\Site\Settings; | |
use Drupal\field\Entity\FieldConfig; |
const BASE_URL = 'https://countriesnow.space/api/v0.1/countries' | |
let getCountries = async () => { | |
const response = await fetch(`${BASE_URL}`).then(response => response.json()) | |
const { data } = response | |
data.forEach((country) => { | |
if (names.includes(country.country)) { | |
console.log(country) // {"country": "Afghanistan", "cities": [ "Herat", "Kabul", "Kandahar", "Molah", ...]} | |
} |
const getFormValuesObject = (selector) => { | |
const form = document.querySelector(selector); | |
const formData = new FormData(form); | |
const formValues = {}; | |
for (const [name, value] of formData.entries()) { | |
formValues[name] = value; | |
} | |
return formValues; | |
}; |
I hereby claim:
To claim this, I am signing this object:
sudo apt install android-tools-adb | |
sudo apt install android-tools-fastboot | |
fastboot flash recovery recovery.img | |
adb sideload vbmeta.img | |
adb sideload super_empty.img | |
adb sideload dtbo.img | |
adb sideload boot.img | |
adb sideload lineage-19.1-20231006-nightly-vayu-signed.zip |
Because arrays are mutable. The index of any given item can and will change if items are added to or removed from the array. You want your key to be a unique value identifying only your unique component. A primary key that you create is always better than using an index. Here is an example. (https://stackoverflow.com/questions/44531510/why-not-always-use-the-index-as-the-key-in-a-vue-js-for-loop)