Advertisement · 728 × 90

Posts by Заметки разработчика

Preview
Понижаем приоритет группы CSS-правил с помощью @layer Узнайте, как использовать CSS-слои (@layer), чтобы переопределять стили из сбросов, библиотек и легаси-кода. Подробные примеры и подводные камни !important.

Вы, вероятно, уже знаете, что можно использовать :where() для снижения специфичности одного селектора, но знали ли вы, что можно добиться аналогичного эффекта сразу для нескольких правил?

www.dev-notes.ru/articles/css...

#css #frontend

1 month ago 0 0 0 0
Preview
Laravel Коллекции от А до Я: Фильтрация, Lazy Collections и макросы Хватит писать циклы! Узнайте, как использовать Коллекции Laravel для фильтрации, трансформации и обработки миллионов записей без утечек памяти.

Обновлена статья:

Узнайте, как использовать Коллекции Laravel для фильтрации, преобразования и оптимизации работы с данными. От основ (filter, map) до продвинутых техник: ленивые коллекции, макросы и операции сведения.

www.dev-notes.ru/articles/lar...

#Laravel #Collection #Eloquent #PHP

1 month ago 0 0 0 0
Preview
Зачем нужен `figcaption`, если есть `alt` Разбираемся, чем отличается атрибут alt от элемента <figcaption> в HTML. Когда использовать подпись к изображению, а когда достаточно alt? Примеры и простой тест для самопроверки.

Чем отличается описательный текст атрибута alt изображения от подписи figcaption, которая размещается в элементе <figure>?

www.dev-notes.ru/articles/a11...

#a11y #html

1 month ago 0 0 0 0
Preview
Атрибуты и свойства HTML: в чём разница Разбираем ключевое различие между атрибутами и свойствами HTML на примере value у <input>. Объясняем природу расхождения, частные случаи и даём практические правила для надёжного кода.

Атрибуты и свойства HTML-элементов часто путают, но их различие напрямую влияет на работу с формами и динамическим контентом. Разбираемся, почему input.value и getAttribute('value') возвращают разные значения и как писать надёжный код.

www.dev-notes.ru/articles/htm...

#HTML #JavaScript

1 month ago 0 0 0 0
Preview
URL Pattern API: Маршрутизация в JavaScript URL Pattern API — стандарт для валидации URL и извлечения параметров. Синтаксис, методы test() и exec(), примеры для Service Worker, SPA и Deno.

URL Pattern API — это как регулярные выражения для адресной строки, только проще. Разбираем синтаксис, три главных метода и сценарии использования: от умного кэширования в Service Worker до роутинга на сервере.

www.dev-notes.ru/articles/jav...

1 month ago 0 0 0 0

Документация npm: "флаг --provenance не обязателен"
Реальность: без него ничего не работает 🫠

Разобираемся в тонкостях trusted publishing:

— Где именно npm ждет настройки
— Какой токен теперь нужен (спойлер: никакой)
— Полный YAML, который не падает с 403

→ www.dev-notes.ru/articles/nod...

1 month ago 0 0 0 0
Preview
Агрегатные функции SQL — примеры и использование В статье мы рассмотрим наиболее часто используемые агрегатные функции SQL, их синтаксис, практические примеры и способы оптимального использования в запросах.

Подробности — в статье 👇
www.dev-notes.ru/articles/dat...

9 months ago 0 0 0 0
Advertisement

1. COUNT(*) считает все строки, даже с NULL
2. AVG() пропускает NULL — но AVG(DISTINCT) даст другой результат
3. GROUP BY группирует, HAVING фильтрует группы
4. SUM(column) ≠ SUM(DISTINCT column)
5. MIN() и MAX() — быстрее, чем ORDER BY LIMIT

9 months ago 0 0 1 0

Тред: 5 фишек про агрегатные функции в #SQL, которые должен знать каждый:

9 months ago 0 0 1 0
How to Verify That Uploaded Profile Pictures Belong to the User?

I'm building an app where users upload profile pictures, and I want to ensure that the uploaded pictures actually belong to them and aren’t just random images of someone else.

