- mysql禁用远程登录
igotyback
mysql
去mysql库中的user表里,将host都改成localhost之后刷新权限FLUSHPRIVILEGES;
- Tomcat 中 catalina.out、catalina.log、localhost.log 和 access_log 的区别
金色888
打开Tomcat安装目录中的log文件夹,我们可以看到很多日志文件,这篇文章就来介绍下这些日记文件的具体区别。catalina.out日志#catalina.out日志文件是Tomcat的标准输出(stdout)和标准出错(stderr)输出的“目的地”。我们在应用里使用System.out打印的内容都会输出到这个日志文件中。另外,如果我们在应用里使用其他的日志框架,配置了向Console输出日志
- MySQL用户权限管理
hzw0510
MySQLmysqloracle数据库
创建/授权用户创建用户格式创建用户命令一般格式:createuser[用户名]@[访问地址]identifiedby[密码]举例1:创建zhangsan用户,只是创建用户并没有权限,'localhost'表示只能在本地登录,无法通过远程连接;密码是passwordCREATEUSER'zhangsan'@'localhost'
- 2020-11-12 写单片机内存的脚本 nc openocd 事务自动测试
linuxScripter
这是写单片机内存的脚本:z@z-ThinkPad-T400:~/zworkT400/EDA_heiche/zREPOgit/simple-gcc-stm32-project$catz.wholeRun.oneCase.cmdcattmp6.toWrite|awk'{system("echomwb"$1""$2"|nclocalhost4444");}'catUSER/DEBUG/debug.h|g
- qiankun 结合 vue3, 小白快速上手体验
陈y_d
vue.js前端javascript
一、主应用改造首先需要维护一份微应用列表,里面包含了微应用的名称、入口和生效规则,若需要给子应用传递内容,可以在props传入对应的内容//app.jsconstapps=[{name:'micro-vue-app3',entry:'//localhost:3013',container:'#micro-vue-app3',activeRule:'/micro-vue3-app3',props:{
- Elasticsearch7.7.0 配置用户名和密码
i0208
Elasticsearch
配置用户和密码需要在配置文件中开启x-pack验证,修改config目录下面的elasticsearch.yml文件,在里面添加如下内容,并重启ES[root@localhostesuser]#vim/opt/es/elasticsearch-7.7.0/config/elasticsearch.ymlxpack.security.enabled:truexpack.license.self_ge
- Linux实操篇_实用指令_压缩和解压类指令
Shaw_Young
压缩和解压缩类gzip/gunzip指令gzip用于压缩文件,gunzip用于解压的基本语法语法功能描述gzip文件压缩文件,只能将文件压缩成为*.gz文件gunzip文件.gz解压缩文件命令应用实例案例1:gzip压缩,将/home下的hello.txt文件进行压缩[root@localhosthome]#gziphello.txt案例2:gunzip压缩,将/home下的hello.txt.g
- 【Java】Mybatis Druid连接池配置详细
beautiful_huang
Java
pom.xmlcom.alibabadruid1.0.18.propertiesspring.datasource.driver-class-name=com.mysql.jdbc.Driverspring.datasource.url=jdbc:mysql://localhost:3306/mybatis2?characterEncoding=utf-8&useSSL=truespring.da
- docker_持久化存储
打败404
docker容器运维
DockerVolumes单机部署要在Docker中使用Volumes(卷)来实现持久化存储,步骤非常简单。以下是具体的操作方法:创建一个DockerVolume你可以通过DockerCLI来创建卷。执行以下命令创建一个名为my_volume的卷:#这将创建一个卷,Docker会自动管理它的存储位置。[root@localhostmy-flask-app]#dockervolumecreatemy
- 通过TensorBoard查看服务器训练过程
江木123
工具服务器
步骤1:启动服务器上的TensorBoard在服务器上,启动TensorBoard并指定一个端口(例如6006):tensorboard--logdir--port6006这里是你存放训练日志的目录。步骤2:使用SSH隧道将端口转发到本地在本地计算机的终端中,使用SSH命令创建一个隧道,将服务器上的6006端口转发到本地计算机的6006端口:ssh-L6006:localhost:6006@600
- Linux命令行中几个使用history相关的技巧
老率的IT私房菜
当你频繁使用Linux命令行时,有效地使用历史记录可以大大提高生产力。1.使用HISTTIMEFORMAT显示时间戳当在命令行输入history时,它将显示序号和命令。出于审计目的,将时间戳与命令一起显示可能会有所帮助。[root@localhost~]#exportHISTTIMEFORMAT='%F%T'[root@localhost~]#history|less2.使用Ctrl+r搜索历史记
- lnmt架构
有点小忧郁
Linux课程
lnmt架构安装nginx//创建系统用户nginx[root@localhost~]#useradd-r-M-s/sbin/nologinnginx//安装依赖环境[root@localhost~]#yum-yinstallpcre-developensslopenssl-develgd-develgccgcc-c++[root@localhost~]#yum-ygroupsmarkinstal
- ifconfig eth0网卡配置
lanhuazui10
linux命令
在嵌入式开发中,在设备运行的时候出现网络挂载问题时候,经常需要临时修改设备的ip地址,子网掩码,MAC地址,网关等,可以使用ifconfigeth0修改网卡的配置信息。ifconfig显示网络设备信息[root@localhost~]#ifconfigeth0Linkencap:EthernetHWaddr00:50:56:BF:26:20inetaddr:192.168.120.204Bcast
- Linux基础入门 --10 DAY
安红豆.
Linux学习linux运维服务器
文本常见处理工具文件内容查看命令cat格式:cat[OPTION]...[FILE]...常见选项:-E:显示行结束符-A:显示所有控制符-n:对显示出的每一行进行编号-b:对非空行进行编号-s:压缩连续的空行成一行范例:[root@localhost~]#cat-A-nmyasm.s1.section.text$2.global_start$3$4_start:$5^Imovr0,#1$6^Ia
- Linux操作系统:Docker版本更新
Zero_one_ws
Linuxlinuxdockerjava服务器容器算法部署
如不能解决missingsignaturekey问题,可在留言区留言,互助共进!dockerpull拉取镜像遇到如下错误,重试多次依然不能拉取时,很可能就是docker版本太低了。[root@localhost~]#dockerpullmysql--disable-content-trust=trueUsingdefaulttag:latestTryingtopullrepositorydocke
- Spring-JdbcTemplate详解,这都看不懂就安心去当个咸鱼吧!
2401_86367135
面试辅导大厂内推springsql数据库
jdbc.url=jdbc:mysql://localhost:3306/springjdbc?characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=falsejdbc.user=rootjdbc.password=1234可以通过HSQLDB自带的工具来初始化数据库表,这里我们写一个Bean,在Spring容器启动时自动创建一个users表:
- python将excel导入mysql_利用python将excel数据导入mySQL
weixin_39959369
主要用到的库有xlrd和pymysql,注意pymysql不支持python3篇幅有限,只针对主要操作进行说明连接数据库首先pymysql需要连接数据库,我这里连接的是本地数据库(数据库叫lds714610)。conn=connect(host='localhost',port=3306,database='lds714610',user='root',charset='utf8')#主要通过cu
- 使用yum 安装是出现 : Loaded plugins: fastestmirror
get200
linux
[
[email protected]]#yum–yinstallhttpdhttpd-develLoadedplugins:fastestmirror解决办法:1.修改插件配置文件[
[email protected]]#vim/etc/yum/pluginconf.d/fastestmirror.conf[main]enabled=0//由1改成0,禁用该插件ver
- Jupyter notebook安装的问题
大梦一场三十一
使用anaconda去安装会比较简单,而后在anaconda打开Jupyternotebookimage.png遇到的问题:(1)在anaconda打开Jupyternotebook,无法出现在浏览器上,http://localhost:8888/tree,无法使用。可以尝试使用http://127.0.0.1:8888/tree。原因是hosts中没有定义127.0.0.1为localhost,
- metamask简述
小朴同学
metamask是一个谷歌插件。他是一个很轻的以太坊钱包,支持正式的以太坊网络,支持主流的三种以太坊测试网络:Ropsten,Kovan,Rinkeby。也支持Localhost8545(尝试连接一个未可知的私人网络,可能会连接失败)和CustomRPC(自定义RPC)。简单功能创建新的账户发币和收币购买正式币和测试币(根据不同的测试网络获取的方式不一致)更改地址所在的网络调用合约功能未测试成功T
- 关于 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 的解决办法
朝畫夕拾
修改密码:ALTERUSER'root'@'localhost'IDENTIFIEDBY'root';启动cmd窗口,输入命令“mysql-uroot-p”直接回车登录到MySQL服务器,然后进行修改,可以输入命令:mysql>ALTERUSER'root'@'localhost'IDENTIFIEDBY'HuaZai12345!';现在退出,在输入命令“mysql-uroot-p”在输入刚才设置
- nginx配置负载均衡的几种方式
itbigold
nginx负载均衡
1,轮询(默认)每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除。 #反向代理配置 upstreamserver_list{ #这个是tomcat的访问路径 serverlocalhost:8080; serverlocalhost:9999; } server{ listen 80; server_n
- 利用jQuery框架的ajax请求获取json格式的数据
听海边涛声
jqueryajaxjson
Document$('#btn').click(()=>{$.get('http://localhost:8080/jsajaxproject/jquery_json','username=tom&age=20',(data)=>{//alert(data)alert(data.name+'\t'+data.age+'\t'+data.gender)},'json')})点击按钮:
- 使用ansible的剧本制作salt-master与salt-minion的安装与启动服务过程
qq_42750608
linuxansibleansible
虚拟机版本:RockyLinuxrelease8.6(GreenObsidian)准备几台虚拟机ipv4地址主机名192.168.137.13center192.168.137.14sp-1192.168.137.15sp-2192.168.137.16sp-3一、center主机的配置1.vim/etc/hosts127.0.0.1localhostlocalhost.localdomainlo
- llm在网页中的流式输出(langchain与streamlit库)
格瑞Lxf
langchain
一、手动进行流式输出llm本身是支持在终端流式输出的,以ollama为例llm=Ollama(base_url="http://localhost:11434",model="qwen",callback_manager=CallbackManager([StreamingStdOutCallbackHandler()]),)查看源码StreamingStdOutCallbackHandler类中
- unity 局域网读取文件_(转载)Unity3D连接本地或局域网MySQL数据库
丛子涵
unity局域网读取文件
1usingMySql.Data.MySqlClient;2usingSystem;3usingSystem.Data;45publicclassMySqlAccess6{7publicstaticMySqlConnectionmySqlConnection;//连接类对象89privatestaticstringhost;//IP地址。如果只是在本地的话,写localhost就可以。10priv
- hadoop 0.22.0 部署笔记
weixin_33701564
大数据java运维
为什么80%的码农都做不了架构师?>>>因为需要使用hbase,所以开始对hbase进行学习。hbase是部署在hadoop平台上的NOSql数据库,因此在部署hbase之前需要先部署hadoop。环境:redhat5、hadoop-0.22.0.tar.gz、jdk-6u13-linux-i586.zipip192.168.1.128hostname:localhost.localdomain(
- linux虚拟机设置静态ip并访问外网
却诚Salong
安装问题和解决方法linuxtcp/ip服务器
需求:需要用vmware做虚拟机集群,但是前提是保证每个节点的ip固定,而且还要联网。1.先确保你的动态ip状况下可以正常ping通外网,具体怎么配置这里不做详细解释。2.在windows系统应用中打开虚拟网络编辑器,查看网关ip。3.然后在linux虚拟机中输入ifconfig,查看linux的ip地址[root@localhostnetwork-scripts]#ifconfigens33:f
- Langchain + Ollama
AI工程仔
LLM&AIGClangchainollamarag
文章目录方式一:Ollama运行起来后,使用langchain加载fromlangchain.llmsimportOllamaollama=Ollama(base_url='http://localhost:11434',model="llama2")print(ollama("whyistheskyblue"))方式二:使用langchain_community1、下载Ollama:https:
- MySQL添加用户、为用户分配权限
ChenyuMa
添加用户1.允许本地访问的用户(127.0.0.1)createuserzhrt@localhostidentifiedby'123456';2.允许外网IP访问的用户createuser'zhrt'@'%'identifiedby'123456';用户分配权限授予用户在本地服务器对该数据库的全部权限grantallprivilegesondbname.*tozhrt@localhostident
- LeetCode[位运算] - #137 Single Number II
Cwind
javaAlgorithmLeetCode题解位运算
原题链接:#137 Single Number II
要求:
给定一个整型数组,其中除了一个元素之外,每个元素都出现三次。找出这个元素
注意:算法的时间复杂度应为O(n),最好不使用额外的内存空间
难度:中等
分析:
与#136类似,都是考察位运算。不过出现两次的可以使用异或运算的特性 n XOR n = 0, n XOR 0 = n,即某一
- 《JavaScript语言精粹》笔记
aijuans
JavaScript
0、JavaScript的简单数据类型包括数字、字符创、布尔值(true/false)、null和undefined值,其它值都是对象。
1、JavaScript只有一个数字类型,它在内部被表示为64位的浮点数。没有分离出整数,所以1和1.0的值相同。
2、NaN是一个数值,表示一个不能产生正常结果的运算结果。NaN不等于任何值,包括它本身。可以用函数isNaN(number)检测NaN,但是
- 你应该更新的Java知识之常用程序库
Kai_Ge
java
在很多人眼中,Java 已经是一门垂垂老矣的语言,但并不妨碍 Java 世界依然在前进。如果你曾离开 Java,云游于其它世界,或是每日只在遗留代码中挣扎,或许是时候抬起头,看看老 Java 中的新东西。
Guava
Guava[gwɑ:və],一句话,只要你做Java项目,就应该用Guava(Github)。
guava 是 Google 出品的一套 Java 核心库,在我看来,它甚至应该
- HttpClient
120153216
httpclient
/**
* 可以传对象的请求转发,对象已流形式放入HTTP中
*/
public static Object doPost(Map<String,Object> parmMap,String url)
{
Object object = null;
HttpClient hc = new HttpClient();
String fullURL
- Django model字段类型清单
2002wmj
django
Django 通过 models 实现数据库的创建、修改、删除等操作,本文为模型中一般常用的类型的清单,便于查询和使用: AutoField:一个自动递增的整型字段,添加记录时它会自动增长。你通常不需要直接使用这个字段;如果你不指定主键的话,系统会自动添加一个主键字段到你的model。(参阅自动主键字段) BooleanField:布尔字段,管理工具里会自动将其描述为checkbox。 Cha
- 在SQLSERVER中查找消耗CPU最多的SQL
357029540
SQL Server
返回消耗CPU数目最多的10条语句
SELECT TOP 10
total_worker_time/execution_count AS avg_cpu_cost, plan_handle,
execution_count,
(SELECT SUBSTRING(text, statement_start_of
- Myeclipse项目无法部署,Undefined exploded archive location
7454103
eclipseMyEclipse
做个备忘!
错误信息为:
Undefined exploded archive location
原因:
在工程转移过程中,导致工程的配置文件出错;
解决方法:
 
- GMT时间格式转换
adminjun
GMT时间转换
普通的时间转换问题我这里就不再罗嗦了,我想大家应该都会那种低级的转换问题吧,现在我向大家总结一下如何转换GMT时间格式,这种格式的转换方法网上还不是很多,所以有必要总结一下,也算给有需要的朋友一个小小的帮助啦。
1、可以使用
SimpleDateFormat SimpleDateFormat
EEE-三位星期
d-天
MMM-月
yyyy-四位年
- Oracle数据库新装连接串问题
aijuans
oracle数据库
割接新装了数据库,客户端登陆无问题,apache/cgi-bin程序有问题,sqlnet.log日志如下:
Fatal NI connect error 12170.
VERSION INFORMATION: TNS for Linux: Version 10.2.0.4.0 - Product
- 回顾java数组复制
ayaoxinchao
java数组
在写这篇文章之前,也看了一些别人写的,基本上都是大同小异。文章是对java数组复制基础知识的回顾,算是作为学习笔记,供以后自己翻阅。首先,简单想一下这个问题:为什么要复制数组?我的个人理解:在我们在利用一个数组时,在每一次使用,我们都希望它的值是初始值。这时我们就要对数组进行复制,以达到原始数组值的安全性。java数组复制大致分为3种方式:①for循环方式 ②clone方式 ③arrayCopy方
- java web会话监听并使用spring注入
bewithme
Java Web
在java web应用中,当你想在建立会话或移除会话时,让系统做某些事情,比如说,统计在线用户,每当有用户登录时,或退出时,那么可以用下面这个监听器来监听。
import java.util.ArrayList;
import java.ut
- NoSQL数据库之Redis数据库管理(Redis的常用命令及高级应用)
bijian1013
redis数据库NoSQL
一 .Redis常用命令
Redis提供了丰富的命令对数据库和各种数据库类型进行操作,这些命令可以在Linux终端使用。
a.键值相关命令
b.服务器相关命令
1.键值相关命令
&
- java枚举序列化问题
bingyingao
java枚举序列化
对象在网络中传输离不开序列化和反序列化。而如果序列化的对象中有枚举值就要特别注意一些发布兼容问题:
1.加一个枚举值
新机器代码读分布式缓存中老对象,没有问题,不会抛异常。
老机器代码读分布式缓存中新对像,反序列化会中断,所以在所有机器发布完成之前要避免出现新对象,或者提前让老机器拥有新增枚举的jar。
2.删一个枚举值
新机器代码读分布式缓存中老对象,反序列
- 【Spark七十八】Spark Kyro序列化
bit1129
spark
当使用SparkContext的saveAsObjectFile方法将对象序列化到文件,以及通过objectFile方法将对象从文件反序列出来的时候,Spark默认使用Java的序列化以及反序列化机制,通常情况下,这种序列化机制是很低效的,Spark支持使用Kyro作为对象的序列化和反序列化机制,序列化的速度比java更快,但是使用Kyro时要注意,Kyro目前还是有些bug。
Spark
- Hybridizing OO and Functional Design
bookjovi
erlanghaskell
推荐博文:
Tell Above, and Ask Below - Hybridizing OO and Functional Design
文章中把OO和FP讲的深入透彻,里面把smalltalk和haskell作为典型的两种编程范式代表语言,此点本人极为同意,smalltalk可以说是最能体现OO设计的面向对象语言,smalltalk的作者Alan kay也是OO的最早先驱,
- Java-Collections Framework学习与总结-HashMap
BrokenDreams
Collections
开发中常常会用到这样一种数据结构,根据一个关键字,找到所需的信息。这个过程有点像查字典,拿到一个key,去字典表中查找对应的value。Java1.0版本提供了这样的类java.util.Dictionary(抽象类),基本上支持字典表的操作。后来引入了Map接口,更好的描述的这种数据结构。
&nb
- 读《研磨设计模式》-代码笔记-职责链模式-Chain Of Responsibility
bylijinnan
java设计模式
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
/**
* 业务逻辑:项目经理只能处理500以下的费用申请,部门经理是1000,总经理不设限。简单起见,只同意“Tom”的申请
* bylijinnan
*/
abstract class Handler {
/*
- Android中启动外部程序
cherishLC
android
1、启动外部程序
引用自:
http://blog.csdn.net/linxcool/article/details/7692374
//方法一
Intent intent=new Intent();
//包名 包名+类名(全路径)
intent.setClassName("com.linxcool", "com.linxcool.PlaneActi
- summary_keep_rate
coollyj
SUM
BEGIN
/*DECLARE minDate varchar(20) ;
DECLARE maxDate varchar(20) ;*/
DECLARE stkDate varchar(20) ;
DECLARE done int default -1;
/* 游标中 注册服务器地址 */
DE
- hadoop hdfs 添加数据目录出错
daizj
hadoophdfs扩容
由于原来配置的hadoop data目录快要用满了,故准备修改配置文件增加数据目录,以便扩容,但由于疏忽,把core-site.xml, hdfs-site.xml配置文件dfs.datanode.data.dir 配置项增加了配置目录,但未创建实际目录,重启datanode服务时,报如下错误:
2014-11-18 08:51:39,128 WARN org.apache.hadoop.h
- grep 目录级联查找
dongwei_6688
grep
在Mac或者Linux下使用grep进行文件内容查找时,如果给定的目标搜索路径是当前目录,那么它默认只搜索当前目录下的文件,而不会搜索其下面子目录中的文件内容,如果想级联搜索下级目录,需要使用一个“-r”参数:
grep -n -r "GET" .
上面的命令将会找出当前目录“.”及当前目录中所有下级目录
- yii 修改模块使用的布局文件
dcj3sjt126com
yiilayouts
方法一:yii模块默认使用系统当前的主题布局文件,如果在主配置文件中配置了主题比如: 'theme'=>'mythm', 那么yii的模块就使用 protected/themes/mythm/views/layouts 下的布局文件; 如果未配置主题,那么 yii的模块就使用 protected/views/layouts 下的布局文件, 总之默认不是使用自身目录 pr
- 设计模式之单例模式
come_for_dream
设计模式单例模式懒汉式饿汉式双重检验锁失败无序写入
今天该来的面试还没来,这个店估计不会来电话了,安静下来写写博客也不错,没事翻了翻小易哥的博客甚至与大牛们之间的差距,基础知识不扎实建起来的楼再高也只能是危楼罢了,陈下心回归基础把以前学过的东西总结一下。
*********************************
- 8、数组
豆豆咖啡
二维数组数组一维数组
一、概念
数组是同一种类型数据的集合。其实数组就是一个容器。
二、好处
可以自动给数组中的元素从0开始编号,方便操作这些元素
三、格式
//一维数组
1,元素类型[] 变量名 = new 元素类型[元素的个数]
int[] arr =
- Decode Ways
hcx2013
decode
A message containing letters from A-Z is being encoded to numbers using the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, det
- Spring4.1新特性——异步调度和事件机制的异常处理
jinnianshilongnian
spring 4.1
目录
Spring4.1新特性——综述
Spring4.1新特性——Spring核心部分及其他
Spring4.1新特性——Spring缓存框架增强
Spring4.1新特性——异步调用和事件机制的异常处理
Spring4.1新特性——数据库集成测试脚本初始化
Spring4.1新特性——Spring MVC增强
Spring4.1新特性——页面自动化测试框架Spring MVC T
- squid3(高命中率)缓存服务器配置
liyonghui160com
系统:centos 5.x
需要的软件:squid-3.0.STABLE25.tar.gz
1.下载squid
wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE25.tar.gz
tar zxf squid-3.0.STABLE25.tar.gz &&
- 避免Java应用中NullPointerException的技巧和最佳实践
pda158
java
1) 从已知的String对象中调用equals()和equalsIgnoreCase()方法,而非未知对象。 总是从已知的非空String对象中调用equals()方法。因为equals()方法是对称的,调用a.equals(b)和调用b.equals(a)是完全相同的,这也是为什么程序员对于对象a和b这么不上心。如果调用者是空指针,这种调用可能导致一个空指针异常
Object unk
- 如何在Swift语言中创建http请求
shoothao
httpswift
概述:本文通过实例从同步和异步两种方式上回答了”如何在Swift语言中创建http请求“的问题。
如果你对Objective-C比较了解的话,对于如何创建http请求你一定驾轻就熟了,而新语言Swift与其相比只有语法上的区别。但是,对才接触到这个崭新平台的初学者来说,他们仍然想知道“如何在Swift语言中创建http请求?”。
在这里,我将作出一些建议来回答上述问题。常见的
- Spring事务的传播方式
uule
spring事务
传播方式:
新建事务
required
required_new - 挂起当前
非事务方式运行
supports
&nbs