ICode9

精准搜索请尝试: 精确搜索
  • C++之vector2022-08-21 13:02:28

      一、标准库函数 1. 构造数组  ——参考博客   一维数组构造: // 构造一维数组 vector<int> vec(n); // n为vec长度,默认所有值为0 vector<int> vec(n, 1); // 所有值设为1   二维m*n数组构造: // 构造二维维数组 vector<int> tmp(n); // n为vec长度,默

  • RUST基础:类型别名2022-08-21 11:30:43

    Rust基础入门书籍推荐《深入浅出RUST》 我们可以用type关键字给同一个类型起个别名(type alias)。实例如下: 1 type Age = u32; 2 3 fn grow(age:Age,year:u32) -> Age{ 4 age + year 5 } 6 7 fn main() { 8 let x : Age = 20; 9 println!("20years later:{}

  • pywinauto app自动化的实践2022-08-21 00:34:36

    from pywinauto import Application app = Application(backend='uia').start("notepad") # print(app.windows()) # # 无标题 - 记事本 dlg = app.YourDialogTitle # print(dlg) np=app["无标题 - 记事本"] np['Edit'].type_keys("九零五五五五

  • [Typescript] Filtering properties out2022-08-21 00:30:41

    List all the props with begin with "query" key in Document type queryTypes = Extract<keyof Document, `query${string}`> type queryyPoprDoc = { [Key in queryTypes]: Document[Key] } What if we want to filter out by value? For example we w

  • php 图片添加文字水印 以及 图片合成(微信快码传播)2022-08-19 22:01:14

    1、图片添加文字水印: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 $bigImgPath = 'backgroud.png';     $img = imagecreatefromstring(file_get_contents($bigImgPath));       $font = 'msyhl.ttc';//字体

  • 通过 ob-operator 部署 OceanBase 数据库2022-08-19 16:35:01

    本文介绍如何通过 ob-operator 来部署 OceanBase 数据库。 背景信息 ob-operator 与其他 operator 一样,旨在让 OceanBase 以容器的方式,无缝运行在 Kubernetes 集群上。 ob-operator 现已支持 OceanBase 集群的创建、删除,完整的节点生命周期管理、ob-proxy 管理,后续会支持租户管理

  • [Typescript] Pick partially object type with indexed access types2022-08-18 19:32:44

    type PartOfWindow = { [Key in | "document" | "navigator" | "setTimeout"]: Window[Key] } /* type PartOfWindow = { document: Document; navigator: Navigator; setTimeout: (handler: TimerHandler,

  • ES自定义评分查询——ES function_score2022-08-18 11:31:35

    在很多复杂的业务场景下,排序的规则会比较复杂,单一的降序,升序无法满足日常需求。不过 ES 中提供了给文档加权重的方式来排序。 首先初始化三条测试数据,方便查看效果(type:1 为翻译,2 为转载,3 为原创): POST /language_index/_doc/1 { "id": 1, "title": "Java怎么学", "t

  • C#中特性的使用2022-08-17 20:31:34

    一、简介 记录一下特性的使用方法,特性其实就是一个特殊的类,需要继承Attribute,当我们序列化一个对象时,就需要在其类上标注Serializable,这个就是官方提供的一种特性 二、使用 2.1 定义 [AttributeUsage(AttributeTargets.All)]//约束特性使用范围 public class TestAttribute:Attri

  • 整数类型2022-08-17 14:31:29

    python中整数类型用来表示数学概念中的整数,包含正整数,负整数和0。 在python中整数可以直接使用,看下面的代码: >>> n = 88 # 正整数 >>> n1 = -88 # 负整数 >>> n2 = 99 + 1 # 算术计算 print函数和type函数 python提供了内建函数print用来在控制台打印数据,是代码调试最重要的函数

  • vue路由props传参2022-08-17 10:32:37

    路由配置时通过props传的参数,在该组件内可以直接通过props接收 传参数: 点击查看代码 { path: 'quarter-GDP', name: 'GDP', component: () => import('@/views/VisualChart/Modules/GDP'), meta: { id: '30101', title: '

  • Filbeat采集nginx-ingress日志2022-08-17 10:02:22

        一、创建configmap配置文件   注:filebeat6以上版本需要将prospectors改为inputs,paths下指定的nginx-ingress日志路径匹配模式以及hosts指定的kafka地址需要根据实际修改,document_type和topic需要是kafka中存在的 [root@localhost ~]# cat >> filebeat-config.yaml <<EOF

  • request.js?b775:101 Uncaught (in promise) Error: Failed to convert value of type 'java.lang.Str2022-08-17 06:30:26

    request.js?b775:101 Uncaught (in promise) Error: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Long'; nested exception is java.lang.NumberFormatException: For input string: "undefined" at _def

  • React报错之Type '() => JSX.Element[]' is not assignable to type FunctionComponent2022-08-16 23:03:48

    正文从这开始~ 总览 当我们尝试从函数组件中返回元素组成的数组时,会产生"Type '() => JSX.Element[]' is not assignable to type FunctionComponent"错误。为了解决该错误,可以将元素数组包裹在React片段中。 这里有个示例用来展示错误是如何发生的。 // App.tsx import React fr

  • [Typescript] Index access types2022-08-16 21:34:29

    Indexed Access types provide a mechanism for retrieving part(s) of an array or object type via indices. We’ll look at how this kind of type works, and a couple of practical examples of where you might use them. interface Car { make: string model: stri

  • mac数据集中的异常文件2022-08-16 12:33:02

    1背景 提取训练图片。总共N张,但是启动训练的时候多了一个文件,总文件数量N+1;训练过程报错 AttributeError: ‘NoneType‘ object has no attribute ‘astype‘ 错误原因:https://blog.csdn.net/qq_40475568/article/details/83415948?utm_medium=distribute.pc_relevant.none-task-b

  • 16 Django页面优化12022-08-16 10:34:11

    需要用到bootstrap models.py class TransactionRecord(): """ 交易记录 """ charge_type_class_mapping = { 1: "success", 2: "danger", 3: "default", 4: "info"

  • Go语言反射reflect标准库03-通过反射获取类型信息相关操作2022-08-16 08:32:45

    10.3通过反射获取类型信息 在 Go语言中通过调用 reflect.TypeOf 函数,我们可以从一个任何非接口类型的值创建一个 reflect.Type 值。reflect.Type 值表示着此非接口值的类型。通过此值,我们可以得到很多此非接口类型的信息。当然,我们也可以将一个接口值传递给一个 reflect.TypeOf

  • ExtJS - UI组件 - Chart2022-08-16 07:30:09

    更新记录 转载请注明出处:https://www.cnblogs.com/cqpanda/p/16587398.html 2022年8月16日 发布。 2022年8月13日 从笔记迁移到博客。 ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html Chart(图表)说明 图表的类型(Chart types) 说明 three types of charts: cartes

  • [Typescript] Extract & Exclude2022-08-15 19:01:55

    Extract is useful for obtaining some sub-part of a type that is assignable to some other type. type FavoriteColors = | "dark sienna" | "van dyke brown" | "yellow ochre" | "sap green" | "titanium white

  • windows系统下执行es的curl2022-08-15 12:32:56

    windows系统下执行curl: 注意:windows下不能用单引号,必须用双引号,英文双引号,双引号!!! 查看es状态curl http://localhost:9200/_cat/health 查看特定索引curl "http://localhost:9200/_cat/indices/testindex" 删除索引curl -X DELETE "http://localhost:9200/testindex" 新建索引curl

  • oracle常用查字段注释2022-08-14 21:01:43

    select B.column_id , B.owner ,B.table_name , b.column_name,b.comments ,case when B.data_type IN ('VARCHAR2','CHAR','NVARCHAR2','NCHAR' ) then B.data_type || '(' || B.CHAR_LENGTH || ')'whe

  • find命令的7种用法2022-08-14 17:01:39

    find命令的7种用法,看完就没有不会用的 Cloud研习社 Cloud研习社 2022-08-10 07:31 发表于山东 收录于合集 #实战经验31个 #Linux122个 #云计算29个 #计算机32个   可以肯定地说,find命令是Linux 中后端开发人员必须知道的操作之一,除非您使用的是 Windows Server。对于

  • C#中反射的使用2022-08-14 15:31:15

    一、简介 简单记录一下反射的使用方法 二、反射的用途 目前只了解到两种使用场景,一个是ORM中,可以通过反射获取实体类中所有的属性,以此拼接sql语句,还有就是使用dll动态库时,无论动态库代码如何修改,只要实现了给定接口,就不需要修改主程序,使其更加灵活 三、反射的使用步骤 假设程序集T

  • 添加累计列2022-08-13 18:02:04

    问题1:添加累计数量列 let 源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content], 更改的类型 = Table.TransformColumnTypes(源,{{"标题", type text}, {"数量", Int64.Type}}), 已添加索引 = Table.AddIndexColumn(更改的类型, "索引", 1, 1, Int64.T

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

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

ICode9版权所有