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
git clone --bare https://bitbucket.org/durdn/cfg.git $HOME/.cfg | |
function config { | |
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ | |
} | |
mkdir -p .config-backup | |
config checkout | |
if [ $? = 0 ]; then | |
echo "Checked out config."; | |
else | |
echo "Backing up pre-existing dot files."; |
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
const adjustParams = (period) => { | |
const iter = 10; | |
const incr = 1 / iter; | |
let bestAlpha = 0.0; | |
let bestError = -1; | |
let alpha = bestAlpha; | |
let bestGamma = 0.0; | |
let gamma = bestGamma; | |
let bestDelta = 0.0; | |
let delta = bestDelta; |
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
predict = ( | |
data, | |
a = 0.95, | |
b = 0.4, | |
g = 0.2, | |
p = this.PERIODS_TO_PREDICT, | |
) => { | |
const alpha = a; | |
const beta = b; | |
const gamma = g; |
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
{"lastUpload":"2019-11-30T17:01:31.171Z","extensionVersion":"v3.4.3"} |
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 TodoComponent implements OnInit { | |
constructor(private _store: Store<State>) { } | |
ngOnInit() { | |
} | |
createTodo() { | |
// Или любой другой способ задать значения :) | |
let todo: Todo = { |
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 {Action} from "@ngrx/store"; | |
export interface Todo { | |
title: string; | |
completed: boolean; | |
id: number; | |
userId: number; | |
} | |
export enum TodosActions { |
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
ngOnInit() { | |
this.store.dispatch(new GetPosts()); | |
} |
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 { Injectable } from '@angular/core'; | |
import { Actions, Effect, ofType } from '@ngrx/effects'; | |
import { EMPTY } from 'rxjs'; | |
import { map, mergeMap } from 'rxjs/operators'; | |
@Injectable() | |
export class MovieEffects { | |
@Effect() | |
loadMovies$ = this.actions$ |