- HDU2196Computer 树形dp
Vibrant
传送门解法1树的直径参考博客#include//树的直径#defineMAXN10010usingnamespacestd;typedefpairP;intdis[MAXN],Max,root;vectora[MAXN];voidInit(intn){Max=0;for(inti=1;iMax)Max=sum,root=now;for(inti=0;i//记忆化搜索#defineMAXN10010
- 划分为k个相等的子集
SummerM.
刷题日记深度优先算法
作者主页:慢热的陕西人专栏链接:力扣刷题日记欢迎各位大佬点赞关注收藏,留言文章目录划分为k个相等的子集题目链接方法一:状态压缩+记忆化搜索思路代码复杂度分析划分为k个相等的子集题目链接698.划分为k个相等的子集-力扣(LeetCode)方法一:状态压缩+记忆化搜索思路状态压缩:s的二进制位来表示每个位置(对应到数组种的index)是否被选择,1为未选择,反之为被选择。记忆化搜索:dp数组表示每种
- 【C++】01背包问题暴力,记忆,动态规划解法
吃小南瓜�
C++c++动态规划开发语言
0-1背包问题详解与实现目录0-1背包问题详解与实现问题描述问题分析状态定义状态转移方程边界条件算法实现暴力搜索记忆化搜索动态规划空间优化总结思维导图C++学习资源问题描述在算法领域,0-1背包问题是一个经典的优化问题。给定一个背包和一个物品集合,每个物品有其重量和价值,我们需要选择物品放入背包,使得背包内物品的总价值最大,同时不超过背包的容量限制。问题分析0-1背包问题可以通过决策树模型来理解。
- P5635 【CSGRound1】天下第一
golemon.
算法题算法数据结构c++
P5635【CSGRound1】天下第一-洛谷|计算机科学教育新生态(luogu.com.cn)思路:记忆化搜索,因为模数ppp对于多组输入来说是不变的,那么(x+y)(x+y)%p==0(x+y)这个判定条件在整个程序中都是正确的。题目中,每两个回合是一轮-两人都执行一次。为了让代码好写,每次搜索时是按照一轮来搜索。f[x][y]!=0f[x][y]!=0f[x][y]!=0:之前搜索时已经得到
- 记忆化搜索经典用法
Colinnian
深度优先算法图论
[SHOI2002]滑雪-洛谷intd[105][105],s[105][105];intdx[5]={0,1,0,-1,0};intdy[5]={0,0,1,0,-1};intmain(){intr,c;std::cin>>r>>c;for(inti=1;i>d[i][j];}}intans=0;autodfs=[&](autoself,intx,inty)->int{//这个点有值了,就是它目
- Longest Common Subsequence
carlclone
复盘go多层map嵌套,每层map都要初始化既要写极端小的也要写极端大的用例自底向上,状态,状态转移函数还没写,要搞懂啊画图最长公共子序列LongestCommonSubsequence未添加记忆化搜索的伪代码findLCSLenin(lstr,rstr,p1,p2)ifp1==-1orp2==-1return0maxLen=0iflstr[p1]==rstr[p2]maxLen++maxLen+
- Leetcode 62. 不同路径【暴搜 + 记忆化搜索 + DP +详解】
名字想不称展
力扣3000题动态规划算法leetcode
不同路径思路:暴搜:从起点搜到终点:递归的出口:起点为(0,0),终点为(n,m),所以递归的出口是,二者坐标相等!另外就是边界问题,存在无限向下递归或向右一直递归越界的问题,所以需要判断边界,当前是返回还是继续往前走!递归的参数:当前坐标(x,y),由于题目不是全局变量,那就再加上终点坐标(m,n);递归体:dfs(x+1,y),dfs(x,y+1);classSolution{public:i
- LeetCode62不同路径解题记录
shuangge666666
java数据结构动态规划leetcode算法
LeetCode62.不同路径解题感想一.题目介绍二.解题思路及代码实现方法一:深度优先搜索(dfs)方法二:记忆化搜索方法三:动态规划方法四:组合数学法总结一.题目介绍题目链接:LeetCode62.不同路径;二.解题思路及代码实现方法一:深度优先搜索(dfs)由于是求从一个点到另一个点的路径有多少条,显而易见,可以采用深度优先搜索的方式,遍历所有路径,如果能够到达目标坐标的路径并统计路径数目然
- 学习笔记:数字三角形模型
心情想要飞
学习笔记(提高篇)dp动态规划数字三角形c++算法
概念动态规划,解决问题的一种方法。将很多问题转换成多个子问题求解,先计算子问题,到达边界直接返回问题的值,最后得到最终答案的一种方法。动态规划分为两大类:记忆化搜索和递推。记忆化搜索更好写,但常数更高;递推不太好写,但是常数低。二者时间复杂度无特殊情况基本相同。状态转移方程:将一个问题转换成子问题计算得到结果的方程。dpdpdp:动态规划的简称。数字三角形,就是一个三角形,每一个点都有一个数字,找
- C++ 动态规划 记忆化搜索 滑雪
伏城无嗔
力扣动态规划算法笔记c++动态规划
给定一个R行C列的矩阵,表示一个矩形网格滑雪场。矩阵中第i行第j列的点表示滑雪场的第i行第j列区域的高度。一个人从滑雪场中的某个区域内出发,每次可以向上下左右任意一个方向滑动一个单位距离。当然,一个人能够滑动到某相邻区域的前提是该区域的高度低于自己目前所在区域的高度。下面给出一个矩阵作为例子:12345161718196152425207142322218131211109在给定矩阵中,一条可行的
- 1273. 删除树节点;2786. 访问数组中的位置使分数最大;889. 根据前序和后序遍历构造二叉树
igang of rebirth
算法python
1273.删除树节点核心思想:递归,从根节点出发,枚举父节点的子节点,如果它们的值加起来为0的话就把父亲的节点删除后剩余的数置为0,默认返回一个节点,del_remain保存的是,del_remain[x]表示完成删除操作后以x节点为父节点剩余的节点个数。2786.访问数组中的位置使分数最大核心思想:记忆化搜索,枚举第i个数选或不选,并用0,1标记上一个数的奇偶性,这种做法比dp好理解一点。889
- LC-1444. 切披萨的方案数(记忆化搜索==>动态规划)
Miraclo_acc
算法刷题记录动态规划
1444.切披萨的方案数困难118给你一个rowsxcols大小的矩形披萨和一个整数k,矩形包含两种字符:'A'(表示苹果)和'.'(表示空白格子)。你需要切披萨k-1次,得到k块披萨并送给别人。切披萨的每一刀,先要选择是向垂直还是水平方向切,再在矩形的边界上选一个切的位置,将披萨一分为二。如果垂直地切披萨,那么需要把左边的部分送给一个人,如果水平地切,那么需要把上面的部分送给一个人。在切完最后一
- 509. 斐波那契数
爱跑步的程序员~
刷题算法算法javadfs动态规划
Problem:509.斐波那契数文章目录思路解题方法复杂度Code解法一(暴力搜索)解法二(记忆化搜索)解法三(动态规划)解法四(动态规划(空间O(1)))思路斐波那契数(通常用F(n)表示)形成的序列称为斐波那契数列。该数列由0和1开始,后面的每一项数字都是前面两项数字的和。也就是:F(0)=0,F(1)=1F(n)=F(n-1)+F(n-2),其中n>1给定n,请计算F(n)。斐波那契数列是
- 01背包问题
青年之家
algorithms算法
目录题目描述记忆化搜索暴力搜索记忆化动态规划由搜索递归函数得到递归式直接写出递归式题目描述有nnn个重量和价值分别为wiw_iwi,viv_ivi的物品。从这些物品中挑选出总重量不超过WWW的物品,求所有挑选方案中价值总和的最大值。数据范围:1≤n≤1001\len\le1001≤n≤1001≤wi,vi≤1001\lew_i,v_i\le1001≤wi,vi≤1001≤W≤100001\leW\
- dp_day6(从记忆化搜索(dfs)到递推(dp))
像风一样_
深度优先算法动态规划c++leetcode
最长公共子序列最长公共子序列从最后一个元素开始思考,如果s[i]==t[j],毫无疑问,它们是公共的,直接考虑s[i-1],t[j-1]即可,如果不相等,就保留一个,舍去另一个,考虑s[i-1],t[j]与考虑s[i],t[j-1]两种情况的最大值即可,记忆化搜索代码classSolution{public:vector>cache=vector>(1005,vector(1005,-1));in
- 从记忆化搜索到递推
像风一样_
深度优先算法leetcode动态规划c++
本篇博客的内容学习自"灵茶山艾府"视频链接打家劫舍从最后一个节点开始考虑,因为因为约束最小,设当前结点为i,如果不偷i结点,就考虑i-1个结点,如果偷i结点,就考虑i-2个节点,所以dfs(i)=max(dfs(i-1),dfs(i-2)+nums[i])回溯代码classSolution{public:intdfs(inti,vector&nums){if(i&nums){returndfs(n
- 动态规划的一个初步学习
白色的风扇
动态规划学习算法
啥叫动态规划在我们写很多的题目时,常常可以用暴力枚举来写,缺点就是速度太慢了。如果我们用一个数组或者哈希表(虽然我还没学过哈希表)将之前暴力枚举的数据储存起来,当再一次枚举到这个数字的时候就直接调用数组或者哈希表里面的数据,这样就能节省很多时间。所以动态规划就是带数组记忆的递归,所以动态规划也往往叫做记忆化搜索。1.状态转移方程是啥:状态转移方程根据我的理解就是,可以根据前面的一维数组(或者二维数
- HDU1677 矩阵嵌套 DP 记忆化搜索 图 最长上升序列
JUNLONG2
矩阵嵌套题有两种解法第一种是用图,然后记忆化搜索若矩形i能被嵌入矩形j则G[i][j]为1,状态转移方程:dp(i)=max{dp(i),dp(j)+1}这题如果我用图来解会显示超时第二种排序,然后求最长上升序列按面积递减排序
- 【数学】【记忆化搜索 】【动态规划】964. 表示数字的最少运算符
闻缺陷则喜何志丹
#算法题动态规划算法c++力扣记忆化搜索数学乘方
作者推荐【动态规划】【字符串】【表达式】2019.解出数学表达式的学生分数本文涉及知识点动态规划汇总数学记忆化搜索LeetCoce964表示数字的最少运算符给定一个正整数x,我们将会写出一个形如x(op1)x(op2)x(op3)x…的表达式,其中每个运算符op1,op2,…可以是加、减、乘、除(+,-,*,或是/)之一。例如,对于x=3,我们可以写出表达式3*3/3+3-3,该式的值为3。在写这
- 【无标题】洛谷P1434 [SHOI2002]滑雪(记忆化搜索)
一只蓝色小鲨鱼
深搜dfs(包括记忆化搜索)动态规划思维蓝桥杯c++深度优先
#include#include#includeusingnamespacestd;constintN=110;intn,m;intg[N][N];boolst[N][N];intdx[]={1,-1,0,0};intdy[]={0,0,-1,1};intdfs(intx,inty){intcnt=1;for(inti=0;in||bm)continue;if(g[a][b]>=g[x][y])c
- 动态规划入门题目
wyf-student
动态规划代理模式算法笔记python学习leetcode
动态规划(记忆化搜索):将给定问题划分成若干子问题,直到子问题可以被直接解决。然后把子问题的答保存下来以免重复计算,然后根据子问题反推出原问题解的方法动态规划也称为递推(暴力深搜+记忆中间状态结果)其中:递推公式=dfs向下递归的公式递推列表的初始值=递归的边界文章目录一、爬楼梯思路解题方法复杂度复杂度二、三角形最小路径和思路思路解题方法复杂度复杂度三、大盗阿福思路解题方法复杂度一、爬楼梯Prob
- dfs专题(记忆化搜索)P1141 01迷宫——洛谷(题解)
2301_80718054
深度优先算法
题目描述有一个仅由数字00与11组成的�×�n×n格迷宫。若你位于一格00上,那么你可以移动到相邻44格中的某一格11上,同样若你位于一格11上,那么你可以移动到相邻44格中的某一格00上。你的任务是:对于给定的迷宫,询问从某一格开始能移动到多少个格子(包含自身)。输入格式第一行为两个正整数�,�n,m。下面�n行,每行�n个字符,字符只可能是00或者11,字符之间没有空格。接下来�m行,每行两个
- C语言-算法-搜索剪枝与记忆化搜索
SpongeG
C语言-算法算法c语言剪枝
Function题目描述对于一个递归函数w(a,b,c)w(a,b,c)w(a,b,c)如果a≤0a\le0a≤0或b≤0b\le0b≤0或c≤0c\le0c≤0就返回值$1$。如果a>20a>20a>20或b>20b>20b>20或c>20c>20c>20就返回w(20,20,20)w(20,20,20)w(20,20,20)如果a#defineMAX21longlongw(longlonga,
- 0-1最短路/记忆化搜索,LeetCode 514. 自由之路
EQUINOX1
leetcode每日一题leetcode算法职场和发展动态规划深度优先
一、题目1、题目描述电子游戏“辐射4”中,任务“通向自由”要求玩家到达名为“FreedomTrailRing”的金属表盘,并使用表盘拼写特定关键词才能开门。给定一个字符串ring,表示刻在外环上的编码;给定另一个字符串key,表示需要拼写的关键词。您需要算出能够拼写关键词中所有字符的最少步数。最初,ring的第一个字符与12:00方向对齐。您需要顺时针或逆时针旋转ring以使key的一个字符在12
- 搜索<2>——记忆化搜索与剪枝
seanli1008
算法深度优先算法
Part1:记忆化搜索记忆化搜索其实就是拿个数组记录下已经得到的值,这样再遇到的时候直接调用即可。P1464:虽然此题好像不用记忆化也行,但我们还是老老实实写个记忆化吧。没什么困难的地方,就是它叫你怎么干你就怎么干,记得开longlong。#includeusingnamespacestd;intmem[25][25][25];intw(intx,inty,intz){if(x20||y>20||
- 【洛谷题解】P1028 [NOIP2001 普及组] 数的计算
杨智123
算法c++深度优先
题目链接:[NOIP2001普及组]数的计算-洛谷难度:普及-设计知识点:深搜剪枝,记忆化搜索题意:给出正整数n,要求按如下方式构造数列:只有一个数字n的数列是一个合法的数列。在一个合法的数列的末尾加入一个正整数,但是这个正整数不能超过该数列最后一项的一半,可以得到一个新的合法数列。请你求出,一共有多少个合法的数列。两个合法数列a,b不同当且仅当两数列长度不同或存在一个正整数,使得i≤∣a∣,使得
- 个人力扣题目分类记录
零子若
LeetCode算法leetcode
目录思维模拟前缀和差分快速选择快排三分分治扫描线递归栈模拟栈单调栈哈希二分查找边界问题最大值最小值堆搜索回溯单纯回溯较复杂剪枝dfs回溯+状压构图bfs记忆化搜索回溯+dp·博弈问题(dp)BFS迭代复杂快速幂双指针绕弯题快慢指针题边界固定()二分滑动窗口桶思想链表位运算状压状压dp(deepdarkhard)字符串栈模拟回文串字符串运算树二叉树层序遍历先序遍历中序遍历二叉搜索树树+dfs(递归)
- Go使用记忆化搜索的套路【以20240121力扣每日一题为例】
白速龙王的回眸
leetcodeleetcode深度优先算法
题目分析这道题很明显记忆化搜索,用py很容易写出来PythonclassSolution:defsplitArray(self,nums:List[int],k:int)->int:n=len(nums)#寻找分割子数组中和的最小的最大值s=[0]fornuminnums:s.append(s[-1]+num)#print(s)@cachedefdfs(cur,tk):#前cur个分成tk个的最小
- 记忆化搜索--递归优化
码农C风
算法分享总结&&数据结构详解动态规划算法数据结构
你真的懂记忆化搜索吗Hello!我是C风,在Java学习之余,算法也不能落下了,数据结构与算法是编程的灵魂,我之前已经分享过循环赛和八皇后问题;这里我们再来看看这个有趣的题目,题目可能很简单,但是我们仅仅以此当作模板来看学习深搜和记忆化搜索。呵呵,有一天我做了一个梦,梦见了一种很奇怪的电梯。大楼的每一层楼都可以停电梯,而且第ii层楼(1=time[pos]){//时间够才采,不够就不进入递归了,就
- 力扣每日一题----2209. 用地毯覆盖后的最少白色砖块
乖的小肥羊
leetcode算法职场和发展
//这题我们先考虑的是如何从所有覆盖方案中找到最少数目的方案//一个暴搜就是暴力解法,比如有1000块,那么每次枚举填的起始位置的//话就是很大的时间复杂度了,就算用记忆化搜索也没用//那么动态规划可行吗,可行的,我们先来分析一下//枚举第一块的时候,我们有1000中选择,枚举第二块的时候,因为可以重复覆盖//又有1000种选择,那么枚举第二快的时候,第二块的状态是由枚举第一块的状态//转移过来的
- jquery实现的jsonp掉java后台
知了ing
javajsonpjquery
什么是JSONP?
先说说JSONP是怎么产生的:
其实网上关于JSONP的讲解有很多,但却千篇一律,而且云里雾里,对于很多刚接触的人来讲理解起来有些困难,小可不才,试着用自己的方式来阐释一下这个问题,看看是否有帮助。
1、一个众所周知的问题,Ajax直接请求普通文件存在跨域无权限访问的问题,甭管你是静态页面、动态网页、web服务、WCF,只要是跨域请求,一律不准;
2、
- Struts2学习笔记
caoyong
struts2
SSH : Spring + Struts2 + Hibernate
三层架构(表示层,业务逻辑层,数据访问层) MVC模式 (Model View Controller)
分层原则:单向依赖,接口耦合
1、Struts2 = Struts + Webwork
2、搭建struts2开发环境
a>、到www.apac
- SpringMVC学习之后台往前台传值方法
满城风雨近重阳
springMVC
springMVC控制器往前台传值的方法有以下几种:
1.ModelAndView
通过往ModelAndView中存放viewName:目标地址和attribute参数来实现传参:
ModelAndView mv=new ModelAndView();
mv.setViewName="success
- WebService存在的必要性?
一炮送你回车库
webservice
做Java的经常在选择Webservice框架上徘徊很久,Axis Xfire Axis2 CXF ,他们只有一个功能,发布HTTP服务然后用XML做数据传输。
是的,他们就做了两个功能,发布一个http服务让客户端或者浏览器连接,接收xml参数并发送xml结果。
当在不同的平台间传输数据时,就需要一个都能解析的数据格式。
但是为什么要使用xml呢?不能使json或者其他通用数据
- js年份下拉框
3213213333332132
java web ee
<div id="divValue">test...</div>测试
//年份
<select id="year"></select>
<script type="text/javascript">
window.onload =
- 简单链式调用的实现技术
归来朝歌
方法调用链式反应编程思想
在编程中,我们可以经常遇到这样一种场景:一个实例不断调用它自身的方法,像一条链条一样进行调用
这样的调用你可能在Ajax中,在页面中添加标签:
$("<p>").append($("<span>").text(list[i].name)).appendTo("#result");
也可能在HQ
- JAVA调用.net 发布的webservice 接口
darkranger
webservice
/**
* @Title: callInvoke
* @Description: TODO(调用接口公共方法)
* @param @param url 地址
* @param @param method 方法
* @param @param pama 参数
* @param @return
* @param @throws BusinessException
- Javascript模糊查找 | 第一章 循环不能不重视。
aijuans
Way
最近受我的朋友委托用js+HTML做一个像手册一样的程序,里面要有可展开的大纲,模糊查找等功能。我这个人说实在的懒,本来是不愿意的,但想起了父亲以前教我要给朋友搞好关系,再加上这也可以巩固自己的js技术,于是就开始开发这个程序,没想到却出了点小问题,我做的查找只能绝对查找。具体的js代码如下:
function search(){
var arr=new Array("my
- 狼和羊,该怎么抉择
atongyeye
工作
狼和羊,该怎么抉择
在做一个链家的小项目,只有我和另外一个同事两个人负责,各负责一部分接口,我的接口写完,并全部测联调试通过。所以工作就剩下一下细枝末节的,工作就轻松很多。每天会帮另一个同事测试一些功能点,协助他完成一些业务型不强的工作。
今天早上到公司没多久,领导就在QQ上给我发信息,让我多协助同事测试,让我积极主动些,有点责任心等等,我听了这话,心里面立马凉半截,首先一个领导轻易说
- 读取android系统的联系人拨号
百合不是茶
androidsqlite数据库内容提供者系统服务的使用
联系人的姓名和号码是保存在不同的表中,不要一下子把号码查询来,我开始就是把姓名和电话同时查询出来的,导致系统非常的慢
关键代码:
1, 使用javabean操作存储读取到的数据
package com.example.bean;
/**
*
* @author Admini
- ORACLE自定义异常
bijian1013
数据库自定义异常
实例:
CREATE OR REPLACE PROCEDURE test_Exception
(
ParameterA IN varchar2,
ParameterB IN varchar2,
ErrorCode OUT varchar2 --返回值,错误编码
)
AS
/*以下是一些变量的定义*/
V1 NUMBER;
V2 nvarc
- 查看端号使用情况
征客丶
windows
一、查看端口
在windows命令行窗口下执行:
>netstat -aon|findstr "8080"
显示结果:
TCP 127.0.0.1:80 0.0.0.0:0 &
- 【Spark二十】运行Spark Streaming的NetworkWordCount实例
bit1129
wordcount
Spark Streaming简介
NetworkWordCount代码
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
- Struts2 与 SpringMVC的比较
BlueSkator
struts2spring mvc
1. 机制:spring mvc的入口是servlet,而struts2是filter,这样就导致了二者的机制不同。 2. 性能:spring会稍微比struts快。spring mvc是基于方法的设计,而sturts是基于类,每次发一次请求都会实例一个action,每个action都会被注入属性,而spring基于方法,粒度更细,但要小心把握像在servlet控制数据一样。spring
- Hibernate在更新时,是可以不用session的update方法的(转帖)
BreakingBad
Hibernateupdate
地址:http://blog.csdn.net/plpblue/article/details/9304459
public void synDevNameWithItil()
{Session session = null;Transaction tr = null;try{session = HibernateUtil.getSession();tr = session.beginTran
- 读《研磨设计模式》-代码笔记-观察者模式
bylijinnan
java设计模式
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
import java.util.ArrayList;
import java.util.List;
import java.util.Observable;
import java.util.Observer;
/**
* “观
- 重置MySQL密码
chenhbc
mysql重置密码忘记密码
如果你也像我这么健忘,把MySQL的密码搞忘记了,经过下面几个步骤就可以重置了(以Windows为例,Linux/Unix类似):
1、关闭MySQL服务
2、打开CMD,进入MySQL安装目录的bin目录下,以跳过权限检查的方式启动MySQL
mysqld --skip-grant-tables
3、新开一个CMD窗口,进入MySQL
mysql -uroot
 
- 再谈系统论,控制论和信息论
comsci
设计模式生物能源企业应用领域模型
再谈系统论,控制论和信息论
偶然看
- oracle moving window size与 AWR retention period关系
daizj
oracle
转自: http://tomszrp.itpub.net/post/11835/494147
晚上在做11gR1的一个awrrpt报告时,顺便想调整一下AWR snapshot的保留时间,结果遇到了ORA-13541这样的错误.下面是这个问题的发生和解决过程.
SQL> select * from v$version;
BANNER
-------------------
- Python版B树
dieslrae
python
话说以前的树都用java写的,最近发现python有点生疏了,于是用python写了个B树实现,B树在索引领域用得还是蛮多了,如果没记错mysql的默认索引好像就是B树...
首先是数据实体对象,很简单,只存放key,value
class Entity(object):
'''数据实体'''
def __init__(self,key,value)
- C语言冒泡排序
dcj3sjt126com
算法
代码示例:
# include <stdio.h>
//冒泡排序
void sort(int * a, int len)
{
int i, j, t;
for (i=0; i<len-1; i++)
{
for (j=0; j<len-1-i; j++)
{
if (a[j] > a[j+1]) // >表示升序
- 自定义导航栏样式
dcj3sjt126com
自定义
-(void)setupAppAppearance
{
[[UILabel appearance] setFont:[UIFont fontWithName:@"FZLTHK—GBK1-0" size:20]];
[UIButton appearance].titleLabel.font =[UIFont fontWithName:@"FZLTH
- 11.性能优化-优化-JVM参数总结
frank1234
jvm参数性能优化
1.堆
-Xms --初始堆大小
-Xmx --最大堆大小
-Xmn --新生代大小
-Xss --线程栈大小
-XX:PermSize --永久代初始大小
-XX:MaxPermSize --永久代最大值
-XX:SurvivorRatio --新生代和suvivor比例,默认为8
-XX:TargetSurvivorRatio --survivor可使用
- nginx日志分割 for linux
HarborChung
nginxlinux脚本
nginx日志分割 for linux 默认情况下,nginx是不分割访问日志的,久而久之,网站的日志文件将会越来越大,占用空间不说,如果有问题要查看网站的日志的话,庞大的文件也将很难打开,于是便有了下面的脚本 使用方法,先将以下脚本保存为 cutlog.sh,放在/root 目录下,然后给予此脚本执行的权限
复制代码代码如下:
chmo
- Spring4新特性——泛型限定式依赖注入
jinnianshilongnian
springspring4泛型式依赖注入
Spring4新特性——泛型限定式依赖注入
Spring4新特性——核心容器的其他改进
Spring4新特性——Web开发的增强
Spring4新特性——集成Bean Validation 1.1(JSR-349)到SpringMVC
Spring4新特性——Groovy Bean定义DSL
Spring4新特性——更好的Java泛型操作API
Spring4新
- centOS安装GCC和G++
liuxihope
centosgcc
Centos支持yum安装,安装软件一般格式为yum install .......,注意安装时要先成为root用户。
按照这个思路,我想安装过程如下:
安装gcc:yum install gcc
安装g++: yum install g++
实际操作过程发现,只能有gcc安装成功,而g++安装失败,提示g++ command not found。上网查了一下,正确安装应该
- 第13章 Ajax进阶(上)
onestopweb
Ajax
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/
- How to determine BusinessObjects service pack and fix pack
blueoxygen
BO
http://bukhantsov.org/2011/08/how-to-determine-businessobjects-service-pack-and-fix-pack/
The table below is helpful. Reference
BOE XI 3.x
12.0.0.
y BOE XI 3.0 12.0.
x.
y BO
- Oracle里的自增字段设置
tomcat_oracle
oracle
大家都知道吧,这很坑,尤其是用惯了mysql里的自增字段设置,结果oracle里面没有的。oh,no 我用的是12c版本的,它有一个新特性,可以这样设置自增序列,在创建表是,把id设置为自增序列
create table t
(
id number generated by default as identity (start with 1 increment b
- Spring Security(01)——初体验
yang_winnie
springSecurity
Spring Security(01)——初体验
博客分类: spring Security
Spring Security入门安全认证
首先我们为Spring Security专门建立一个Spring的配置文件,该文件就专门用来作为Spring Security的配置