ICode9

精准搜索请尝试: 精确搜索
  • cesium 图层构建的那些事 (十七)2022-01-28 13:59:20

    根据基础聚合类,我们构建geojosn序列化的聚合使用类 首先是参数定义 interface ClassBreak { minValue: number, maxValue: number, symbol: any } interface UniqueValue { value: number, symbol: any } export interface PRenderer { type: “simple”|“uniqueValue”|“c

  • kotlin更多语言结构——>相等性2022-01-27 03:32:45

    Kotlin 中有两种类型的相等性: — 结构相等(用 equals() 检测); — 引用相等(两个引用指向同一对象)。   结构相等   结构相等由 ==(以及其否定形式 !=)操作判断。按照惯例,像 a == b 这样的表达式会翻译成: a?.equals(b) ?: (b === null)   也就是说如果 a

  • NetCore IIS 发布 WebApi 跨域访问的两问题2022-01-26 09:04:03

    在编写WebApi过程中,对于前端访问涉及到两个地方,走了较多弯路,以此留存。 1、解决跨越访问。 1.1创建的WebApi项目里,在StartUp类的ConfigureServices方法中添加如下代码: services.AddCors(option => option.AddPolicy("any", build => build .Allow

  • git--git error: src refspec dev does not match any2022-01-25 16:06:19

    操作git时,报错为: git error: src refspec dev does not match any   是因为git push时选取的本地分支进行推送,如果推送的分支在本地分支中不存在,就会产生报错src refspec dev does not match any e.g. 仔细检查本地分支,是否有dev这个分支名称。 git push origin dev:develop

  • js 实现apply2022-01-25 13:01:42

    手写apply /** * Function.apply(this: Function, thisArg: any, argArray?: any): any * @param {*} context */ Function.prototype._apply = function(context){ if(typeof this !== 'function'){ throw 'Error' } context = co

  • Could not find a package configuration file provided by “gazebo_ros“ with any of the following nam2022-01-25 10:02:30

    Could not find a package configuration file provided by “gazebo_ros” with any of the following names: gazebo_rosConfig.cmake gazebo_ros-config.cmake sudo apt-get install ros-$ROS_DISTRO-gazebo-ros-control -y

  • 元素隐式具有 “any“ 类型,因为类型为 “string“ 的表达式不能用于索引类型2022-01-23 16:00:28

    元素隐式具有 “any” 类型,因为类型为 “string” 的表达式不能用于索引类型 在使用ts批量注入@element-plus/icons图标时报错 解决办法 要么忽略要么声明,但是如果忽然就失去了typescript意义 这里给出typescript的声明方法 在utils.ts中定义方法 export function isValidK

  • Cesium 自定义Material 系列 (十三)2022-01-23 12:58:31

    对于水泥纹理效果 我们先定义一下他的interface, 方便使用的人知道他的调用参数 export interface PMaterialCement{ cementColor?: any, grainScale?: number, roughness?: number } 对于水泥纹理纹理我们叫 MaterialCement import {MaterialProperty} from "./MaterialPro

  • any、unknown 和 never 有什么区别2022-01-21 15:35:05

    any 我们把对象设置为 any,编译时正常,运行时才会抛出异常 let v: any = 22 v = new Array() v = "33" v.push(33) console.log(v); 为了避免写 any 运行时异常,unknown出场 unknown let v: unknown = 22 v = new Array() v.push(33) // Object is of type 'unknown' console.log(v)

  • Cesium 自定义Material 系列 (一)2022-01-21 11:00:52

    cesium 在materail 定义上还是比较自由的允许自己构建shader, 我整理一下常用的效果materail 设计 全程使用typescript 来编写这个系列。 首先我们要设计material 的基础类 const loadedMap = new Map<string, boolean="">(); // 着色器的基类 export abstract class Materia

  • ts文件中校验手机号、座机号、生日、大小写的密码2022-01-21 10:02:48

    // 校验密码规则 export const verifyPassword = (value: any) => { const regs = /^(?=.*[A-Z])(?=.*[a-z])(?=.*[a-zA-Z]).{6,20}$/; if (!regs.test(value)) { return true; } return false; }; export const validatePassword = (rule: any, value: any, c

  • arcgis 4 与deckgl 整合 (一)2022-01-21 09:37:08

    arcgis 官网有与deckgl整合的二维三维整合也是可以,不过还是有点bug 我们先构建基础类 基础图层 const {loadArcGISModules} = require("@deck.gl/arcgis");   export default class BaseLayer { layer: any;   init(view: any) { return new Promise((r

  • IfcConstructionMaterialResourceTypeEnum2022-01-21 09:01:28

    IfcConstructionMaterialResourceTypeEnum 类型定义 此枚举用于确定建筑材料资源的主要用途。它仅限于建筑中使用的最常见原材料,不包括通常作为成品出售的材料。   IFC4中增加的新枚举。   Enumeration definition ConstantDescription AGGREGATES Construction aggregate in

  • cesium 图层构建的那些事 (二十一)2022-01-20 18:05:13

    对于cesium entiy的增删改查 我们来封装一个layer来统一管理类似arcgis js 的GraphicLayer 中间数据管理类 import {Layer} from "./Layer";   export abstract class DataSourceLayer extends Layer { type: string = "DataSourceLayer";   protected

  • cesium 实现卷帘2022-01-20 18:04:54

    这里需要ImageryLayer 定义参考 cesium 图层那些事 ```javascript/** 卷帘效果*/ import {ImageryLayer} from "./ImageryLayer"; export class ShutterEffect {private map: any;private _wrapper: any;private _splitter: any;private _splitterWidthCenter: any;private _mo

  • cesium 图层构建的那些事 (二十二)2022-01-20 18:03:47

    我们来构建等高线图层 ```javascript import {Layer} from "./Layer";import { GraphicLayer } from "./GraphicLayer"; export class IsoLineLayer extends Layer {private option: any;protected isAdd2LoadCesium = true;constructor(option: any) {super(option

  • cesium 图层构建的那些事 (二十三)2022-01-20 18:02:52

    我们来构建视频图层 首先做定义 export interface PVideoEntity{ name?:string, entity:any, video:any, } 视频构建图层```javascript import { PVideoEntity } from './PVideoEntity';import { Tuple } from "./Tuple"; export class VideoEntity extends Tu

  • arcgis js 4 与h337 构建热力图 (适用于最新的4.21版本)2022-01-20 17:33:46

    arcgis js 4 自带的热力图只能用于mapView, 对于sceneView 只能用别的方法来构建,对于最新arcgis api dojo 已经全部清除之前热力图构建方法失效,于是乎重新改代码 其中Point 是esri 的Point 可以预先加载好存起来```javascript // @ts-ignoreimport h337 from 'heatmap.js'; expor

  • TypeScript学习: 十二、TS中的装饰器2022-01-19 23:35:35

    前言 装饰器: 装饰器是一种特殊类型声明, 它能够被附加到类声明,方法,属性或者参数上, 可以修改类的行为 通俗的讲装饰器就是一个方法, 可以注入到类,方法,属性参数上来扩展类,属性,方法,参数功能 常见的装饰器:属性装饰器,方法装饰器,参数装饰器 写法: 普通修饰器(无法传参)、装饰器工厂(可以

  • 【javascript】Cannot set properties of undefined解决办法2022-01-19 14:31:21

    问题代码 let msgList:any; errors?.map((error: { field: React.ReactText; message: any }) => { msgList[error.field] = error?.message || ""; }); console.log(msgList); 报错信息: TypeError Cannot set properties of undefined (setting 'user&

  • 入侵检测——BurpSuite2022-01-13 17:31:15

    目录 介绍ping测试流量分析规则 TCP型流量分析规则 介绍 BurpSuite里面有一个类似DNSlog的功能。它生成的域名中存在.burpcollaborator.net,可识别度和精准度都非常好,可以利用此特征防御BurpSuite带外通道攻击。这种攻击方式还是蛮流行的,一周就能收到近10W条告警。 ping

  • error: src refspec dev does not match any. git报错2022-01-06 16:02:26

    原因 git push时选取的本地分支进行推送,如果推送的分支在本地分支中不存在,就会产生报错src refspec dev does not match any 注意推送的分支名一定要和本地的分支名一样 解决 创建一个对应的dev branch:git checkout -b (分支名-要和远程分支名一样才行)

  • WPS Office has not found any installed printers2022-01-04 23:34:00

    问题 之前用deb安装wps缩放DPI一直不正常无法解决,换snap版后恢复正常。 使用snap安装Ubuntu软件商店提供的wps成功却无法使用打印机。 提示WPS Office has not found any installed printers但其他软件可以正常打印 解决 原来在snap store里有对应的权限设置,需要手动开启 重启WPS

  • react-monaco-editor格式化2022-01-04 19:04:23

    引入react-monaco-editor import Monaca from 'react-monaco-editor'; 2、配置 const editorDidMountHandle = (editor: any, monaco: any) => { editor.getAction('editor.action.formatDocument').run() //格式化 } <Monaca heigh

  • ElementUI中对el-table的某一列的时间进行格式化---element 日期格式化工具2022-01-04 13:33:38

    实现 在此列上添加template,显示的内容调用函数parseDateFull,参数为后台返回的时间。     <el-table-column label="处理时间" align="center" prop="clsj" width="180" >

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

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

ICode9版权所有