I’ve looked into some possible solutions like:

Selfie verification (taking a live selfie and comparing it with the uploaded profile picture).

Face recognition models like OpenCV + DeepFace or AWS Rekognition.

Liveness detection to prevent users from uploading a photo of another person from their gallery. But I’m wondering—what are some reliable and scalable ways companies use to handle this? Are there any open-source tools or APIs that work well for this kind of verification? or like any other ways that can be used for verification

How to Verify That Uploaded Profile Pictures Belong to the User? I'm building an app where users upload profile pictures, and I want to ensure that the uploaded pictures actually belong to them and aren’t just random images of someone else. I’ve looked into some possible solutions like: Selfie verification (taking a live selfie and comparing it with the uploaded profile picture). Face recognition models like OpenCV + DeepFace or AWS Rekognition. Liveness detection to prevent users from uploading a photo of another person from their gallery. But I’m wondering—what are some reliable and scalable ways companies use to handle this? Are there any open-source tools or APIs that work well for this kind of verification? or like any other ways that can be used for verification

Any website/ app that pulls this crap 🤮 is to be avoided like the plague. It's yucky and stupid. Meta does it & it doesn't even fucking work well, though they have all the money; it's full of people posting they got locked out of their accounts in spite of posting real selfies/ videos of themselves.

1 year ago 11 1 0 0
Preview
Release Eleventy Dev Server v2.0.7 · 11ty/eleventy-dev-server Adds support for Response objects returned from onRequest callbacks, simplifying usage with Fetch and unlocks easy-to-configure proxy server behavior #9 Fixes bug with requests to server while it i...

New release: Eleventy 🛎️ Dev Server v2.0.7 includes bug fixes for CSS reloads, supports returning a `Response` in your onRequest callbacks (easily proxy to a different server using `fetch()`), and a bunch of other goodies!

1 year ago 8 2 0 0
Preview
The customizable select - Part one: history, trickery, and styling the select with CSS | utilitybend Exploring customizable select elements. This series explores styling possibilities. The first article covers the history and provides a guide to building a custom select as a progressive enhancement. ...

🚀The customizable select was just released in Chrome 134 🤩! I’ve been playing around with this feature for quite some time and am excited to start a series. In this part1 history, trickery and how to progressively style a select element. 🥰

utilitybend.com/blog/the-cus...

1 year ago 43 12 1 0

Cursed styling

textarea[style='height: 300px'] {
height: 80vh !important
}

#CSS

1 year ago 24 1 0 2
Preview
ESLint now officially supports linting of CSS - ESLint - Pluggable JavaScript Linter A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.

🚀 ESLint now officially supports linting CSS!

Read more:
eslint.org/blog/2025/02...

1 year ago 126 28 4 5
Post image

💡Отключение привязки к области видимости

Laravel предполагает, что вложенные модели маршрутов связаны друг с другом, то есть он будет автоматически применять отношения parent-child. Можно отключить привязку к области видимости с помощью метода `withoutScopeBindings` 🚀.

#Laravel #Route #tips

1 year ago 0 0 0 0
Preview
Rainbow Selection in CSS ::selection is cool, but scoping it to selectors like :nth-child(5n+2) is even more fun, especially on a love filled ay like Valentine's Day.

Rainbow Selection in CSS

::selection is cool, but scoping it to selectors like :nth-child(5n+2) is even more fun, especially on a love filled ay like Valentine's Day.

1 year ago 5 1 0 0
Preview
Три подхода к селектору & (амперсанд) в CSS & — мощное дополнение к CSS, позволяющее создавать селекторы без повторений и способствующее улучшению организованности и понимания кода.

Три подхода к селектору `&` (амперсанд) в CSS

`&` — мощное дополнение к CSS, позволяющее создавать селекторы без повторений и способствующее улучшению организованности и понимания кода.

#Frontend #CSS #Nesting

www.dev-notes.ru/articles/css...

1 year ago 0 0 0 0
Advertisement
Preview
Add headings to HTML landmarks / Marijke Luttekes Use visually hidden headings to make your website easier to navigate.

