ICode9

精准搜索请尝试: 精确搜索
  • nrm管理切换源地址2022-08-02 14:03:00

    1、全局安装nrm npm i -g nrm mac上使用 sudo npm i -g nrm 2、查看可用的源地址 nrm ls      3、切换源地址 nrm use taobao  

  • Python操作对象存储(AWS S3 use boto3)2022-08-01 17:34:53

    提取/封装boto3 S3方法便于使用 使用AWS S3 时,参数AWS_ENDPOINT置空即可, 使用腾讯云cos,阿里云oss或者私有对象存储minio时, 指定AWS_ENDPOINT为服务url class S3(object): """ tenant_id: 租户id作为第一层文件夹 bucket: IC3文件默认存储在DEFAULT_BUCKET内 """

  • msf使用教程2022-07-31 01:04:42

    1.关键词 (1)reverse_tcp木马会主动连接目标服务器(2)bind_tcp木马会监听本地的端口 2.msf各模块①exploits漏洞利⽤模块,这个模块通常是⽤于对某些有可能存在漏洞的⽬标进⾏漏洞利⽤。②payloads攻击载荷,exploit成功之后就会执⾏payload,这段payload可以是反弹代码,可以是添加⽤户的代码

  • 性能测试工具gperftools使用-内存占用分析2022-07-29 12:36:00

    参考资料 性能测试工具gperftools使用-cpu分析 https://www.cnblogs.com/gnivor/p/11719958.html gperftools使用 https://zhuanlan.zhihu.com/p/352260464 google heap profiler内存管理工具小试 https://blog.csdn.net/cica0cica/article/details/76919381 安装相关依赖 sudo yu

  • [TypeScript] Interface2022-07-27 19:35:04

    An interface is a way of defining an object type. An “object type” can be thought of as, “an instance of a class could conceivably look like this”. For example, string | number is not an object type, because it makes use of the union type operator.

  • 题物竟有感2022-07-27 19:03:02

    # 商业转载请联系作者获得授权,非商业转载请注明出处。# For commercial use, please contact the author for authorization. For non-commercial use, please indicate the source.# 协议(License):署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)# 作者(Author):潇湘

  • vue2升级vue3:vue3 hooks库选用2022-07-25 23:33:34

    之前a-hooks:https://ahooks.js.org/,比react-use 精简好用。但是没有vue版本的。 网上有个人实现的:https://github.com/dewfall123/ahooks-vue   但是vue,还是选择vue-use好点。 VueUse 是一个基于 Composition API 的实用函数集, 与 Composition API 的配合相得益彰 VueUse 的作

  • rust库学习-diesel2022-07-23 16:33:05

    介绍 diesel 是一个 orm 框架 支持 postgresql,mysql,sqlite 不用的数据库接口可能会不一样 官方例子地址 实践 新建工程 cargo new --lib diesel_demo cd diesel_demo Cargo.toml [dependencies] diesel = { version = "1.4.4", features = ["postgres"] } 安装diesel_cli

  • libnfc库2022-07-23 01:01:52

    *- * Free/Libre Near Field Communication (NFC) library * * Libnfc historical contributors: * Copyright (C) 2009 Roel Verdult * Copyright (C) 2009-2015 Romuald Conty * Copyright (C) 2010-2012 Romain Tartière * Copyright (C) 2010-2013 Philippe Teuwen *

  • [Vue warn]: Do not use built-in or reserved HTML elements as component id: text 错误的解决办法2022-07-22 12:37:16

        引入的text 没用,要么注释掉,要么引用  

  • React中css的module2022-07-22 12:35:02

    处理css全局作用 现在有这样一个场景: A页面和B页面都有一个相同的类名 我们在A页面中有引入css。 B页面没有css 在我们切换A和B页面的时候。 A页面的css也作用在了B页面。 我们只希望A页面的css不影响B页面。 怎么处理这样的问题了。 可以将css文件变成 xxx.module.css 其中的m

  • 浅析Vue.use作用、原理和源码解读及为什么建议使用对象plugin.install方式2022-07-21 22:37:31

    一、Vue.use() 作用   上述代码截取自vue源码 global-api 下的use.ts文件,它导出一个initUse方法,参数传入Vue。内部use方法接收plugin参数,该参数就是我们编写的插件。同时定义了一个数组,当数组中存在传入的插件,会直接返回,即实现自动阻止多次注册相同的插件。   const args

  • [Bug0031]nvm运行 nvm use xxx 命令时报错 exit status 1: ��û���㹻��Ȩ��ִ�д˲�����2022-07-21 19:03:44

    1、问题 nvm运行 nvm use xxx 命令时报错 exit status 1: ��û���㹻��Ȩ��ִ�д˲����� 2、场景 项目需要切换 nodejs 版本,但是使用cmder 切换报错,于是使用 cmd 非管理员命令行进入,切换也报错。 3、原因 查找方案描述到应该是权限问题 4、解决方案 将cmd以管理员身份运行 遗留问题如何讲cmder以

  • 中间件2022-07-19 09:34:31

    概念:本质上就是一个函数,里面包含了三个参数request,response,next 作用:   1)执行任何代码   2)修改请求和响应对象   3)终结请求—响应循环(让一次请求得到响应)   4)调用堆栈方法中的下一个中间件或路由 分类:   1)应用(全局)级中间件(过滤非法的请求,例如防盗链)     --第一种写

  • Try to run this command from the system terminal. Make sure that you use the correct version of 2022-07-17 20:37:05

          切换后,安装第三方库报错: Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Users\zhuangjie\AppData\Local\Programs\Python\Python39\p

  • 调整 Jupyter Notebook 缩进的方法2022-07-14 22:37:23

    引言:好久没在博客园发文了,忙里偷闲,一时兴起,履践有感,故作此篇。 背景   笔者最初使用 Jupyter Notebook 时,曾因缩进量过小而将其调整为 8 字符(Tab),前段时间又觉得太大想要恢复原来的 4 字符,但没有查到恢复方法,也不想重装,于是硬着头皮把相关配置文件都排查了一遍,终于恢复成功(后

  • react hook 实现use-watch2022-07-14 20:33:52

    import { useEffect, useRef } from 'react'; const defaultCompare = (prev, next) => prev === next; export const useWatch = ( callback, value, { initialValue = '', compare = defaultCompare } = {}, ) => { const prevValue = us

  • msys2 use self hosted mirror2022-07-14 19:05:29

    update mirrorlist.xxx C:\msys64\etc\pacman.d 里的所有 mirrorlist.xxx 都改成只有自己的镜像地址(https) install pki 将自己的证书放到 C:\msys64\etc\pki\ca-trust\source\anchors\xxx.crt,然后执行 update-ca-trust update and install package pacman -Sy # 更新

  • 让你的输入输出变得花里胡哨2022-07-14 09:00:07

    Linux下) void Black() { printf("\033[30m"); } void Red() { printf("\033[31m"); } void Green() { printf("\033[32m"); } void Yellow() { printf("\033[33m"); } void Blue() { printf("\033

  • 解决pytorch多线程共享全局变量问题:Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessin2022-07-13 09:36:17

    原因:在Python3中使用 spawn 或 forkseverver 启动方法才支持在进程之间共享CUDA张量。而我是用的multiprocessing 是使用 fork 创建子进程,不被 CUDA 运行时所支持 在程序最开始的地方加上: torch.multiprocessing.set_start_method(‘spawn’)  

  • Use anonymous type for LINQ based lists instead of var2022-07-12 10:35:19

    Use anonymous type for LINQ based lists instead of var 问题 I've LINQ requests that return anonymous types like: var result = context.Table1.Select( x => new { col1 = x.col1, col2 = x.col2 }).ToList(); That works fine,

  • vue项目部署后页面加载首次很慢的优化方案2022-07-10 04:31:08

    参考: vue项目首次加载特别慢需要怎么配置? 1.看看你的依赖包是不是全局引入的,改为组件内按需引入,可大大降低加载时长。或者将组件引入方式改为cdn引入。需要注意的是,两种引入方式不能共存。 2.看network,点击ALL,看看哪些文件加载时间长,针对性的优化,静态文件压缩、js文件切片等 3.使

  • git squash commits All In One2022-07-10 00:33:42

    git squash commits All In One squash commits / git commits 合并 git rebase # 通过 rebase 命令来完成 2个/多个/n 个 commits 的合并 $ git rebase -i HEAD~2 # $ git rebase -i HEAD~5 # $ git rebase -i HEAD~n # vim 编辑,把最后面的一条/多条 commit 的 `pick` 改

  • element message按需引入的坑2022-07-09 01:04:09

        按需引入的时候  import {Message} from “element-ui”; 这个不能用 Vue.use(Message);   用这个方式引入 Vue.use(Message); Vue.prototype.$message = Message; 方便以后的入坑

  • use js to detect real user click event All In One2022-07-08 01:00:57

    use js to detect real user click event All In One 使用 js 检测真实的用户点击事件 All In One <button id="btn" class="btn">Subscribe</button> <script> btn.addEventListener('click', (event) => { console.log(&#

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

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

ICode9版权所有