- 详细分析Mysql配置文件路径的查找(多种方法)
码农研究僧
配置mysql数据库配置文件
目录前言1.基本知识2.查找配置文件2.1mysql--help--verbose2.2MySQL进程启动参数2.3MySQL内部变量查询2.4常见配置2.5mysqladmin工具2.6查看日志2.7strace跟踪系统调用前言事因是卸载mysql5,准备安装mysql8的时候,一直安装不上,最后发现是配置文件读取到了mysql5的问题在使用MySQL时,配置文件(通常为my.cnf或my.in
- Mysql:create table ... select ...报错
大道不孤,众行致远
技术杂谈mysql数据库
客户做mysql迁移,从本地mysql迁移到云mysql,结果系统报错,日志里显示StatementviolatesGTIDconsistency:CREATETABLE...SELECT.就是类似的语句违反了GTID,即全局事务标识符。MySQL主从复制之GTID模式是为了保证所有事务都以一致的顺序执行。解决上面的问题有两个方案:1、不修改系统,关闭mysql的GTID:mysql配置文件增加g
- 使⽤docker部署project-exam-system(2)
冬冬的狼外婆
docker容器运维
制作docker-compose.yml⽂件,实现⼀键部署步骤:1.启动nginxdockerrun-itd-p80:80-v/root/pes/web/src/dist/:/usr/share/nginx/html/nginx:latest2.启动java容器3.启动mysql配置⾼可⽤的项⽬1.先创建三个前段nginx容器1.端⼝不能映射80dockerrun-itd-v/root/pes/w
- Ubuntu 24.04部署Wordpress
idiot_qi
其他工具ubuntulinuxwordpress
环境:Ubuntu24.04PHP8.1.2-1ubuntu2.18Nginx/1.18.0(Ubuntu)WordPress6.6.1Mysql8文章目录1.安装php2.配置nginx2.1.安装nginx2.2.配置3.下载wordpress3.1.配置wordpress4.mysql配置wordpress数据库和用户4.1.安装和远程连接4.2.创建wordpress数据库和用户5.访问w
- MYSQL优化相关
peanut___
mysql优化3大方向:优化mysql所在服务器内核(运维完成)对mysql配置参数进行优化(my.cnf),此优化需要进行压力测试进行参数调整建表时的优化对sql语句的优化一、mysql参数优化mysql默认最大连接数为100,查看命令:showvariableslike'max_connections';(该机器最大连接数)设置最大连接数setglobalmax_connections=100
- MySQL配置文件my.ini或my.cnf的位置 以及参数的含义
古语静水流深
Mysql的知识体系梳理mysql配置信息配置信息mysql设置
1、Windows下MySQL的配置文件是my.ini,一般会在安装目录的根目录。2、Linux下MySQL的配置文件是my.cnf,一般会放在/etc/my.cnf,/etc/mysql/my.cnf。如果找不到,可以用find命令查找。3、Linux用rpm包安装的MySQL是不会安装/etc/my.cnf文件的至于为什么没有这个文件而MySQL却也能正常启动和作用,有两个说法:第一种说法,m
- 【MySQL】MySQL配置中sql_mode的作用
码农老张Zy
mysqlsqlandroid数据库
MySQL配置中sql_mode的作用不知道你有没有踫到过这种问题,在MySQL8默认的情况下,我们之前习惯的为DateTime类型指定的0000-00-00这种格式是无法插入或者修改数据的。其实这种情况就是MySQL模式设置的问题,也就是我们今天要讲的sql_mode这个参数属性的作用。sql_mode根据官网的解释,MySQL服务器是可以在不同的SQL模式中运行的,这个模式会影响MySQL支持
- JavaWeb学习笔记(一)数据库概念、MySQL配置、SQL分类
Intention:
数据库sqlmysql
JavaWeb学习笔记(一)JavaWeb介绍1.网页:展现数据2.数据库:存储和管理数据3.JavaWeb程序:逻辑处理数据库数据库相关概念数据库存储数据的仓库,数据是有组织的进行存储英文:DataBase,简称DB数据库管理系统管理数据库的大型软件英文:DataBaseManagementSystem,简称DBMSSQL英文:StructuredQueryLanguage,简称SQL,结构化查
- MySQL数据库|安装(Windows)
Sunshine.King
MySQL数据库mysqlwindows
目录一、下载MySQL1.下载链接2.steps二、安装配置1.解压下载的压缩包2.编写mysql配置文件--my.ini①.在解压目录下==创建==my.ini文件②.编辑my.ini3.启动MySQL数据库4.登录MySQL数据库5.修改密码6.配置环境变量7.将MySQL服务调为手动一、下载MySQL1.下载链接目前版本是MySQL8,下载链接2.steps点击Download,进入下载页点
- Docker Desktop 链接windos 安装的redis和mysql
云上全栈工程师
dockerredismysql
1.1.先在容器安装项目2.链接redis和mysql配置redis和mysql是在windos安装的,使用的是小p管理器安装的项目链接DB_DRIVER=mysqlDB_HOST=host.docker.internalDB_PORT=3306DB_DATABASE=yunxc_testDB_USERNAME=yunxc_testDB_PASSWORD=test123456...DB_CHARS
- MySQL提示“SQLSTATE[HY000] [1045] Access denied for user ‘root‘@‘localhost‘ (using password: YES)”错误
bronya0
教程
(无意中发现了清华大佬的算法刷题笔记,加公众号勾玉技术发送清华算法领取)——————————————————————ssh登录正常,网站登录就报错.尝试了各种方法均不行.然后看了下mysql配置文件,默认使用端口为3306,突然想到我服务器安全组好像没开放这个端口…开放后,瞬间解决问题.
- 【MySQL探索之旅】MySQL数据库下载及安装教程
爱敲代码的小杨.
MySQL探索之旅mysql
博客主页:爱敲代码的小杨.✨专栏:《JavaSE语法》|《数据结构与算法》|《C生万物》❤️感谢大家点赞收藏⭐评论✍,您的三连就是我持续更新的动力❤️小杨水平有限,欢迎各位大佬指点,相互学习进步!文章目录前言MySQL下载MySQL安装MySQL配置配置类型和网络配置账号密码配置MySQL服务执行配置生效配置path变量直接在命令行窗口使用MySQL命令前言MySQL已经成为世界上最受欢迎的数据库
- 简单配置mysql主从
老芦IT
mysql数据库
配置mysql主从(范例)mysql主机ip地址为192.168.8.149,192.168.8.164配置之前首先确认数据库为初始化状态,数据库有数据的话需要将数据库内容全部,备份,之后清空。149主机为主164为从修改149(Master)mysql配置文件更改配置文件,首先检查你的主服务器上的mysql主配置文件中是否已经在[mysqld]模块下配置了log-bin和server-id,上面
- HeidiSQL安装配置(基于小皮面板(phpstudy))连接MySQL
晴友读钟
装装装!数据库mysql数据库HeidiSQL
下载资源对于这款图形化工具,博主建议通过小皮面板(phpstudy)来下载即可,也是防止你下载到钓鱼软件,小皮面板(phpstudy)如果你不懂是什么,请看下面链接这篇博客第二篇:MySQL安装与配置(基于小皮面板(phpstudy))_phpstudymysql配置-CSDN博客安装流程小皮面板(phpstudy)是直接一键安装和卸载的,功能强大!使用教程1.打开HeidiSQL直接点击【管理】
- docker容器部署mysql并远程访问
天使手儿
dockermysql容器
记录一篇docker部署mysql的配置笔记,省的每次都去网上查了。拉取mysql镜像sudodockerpullmysql启动mysql容器sudodockerrun--namemysql-eMYSQL_ROOT_PASSWORD=2222-p33060:3306-dmysql配置远程访问1进入容器sudodockerexec-itmysql/bin/bash2进入mysqlmysql-uroo
- Prometheus服务器、Prometheus被监控端、Grafana、监控MySQL数据库、自动发现概述、配置自动发现、Alertmanager
Mick方
prometheusgrafana
目录Prometheus概述部署Prometheus服务器环境说明:配置时间安装Prometheus服务器添加被监控端部署通用的监控exporterGrafana概述部署Grafana展示node1的监控信息监控MySQL数据库配置MySQL配置mysqlexporter配置mysqlexporter配置prometheus监控mysql自动发现机制概述基于文件自动发现修改Prometheus使用
- M63-第十三周作业
布格雷斯
1、ansible-playbook实现MySQL的二进制部署1.1安装ansible#yum-yinstallansible1.2配置主机清单文件#vi/etc/ansible/hosts[local]10.0.0.7ansible_connection=local#指定连接类型为本地,无需通过ssh连接[mysql]10.0.0.1710.0.0.2710.0.0.371.3mysql配置文件
- 代码生成器,自适应mysql、oracle数据库
老王的御用替身
项目地址项目的优势可根据自己需要定制生成的代码支持oracle和mysql通过前端页面一键下载代码操作方便启动即可用所有项目兼容使用说明配置主库,从库配置数据库地址启动项目访问localhostoraclemysql配置代码生成策略配置生成的包名,是否去掉表前缀配置代码生成策略代码下载根据自己需要配置代码生成规则代码生成规则
- Mac (M1)系统下载、安装MySQL
致微
macosmysql
文章目录一、下载MySQL二、安装mysql2.1MySQL安装2.2MySQL配置2.2.1环境变量配置1.打开终端,输入以下命令:2.按`i`键,进入`insert`模式,输入以下两行代码3.回到终端,输入以下命令4.按`i`键,进入`insert`模式,输入以下两行代码5.在终端执行如下命令2.2.2配置文件的创建1.创建my.cnf文件2.修改my.cnf读写权限3.在系统设置的MySQL
- mysql如何开启远程访问权限?
天联SD-WAN
mysql数据库
MySQL是一种广泛使用的关系数据库管理系统,在开发和应用中都有着重要的地位。默认情况下,MySQL只允许本地访问,这就限制了其在异地统一管理、随时随地协同办公和远程数据采集管理方面的应用。为了解决这个问题,我们需要开启MySQL的远程访问权限。远程访问权限的配置要开启MySQL的远程访问权限,我们需要进行以下几个步骤:编辑MySQL配置文件我们需要找到MySQL的配置文件my.cnf。一般情况下
- Mysql报错:too many connections
不死鸟.亚历山大.狼崽子
Mysqlmysql数据库
1问题原因MySQL报错“toomanyconnections”通常是由于数据库的最大连接数超过了MySQL配置的最大限制。有以下几个原因:(1)访问量过高:当MySQL服务器面对大量的并发请求时,已经建立的连接数可能会不足以处理所有的请求,从而导致连接池耗尽、连接被拒绝、出现“toomanyconnections”等错误。(2)max_connections值过小:默认情况下,MySQL的最大连
- Docker部署MySQL8.0
Bearki-CN
DockerMySQLdockermysql数据库
1.创建数据卷,用来持久话数据//MySQL配置储存卷dockervolumecreatemysql.conf//MySQL数据储存卷dockervolumecreatemysql.data//MySQL日志储存卷dockervolumecreatemysql.log2.环境变量(引用MySQL官方对Docker容器MySQL环境变量的描述)布尔变量包括MYSQL_RANDOM_ROOT_PASS
- MySQL安装
梁平_dc10
.下载MySQLsudorpm-Uvhhttp://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm2.安装MySQLyuminstallmysql-server3.检查是否安装成功rpm-qa|grepmysql*4.修改MySQL密码1.修改MySQL配置文件#vim/etc/my.cnf(注:windows下修改的是my
- druid连接mysql配置_数据库连接池Druid的基本配置
沉吟细把真无奈
druid连接mysql配置
1.简介,什么是DruidDruid是阿里巴巴开源平台上的一个项目,整个项目由数据库连接池、插件框架和SQL解析器组成。该项目主要是为了扩展JDBC的一些限制,可以让程序员实现一些特殊的需求,比如向密钥服务请求凭证、统计SQL信息、SQL性能收集、SQL注入检查、SQL翻译等,程序员可以通过定制来实现自己需要的功能。2.性能相关3.配置在上面的配置中,通常你需要配置url、username、pas
- 小皮php面板mysql配置_体验phpStudy小皮面板创建LAMP/LNMP系统和建站图文
qbkivlin
小皮php面板mysql配置
在国庆节后老左有看到原phpStudy面板新的Linux面板系统更新发布取名小皮面板(phpStudyLinux系统初次体验-一键安装phpStudy面板查看功能),初次体验这款面板之后我们肯定会会当前比较热门的宝塔面板作为比较,有些人说UI和功能上有所参考,但是本身在功能上你说有多可以创新也不可能,毕竟都是用的开源软件搭配组合的LAMP和LNMP。从老左(LAOZUO.ORG)接触较多的WEB面
- linux系统mysql数据库使用keepalived做高可用
丨析木丨
linux数据库数据库linuxmysql
mysql使用keepalived做高可用mysql+keepalived主库服务器配置从库服务器配置两台服务器安装mysql+keepalived先做两台服务器数据库互为主从主库服务器配置开启binlog服务mkdir-pv/data///创建存放binlog日志目录chownmysql.mysql/data//修改目录所有者和属组vim/etc/my.cnf//mysql配置文件server-
- 看这一篇就够了,如何写一手好SQL?
AnyL8023
MySQL性能最大数据量抛开数据量和并发数,谈性能都是耍流氓。MySQL没有限制单表最大记录数,它取决于操作系统对文件大小的限制。看这一篇就够了,如何写一手好SQL?《阿里巴巴Java开发手册》提出单表行数超过500万行或者单表容量超过2GB,才推荐分库分表。性能由综合因素决定,抛开业务复杂度,影响程度依次是硬件配置、MySQL配置、数据表设计、索引优化。500万这个值仅供参考,并非铁律。曾经操作
- 宝塔面板+NextCloud文档云 搭建流程
歪果仨
系统工程服务器运维linux
系统工程-建设篇第一章宝塔面板+NextCloud文档云搭建流程系统工程-建设篇下章内容前言实施步骤前置条件部署宝塔面板安装CentOS操作系统配置CentOS操作系统安装Linux宝塔面板配置宝塔面板的LNMPNginx配置MySQL配置PHP配置Redis配置宝塔开启禁ping,修改ssh端口,开启系统防火墙,可选关闭selinux宝塔新建网站和数据库,做计划定时备份部署NextCloud下载
- MySQL如何实时同步数据到ES?试试阿里开源的Canal
漫走云雾
mysqlelasticsearch开源
前言前几天在网上冲浪的时候发现了一个比较成熟的开源中间件——Canal。在了解了它的工作原理和使用场景后,顿时产生了浓厚的兴趣。今天,就让我们跟随我的脚步,一起来揭开它神秘的面纱吧。目录前言简介工作原理MySQL主备复制原理canal工作原理Canal架构Canal-HA机制应用场景同步缓存Redis/全文搜索ES下发任务数据异构MySQL配置开启binlog扩展statementrowmixed
- Springboot整合Spring全家桶之Spring Data JPA
iDevOps
1.添加依赖org.springframework.bootspring-boot-starter-data-jpamysqlmysql-connector-java2.配置application.properties#Mysql配置spring.datasource.driverClassName=com.mysql.jdbc.Driverspring.datasource.url=jdbc:m
- java类加载顺序
3213213333332132
java
package com.demo;
/**
* @Description 类加载顺序
* @author FuJianyong
* 2015-2-6上午11:21:37
*/
public class ClassLoaderSequence {
String s1 = "成员属性";
static String s2 = "
- Hibernate与mybitas的比较
BlueSkator
sqlHibernate框架ibatisorm
第一章 Hibernate与MyBatis
Hibernate 是当前最流行的O/R mapping框架,它出身于sf.net,现在已经成为Jboss的一部分。 Mybatis 是另外一种优秀的O/R mapping框架。目前属于apache的一个子项目。
MyBatis 参考资料官网:http:
- php多维数组排序以及实际工作中的应用
dcj3sjt126com
PHPusortuasort
自定义排序函数返回false或负数意味着第一个参数应该排在第二个参数的前面, 正数或true反之, 0相等usort不保存键名uasort 键名会保存下来uksort 排序是对键名进行的
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8&q
- DOM改变字体大小
周华华
前端
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml&q
- c3p0的配置
g21121
c3p0
c3p0是一个开源的JDBC连接池,它实现了数据源和JNDI绑定,支持JDBC3规范和JDBC2的标准扩展。c3p0的下载地址是:http://sourceforge.net/projects/c3p0/这里可以下载到c3p0最新版本。
以在spring中配置dataSource为例:
<!-- spring加载资源文件 -->
<bean name="prope
- Java获取工程路径的几种方法
510888780
java
第一种:
File f = new File(this.getClass().getResource("/").getPath());
System.out.println(f);
结果:
C:\Documents%20and%20Settings\Administrator\workspace\projectName\bin
获取当前类的所在工程路径;
如果不加“
- 在类Unix系统下实现SSH免密码登录服务器
Harry642
免密ssh
1.客户机
(1)执行ssh-keygen -t rsa -C "
[email protected]"生成公钥,xxx为自定义大email地址
(2)执行scp ~/.ssh/id_rsa.pub root@xxxxxxxxx:/tmp将公钥拷贝到服务器上,xxx为服务器地址
(3)执行cat
- Java新手入门的30个基本概念一
aijuans
javajava 入门新手
在我们学习Java的过程中,掌握其中的基本概念对我们的学习无论是J2SE,J2EE,J2ME都是很重要的,J2SE是Java的基础,所以有必要对其中的基本概念做以归纳,以便大家在以后的学习过程中更好的理解java的精髓,在此我总结了30条基本的概念。 Java概述: 目前Java主要应用于中间件的开发(middleware)---处理客户机于服务器之间的通信技术,早期的实践证明,Java不适合
- Memcached for windows 简单介绍
antlove
javaWebwindowscachememcached
1. 安装memcached server
a. 下载memcached-1.2.6-win32-bin.zip
b. 解压缩,dos 窗口切换到 memcached.exe所在目录,运行memcached.exe -d install
c.启动memcached Server,直接在dos窗口键入 net start "memcached Server&quo
- 数据库对象的视图和索引
百合不是茶
索引oeacle数据库视图
视图
视图是从一个表或视图导出的表,也可以是从多个表或视图导出的表。视图是一个虚表,数据库不对视图所对应的数据进行实际存储,只存储视图的定义,对视图的数据进行操作时,只能将字段定义为视图,不能将具体的数据定义为视图
为什么oracle需要视图;
&
- Mockito(一) --入门篇
bijian1013
持续集成mockito单元测试
Mockito是一个针对Java的mocking框架,它与EasyMock和jMock很相似,但是通过在执行后校验什么已经被调用,它消除了对期望 行为(expectations)的需要。其它的mocking库需要你在执行前记录期望行为(expectations),而这导致了丑陋的初始化代码。
&nb
- 精通Oracle10编程SQL(5)SQL函数
bijian1013
oracle数据库plsql
/*
* SQL函数
*/
--数字函数
--ABS(n):返回数字n的绝对值
declare
v_abs number(6,2);
begin
v_abs:=abs(&no);
dbms_output.put_line('绝对值:'||v_abs);
end;
--ACOS(n):返回数字n的反余弦值,输入值的范围是-1~1,输出值的单位为弧度
- 【Log4j一】Log4j总体介绍
bit1129
log4j
Log4j组件:Logger、Appender、Layout
Log4j核心包含三个组件:logger、appender和layout。这三个组件协作提供日志功能:
日志的输出目标
日志的输出格式
日志的输出级别(是否抑制日志的输出)
logger继承特性
A logger is said to be an ancestor of anothe
- Java IO笔记
白糖_
java
public static void main(String[] args) throws IOException {
//输入流
InputStream in = Test.class.getResourceAsStream("/test");
InputStreamReader isr = new InputStreamReader(in);
Bu
- Docker 监控
ronin47
docker监控
目前项目内部署了docker,于是涉及到关于监控的事情,参考一些经典实例以及一些自己的想法,总结一下思路。 1、关于监控的内容 监控宿主机本身
监控宿主机本身还是比较简单的,同其他服务器监控类似,对cpu、network、io、disk等做通用的检查,这里不再细说。
额外的,因为是docker的
- java-顺时针打印图形
bylijinnan
java
一个画图程序 要求打印出:
1.int i=5;
2.1 2 3 4 5
3.16 17 18 19 6
4.15 24 25 20 7
5.14 23 22 21 8
6.13 12 11 10 9
7.
8.int i=6
9.1 2 3 4 5 6
10.20 21 22 23 24 7
11.19
- 关于iReport汉化版强制使用英文的配置方法
Kai_Ge
iReport汉化英文版
对于那些具有强迫症的工程师来说,软件汉化固然好用,但是汉化不完整却极为头疼,本方法针对iReport汉化不完整的情况,强制使用英文版,方法如下:
在 iReport 安装路径下的 etc/ireport.conf 里增加红色部分启动参数,即可变为英文版。
# ${HOME} will be replaced by user home directory accordin
- [并行计算]论宇宙的可计算性
comsci
并行计算
现在我们知道,一个涡旋系统具有并行计算能力.按照自然运动理论,这个系统也同时具有存储能力,同时具备计算和存储能力的系统,在某种条件下一般都会产生意识......
那么,这种概念让我们推论出一个结论
&nb
- 用OpenGL实现无限循环的coverflow
dai_lm
androidcoverflow
网上找了很久,都是用Gallery实现的,效果不是很满意,结果发现这个用OpenGL实现的,稍微修改了一下源码,实现了无限循环功能
源码地址:
https://github.com/jackfengji/glcoverflow
public class CoverFlowOpenGL extends GLSurfaceView implements
GLSurfaceV
- JAVA数据计算的几个解决方案1
datamachine
javaHibernate计算
老大丢过来的软件跑了10天,摸到点门道,正好跟以前攒的私房有关联,整理存档。
-----------------------------华丽的分割线-------------------------------------
数据计算层是指介于数据存储和应用程序之间,负责计算数据存储层的数据,并将计算结果返回应用程序的层次。J
&nbs
- 简单的用户授权系统,利用给user表添加一个字段标识管理员的方式
dcj3sjt126com
yii
怎么创建一个简单的(非 RBAC)用户授权系统
通过查看论坛,我发现这是一个常见的问题,所以我决定写这篇文章。
本文只包括授权系统.假设你已经知道怎么创建身份验证系统(登录)。 数据库
首先在 user 表创建一个新的字段(integer 类型),字段名 'accessLevel',它定义了用户的访问权限 扩展 CWebUser 类
在配置文件(一般为 protecte
- 未选之路
dcj3sjt126com
诗
作者:罗伯特*费罗斯特
黄色的树林里分出两条路,
可惜我不能同时去涉足,
我在那路口久久伫立,
我向着一条路极目望去,
直到它消失在丛林深处.
但我却选了另外一条路,
它荒草萋萋,十分幽寂;
显得更诱人,更美丽,
虽然在这两条小路上,
都很少留下旅人的足迹.
那天清晨落叶满地,
两条路都未见脚印痕迹.
呵,留下一条路等改日再
- Java处理15位身份证变18位
蕃薯耀
18位身份证变15位15位身份证变18位身份证转换
15位身份证变18位,18位身份证变15位
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
蕃薯耀 201
- SpringMVC4零配置--应用上下文配置【AppConfig】
hanqunfeng
springmvc4
从spring3.0开始,Spring将JavaConfig整合到核心模块,普通的POJO只需要标注@Configuration注解,就可以成为spring配置类,并通过在方法上标注@Bean注解的方式注入bean。
Xml配置和Java类配置对比如下:
applicationContext-AppConfig.xml
<!-- 激活自动代理功能 参看:
- Android中webview跟JAVASCRIPT中的交互
jackyrong
JavaScripthtmlandroid脚本
在android的应用程序中,可以直接调用webview中的javascript代码,而webview中的javascript代码,也可以去调用ANDROID应用程序(也就是JAVA部分的代码).下面举例说明之:
1 JAVASCRIPT脚本调用android程序
要在webview中,调用addJavascriptInterface(OBJ,int
- 8个最佳Web开发资源推荐
lampcy
编程Web程序员
Web开发对程序员来说是一项较为复杂的工作,程序员需要快速地满足用户需求。如今很多的在线资源可以给程序员提供帮助,比如指导手册、在线课程和一些参考资料,而且这些资源基本都是免费和适合初学者的。无论你是需要选择一门新的编程语言,或是了解最新的标准,还是需要从其他地方找到一些灵感,我们这里为你整理了一些很好的Web开发资源,帮助你更成功地进行Web开发。
这里列出10个最佳Web开发资源,它们都是受
- 架构师之面试------jdk的hashMap实现
nannan408
HashMap
1.前言。
如题。
2.详述。
(1)hashMap算法就是数组链表。数组存放的元素是键值对。jdk通过移位算法(其实也就是简单的加乘算法),如下代码来生成数组下标(生成后indexFor一下就成下标了)。
static int hash(int h)
{
h ^= (h >>> 20) ^ (h >>>
- html禁止清除input文本输入缓存
Rainbow702
html缓存input输入框change
多数浏览器默认会缓存input的值,只有使用ctl+F5强制刷新的才可以清除缓存记录。
如果不想让浏览器缓存input的值,有2种方法:
方法一: 在不想使用缓存的input中添加 autocomplete="off";
<input type="text" autocomplete="off" n
- POJO和JavaBean的区别和联系
tjmljw
POJOjava beans
POJO 和JavaBean是我们常见的两个关键字,一般容易混淆,POJO全称是Plain Ordinary Java Object / Pure Old Java Object,中文可以翻译成:普通Java类,具有一部分getter/setter方法的那种类就可以称作POJO,但是JavaBean则比 POJO复杂很多, Java Bean 是可复用的组件,对 Java Bean 并没有严格的规
- java中单例的五种写法
liuxiaoling
java单例
/**
* 单例模式的五种写法:
* 1、懒汉
* 2、恶汉
* 3、静态内部类
* 4、枚举
* 5、双重校验锁
*/
/**
* 五、 双重校验锁,在当前的内存模型中无效
*/
class LockSingleton
{
private volatile static LockSingleton singleton;
pri