- JVM性能调优监控工具jps、jstack、jmap、jhat、jstat使用详解
web718
Java
JDK本身提供了很多方便的JVM性能调优监控工具,除了集成式的VisualVM和jConsole外,还有jps、jstack、jmap、jhat、jstat等小巧的工具,本博客希望能起抛砖引玉之用,让大家能开始对JVM性能调优的常用工具有所了解。现实企业级Java开发中,有时候我们会碰到下面这些问题:OutOfMemoryError,内存不足内存泄露线程死锁锁争用(LockContention)J
- 精通JVM监控与调优:工具使用与命令指南
道长不会写代码
jvm
精通JVM监控与调优:工具使用与命令指南1.JVM监控工具概览1.1监控工具列表2.jconsole使用指南2.1操作步骤2.2常用命令3.VisualVM使用指南3.1操作步骤3.2常用命令4.jstack使用指南4.1操作步骤4.2常用命令5.jmap使用指南5.1操作步骤5.2常用命令6.jstat使用指南6.1操作步骤6.2常用命令7.MAT使用指南7.1操作步骤7.2常用命令8.GCVi
- Java笔试面试题AI答之线程(11)
工程师老罗
Java笔试面试题AI答java开发语言
文章目录61.简述什么是原子操作?Java中有哪些原子操作?简述原子操作Java中的原子操作62.简述什么是Java竞态条件?你如何发现并解决竞态条件?Java竞态条件(RaceCondition)如何发现竞态条件?如何解决竞态条件?63.简述Java中你如何转储线程(threaddump)?1.使用`jstack`工具2.使用`jconsole`或`VisualVM`3.编程方式注意64.如果你
- Java技术专题-Java Agent探针的技术介绍(1)
洛神灬殇
前提概要Java调式、热部署、JVM背后的支持者JavaAgent:各个JavaIDE的调试功能,例如eclipse、IntelliJ;热部署功能,例如JRebel、XRebel、spring-loaded;各种线上诊断工具,例如Btrace、Greys,还有阿里的Arthas;各种性能分析工具,例如VisualVM、JConsole等;Agent的介绍JavaAgent直译过来叫做Java代理,
- JavaEE____多线程1
漫天 星辰
JavaEEjava-ee
文章目录一.线程使用1.线程休眠演示打印电影字幕2.多线程性能VS单线程性能2.1单线程执行时间2.2多线程执行时间3.线程3种创建方式3.1创建方式1:继承Threada)使用jconsole观察线程b)启动线程——start方法3.2创建方式2:实现Runnable接口(4种写法)3.2.1写法13.2.2写法23.2.3写法33.2.4写法43.3创建方式3:实现Callable接口进行实现
- [Java] 多线程初识
Prectie.RTE
java开发语言
多线程前言内核相关线程一、线程概念及简单操作多线程编程第一个多线程程序真正体现多线程程序一些问题jconsole工具创建线程的方式方法一:继承Thread类方法二:实现`Runnable`接口方法三:继承Thread,但是使用匿名内部类方法四:实现`Runnable`接口,但是使用匿名内部类方法五:\[常用/推荐]使用lambda表达式二、Thread类及常见方法1)Thread常见构造方法2)T
- java工具之JVM监控
这一刻_776b
一、JVM监控工具JVM性能调优监控工具jps、jstack、jmap、jhat、jstat、jconsole、jinfo、hprof使用详解-实例分析(1)jps:用来显示本地的java进程,可以查看本地运行着几个java程序,并显示他们的进程号。命令格式:jps或jps远程服务ip地址(默认端口1099)(2)jstack:可以观察到jvm中当前所有线程的运行情况和线程当前状态。,如果现在运行
- jconsole连接docker内Java服务
代码人生520
dockerjava
jconsole连接docker内Java服务为了简化jconsole的配置,我们使用无密码无认证,通过ip+port直接连接的方式。1.在dockerfile中配置指定参数java-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=8080-Dcom.sun.management.jmxremote.authenti
- 性能测试常见问题经验汇总
Coding测试
JVM分析神器:visualVM一、内存泄漏1、堆内存溢出现象:(1)压测执行一段时间后,系统处理能力下降。这时用JConsole、JVisualVM等工具连上服务器查看GC情况,每次GC回收都不彻底并且可用堆内存越来越少。(2)压测持续下去,最终在日志中有报错信息:java.lang.OutOfMemoryError.Javaheapspace。排查手段:(1)使用jmap-histopid>t
- Java性能分析中常用的命令和工具
A尘埃
java开发语言常用的命令和工具
命令功能jps用于查看正在运行的Java进程的状态信息jinfo用于查看和修改正在运行的Java进程的Java虚拟机(JVM)参数和系统属性。jstack用于生成Java进程的线程转储信息jmap用于生成Java进程的内存映射信息jconsole是Java自带的监控和管理控制台,它提供了一个图形化界面,允许您监视和管理正在运行的Java应用程序的性能和资源使用情况jvisualvm是一款功能强大的
- 备战面试日记(2.6) - (JVM.JVM调优)
舍其小伙伴
面试准备JVM虚拟机相关面试java职场和发展
本人本科毕业,21届毕业生,一年工作经验,简历专业技能如下,现根据简历,并根据所学知识复习准备面试。记录日期:2022.1.3大部分知识点只做大致介绍,具体内容根据推荐博文链接进行详细复习。文章目录JVM-JVM调优JVM参数JVM参数设置方法JVM调优工具JPS、JMAP、JSTACKjconsolejvisualvm使用方式JVM调优方案调优原则调优目的从应用层面来说从虚拟机层面来说调优方案调
- 【并发编程】锁死的问题——如何解决?以及如何避免?
王果冻ddd
java开发语言面试
目录1.如何解决一、死锁的定义和原因1.1定义1.2原因二、常见的死锁场景2.1线程间相互等待资源2.2嵌套锁的循环等待2.3对资源的有序请求三、死锁排查的方法3.1使用jstack命令3.2使用jconsole3.3使用VisualVM四、常见的解决方案4.1避免嵌套锁的循环等待4.2使用带超时的锁4.3使用资源分配图2.如何避免1.如何解决一、死锁的定义和原因1.1定义死锁是指两个或多个线程在
- Jvm-GC日志分析工具
盼旺
jdk自带的工具1.jconsoleJconsole(JavaMonitoringandManagementConsole)是从java5开始,在JDK中自带的java监控和管理控制台,用于对JVM中内存,线程和类等的监控,是一个基于JMX(javamanagementextensions)的GUI性能监测工具。jconsole使用jvm的扩展机制获取并展示虚拟机中运行的应用程序的性能和资源消耗等
- JavaScript 删除对象属性
lenjstlp
jsonreact.jsnode.js
1.解构赋值constobj={a:1,b:2,c:3}const{a,...s}=objconsole.log(s)//{b:2,c:3}2.delete关键字constobj={a:1,b:2,c:3}deleteobj.adeleteobj.bconsole.log(obj)//{c:3}
- JVM篇--JVM调优高频面试题
ayu_programer
面试JVMjvm
1说一下JVM调优的工具?JDK自带了很多监控工具,都位于JDK的bin目录下,其中最常用的是jconsole和jvisualvm这两款视图监控工具。jconsole:用于对JVM中的内存、线程和类等进行监控;jvisualvm:JDK自带的全能分析工具,可以分析:内存快照、线程快照、程序死锁、监控内存的变化、gc变化等2常用的JVM调优的参数都有哪些?-Xms2g:初始化推大小为2g;-Xmx2
- 1、java内存管理-方法区(元空间的简介)
田美河边的钓鱼人
我这里使用的版本为:javaversion"1.8.0_31",64位的机器首先,这里会先用一个工具查看内存的信息:jconsole相关的介绍:https://docs.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html装了jdk,并且配置了环境变量,可以直接在控制台中输入jconsole,就会弹出对应的界面。这里我首先写一段代码
- spring cloud 配置阿里数据库连接池 druid
IT祖师爷
1.配置pomcom.alibabadruid1.1.12com.alibabajconsolecom.alibabatools2.配置application.properties#druid连接池spring.datasource.type:com.alibaba.druid.pool.DruidDataSource#最大活跃数spring.datasource.maxActive:20#初始化
- 如何监测和分析Java应用程序的性能问题?
动力节点IT教育
Java自学教程java开发语言
如何监测和分析Java应用程序的性能问题?要监测和分析Java应用程序的性能问题,可以使用以下工具和技术:JConsole和VisualVM:这两个工具是Java自带的基本性能监控工具,可以实时监控Java应用程序的内存使用、线程活动、类加载等情况,同时还可以进行堆转储和线程转储,帮助定位性能问题。JavaMissionControl(JMC):这是一个功能强大的Java性能分析工具,可以监控、分
- 基础+常用的数据结构
2629352674
面试数据结构
基础java基础JDK和JREJDK,它是功能齐全的JavaSDK,是提供给开发者使用,能够创建和编译Java程序的开发套件。它包含了JRE,同时还包含了编译java源码的编译器javac以及一些其他工具比如javadoc(文档注释工具)、jdb(调试器)、jconsole(基于JMX的可视化监控⼯具)、javap(反编译工具)等等。JRE是Java运行时环境。什么是字节码在Java中,JVM可以
- 运行时管理和监控 Java 应用程序-JMX技术初探
David爱编程
javajava开发语言
文章目录1.JMX简介2.使用场景2.1性能监控和调优2.2运行时配置管理2.3故障诊断和问题排查3.使用样例3.1简单的MBean接口3.2简单的MBean实现3.3使用jconsole工具监测jmx所在java进程3.4直接在jconsole视图中点击调用MBean的方法,控制台输出对应日志信息4.总结1.JMX简介Java管理扩展(JMX)是Java平台上的一种标准管理和监控技术。它提供了一
- jvm调优(工具篇)
郑..方..醒
JavaJVM调优jvmjava后端
提示:jvm调优的监控工具、故障排查工具、可视化工具、jps、jstat、jinfo、jmap、jstack、jcmd、jhat、jhsdb、jconsole、VisualVM、JavaMissionControl文章目录前言一、监控工具1、jps2、jstat二、故障排查工具1、jinfo2、jmap3、jstack4、jcmd5、jhat6、jhsdb三、可视化工具:1、jhsdb2、jcon
- Zabbix应用场景:使用JMX监控Tomcat+Jconsole测试
-KamMinG
Zabbix
一、监控原理二、监控步骤环境Zabbixserver、Java、Tomcat:192.168.120.128步骤一、前置条件如编译安装Zabbixserver已加上–enable-java以支持jmx监控,可忽略此步#./configure--enable-server--enable-proxy--enable-agent--enable-java--with-mysql=/usr/bin/my
- Java性能权威指南
一心猿
java开发语言
一、Java监控工具jcmd:打印Java进程中的基本类、线程和JVM信息。适合用在脚本中。以下方式执行:%jcmdprocess_idcommandoptional_arguments。jconsole:提供JVM活动的图形化视图,包括线程的使用、类的使用和GC活动。jconsole需要相当多的系统资源,在生产系统中运行可能会干扰系统。你可以设置jconsole让它在本地运行,并附加到远程系统上
- ActiveMQ嵌入Tomcat
Java大生
在一些项目中,单独开启一个ActiveMQ,对于项目实施来说有时略显繁琐。所以我们将ActiveMQ内嵌到Tomcat,Tomcat启动同时就顺带启动了ActiveMQ。由此我们需要掌握三个个重要的知识点ActiveMQ中的BrokerService自启动Servlet配置使用jconsole了解嵌入ActiveMQ运行状态一、开启BrokerService在pom.xml添加ActiveMQ依赖
- SpringBoot项目线程一直累加,没有进行回收的问题分析记录
染的人
Java开发笔记javaspringspringboot
问题平时空闲时间,一直给朋友维护一个SpringBoot项目。随着业务发展,朋友经常反馈服务经常崩溃,无法正常访问。通过jvm自带的jconsole观察到,该项目自从启动后,线程数量一直出于不断增加的趋势,没有线程回收的迹象,如下图所示:由此诊断,线程的不回收导致随着时间延长,大量的系统资源被占用,后续的请求线程无法创建,导致服务崩溃。分析我们需要找到线程没有回收的原因。由于该项目是运行windo
- 【jvm调优】使用JConsole工具
锅巴编程
jvmjava
如何使用JConsole来查看垃圾回收器的信息?JConsole是一个内置的Java性能分析器,安装Java时自带,默认位置为C:\ProgramFiles\Java\jdk1.8.0_152\bin。使用JConsole来查看垃圾回收器的信息的步骤如下:选择你本地正在运行的JVM应用。切换到VM概要标签页面,即可查看当前使用的垃圾回收器。如何使用JConsole?JConsole是Java开发工
- 【ES6语法】解构赋值及其应用场景举例
DayHeart
ES6语法htmlvue前端es6
letobj={a:{b:{c:666}}}//从对象中拿到clet{a:{b:{c}}}=objconsole.log(c)//666//改变属性名let{a:{b:{c:alias}}}=objconsole.log(alias)//666应用:VUE路由的index中的props的一种写法,值为函数,此处为连续解构赋值props(query:{id,title}){return{id,tit
- 面试-面对面沟通题
中年程序员一枚
面试职场和发展
线上系统GC问题如何快速定位与分析1、采集GC日志:如使用-Xloggc参数来指定GC日志的输出路径。2、监控与分析工具:如JConsole、VisualVM等,实时监控JVM的GC情况。3、分析GC日志:如使用GCViewer等工具,可以获得更直观的GC情况和趋势分析,通过观察GC的频率、持续时间等指标,可以初步判断是否存在问题。4、检查JVM参数配置:如回顾JVM的参数配置,包括堆内存大小、新
- 如何使用Neo4j GraphQL Library(三)
我的小小笔尖
使用本地环境将上一节内容走一遍,做一次小总结如何使用Neo4jGraphQLLibrary(二)https://www.jianshu.com/p/4027668df8501.启动本地Neo4jServerC:\Users\bing.yao>neo4jconsole打开谷歌浏览器,本地访问Neo4jBrowershttp://localhost:7474/browser/2.启动本地ApolloS
- JVM监控和调优常用命令工具总结
圆月弯刀丶
JAVA语言
阅读目录JVM监控和调优jpsjinfojstatjstackjmapjhatjconsole,jvisualvm回到顶部JVM监控和调优在Java应用和服务出现莫名的卡顿、CPU飙升等问题时总是要分析一下对应进程的JVM状态以定位问题和解决问题并作出相应的优化,在这过程中Java自带的一些状态监控命令和图形化工具就非常方便了。本文总结了最常用的命令行工具及其常用参数解释,图形化监控工具的用法,仅
- 戴尔笔记本win8系统改装win7系统
sophia天雪
win7戴尔改装系统win8
戴尔win8 系统改装win7 系统详述
第一步:使用U盘制作虚拟光驱:
1)下载安装UltraISO:注册码可以在网上搜索。
2)启动UltraISO,点击“文件”—》“打开”按钮,打开已经准备好的ISO镜像文
- BeanUtils.copyProperties使用笔记
bylijinnan
java
BeanUtils.copyProperties VS PropertyUtils.copyProperties
两者最大的区别是:
BeanUtils.copyProperties会进行类型转换,而PropertyUtils.copyProperties不会。
既然进行了类型转换,那BeanUtils.copyProperties的速度比不上PropertyUtils.copyProp
- MyEclipse中文乱码问题
0624chenhong
MyEclipse
一、设置新建常见文件的默认编码格式,也就是文件保存的格式。
在不对MyEclipse进行设置的时候,默认保存文件的编码,一般跟简体中文操作系统(如windows2000,windowsXP)的编码一致,即GBK。
在简体中文系统下,ANSI 编码代表 GBK编码;在日文操作系统下,ANSI 编码代表 JIS 编码。
Window-->Preferences-->General -
- 发送邮件
不懂事的小屁孩
send email
import org.apache.commons.mail.EmailAttachment;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.HtmlEmail;
import org.apache.commons.mail.MultiPartEmail;
- 动画合集
换个号韩国红果果
htmlcss
动画 指一种样式变为另一种样式 keyframes应当始终定义0 100 过程
1 transition 制作鼠标滑过图片时的放大效果
css
.wrap{
width: 340px;height: 340px;
position: absolute;
top: 30%;
left: 20%;
overflow: hidden;
bor
- 网络最常见的攻击方式竟然是SQL注入
蓝儿唯美
sql注入
NTT研究表明,尽管SQL注入(SQLi)型攻击记录详尽且为人熟知,但目前网络应用程序仍然是SQLi攻击的重灾区。
信息安全和风险管理公司NTTCom Security发布的《2015全球智能威胁风险报告》表明,目前黑客攻击网络应用程序方式中最流行的,要数SQLi攻击。报告对去年发生的60亿攻击 行为进行分析,指出SQLi攻击是最常见的网络应用程序攻击方式。全球网络应用程序攻击中,SQLi攻击占
- java笔记2
a-john
java
类的封装:
1,java中,对象就是一个封装体。封装是把对象的属性和服务结合成一个独立的的单位。并尽可能隐藏对象的内部细节(尤其是私有数据)
2,目的:使对象以外的部分不能随意存取对象的内部数据(如属性),从而使软件错误能够局部化,减少差错和排错的难度。
3,简单来说,“隐藏属性、方法或实现细节的过程”称为——封装。
4,封装的特性:
4.1设置
- [Andengine]Error:can't creat bitmap form path “gfx/xxx.xxx”
aijuans
学习Android遇到的错误
最开始遇到这个错误是很早以前了,以前也没注意,只当是一个不理解的bug,因为所有的texture,textureregion都没有问题,但是就是提示错误。
昨天和美工要图片,本来是要背景透明的png格式,可是她却给了我一个jpg的。说明了之后她说没法改,因为没有png这个保存选项。
我就看了一下,和她要了psd的文件,还好我有一点
- 自己写的一个繁体到简体的转换程序
asialee
java转换繁体filter简体
今天调研一个任务,基于java的filter实现繁体到简体的转换,于是写了一个demo,给各位博友奉上,欢迎批评指正。
实现的思路是重载request的调取参数的几个方法,然后做下转换。
- android意图和意图监听器技术
百合不是茶
android显示意图隐式意图意图监听器
Intent是在activity之间传递数据;Intent的传递分为显示传递和隐式传递
显式意图:调用Intent.setComponent() 或 Intent.setClassName() 或 Intent.setClass()方法明确指定了组件名的Intent为显式意图,显式意图明确指定了Intent应该传递给哪个组件。
隐式意图;不指明调用的名称,根据设
- spring3中新增的@value注解
bijian1013
javaspring@Value
在spring 3.0中,可以通过使用@value,对一些如xxx.properties文件中的文件,进行键值对的注入,例子如下:
1.首先在applicationContext.xml中加入:
<beans xmlns="http://www.springframework.
- Jboss启用CXF日志
sunjing
logjbossCXF
1. 在standalone.xml配置文件中添加system-properties:
<system-properties> <property name="org.apache.cxf.logging.enabled" value=&
- 【Hadoop三】Centos7_x86_64部署Hadoop集群之编译Hadoop源代码
bit1129
centos
编译必需的软件
Firebugs3.0.0
Maven3.2.3
Ant
JDK1.7.0_67
protobuf-2.5.0
Hadoop 2.5.2源码包
Firebugs3.0.0
http://sourceforge.jp/projects/sfnet_findbug
- struts2验证框架的使用和扩展
白糖_
框架xmlbeanstruts正则表达式
struts2能够对前台提交的表单数据进行输入有效性校验,通常有两种方式:
1、在Action类中通过validatexx方法验证,这种方式很简单,在此不再赘述;
2、通过编写xx-validation.xml文件执行表单验证,当用户提交表单请求后,struts会优先执行xml文件,如果校验不通过是不会让请求访问指定action的。
本文介绍一下struts2通过xml文件进行校验的方法并说
- 记录-感悟
braveCS
感悟
再翻翻以前写的感悟,有时会发现自己很幼稚,也会让自己找回初心。
2015-1-11 1. 能在工作之余学习感兴趣的东西已经很幸福了;
2. 要改变自己,不能这样一直在原来区域,要突破安全区舒适区,才能提高自己,往好的方面发展;
3. 多反省多思考;要会用工具,而不是变成工具的奴隶;
4. 一天内集中一个定长时间段看最新资讯和偏流式博
- 编程之美-数组中最长递增子序列
bylijinnan
编程之美
import java.util.Arrays;
import java.util.Random;
public class LongestAccendingSubSequence {
/**
* 编程之美 数组中最长递增子序列
* 书上的解法容易理解
* 另一方法书上没有提到的是,可以将数组排序(由小到大)得到新的数组,
* 然后求排序后的数组与原数
- 读书笔记5
chengxuyuancsdn
重复提交struts2的token验证
1、重复提交
2、struts2的token验证
3、用response返回xml时的注意
1、重复提交
(1)应用场景
(1-1)点击提交按钮两次。
(1-2)使用浏览器后退按钮重复之前的操作,导致重复提交表单。
(1-3)刷新页面
(1-4)使用浏览器历史记录重复提交表单。
(1-5)浏览器重复的 HTTP 请求。
(2)解决方法
(2-1)禁掉提交按钮
(2-2)
- [时空与探索]全球联合进行第二次费城实验的可能性
comsci
二次世界大战前后,由爱因斯坦参加的一次在海军舰艇上进行的物理学实验 -费城实验
至今给我们大家留下很多迷团.....
关于费城实验的详细过程,大家可以在网络上搜索一下,我这里就不详细描述了
在这里,我的意思是,现在
- easy connect 之 ORA-12154: TNS: 无法解析指定的连接标识符
daizj
oracleORA-12154
用easy connect连接出现“tns无法解析指定的连接标示符”的错误,如下:
C:\Users\Administrator>sqlplus username/
[email protected]:1521/orcl
SQL*Plus: Release 10.2.0.1.0 – Production on 星期一 5月 21 18:16:20 2012
Copyright (c) 198
- 简单排序:归并排序
dieslrae
归并排序
public void mergeSort(int[] array){
int temp = array.length/2;
if(temp == 0){
return;
}
int[] a = new int[temp];
int
- C语言中字符串的\0和空格
dcj3sjt126com
c
\0 为字符串结束符,比如说:
abcd (空格)cdefg;
存入数组时,空格作为一个字符占有一个字节的空间,我们
- 解决Composer国内速度慢的办法
dcj3sjt126com
Composer
用法:
有两种方式启用本镜像服务:
1 将以下配置信息添加到 Composer 的配置文件 config.json 中(系统全局配置)。见“例1”
2 将以下配置信息添加到你的项目的 composer.json 文件中(针对单个项目配置)。见“例2”
为了避免安装包的时候都要执行两次查询,切记要添加禁用 packagist 的设置,如下 1 2 3 4 5
- 高效可伸缩的结果缓存
shuizhaosi888
高效可伸缩的结果缓存
/**
* 要执行的算法,返回结果v
*/
public interface Computable<A, V> {
public V comput(final A arg);
}
/**
* 用于缓存数据
*/
public class Memoizer<A, V> implements Computable<A,
- 三点定位的算法
haoningabc
c算法
三点定位,
已知a,b,c三个顶点的x,y坐标
和三个点都z坐标的距离,la,lb,lc
求z点的坐标
原理就是围绕a,b,c 三个点画圆,三个圆焦点的部分就是所求
但是,由于三个点的距离可能不准,不一定会有结果,
所以是三个圆环的焦点,环的宽度开始为0,没有取到则加1
运行
gcc -lm test.c
test.c代码如下
#include "stdi
- epoll使用详解
jimmee
clinux服务端编程epoll
epoll - I/O event notification facility在linux的网络编程中,很长的时间都在使用select来做事件触发。在linux新的内核中,有了一种替换它的机制,就是epoll。相比于select,epoll最大的好处在于它不会随着监听fd数目的增长而降低效率。因为在内核中的select实现中,它是采用轮询来处理的,轮询的fd数目越多,自然耗时越多。并且,在linu
- Hibernate对Enum的映射的基本使用方法
linzx0212
enumHibernate
枚举
/**
* 性别枚举
*/
public enum Gender {
MALE(0), FEMALE(1), OTHER(2);
private Gender(int i) {
this.i = i;
}
private int i;
public int getI
- 第10章 高级事件(下)
onestopweb
事件
index.html
<!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/
- 孙子兵法
roadrunners
孙子兵法
始计第一
孙子曰:
兵者,国之大事,死生之地,存亡之道,不可不察也。
故经之以五事,校之以计,而索其情:一曰道,二曰天,三曰地,四曰将,五
曰法。道者,令民于上同意,可与之死,可与之生,而不危也;天者,阴阳、寒暑
、时制也;地者,远近、险易、广狭、死生也;将者,智、信、仁、勇、严也;法
者,曲制、官道、主用也。凡此五者,将莫不闻,知之者胜,不知之者不胜。故校
之以计,而索其情,曰
- MySQL双向复制
tomcat_oracle
mysql
本文包括:
主机配置
从机配置
建立主-从复制
建立双向复制
背景
按照以下简单的步骤:
参考一下:
在机器A配置主机(192.168.1.30)
在机器B配置从机(192.168.1.29)
我们可以使用下面的步骤来实现这一点
步骤1:机器A设置主机
在主机中打开配置文件 ,
- zoj 3822 Domination(dp)
阿尔萨斯
Mina
题目链接:zoj 3822 Domination
题目大意:给定一个N∗M的棋盘,每次任选一个位置放置一枚棋子,直到每行每列上都至少有一枚棋子,问放置棋子个数的期望。
解题思路:大白书上概率那一张有一道类似的题目,但是因为时间比较久了,还是稍微想了一下。dp[i][j][k]表示i行j列上均有至少一枚棋子,并且消耗k步的概率(k≤i∗j),因为放置在i+1~n上等价与放在i+1行上,同理