При наследование не корректно будет работать оператор
instanceof
@Contextable("module") class A { } @Contextable("module") class B extends A {} const b = new B()
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 { | |
BehaviorSubject, | |
combineLatest, | |
defaultIfEmpty, | |
filter, | |
iif, | |
map, | |
Observable, | |
observeOn, | |
of, |
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
/* eslint-disable @typescript-eslint/triple-slash-reference */ | |
/// <reference path="./types/input-keysym.d.ts" /> | |
/// <reference path="./types/input-utl.d.ts" /> | |
/// <reference path="./types/util-browser.d.ts" /> | |
/// <reference path="./types/rfb.d.ts" /> | |
import * as NovncBrowserUtils from '@novnc/novnc/core/util/browser'; | |
import * as NovncInputUtils from '@novnc/novnc/core/input/util'; | |
import NovncKeysym from '@novnc/novnc/core/input/keysym'; | |
import NovncClient from '@novnc/novnc/core/rfb'; |
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
declare module '@novnc/novnc/core/input/keysym' { | |
export default { | |
XK_VoidSymbol: 0xffffff, /* Void symbol */ | |
XK_BackSpace: 0xff08, /* Back space, back char */ | |
XK_Tab: 0xff09, | |
XK_Linefeed: 0xff0a, /* Linefeed, LF */ | |
XK_Clear: 0xff0b, | |
XK_Return: 0xff0d, /* Return, enter */ | |
XK_Pause: 0xff13, /* Pause, hold */ |
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
#NoEnv | |
#SingleInstance force | |
SetWinDelay, -1 | |
DetectHiddenWindows, on | |
Menu, Tray, NoStandard | |
; Menu, Tray, Icon, wt-tilda.ico | |
Menu, Tray, Add, Exit, Exit |
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
; Config | |
#Persistent | |
#SingleInstance force | |
; 200 wheel events per second rate | |
#HotkeyInterval 1000 | |
#MaxHotkeysPerInterval 200 | |
DeactivateMenuItem := "Deactivate (Win + Shift + W)" | |
EnableHScrollMenuItem := "Enable HScroll (Win + Shift + H)" |
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 Observable { | |
protected listeners: Map< any, Function > = new Map(); | |
constructor() {} | |
public subscribe(listener: any, next: Function) { | |
this.listeners.set(listener, next); | |
} |
Drag-and-Drop (ng2-dnd)
Directive: dnd-draggable
Inputs:
dragEnabled: boolean
dragData: any
- The data that has to be dragged. It can be any JS object.
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
gen = (cur, all, chunk = 10) -> | |
half = (chunk - 4) // 2 | |
ledge = Math.max(1 , cur - half) | |
redge = Math.min(all, cur + half) | |
ldiff = half - (cur - ledge) + ((ledge < half-1) && 2 || (ledge < half) && 1 || 0) | |
rdiff = half - (redge - cur) + ((cur+half >= all) && 2 || (cur+half+1 == all) && 1 || 0) | |
prev = 0 |
NewerOlder