- 安装依赖时报错:npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving
帅气绝非偶然
npm前端node.js
这里我在npmivant@latest-v2或者其他依赖包的时候出现以上错误可能是npm版本问题报错解决方法:在安装命令后边加上1|--legacy-peer-deps或者--force如图中的指令:
- nacos管理springboot配置时,发生的Could not resolve placeholder两种原因
生产队队长
SpringAllspringboot
IllegalArgumentException:Couldnotresolveplaceholder'xxx.xxx.xxx'invalue"${xxx.xxx.xxx}"第一种:确实缺少配置,加上对应的配置即可。第二种:这个情况,可能会迷惑很多人报错某个配置无法引用,但是,检查配置时,确实存在,已经配置好了。而且,整个yml文件也没有语法格式错误。原因:我们在解决第一个问题的时候,可能导致这个
- Android 屏幕亮度调节
oh嘉嘉加加加
屏幕亮度调节模式:Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC:值为1,自动调节亮度。Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL:值为0,手动模式。设置屏幕亮度调节模式为手动模式ContentResolvercontentResolver=getActivity().getContentResolv
- antd of vue treeSelect——异步加载
who_become_gods
onLoadData(treeNode){varthat=thisreturnnewPromise((resolve)=>{if(treeNode.
- java包扫描
Java__攻城狮
java开发语言spring
packagecom.mashang.test03;importorg.springframework.core.io.Resource;importorg.springframework.core.io.support.PathMatchingResourcePatternResolver;importorg.springframework.core.io.support.ResourcePat
- 3.1、前端异步编程(超详细手写实现Promise;实现all、race、allSettled、any;async/await的使用)
lin-lins
JavaScript高级前端javascripthtml
前端异步编程规范Promise介绍手写Promise(resolve,reject)手写Promise(then)Promise相关API实现allraceallSettledanyasync/await和Promise的关系async/await的使用Promise介绍Promise是一个类,可以翻译为承诺、期约Promise就像一个容器,里面存放着未来才会结束,返回结果的容器,返回的结果只需要
- npm ERR! Conflicting peer dependency: [email protected] 版本冲突
令狐少侠2011
npmwebpack前端
npmERR!Conflictingpeerdependency:
[email protected]版本问题今天在重新安装node_modules时,遇到了如下错误:$npminstallnpmERR!codeERESOLVEnpmERR!ERESOLVEcouldnotresolvenpmERR!npmERR!Whileresolving:
[email protected]!Found
- nodejs清空文件内容
不cong明的亚子
前端小技巧javascript前端node.js
话不多说,直接上代码constfs=require("fs");constpath=require("path");functionclearFile(filename){//写入文件是异步过程,需要使用promise保证文件操作完成returnnewPromise(resolve=>{letstr=path.join(__dirname,`./${filename}`);fs.writeFile
- yum源404导致Could not resolve host: mirrorlist.centos.org
热心市民梁先生
centoslinux运维
yum源更换错误问题记录网上查询到的部分源过旧,现在已经不存在404,可以将报错信息中的无法访问的地址在浏览器中尝试。如下http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock这个地址就已经不在。可以网上搜一下最新的镜像源,如http://mirrors.aliyun.com/repo/Centos-7.rep
- 《Spring实战》读书笔记-第5章 构建Spring Web应用程序
2401_86367086
面试辅导大厂内推spring前端java
5.1SpringMVC起步SpringMVC框架主要包括请求调度Servlet、处理器映射(handlermapping)、控制器以及视图解析器(viewresolver)这些组件。跟踪SpringMVC的请求Web请求从离开浏览器开始到获取响应返回,它会经历好多站,每站都会留下一些信息同时带上其他信息。一路上请求会将信息带到很多站点,并产生期望的结果请求带着URL以及其他信息离开浏览器后,第一
- 将input type=file 获取到的图片展示到页面上
不会做饭的程序员
JSjs
我们创建一个函数,用于接收拿到的files[0],并将生成的base64地址返回出去getBase64(file){returnnewPromise(function(resolve,reject){letreader=newFileReader();letimgResult="";reader.readAsDataURL(file);reader.onload=function(){imgRes
- SpringBoot:Thymeleaf集成
dingcho
前端SpringCloudspringbootThymeleaf集成
org.springframework.bootspring-boot-starter-thymeleaf配置ClassLoaderTemplateResolver:/***Function:todo**@program:TemplateConfig*@Package:com.kingbal.tohtml.tst*@author:dingcho*@date:2024/09/06*@version:
- 解决maven中添加依赖时失败,Cannot resolve的问题
菜鸟进化中…
mavenintellij-ideajava
产生的原因是在你的本地仓库里面已经有你想使用的文件夹了,里面虽然有东西,但是并不是你所需要的jra,所以这时候他就不会到中央仓库里面去获取,所以就报错了,解决办法是将.lastUpdated所在的文件夹删掉就可以了将类似下面整个文件夹删掉,这个文件夹的位置可按照你gav的位置找到
- 【OpenCV】官方文档学习,库的命名冲突处理办法【声明命名空间】
深耕AI
opencv学习人工智能
原文:SomeofthecurrentorfutureOpenCVexternalnamesmayconflictwithSTLorotherlibraries.Inthiscase,useexplicitnamespacespecifierstoresolvethenameconflicts:Mata(100,100,CV_32F);randu(a,Scalar::all(1),Scalar::
- Spring MVC 架构详解
firepation
SpringJavaspringmvc
SpringMVC(Model-View-Controller)是Spring框架中用于构建Web应用程序的模块。它通过分离应用程序的不同方面(输入逻辑、业务逻辑和UI逻辑)来简化开发工作。本文将详细介绍SpringMVC架构及其基本组件,包括DispatcherServlet、HandlerMapping、Controller和ViewResolver。SpringMVC架构SpringMVC架
- SpringMvc参数解析器HandlerMethodArgumentResolver
Yx8080
SpringMvc大数据
介绍首先什么是Handler?我的理解是SpringMVC中真正用于处理业务逻辑的类,也就是常说的、标注了@Controller注解的Controller类;Controller类中使用@RequestMapping(或GetMapping等变种注解)标注的方法称为处理器方法;处理器方法的参数指的就是该方法的参数。处理器方法参数解析器HandlerMethodArgumentResolver用于自
- SpringMVC参数解析器HandlerMethodArgumentResolver
这是一条海鱼
SpringMVC
前言在享受SpringMVC带给你便捷的时候,你是否曾经这样疑问过:Controller的handler方法参数能够自动完成参数封装(有时即使没有@PathVariable、@RequestParam、@RequestBody等注解都可),甚至在方法参数任意位置写HttpServletRequest、HttpSession、Writer…等类型的参数,它自动就有值了便可直接使用。对此你是否想问一句
- HandlerMethodArgumentResolver-处理器参数解析
后台开发者Ethan
springmvcspringjava
HandlerMethodArgumentResolverspringmvc中仅仅加个@Controller@RequestMaping等注解就可以将普通的java方法成为一个Handler处理器。spring通过HandlerMethodArgumentResolver来解析handler处理器参数问题。HandlerMethodArgumentResolver接口booleansupports
- Vue.js 路由守卫详解
NMY112
vue.js前端javascript
Vue.js是一个用于构建用户界面的渐进式框架。在大型应用中,路由是管理页面间导航的关键部分。VueRouter提供了一系列的路由守卫,帮助开发者在用户导航到新页面时执行特定逻辑。本文将详细介绍Vue.js中的全部路由守卫,包括如何使用、适用场景以及一些补充说明。一、路由守卫分类VueRouter中的路由守卫主要分为以下几类:全局守卫beforeEachbeforeResolveafterEach
- how to resolve install mysql always notice‘You must reset your password using ALTER USER statement before executing this statement.’
WXL_JIANSHU
现象:#[YoumustresetyourpasswordusingALTERUSERstatementbeforeexecutingthisstatement.](http://www.cnblogs.com/debmzhang/p/5013540.html)修复:安装完mysql之后,登陆以后,不管运行任何命令,总是提示这个step1:SETPASSWORD=PASSWORD('yournew
- vue3 + vite + js 配置Eslint + prettier_vite+js+vue3配置eslint
2401_84446882
程序员javascriptvue.js前端
server:{port:3300,cors:true,proxy:{}},build:{outDir:path.resolve(__dirname,‘…/dist’)}})#####第四步安装eslint-parser(ESLint解析器)pnpmadd@babel/core-D//某些代码需要调用Babel的API进行转码,就要使用@babel/core模块。pnpmadd@babel/esl
- vue3 + vite + js 配置Eslint + prettier_vite+js+vue3配置eslint(2)
2401_84446882
程序员javascript开发语言ecmascript
build:{outDir:path.resolve(__dirname,‘…/dist’)}})#####第四步安装eslint-parser(ESLint解析器)pnpmadd@babel/core-D//某些代码需要调用Babel的API进行转码,就要使用@babel/core模块。pnpmadd@babel/eslint-parser@latest-D#####第五步安装prettier(
- uniapp小程序下载缓存服务器上的图片
牛奶皮子
uni-app小程序
1.使用uni.downloadFile,但是注意下载图片的地址里的域名,需要在微信公众平台里面的downloadFile合法域名进行配置。exportdefaultfunctiondownloadAndCacheImage(imageUrl,name){returnnewPromise((resolve,reject)=>{console.log("imageUrl",imageUrl,name
- Vue3 + vite + antd2 vite.config.js及SyntaxError: The requested module ‘/node_modules/.vite/ant-design
咏春-迪迦
JavaScriptjavascriptvue.js前端
项目中使用Vue3+vite+antdv2.x的vite.config.js配置文件,复制粘贴即可使用!/***Vite配置文件*@author斗宗强者*@since2021-12-1623:09*/import{resolve}from"path";import{defineConfig}from"vite";importvuefrom"@vitejs/plugin-vue";importVit
- exceljs操作手册
Baiychenvip
javascript
ExcelJS读取,操作并写入电子表格数据和样式到XLSX和JSON文件。一个Excel电子表格文件逆向工程项目。安装npminstallexceljs新的功能!Mergedfix:stylesrenderingincasewhen“numFmt”ispresentinconditionalformattingrules(resolves#1814)#1815.Manythanksto@andre
- docker pull msyql5.6 并使用
开花沼泽.
dockeradb容器
dockerpullmsyql:5.6mkdir-p/root/mysql/mysqlconfvim/root/mysql/mysqlconf/my.cnf[mysqld]skip-host-cacheskip-name-resolvedatadir=/var/lib/mysqlinit_connect='SETcollation_connection=utf8_general_ci'init_c
- 工作记录:vue3配置proxy代理服务器
醇醇大魔王
vue3vue.js前端javascript
修改vie.config.ts下边的server//https://vitejs.dev/config/exportdefaultdefineConfig({plugins:[vue()],resolve:{alias:{"@":resolve(__dirname,"./src")}},server:{host:"0.0.0.0",//"0.0.0.0"network和loaclhost地址都会显
- uni+vue3请求响应拦截器(js/ts)
web_Bennu
javascript开发语言ecmascript前端
一、uni+vue3+js请求响应拦截器新建utils文件夹,下面新建request.jsletbaseUrl='http://域名:端口'exportdefault{request(options){returnnewPromise((resolve,reject)=>{options.url=baseUrl+options.url;options.complete=(response)=>{i
- java.net.UnknownHostException: Failed to resolve after 2 queries
乐之者v
javajava
java报错:java.net.UnknownHostException:Failedtoresolveafter2queriesUnknownHostException说明这是无法识别的host。需要加上host。检查网络,获取ip打开cmd,使用ping,看网络是否正常。比如网址为abc.com,pingabc.com返回格式如下:可以看到没有丢包,并且abc.com对应的网址为11.22.3
- 12、Flink 解决流上的确定性最佳实践
猫猫爱吃小鱼粮
FlinkSQLflink大数据
最佳实践示例1运行流查询前主动开启TRY_RESOLVE模式,在检查到流查询中存在无法解决的NDU问题时,尽量按照错误提示修改SQL主动避免问题示例:FLINK-27639INSERTINTOt_join_sinkSELECTo.order_id,o.order_name,l.logistics_id,l.logistics_target,l.
- Enum 枚举
120153216
enum枚举
原文地址:http://www.cnblogs.com/Kavlez/p/4268601.html Enumeration
于Java 1.5增加的enum type...enum type是由一组固定的常量组成的类型,比如四个季节、扑克花色。在出现enum type之前,通常用一组int常量表示枚举类型。比如这样:
public static final int APPLE_FUJI = 0
- Java8简明教程
bijian1013
javajdk1.8
Java 8已于2014年3月18日正式发布了,新版本带来了诸多改进,包括Lambda表达式、Streams、日期时间API等等。本文就带你领略Java 8的全新特性。
一.允许在接口中有默认方法实现
Java 8 允许我们使用default关键字,为接口声明添
- Oracle表维护 快速备份删除数据
cuisuqiang
oracle索引快速备份删除
我知道oracle表分区,不过那是数据库设计阶段的事情,目前是远水解不了近渴。
当前的数据库表,要求保留一个月数据,且表存在大量录入更新,不存在程序删除。
为了解决频繁查询和更新的瓶颈,我在oracle内根据需要创建了索引。但是随着数据量的增加,一个半月数据就要超千万,此时就算有索引,对高并发的查询和更新来说,让然有所拖累。
为了解决这个问题,我一般一个月会进行一次数据库维护,主要工作就是备
- java多态内存分析
麦田的设计者
java内存分析多态原理接口和抽象类
“ 时针如果可以回头,熟悉那张脸,重温嬉戏这乐园,墙壁的松脱涂鸦已经褪色才明白存在的价值归于记忆。街角小店尚存在吗?这大时代会不会牵挂,过去现在花开怎么会等待。
但有种意外不管痛不痛都有伤害,光阴远远离开,那笑声徘徊与脑海。但这一秒可笑不再可爱,当天心
- Xshell实现Windows上传文件到Linux主机
被触发
windows
经常有这样的需求,我们在Windows下载的软件包,如何上传到远程Linux主机上?还有如何从Linux主机下载软件包到Windows下;之前我的做法现在看来好笨好繁琐,不过也达到了目的,笨人有本方法嘛;
我是怎么操作的:
1、打开一台本地Linux虚拟机,使用mount 挂载Windows的共享文件夹到Linux上,然后拷贝数据到Linux虚拟机里面;(经常第一步都不顺利,无法挂载Windo
- 类的加载ClassLoader
肆无忌惮_
ClassLoader
类加载器ClassLoader是用来将java的类加载到虚拟机中,类加载器负责读取class字节文件到内存中,并将它转为Class的对象(类对象),通过此实例的 newInstance()方法就可以创建出该类的一个对象。
其中重要的方法为findClass(String name)。
如何写一个自己的类加载器呢?
首先写一个便于测试的类Student
- html5写的玫瑰花
知了ing
html5
<html>
<head>
<title>I Love You!</title>
<meta charset="utf-8" />
</head>
<body>
<canvas id="c"></canvas>
- google的ConcurrentLinkedHashmap源代码解析
矮蛋蛋
LRU
原文地址:
http://janeky.iteye.com/blog/1534352
简述
ConcurrentLinkedHashMap 是google团队提供的一个容器。它有什么用呢?其实它本身是对
ConcurrentHashMap的封装,可以用来实现一个基于LRU策略的缓存。详细介绍可以参见
http://code.google.com/p/concurrentlinke
- webservice获取访问服务的ip地址
alleni123
webservice
1. 首先注入javax.xml.ws.WebServiceContext,
@Resource
private WebServiceContext context;
2. 在方法中获取交换请求的对象。
javax.xml.ws.handler.MessageContext mc=context.getMessageContext();
com.sun.net.http
- 菜鸟的java基础提升之道——————>是否值得拥有
百合不是茶
1,c++,java是面向对象编程的语言,将万事万物都看成是对象;java做一件事情关注的是人物,java是c++继承过来的,java没有直接更改地址的权限但是可以通过引用来传值操作地址,java也没有c++中繁琐的操作,java以其优越的可移植型,平台的安全型,高效性赢得了广泛的认同,全世界越来越多的人去学习java,我也是其中的一员
java组成:
- 通过修改Linux服务自动启动指定应用程序
bijian1013
linux
Linux中修改系统服务的命令是chkconfig (check config),命令的详细解释如下: chkconfig
功能说明:检查,设置系统的各种服务。
语 法:chkconfig [ -- add][ -- del][ -- list][系统服务] 或 chkconfig [ -- level <</SPAN>
- spring拦截器的一个简单实例
bijian1013
javaspring拦截器Interceptor
Purview接口
package aop;
public interface Purview {
void checkLogin();
}
Purview接口的实现类PurviesImpl.java
package aop;
public class PurviewImpl implements Purview {
public void check
- [Velocity二]自定义Velocity指令
bit1129
velocity
什么是Velocity指令
在Velocity中,#set,#if, #foreach, #elseif, #parse等,以#开头的称之为指令,Velocity内置的这些指令可以用来做赋值,条件判断,循环控制等脚本语言必备的逻辑控制等语句,Velocity的指令是可扩展的,即用户可以根据实际的需要自定义Velocity指令
自定义指令(Directive)的一般步骤
&nbs
- 【Hive十】Programming Hive学习笔记
bit1129
programming
第二章 Getting Started
1.Hive最大的局限性是什么?一是不支持行级别的增删改(insert, delete, update)二是查询性能非常差(基于Hadoop MapReduce),不适合延迟小的交互式任务三是不支持事务2. Hive MetaStore是干什么的?Hive persists table schemas and other system metadata.
- nginx有选择性进行限制
ronin47
nginx 动静 限制
http {
limit_conn_zone $binary_remote_addr zone=addr:10m;
limit_req_zone $binary_remote_addr zone=one:10m rate=5r/s;...
server {...
location ~.*\.(gif|png|css|js|icon)$ {
- java-4.-在二元树中找出和为某一值的所有路径 .
bylijinnan
java
/*
* 0.use a TwoWayLinkedList to store the path.when the node can't be path,you should/can delete it.
* 1.curSum==exceptedSum:if the lastNode is TreeNode,printPath();delete the node otherwise
- Netty学习笔记
bylijinnan
javanetty
本文是阅读以下两篇文章时:
http://seeallhearall.blogspot.com/2012/05/netty-tutorial-part-1-introduction-to.html
http://seeallhearall.blogspot.com/2012/06/netty-tutorial-part-15-on-channel.html
我的一些笔记
===
- js获取项目路径
cngolon
js
//js获取项目根路径,如: http://localhost:8083/uimcardprj
function getRootPath(){
//获取当前网址,如: http://localhost:8083/uimcardprj/share/meun.jsp
var curWwwPath=window.document.locati
- oracle 的性能优化
cuishikuan
oracleSQL Server
在网上搜索了一些Oracle性能优化的文章,为了更加深层次的巩固[边写边记],也为了可以随时查看,所以发表这篇文章。
1.ORACLE采用自下而上的顺序解析WHERE子句,根据这个原理,表之间的连接必须写在其他WHERE条件之前,那些可以过滤掉最大数量记录的条件必须写在WHERE子句的末尾。(这点本人曾经做过实例验证过,的确如此哦!
- Shell变量和数组使用详解
daizj
linuxshell变量数组
Shell 变量
定义变量时,变量名不加美元符号($,PHP语言中变量需要),如:
your_name="w3cschool.cc"
注意,变量名和等号之间不能有空格,这可能和你熟悉的所有编程语言都不一样。同时,变量名的命名须遵循如下规则:
首个字符必须为字母(a-z,A-Z)。
中间不能有空格,可以使用下划线(_)。
不能使用标点符号。
不能使用ba
- 编程中的一些概念,KISS、DRY、MVC、OOP、REST
dcj3sjt126com
REST
KISS、DRY、MVC、OOP、REST (1)KISS是指Keep It Simple,Stupid(摘自wikipedia),指设计时要坚持简约原则,避免不必要的复杂化。 (2)DRY是指Don't Repeat Yourself(摘自wikipedia),特指在程序设计以及计算中避免重复代码,因为这样会降低灵活性、简洁性,并且可能导致代码之间的矛盾。 (3)OOP 即Object-Orie
- [Android]设置Activity为全屏显示的两种方法
dcj3sjt126com
Activity
1. 方法1:AndroidManifest.xml 里,Activity的 android:theme 指定为" @android:style/Theme.NoTitleBar.Fullscreen" 示例: <application
- solrcloud 部署方式比较
eksliang
solrCloud
solrcloud 的部署其实有两种方式可选,那么我们在实践开发中应该怎样选择呢? 第一种:当启动solr服务器时,内嵌的启动一个Zookeeper服务器,然后将这些内嵌的Zookeeper服务器组成一个集群。 第二种:将Zookeeper服务器独立的配置一个集群,然后将solr交给Zookeeper进行管理
谈谈第一种:每启动一个solr服务器就内嵌的启动一个Zoo
- Java synchronized关键字详解
gqdy365
synchronized
转载自:http://www.cnblogs.com/mengdd/archive/2013/02/16/2913806.html
多线程的同步机制对资源进行加锁,使得在同一个时间,只有一个线程可以进行操作,同步用以解决多个线程同时访问时可能出现的问题。
同步机制可以使用synchronized关键字实现。
当synchronized关键字修饰一个方法的时候,该方法叫做同步方法。
当s
- js实现登录时记住用户名
hw1287789687
记住我记住密码cookie记住用户名记住账号
在页面中如何获取cookie值呢?
如果是JSP的话,可以通过servlet的对象request 获取cookie,可以
参考:http://hw1287789687.iteye.com/blog/2050040
如果要求登录页面是html呢?html页面中如何获取cookie呢?
直接上代码了
页面:loginInput.html
代码:
<!DOCTYPE html PUB
- 开发者必备的 Chrome 扩展
justjavac
chrome
Firebug:不用多介绍了吧https://chrome.google.com/webstore/detail/bmagokdooijbeehmkpknfglimnifench
ChromeSnifferPlus:Chrome 探测器,可以探测正在使用的开源软件或者 js 类库https://chrome.google.com/webstore/detail/chrome-sniffer-pl
- 算法机试题
李亚飞
java算法机试题
在面试机试时,遇到一个算法题,当时没能写出来,最后是同学帮忙解决的。
这道题大致意思是:输入一个数,比如4,。这时会输出:
&n
- 正确配置Linux系统ulimit值
字符串
ulimit
在Linux下面部 署应用的时候,有时候会遇上Socket/File: Can’t open so many files的问题;这个值也会影响服务器的最大并发数,其实Linux是有文件句柄限制的,而且Linux默认不是很高,一般都是1024,生产服务器用 其实很容易就达到这个数量。下面说的是,如何通过正解配置来改正这个系统默认值。因为这个问题是我配置Nginx+php5时遇到了,所以我将这篇归纳进
- hibernate调用返回游标的存储过程
Supanccy2013
javaDAOoracleHibernatejdbc
注:原创作品,转载请注明出处。
上篇博文介绍的是hibernate调用返回单值的存储过程,本片博文说的是hibernate调用返回游标的存储过程。
此此扁博文的存储过程的功能相当于是jdbc调用select 的作用。
1,创建oracle中的包,并在该包中创建的游标类型。
---创建oracle的程
- Spring 4.2新特性-更简单的Application Event
wiselyman
application
1.1 Application Event
Spring 4.1的写法请参考10点睛Spring4.1-Application Event
请对比10点睛Spring4.1-Application Event
使用一个@EventListener取代了实现ApplicationListener接口,使耦合度降低;
1.2 示例
包依赖
<p