[typescript] advanced summary of binary search algorithm (including rotation array)
On the question type of binary searchOrdinary dichotomyLC704 binary search simpleLC34 finds the first and last positions of elements in a sorted arrayVariants: rotating arraysLC153 find the minimum value of rotation sort arrayLC33 search rotation sort array mediumDichotomous general skillsThe most commonly used and basic binary search receives ...
Posted by dheeraj4uuu on Tue, 07 Dec 2021 12:44:48 +0100
Take you to understand the 14 basic syntax of Typescript
Absrtact: Typescript can be said to be a superset of JavaScript. Many syntax features are added on the basis of JS, so that types can no longer be converted at will, which can greatly reduce errors in the development stage.
This article is shared from Huawei cloud community< Full parsing of Typescript basic syntax >, author: Aurora Boreal ...
Posted by erasam on Fri, 03 Dec 2021 19:52:09 +0100
Using typescript to realize its own js function library
Original link: https://www.cnblogs.com/yalong/p/15627449.html
background
In daily development, there are many common and common js functions. In order to facilitate subsequent reuse and improve development efficiency, we have built a js function library TBL js LIBS;
Project address: https://github.com/YalongYan/js-libs,
The project is implement ...
Posted by mdl on Wed, 01 Dec 2021 17:38:51 +0100
Understanding of classes in TypeScript
definition
Class is the basis of information encapsulation in Object-Oriented Programming (OOP)
❝ Class is a user-defined reference data type, also known as class type
❞ Traditional object-oriented languages are basically based on classes. The prototype based approach of JavaScript makes developers have a lot more understanding costs
After ...
Posted by Imtehbegginer on Wed, 24 Nov 2021 02:26:17 +0100
TypeScript variable declaration
TypeScript variable declaration A variable is a convenient placeholder for referencing a computer's memory address.
We can think of variables as containers for storing data.
Naming rules for TypeScript variables: 1: Variable names can contain numbers and letters. 2: Except underline_ No other special characters, including spaces, can be inclu ...
Posted by acoole on Tue, 23 Nov 2021 02:28:43 +0100
Implementation of webssh (web side xshell) based on xterm. JS + expers WS + websocket + SSH2 + typescript
To realize the web version of xshell, you need to learn a little more. The following is a brief introduction
Xterm.js
This is an open source framework on the Internet. Its main function is the interface, such as creating a new small black window and setting various styles. The usage is also very simple and specific https://xtermjs.org/
exper ...
Posted by aniesh82 on Tue, 23 Nov 2021 01:53:18 +0100
More on Functions of TypeScript
prefaceThe official documents of TypeScript have already been updated, but the Chinese documents I can find are still in the older version. Therefore, some newly added and revised chapters are translated and sorted out.This article is compiled from "TypeScript Handbook" More on Functions "Chapter.This article is not translated st ...
Posted by amites on Tue, 16 Nov 2021 11:50:37 +0100
"Quick start TypeScript" TypeScript functional programming
catalogue
1, Functional programming style
The variable type can be a function
The literal can be a function
The field of the object can be a function
The argument to a function can be a function
The return value of a function can be a function
Parameters and return values are functions
Higher order function
2, No side effects
3, Reference tr ...
Posted by formlesstree4 on Thu, 11 Nov 2021 04:51:05 +0100
TypeScript learning: IX. generics of TypeScript
Definition of generics
Generics, In the process of software development, we should not only create consistent and well-defined APIs, Reusability should also be considered. Components can support not only current data types, but also future data types, which provides you with very flexible functions when creating lar ...
Posted by mandrews81 on Fri, 29 Oct 2021 18:46:37 +0200
TypeScript core foundation
Configure VScode to automatically generate TS files
Generate ts configuration file
tsc --init
Activate output path When the configuration is saved, it is output to the specified path
Click Run task under the terminal Click typescript Click tsc monitor
Basic data types in TS
boolean type
let flag: boolean = true;
flag = false;
num ...
Posted by grayscale2005. on Thu, 23 Sep 2021 03:06:10 +0200