Add headings to #HTML landmarks: "Some accessibility improvements are invisible to the sighted eye. One of my favorite lessons learned last year was all about invisible headings in HTML landmarks." #a11y

1 year ago 3 1 0 0
Preview
HTML Developers: Please Consider – in the year of 2025 – HTML Accessibility

HTML Developers: Please Consider: "By using native #HTML features, wherever practical, over ARIA, you will save yourselves and users a lot of grief and ensure that your UI work robustly across the largest number of devices." #a11y html5accessibility.com/stuff/2025/01/11/html-de...

1 year ago 4 1 0 0
Preview
Статистика версий PHP: Январь, 2024 Использование PHP в январе 2025 года. Дважды в год я пишу обновлённую информацию об использовании версий PHP в сообществе.

Статистика версий PHP: Январь, 2024

www.dev-notes.ru/articles/php...

#PHP

1 year ago 1 0 0 0

💡 Совет по Laravel: Лимитирование заданий

Вам когда-нибудь требовалось ограничить количество заданий? Чтобы не перегружать API или ограничить пользователей бесплатного тарифного плана от выполнения большого количества заданий, Laravel позволяет определять лимиты и использовать их из коробки 🚀.

1 year ago 0 0 0 0

💡 Совет по Laravel: Сообщения высшего порядка с `Conditionable`

Если используете трейт `Conditionable` в своих классах или работаете с классом `Conditionable`, таким как `Str`, можете использовать сообщения высшего порядка для ещё более гибкого API 🚀.

#laravel

1 year ago 1 0 0 0

💡 Совет по Laravel: Подтверждение пароля пользователя

Некоторые действия, например, удаление аккаунта, могут потребовать от пользователя подтверждения пароля. Хотя эту логику можно реализовать самому, Laravel поставляется с правилом валидации, `current_password`, предназначенным именно для этого 🚀.

1 year ago 0 0 0 0

💡 Совет по Laravel: Запуск запланированных команд на одном сервере

Запускаете приложение на нескольких серверах? По умолчанию запланированные команды будут выполняться на всех серверах, что не нужно и может вызвать проблемы. Это можно предотвратить, используя параметр `onOneServer` 🚀.

#laravel

1 year ago 0 0 0 0

💡 Совет по Laravel: Проверка, является ли строка URL

Вам когда-нибудь требовалось проверить, является ли строка валидным URL? Это можно сделать вручную, но в Laravel есть метод `isUrl`, позволяющий сделать именно это. Можно пойти дальше и проверить наличие различных протоколов 🚀.

#laravel

1 year ago 0 0 0 0
Post image

Laravel Tip💡: The "distinct" Validation Rule

Have you ever needed to check if an array contains duplicate values? While you can do this manually, it can get slightly messy. Instead, you can use the "distinct" validation rule to do exactly this 🚀

#laravel

1 year ago 2 1 0 0
Post image

Laravel Tip💡: Useful Loop Properties

When working with loops in Blade, you may need to check for odd iterations or calculate the remaining ones to adjust your UI. While you can do this manually, the "loop" variable has properties for almost everything you need 🚀

#laravel

1 year ago 5 1 0 0
Advertisement
Post image

Laravel Tip💡: Update Pivot Columns

Have you ever needed to update a pivot column? While you can manually handle this with the query builder, Laravel ships with the "updateExistingPivot" method to do exactly that 🚀

#laravel

1 year ago 4 1 1 0

Chrome 133 goes beta today, with some very nice CSS/UI features:

* Advanced `attr()` function
* `:open` pseudo
* Scroll State Container Queries
* `text-box`, `text-box-trim`, and `text-box-edge`
* popover=hint
* Animation.overallProgress
* DOM state-preserving move

1 year ago 135 27 5 8
Preview
CSS margin-trim and line height units | 12 Days of Web Learn ways of perfecting design with line height units and margin-trim.

#CSS margin-trim and line height units: "Learn ways of perfecting design with line height units and margin-trim."

1 year ago 5 2 0 0