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 { Component, OnInit } from '@angular/core'; | |
@Component({ /* ... */ }) | |
export class MyComponent implements OnInit { | |
public readonly currentUser$: Observable<User | undefined> = this.store.select(fromStore.getCurrentUser); | |
public constructor( | |
private readonly store: Store<AppState>, | |
private readonly my: MyService, |
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 { Component, OnInit } from '@angular/core'; | |
interface Product { /* ... */ } | |
@Injectable() | |
class ProductApiService { | |
public async saveProduct(data: { product: Product; userId: number; pickUpTime: Date }): Promise<Product> { | |
// ... | |
} | |
} |
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
Здравствуйте Вячеслав! Вопрос по стакану. Заранее благодарен! | |
Как правильно трактовать такие ситуации. | |
Вчера в одно мгновение в 1 одну милисекунду (а именно в 18:30:57 и 342 милисекунды по нулевому часовому поясу) | |
- было исполнено 702 BUY ордера на bitfinex (public trades) | |
- общая сумма 901.2 BTC | |
- разброс цен эти ордеров был от $5371 до $5443.9 за BTC | |
- что интересно примерно секундо до этого цена скаканула в верх на $72.9 без объема с $5371 за BTC до $5443.9(то самое число). | |
Вот выдержка со стакана: |
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
docker run --rm --interactive --tty --volume $PWD:/app --volume /etc/passwd:/etc/passwd:ro --volume /etc/group:/etc/group:ro --user $(id -u):$(id -g) composer install |
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
javascript: (() => { | |
window.ankorDownloader = window.ankorDownloader || { | |
download: (html) => { | |
/* | |
console.log('Downloading... html:', [html]); | |
const html = prompt('Enter html with links'); | |
*/ | |
const reg = /class="song-artist"[^>]*?>.+?<span>(.*?)<\/span>.+?class="song-name"[^>]*?>.+?<span>(.*?)<\/span>.+?data-sid="([^"]+)"/gs; | |
const songs = []; | |
let matches; |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Encoder</title> | |
<script> | |
var numberSystem = +prompt('Введите систему счисления(число от 2 до 36):', '16'); | |
if (numberSystem >= 2 && numberSystem <= 36) { | |
var data = prompt('Введите данные для обработки:'); |
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
hasDatabase() { | |
DB_NAME=$1; | |
return $(MYSQL_PWD="${MYSQL_ROOT_PASSWORD}" mysql -u${DB_USER} --skip-column-names --batch -e "SHOW DATABASES LIKE '${DB_NAME}'" | wc -l) | |
} |
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
/** | |
* This is helper class for parse server response | |
*/ | |
export class To { | |
public static number(raw: any): number { | |
const n = Number(raw); | |
return raw === undefined || raw === null || isNaN(n) ? null : n; | |
} |
NewerOlder