ICode9

精准搜索请尝试: 精确搜索
  • 正则表达式2021-12-13 12:33:22

     示例: ? 表示 零次 或 一次 {1} 表示 一次 * 表示 零次 或 多次 + 表示 一次 或 多次 | 表示 或 ^ 表示 开头 $ 表示 结尾 const tel = /^1[3456789]\d{9}$/ const num = /(^[0]$)|(^[1-9]+[0-9]*$)/ const money = /(^[0]$)|(^[0][\.]([0-9]+)$)|(^[1-9]+[\.][0-9]+$)|(^[0-9]

  • Android Bluetooth蓝牙scan过程2021-11-29 18:01:54

    Android Bluetooth框架 一、Settings界面下scan 进入到android设置界面并打开蓝牙,扫描会自动开始。 下面我们从android蓝牙设置界面开始分析: 蓝牙开关按钮 BluetoothSettings.java (packages\apps\settings\src\com\android\settings\bluetooth) public final class B

  • Node.js连接redis显示ClientClosedError错误的解决方法2021-11-28 11:03:09

    问题:调用redis的lpush函数显示lpush is not a function 代码如下: const redis = require('redis'); const db = redis.createClient(); class Entry { ... save(cb) { const entryJSON = JSON.stringify(this); db.lpush( 'entries', entryJ

  • JS中常见的浏览器兼容问题2021-11-23 16:02:21

    / 1、获取非行内样式的兼容封装 function getStyle(ele, attr){ if(ele.currentStyle){ return ele.currentStyle[attr]; }else{ return getComputedStyle(ele)[attr] } } // 2、获取事件对象 // 正常浏览器:事件

  • 【信源编码技术】实验3-均匀/矢量量化2021-11-18 20:03:21

    实验准备 被压缩图像 按光栅扫描顺序存储的256*256像素8位灰度图sena.img sena.img 程序 均匀量化编码器uqimg_enc 使用方法:uqimg_enc [ -i infile ][ -o outfile ][ -l numlev ][ -b numbits ][ -m max_value ][ -t min_value ][ -x row_size ][ -y col_size ] -i inf

  • 错误 的模拟循环比赛2021-11-14 12:00:38

    import randomdef printIntro(): print("这个程序模拟量个选手A和B的某种竞技比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示)") def getInputs(): a = eval(input("请输入选手A的能力值(0-1): ")) b = eval(input("请输入选手B的能力值(0-1): ")) n = ev

  • vue+element-ui+ koa-multer 上传图片2021-11-10 17:01:58

    const router = require('koa-router')() const multer = require('koa-multer') router.prefix('/upload') //配置 var storage = multer.diskStorage({ //文件保存路径 destination: function(req, file, cb) { //存储目录是手动建

  • 2021-11-012021-11-01 16:59:47

    public List buildTree(List jiGouList, Integer shangJiId) { List children = new ArrayList<>(); for (Dept dept : jiGouList) { if (shangJiId.equals(dept.getShangJiId())){ children.add(dept); dept.setChildren(buildTree(jiGouList, dept.getId())); } } ret

  • android 单选按钮、复选按钮的使用2021-10-31 15:04:47

    一、单选按钮 相互排斥的事件使用该控件,一组相互互斥的事件放到一个组内,及RadioGroup。 <RadioGroup android:id="@+id/radiogroup_text" android:layout_width="match_parent" android:layout_height="wrap_content"> <RadioBut

  • Linux:libevent的使用2021-10-31 13:31:45

    1.I/O框架库的概述 I/O框架库以库函数的形式,封装了较为底层的系统调用,给应用程序提供了一组更便于使用的接口。 (1)句柄(文件描述符) I/O框架库要处理的对象,即I/O事件、信号和定时事件,同意成为事件源。 (2)事件多路分发器(I/O复用方法select/poll/epoll) 事件的到来是随机的、异步的

  • CyclicBarrier及其用法详解2021-10-30 18:06:05

    简介 CyclicBarrier类似于栅栏,等待满足设置的线程数时再放开栅栏,类似于客车,人满才发车。与CountDownLatch的直观区别就是CountDownLatch减到0的时候所有线程才被唤醒。 用法 假设有100个人要坐车,需要上满50个人才发车 public class CyclicBarrierTest { public static v

  • 怎么写async await2021-10-30 15:02:51

    暂且使用如下try/catch In async/await functions it is common to use try/catch blocks to catch such errors. `async function asyncTask(cb) { try { const user = await UserModel.findById(1); if(!user) return cb('No user found'); } catch(e) { return cb(

  • libevent(九)bufferevent 客户端测试2021-10-29 18:02:01

    #include <iostream> #include <event2/event.h> #include <event2/listener.h> #include <event2/bufferevent.h> #include <string.h> #include <string> #ifndef _WIN32 #include <signal.h> #endif #define SPORT 5001 using n

  • npm install报错情况 cb() never called! 的确完美解决2021-10-27 15:04:56

    遇到的情况如下图所示, 原因: 由于npm安装插件是从国外服务器下载,受网络的影响比较大,所以我们可以通过转换为淘宝镜像来解决这个问题。 1、以下在终端安装cnpm: npm install -g cnpm --registry=https://registry.npm.taobao.org 2、测试cnpm是否安装好,如果已安装好,在终端输

  • 谈谈对vue中nextTick的理解2021-10-20 19:02:17

    谈谈对nextTick的理解   在下次DOM更新循环结束之后执行回调 文件位置 core/utils/next-tick 异步更新原理   data属性对应一个Dep   Dep在数据访问get的时候触发Dep.depend搜集watcher   Dep在更改数据的时候set触发Dep.notify便利触发watcher更新(此处vue会调用nextTic

  • 2、找sci文献2021-10-06 10:35:05

    如找中科院二区以上的通信或网络领域的文献 1、先找期刊方向 http://muchong.com/journal.php?tag=%BC%C6%CB%E3%BB%FA%CD%F8%C2%E7 然后找选择一个期刊看看是否属于二区以上 2、验证 可以去该网址进行验证 3、去谷歌学术等搜索文献

  • 74、美团算法题---使用log函数,实现升序打印0到1002021-10-02 16:29:55

    一、题目 只能用这个log函数,来实现升序打印0到100 const log=(callback)=>{ log.count = log.count || 0; var count = log.count++ setTimeout(()=>{ console.log(count) callback && callback() },Math.random()*1000%10) } 二、思路 使用循

  • Spring Data JPA 的 Specifications动态查询2021-09-25 10:33:14

    目录0.0 概述1.0 适用范围1.1 JpaSpecificationExecutor接口方法介绍1.2 Specification类1.2.1 toPredicate方法介绍1.2.2 继承关系1.3 示例1.3.1 简单示例(1) 编写查询条件(2) 查询条件的连接(3) 对查询结果排序(4) 分页查询1.3.2 多条件查询示例(and、equal、like、sort、page)1.

  • Codeforces Round #742 (Div. 2) AB2021-09-24 22:33:47

    Balanced Substring You are given a string ss, consisting of nn letters, each letter is either ‘a’ or ‘b’. The letters in the string are numbered from 11 to nn. s[l;r]s[l;r] is a continuous substring of letters from index ll to rr of the string inclus

  • gitbook init报错解决2021-09-21 19:33:43

    gitbook使用踩坑日记 在使用gitbook init命令时引发的一系列问题记录 坑 gitbook init cb不是函数问题 $ gitbook init Installing GitBook 3.2.3 C:\Users\14251\AppData\Roaming\npm\node_modules\gitbook-cli\node_modules\npm\node_modules\graceful-fs\polyfills.js:287

  • cocos creator setTimeout setInterval的实现2021-09-20 13:34:18

    1 var _timeoutIDIndex = 0; 2 3 var TimeoutInfo = function TimeoutInfo(cb, delay, isRepeat, target, args) { 4 _classCallCheck(this, TimeoutInfo); 5 6 this.cb = cb; 7 this.id = ++_timeoutIDIndex; 8 this.start = performance.now(); 9 this

  • 洛谷[P1042] [NOIP2003 普及组] 乒乓球2021-09-19 12:33:21

    题目描述 华华通过以下方式进行分析,首先将比赛每个球的胜负列成一张表,然后分别计算在 11 分制和 21 分制下,双方的比赛结果(截至记录末尾)。 比如现在有这么一份记录,(其中 W 表示华华获得一分,L 表示华华对手获得一分): WWWWWWWWWWWWWWWWWWWWWWLW 在 11 分制下,此时比赛的结果是

  • RxView防抖,解决多次点击问题,多次点击只产生一次请求,防抖动2021-09-11 10:00:05

    1 RxView.clicks(cb_all).throttleFirst(2000, TimeUnit.MICROSECONDS).subscribe(aVoid -> { 2 if (cb_all.isChecked()) { 3 mSelectedTicketDownInfoBeans.clear(); 4 if (mTicketDownInfoBeans.size() > 0

  • 2021-09-09wpaconfig配置文件2021-09-10 13:03:28

    update_config=1 //是否允许wpa_supplicant更新(覆盖)配置 eapol_version=1 //IEEE 802.1X / EAPOL版本 ap_scan=1 //AP扫描/选择 passive_scan=0 //是否强制被动扫描进行网络连接 user_mpm=1 //MPM驻留 max_peer_links=99 //最大对等链路数(0-255;默认值:99) mesh_max_inactivity

  • npm install 遇到cb() never called!错误2021-09-07 12:59:23

    问题 Vue项目新引入了一个组件,执行npm install报错,具体报错如下 解决方法 在网上搜罗的各种方法,不外乎以下四种 1、经典连击 (1)npm cache clean -f (2)npm install -g n(出错后再执行3) (3)npm install -g n --force (4)npm stable (5)npm install (情况因人而异吧,反正我是没有成功=

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

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

ICode9版权所有