ICode9

精准搜索请尝试: 精确搜索
  • Python解释器路径寻找规则2022-12-02 20:41:32

    Python编辑器路径寻址总结 Python寻找解释器顺序Python编程优化这场表演邀请了三位角色:run.sh、main.py、path.sh,拍摄场地选在了 Windows -> Git Bash群演1号 run.sh#!/usr/bin bash. ./path.sh || exit -1# demo.py无法直接找到是因为 $PATH中已经没有 工作目录python demo.py跳

  • JS 模块化 - 03 AMD 规范与 Require JS2022-12-02 20:00:25

    1 AMD 规范介绍AMD 规范,全称 Asynchronous Module Definition,异步模块定义,模块之间的依赖可以被异步加载。AMD 规范由 Common JS 规范演进而来,前文介绍 Common JS 规范时说过,浏览器端无法直接使用 Common JS,需要使用 browserify 编译后才能运行。而 AMD 规范规范则专注于浏览器端。

  • lua module以及模块内的local function使用2022-09-16 19:02:18

     在模块定义local function,使用local function时,需要在使用前就定义,不能通过self:localfunction 或者self.locakfunction 因为是模块内的局部方法      结果:     关于module函数详解:lua module 函数_最远有多远的博客-CSDN博客_lua module package.seeall的作用:在新环境中

  • 模块2022-09-16 00:01:55

    1.定义 模块:用来从逻辑上组织python代码(变量,函数,类,逻辑:实现一个功能),本质是一个.py结尾的python文件。 2.导入方法 import module_name import module1_name,module2_name from module_name import * from module_name import logger as logger_alex   3.import 本质(路径搜索和搜

  • 如何在docker上面安装常用的容器环境2022-09-15 21:33:30

    本文主要记录了如何在docker上面安装最长的容器环境,包括redis、mongodb、es以及mysql 安装redis 1. 从docker hub上(阿里云加速器)拉取redis镜像到本地标签为6.0.8 docker pull redis:6.0.8 2. 基础命令操作 2.1 启动容器并访问 # 启动redis容器 docker run -d -p 6379:6379 re

  • require,import 和 export2022-09-13 12:34:34

    require ,import ,和 export>module 模块概念模块就是实现特定功能的一组方法。只要把不同的函数(以及记录状态的变量)简单地放在一起,就算是一个模块function m1(){}function m2(){}这样就是一个模块,使用的时候直接调用,缺点是污染了全局变量。>为解决污染全局变量问题,把模块成员放到一

  • module.exports与exports,export与export default之间的关系和区别2022-09-13 11:04:33

    module.exports与exports,export与export default之间的关系和区别   首先我们要明白一个前提,CommonJS模块规范和ES6模块规范完全是两种不同的概念。 CommonJS模块规范 Node应用由模块组成,采用CommonJS模块规范。 根据这个规范,每个文件就是一个模块,有自己的作用域。在一个文

  • 源码编译安装nginx2022-09-13 10:03:09

    nginx版本:1.22 安装依赖包: #yum -y install pcre-devel openssl openssl-devel  GeoIP-devel.x86_64 #cd nginx-1.22.0/ #./configure --prefix=/export/server/nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_geoip_module --with

  • nodejs require/import导包报错以及解决方法2022-09-12 03:02:16

    背景 最近发现一本nodejs的小册,在学习其中的代码时,发现里面用到了chalk-animation这个库,在install好这个库后,使用require()导入时报错 Error [ERR_REQUIRE_ESM]: require() of ES Module E:\...\code\node_modules\chalk-animation\index.js from E:\...\code\案例一.js not suppo

  • idea中 Project 下不显示项目文件工程目录的解决方法2022-09-09 22:30:36

    最近从GitHub上获取的Springboot项目,在本地打开后project中不显示项目代码文件,只显示一些配置信息。记录一下解决方法。 网上删除项目文件夹下的.idea文件夹和*.iml文件的方法对我不管用,从stackoverflow上找到原因及解决方法: 因为项目没有定义module,需要在idea -> File ->Project

  • [ABP] pro module's ts file t/eslint import modules error2022-09-08 14:01:03

    coding tool: vscode   版本: 1.71.0 (user setup)   Node.js: 16.14.2   V8: 10.2.154.15-electron.0   OS: Windows_NT x64 10.0.19042 typescript version: 4.8.2 frontend: ng type: add as project with source code for example, identity module, look scrreen sho

  • ts引入图片报错2022-09-08 13:34:09

    在Typscript中是无法识别非代码资源的,所以会报错TS2307: cannot find module '.gif'; 因此我们需要声明一个module: 新建一个ts声明文件,如:images.d.ts,这样ts就可以识别svg、png、jpg等图片类型文件; 项目编译过程中会自动去读取.d.ts这种类型的文件,所以不需要我们手动地加载他们; 当

  • module.exports 、exports、export、export default的区别2022-09-06 18:34:05

    module.exports和exports用于node模块块开发,属于 CommonJS 模块规范;export和export default用于ES6中模块块开发,是属于ES6语法。 Node应用由模块组成,采用CommonJS模块规范。根据这个规范,每个文件就是一个模块,有自己的作用域。在一个文件里面定义的变量、函数、类,都是私有的,对其他

  • 解决python使用过程出现的问题2022-09-06 09:32:40

    关于报错“AttributeError:partially initialized module‘requests‘has no attribute‘get‘的解决方法 报错:AttributeError: partially initialized module ‘requests’ has no attribute ‘get’ (most likely due to a circular import) 解决办法:文件命名产生的问题,只要将

  • 去百度搜索置顶推广 (ECMA6)2022-09-06 02:01:33

    // ==UserScript== // @name 去百度搜索置顶推广 (ECMA6) // @author axetroy // @contributor axetroy // @description 去除插入在百度搜索结果头部、尾部的推广链接。 // @version 2016.6.4 // @grant none // @inc

  • WebAssembly Development All In One2022-09-06 01:30:28

    WebAssembly Development Guide All In One WebAssembly 开发指南 All In One WebAssembly 1.0 has shipped in 4 major browser engines. https://webassembly.org specs https://webassembly.org/specs/ https://webassembly.github.io/spec/core/ https://webassembly.githu

  • angular如何引用其他组件2022-09-05 13:32:18

    原文链接:angular如何引用其他组件 – 每天进步一点点 (longkui.site)       0.背景 前面一篇文章,简单介绍过angular创建并引用组件。在实际情况开发中,情况会稍微复杂一些,今天这篇文章就简单介绍一下,稍微复杂一点组件引用。 场景: 在一个组件内,切换多个组件。 组件一:city(带

  • [nginx]编译安装openresty2022-09-04 15:01:24

    前言 OpenResty是一个基于Nginx和Lua的高性能Web平台,其内部集成了大量精良的Lua库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态 Web 应用、Web 服务和动态网关。 版本信息 系统和应用 版本 Debian 11-amd64位 OpenResty 1.21.4.1

  • HDLBits答案——Verification: Writing Testbenches2022-09-02 18:03:12

    1 clock module top_module ( ); reg clk; dut U1(.clk(clk)); initial begin clk = 0; end always begin #5; clk = ~clk; end endmodule 2 Tb/tb1 module top_module ( output reg A, output reg B

  • 打包&发布Python项目2022-09-02 12:04:08

    概述打包与发布python项目主要包含三个过程,第一配置打包信息,主要通过setuptools工具实现;第二步打包生成wheel或者sdist(source distribution)文件,主要使用build工具;第三步将打包好的wheel、或者sdist文件发布到PYPI,使用twine工具。 pip install setuptools>=42 build twine1 配置

  • HarmonyOS ETS 如何使用library module2022-08-31 09:03:24

    ​ 参考资料 【FAQ】DevEco Studio如何添加多module   代码实现 创建library module 右击项目的目录选择“module”在然后选择“Ohos library ”一直下一步如下图所示 ​ 在resource/base/目录下新建一个文件“media”目录,然后在“media”目录存放一个图片,如下图片所示 ​ 在Mai

  • [Google] LeetCode 715 Range Module 线段树2022-08-30 20:32:34

    A Range Module is a module that tracks ranges of numbers. Design a data structure to track the ranges represented as half-open intervals and query about them. A half-open interval [left, right) denotes all the real numbers x where left <= x < right.

  • 报错:ReferenceError: __dirname is not defined in ES module scope2022-08-29 13:04:15

    报错: __dirname is not defined in ES module scope 前言 新版 NodeJS 支持通过 ESM 方式导入模块,代码如: // CommonJS 规范(旧) const { readFileSync, writeFileSync } = require('fs') const path = require('path') // ESModule 规范(新) import { readFileSync, writeFileSy

  • PowerShell教程 - 模块管理(Modules Management)2022-08-29 08:01:18

    更新记录 转载请注明出处。 2022年8月29日 发布。 2022年8月29日 从笔记迁移到博客。 模块管理(Modules Management) 模块和管理单元(Modules and Snap-Ins) Modules were introduced with the release of PowerShell version 2.0 Modules represented a significant step forward o

  • vscode eslint 报 Cannot find module ‘eslint-babel‘2022-08-28 14:33:04

    使用vscode 开发项目,在项目里一直报Cannot find module 'eslint-babel'。 在项目里看,这个依赖是在package.json里是有的,而且确定是已安装过。 出现这种状态,是使用了vscode工作区的功能,就是一个窗口里,有多个项目(或者是开了多个窗口,打开多个项目)。我这次打开项目,就出现了其中一个项

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

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

ICode9版权所有