This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
вариант 0 | |
private String generateJsonForOptions(final String... values) { | |
return "{" + IntStream.range(0, values.length / 2) | |
.boxed() | |
.map(i -> String.format("\\\"%s\\\":\\\"%s\\\"", values[2 * i], values[2 * i + 1])) | |
.collect(joining(";")) + "}"; | |
} | |
вариант 1 | |
private String generateJsonForOptions(final String... values) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StepNode { | |
const stepName; | |
const func; | |
const that; | |
const args; | |
const nestedStepNode; | |
const getTail = function() { | |
tmp = this; | |
while (tmp.nestedStepNode != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Caps Lock -> Esc/Ctrl | Arrow Keys -> NJKL | Home/PageUp/PageDown/End -> HUIO | Right Command -> Enter/Shift", | |
"rules": [ | |
{ | |
"description": "Change caps_lock to control if pressed with other keys, to escape if pressed alone.", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first.ts | |
import { second } from './second'; | |
export function first() { | |
console.log('first') | |
second() | |
} | |
first() | |
//second.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class LoginForm { | |
private readonly logInButton = element(With.id('sub')); | |
@ScreenedStep() | |
async login(username: string, password: string): Promise<void> { | |
await this.setLogin(username); | |
await this.setPassword(password); | |
await this.submit(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class LoginForm { | |
private readonly logInButton = element(With.id('sub')); | |
async login(username: string, password: string) { | |
await this.setLogin(username); | |
await this.setPassword(password); | |
await this.submit(); | |
const mainpage = new MainPage(); | |
await mainpage.shouldBeOpened() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.util.stream.IntStream; | |
import static java.util.stream.Collectors.toSet; | |
final class Matrix { | |
private final List<List<Integer>> matrix; | |
public Matrix(List<List<Integer>> matrix) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
include /etc/nginx/modules-enabled/*.conf; | |
events { | |
worker_connections 768; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# user www-data; | |
# worker_processes auto; | |
# pid /run/nginx.pid; | |
include /etc/nginx/modules-enabled/*.conf; | |
events { | |
worker_connections 768; | |
} | |
http { |
OlderNewer