// Motivation: https://github.com/angular/angular/issues/18877
import { Directive, ElementRef, AfterViewInit } from '@angular/core';
@Directive({
standalone: true,
selector: '[remove-host]'
})
export class RemoveHostDirective implements AfterViewInit {
This file contains hidden or 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 PathMe { | |
| moves: string[] = []; | |
| constructor() { | |
| this.moves = []; | |
| return this; | |
| } | |
| moveTo(x: number, y: number) { |
This file contains hidden or 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
| Manually download Windows Subsystem for Linux distro packages: | |
| # @link: https://docs.microsoft.com/en-us/windows/wsl/install-manual#installing-your-distro | |
| Windows Subsystem for Linux Installation Guide for Windows 10: | |
| # @link: https://docs.microsoft.com/en-us/windows/wsl/install-win10#set-your-distribution-version-to-wsl-1-or-wsl-2 | |
| Updating Wsl : | |
| Download Msi Wsl update package from below link then install it : | |
| @link : https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi |
This file contains hidden or 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
| def split_text(text, chunk_size=500, separators=['\n\n', '.\n', ':\n', '\n', '. ', ', ', " ", ""]): | |
| """Split text into chunks of size less than chunk_size, using separators.""" | |
| chunks = [] | |
| current_separator_index = 0 | |
| for separator in separators: | |
| current_separator_index += 1 | |
| if len(text) < chunk_size: | |
| if len(text) > 0: | |
| chunks.append(text) |
OlderNewer