Grind 169 Leetcode questions
An updated version of Blind 75
Filters:
- View All Questions
- Order by Difficulty
- Group by Topics
# See: https://olegk.dev/go-linters-configuration-the-right-version | |
run: | |
# Depends on your hardware, my laptop can survive 8 threads. | |
concurrency: 8 | |
# I really care about the result, so I'm fine to wait for it. | |
timeout: 30m | |
# Fail if the error was met. |
{ | |
"title": "Change keyboard layout on cmd press", | |
"rules": [ | |
{ | |
"description": "Change input source to En Birman by left_command; Ru Birman by right_command.", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_command", |
protected onResponseSuccess = async <T>(response: AxiosResponse): Promise<T> => { | |
const config = response?.config || {} | |
if (this.subject.getState() === 'pending') { | |
let observer = null | |
await new Promise<void>((resolve) => { | |
observer = new Observer(resolve) | |
this.subject.attach(observer) | |
}) | |
this.subject.detach(observer) | |
const configWithToken = this.updateConfigToken(config) |
For better understanding we will use the following naming convention:
[ L1 ][ L2 ][ L3 ][ Space ][ R1 ][ R2 ][ R3 ]
A collection of tips for when you need to minimize the number of allocations in your Go programs.
Use the go profiler to identify which parts of your program are responsible for most allocations.
SELECT table, | |
formatReadableSize(sum(bytes)) as size, | |
min(min_date) as min_date, | |
max(max_date) as max_date | |
FROM system.parts | |
WHERE active | |
GROUP BY table |
// This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally | |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" | |
"golang.org/x/crypto/ssh" |
На этой странице описывается процесс настройки нагрузочного тестирования внешних ресурсов.
Для тестирования поведения сервиса под нагрузкой используется утилита Yandex Tank.
Танку можно указать патроны (HTTP-запросы, которые будут отправлены на целевой сервер) и расписание (количество запросов в секунду к целевому серверу в каждый момент времени стрельб, а также продолжительность стрельб). Также к танку можно подключить плагин мониторинга, позволяющий снимать показатели (например, количество свободной памяти или загрузку процессора) с целевого сервера.
onEdit(e)
which is used for the Edit event on Spreadsheet has the old value as e.oldValue
. The specifications for this are as follows.
e
of onEdit(e)
shows hoge
for e.oldValue
and fuga
for e.value
.e.oldValue
and e.value
of onEdit(e)
are not shown anything.e.oldValue
and e.value
of onEdit(e)
are not shown anything.This sample script was created to retrieve both the edited values and the old values for the range of edited cells. This is the modified e.oldValue
.