ICode9

精准搜索请尝试: 精确搜索
  • Python 的静态语法2022-09-12 13:04:27

    1.Python 的静态语法 1.1 静动态语言的介绍 定义:如果类型检查发生在编译阶段(compile time),那么是静态类型语言(statically typed languages)中,相反的,如果类型检查发生在运行阶段(run time),那么是动态类型语言(dynamically typed languages) 类型检查:就是查看变量的类型,然后判断这

  • FormArray 调整数据位置2022-09-07 15:31:18

    get beans() { return this.validateForm.get('beans') as FormArray; } change(fromIdx, toIdx){ const formGroup = this.beans.at(fromIdx); this.beans.removeAt(fromIdx); this.beans.insert(toIdx, formGroup); } trackByFn(index: any, it

  • 一维JSON转树结构2022-09-02 17:34:29

    const treeFormat = (arr: any) => { let map: any = {}; // 构建map // 构建以id为键 当前数据为值 arr.forEach((item: any) => { item["children"] = []; map[item['id']] = item; }); const res: any = { data:[], other:[] };

  • [Google] LeetCode 2128 Remove All Ones With Row and Column Flips2022-08-29 04:00:08

    You are given an m x n binary matrix grid. In one operation, you can choose any row or column and flip each value in that row or column (i.e., changing all 0's to 1's, and all 1's to 0's). Return true if it is possible to remove all 1&

  • redis 0: "AUTH <password> called without any password configured for the def2022-08-29 01:02:09

    运行项目的时候,报redis 0: "AUTH <password> called without any password configured for the def 原因:主要是redis没有设置密码 解决步骤:   1.先进入到redis容器中   docker exec -it 名字 /bin/sh   2.进行链接容器   redis-cli   3.设置redis密码   如 将 redis

  • R语言中any运算符是什么意思2022-08-27 14:30:32

      R中any运算符用于判断逻辑向量中是否至少有一个是TRUE。 001、 any(c(FALSE, FALSE, FALSE)) ## 用于判断逻辑向量中是否至少一个为TRUE any(c(FALSE, FALSE, TRUE)) any(c(TRUE, TRUE, TRUE))  

  • [Typescript] Toolbox: isError2022-08-24 14:31:38

    function isError(err: any): err is Error { return err instanceof Error; } try { somethingRisky() } catch(err: unknown) { if (isError(err)) { console.log(err.stack) } else { console.log(err) } }   You can also have the following in test

  • vue3+ts使用bus事件总线2022-08-24 08:30:11

    1、在vue2中我是这样使用的 //创建一个vueBus.jsimport Bus from 'vue';let install = function (Vue) { Vue.prototype.$bus = new Bus()} export default { install}; //在main.js中引入import vueBus from '@/utils/vueBus';Vue.use(vueBus);//可根据this.$bus._events[&

  • [Typescript] Making TypeScript Stick - 5 - Extends2022-08-15 02:00:12

    Let’s study a few examples of extends scenarios and see if we can figure out whether it will evaluate to true or false 64 extends number . . . Answer: 查看代码  true   number extends 64 . . . Answer: 查看代码  false     string[] extends any . .

  • vue 项目中如何使用 富文本编辑2022-08-13 20:04:00

    第一步   npm   i    wangeditor 第二步 在需要的组件中引入 import WangEditor from "wangeditor"; 第三步   找到容器  <div id="editor"></div> 写一个函数  const wangeditor = () => {       let editor: any = new WangEditor("#editor");       ed

  • 一个typescript版本的dao(数据库访问)层的封装2022-08-12 17:01:23

    首先学会使用mustache语法 select * from {{key1}}字符中{{key1}}会进行匹配map中的key 例如: let sql = select * from {{key1}}; let tableMapper = { "key1": "course", } let result = mustache.render(sql, tableMapper); console.log('

  • [Typescript] namespace2022-08-08 18:31:04

    `namespace` is manily for the left over from the days where we’d refer to libraries through a single global variable. With this in mind, let’s not give namespace too much more thought for now. For example: // using $ as class calling static method $.ajax(

  • 2.TS 的数据类型2022-07-27 10:33:47

    一、定义变量 TS 中创建变量有四个要素: 定义变量的关键字:var、let、const 变量名 变量的数据类型 变量的初始值 语法结构如下: let 变量名: 数据类型 = 初始值 注意,变量的初始值必须是当前定义的数据类型。 例如: let a: number = 10; 二、TS 的数据类型 1、基础类型 数字 numb

  • C#linq中的any方法解析2022-07-21 10:06:49

    Linq中的any方法有那两个重载 any()的方法主要功能是:判断是否为空、是否存在元素满足指定的条件。 any()空参的方法 作用:判断目标是否为空、是否包含元素。 //声明一个int类型的数组 int[] intA = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; //判断数

  • [TypeScript] infer2022-07-19 16:32:30

    Res1: https://www.typescript-training.com/course/making-typescript-stick/08-type-challenges/#returnoff Res2: https://learntypescript.dev/09/l2-conditional-infer   There is an infer keyword that can be used within a condition in a conditional type to put t

  • [Typescript] Unknow and any Types2022-07-19 03:00:20

    `any` type, you can assign any value for any type.   For `unkown`, you can also assign any value to unkwon:   But you cannot assign unkwon variable to another variable without checking the type, unknow force you to do the type checking before assign. i

  • KingbaseES 中实现mysql any_value 功能2022-07-15 16:05:36

    KingbaseES 中可以通过构造一个聚集函数来实现mysql的any_value功能。 示例 创建函数 create function coalesce_("anyelement","anyelement") returns "anyelement" language sql as $$ select coalesce( $1,$2) $$; create aggregate any_value("anyelement&quo

  • Far & Unifield Field Augmented Reality2022-07-14 12:03:13

    At present, both Apple and Android are supporting AR with devices, which includes 3D model rendering with background. It's possible to extent this with a new feature, not place the virtual 3D object around local visible object around the viewer, but

  • kafka分区详解2022-07-12 20:35:30

    what:   Kafka可以将主题划分为多个分区(Partition),会根据分区规则选择把消息存储到哪个具体分区中。   如果分区规则设置的合理,那么所有的消息将会被均匀的分布到不同的分区中,这样就实现了负载均衡 和水平扩展。   多个订阅者可以从一个或者多个分区中同时消费数据,以支撑海量

  • Kafka - 03操作2022-07-10 14:03:26

    Kafka - 03操作  一、数据读写 1.1 console [root@my-node51 ~]# kafka-console-producer.sh --bootstrap-server 192.168.6.51:9092 --topic ttopic >t1------ >t2------ >t3------ > [root@my-node52 ~]# kafka-console-consumer.sh --bootstrap-server 192.168.6.51:

  • Angular--富文本编辑器Ckeditor2022-07-07 13:03:15

    1、官网下载Ckeditor ck5最新版本不会用,目前是用的是ck4,下载full package全包,这样功能比较全。 官网地址:https://ckeditor.com/ckeditor-4/download/ https://ckeditor.com/docs/ckeditor4/latest/api/index.html   2、下载解压后,把ckeditor文件夹拷贝到项目中。我放在asset文件

  • js导入excel&导出excel2022-07-06 15:35:25

    Excel导入 html代码 <button style={{ color: '#1890ff', fontSize: '14px', cursor: 'pointer' }} onClick={() => { upFile(); }} >   导入 </button> <input id="upFile" type="file" style={{ display:

  • [oracle]用户与权限管理2022-07-03 18:05:36

    创建用户 CREATE USER 用户名 IDENTIFIED BY 密码 DEFAULT TABLESPACE 表空间 TEMPORARY TABLESPACE 临时表空间 QUOTA 空间配额大小 ON 表空间 PASSWORD EXPIRE ACCOUNT LOCK | UNLOCK 除了用户名和密码,其它可选 建议一个用户对应一个单独的表空间 修改用户 -- DBA指定用户名

  • 不定代词2022-07-03 11:01:05

    第一组 第二组 some both any either every neither each all no none   第二组 第三组 many llittle much  a little   more few most a few     第四组 other others another the other the others   第五组 half

  • 04-window-firewall2022-07-01 19:02:49

    windows防火墙常用命令 (1.)常用命令 查看当前防火墙状态:netsh advfirewall show allprofiles 关闭防火墙:netsh advfirewall set allprofiles state off 开启防火墙:netsh advfirewall set allprofiles state on 恢复初始防火墙设置:netsh advfirewall reset 启用桌面防火墙: netsh ad

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有