- 博弈论笔记总结
Royen_
博弈论博弈论acm竞赛
博弈论一、四大博弈模型1.巴什博弈(BashGame)2.斐波那契博弈(FibonacciGame)3.威佐夫博弈(WythoffGame)4.尼姆博弈(NimGame)二、SG函数0.前言1.前置知识公平组合游戏(ICG游戏)必胜态与必败态DAG(有向无环图)中的博弈2.SG函数Mex运算定义性质SG定理解题方法参考资料一、四大博弈模型1.巴什博弈(BashGame)Problem一堆n个物品,
- ACM板子
GGood_Name
cocoamacosobjective-cc++
文章目录板子:初始化:快读:快速幂:GCD/LCM:组合数:欧拉筛:大整数质因数分解:分解质因数:求(1e12)内质数:KMP:最小生成树:最短路LCA查找最近祖先二分图匹配RMQ区间最小值:01字典树:字典树:线段树:最长上升子序列:最长公共子序列:01背包中国剩余定理模板*L**u**c**a**s*定理。扩展Lucas定理hash+二分求最长回文串**尼姆博弈模型**莫队算法权值线段树回文树
- 博弈论基础知识与SG函数
Lunar Arc
数学博弈论算法c++数学
博弈论简介要素博弈的类型1.合作博弈和非合作博弈2.静态博弈和动态博弈3.完全信息博弈和不完全信息博弈纳什均衡经典案例一经典案例二四大博弈模型一、巴什博弈二、尼姆博弈※SG函数三、斐波那契博弈四、威佐夫博弈SG函数深入学习SG函数例题练习参考文献写在前面:本文很长,若有兴趣,请耐心阅读。简介博弈论,又称为对策论(GameTheory)、赛局理论等。博弈论主要研究公式化的激励结构间的相互作用,是研究
- 左神高阶进阶班4 (尼姆博弈问题、k伪进制、递归到动态规划、优先级结合的递归套路、子串的递归套路,子序列的递归套路,动态规划的压缩技巧)
Studying~
算法
目录【案例1尼姆博弈问题】【题目描述】【思路解析】【代码实现】【案例2k伪进制问题】【题目描述】【思路解析】【代码实现】【案例3最大路径和】【题目描述】【思路解析】【代码实现】【案例4优先级的递归套路】【题目描述】【思路解析】【代码实现】【案例5子串的递归套路动态规划的空间压缩技巧】【题目描述】【思路解析】【代码实现】【案例6子序列的递归问题】【问题描述】【思路解析】【代码实现】大家觉得写得可以的
- 尼姆博弈详解
GocNeverGiveUp
博弈论
转载自http://blog.csdn.net/ACM_cxlove?viewmode=contentsby---cxlove(三)尼姆博奕(NimmGame):有三堆各若干个物品,两个人轮流从某一堆取任意多的物品,规定每次至少取一个,多者不限,最后取光者得胜。这种情况最有意思,它与二进制有密切关系,我们用(a,b,c)表示某种局势,首先(0,0,0)显然是奇异局势,无论谁面对奇异局势,都必然失败
- python编程考试题目大全
彭_江南
爬虫djangopythondjango
1.题目名称:批阅奏章某朝皇帝有大臣n名(1len(B):A,B=B,Aout_put=[]foriinrange(len(A),0,-1):forjinrange(0,len(A)-i+1):ifA[j:j+i]inB:print(A[j:j+i])out_put.append(A[j:j+i])ifout_put:break5.题目名称:尼姆博弈时间限制:1000ms内存限制:256M题目描述
- acm-博弈论基础知识点详细总结(含证明推导分析)
&*^*&
博弈论算法机器学习线性代数
引言本文主要介绍acm中有关博弈论的基础知识点,意在梳理博弈论学习的总体框架与基本逻辑,使读者和作者都能够对博弈论的思维方式有更深入的理解。博弈论:引言巴什博奕经典巴什博奕巴什博奕扩展尼姆博弈及扩展普通尼姆博弈anti-Nim和游戏(反尼姆博弈)Nim-k博弈Nim-m博弈SG函数的引入尼姆博弈的扩展威佐夫博弈斐波拉契博弈双人零和博弈其他博弈take&break模型翻转硬币博弈阶梯博弈变式图上删边
- 尼姆博弈(所有类型分析)
joesx
c++算法游戏
第一类型:尼姆游戏:定义有n堆各若干个物品,两个人轮流从某一堆取任意多的物品,规定每次至少取一个,多者不限,最后取光者得胜。尼姆和:把所有堆中物体的个数进行异或运算直接求取尼姆和尼姆和为零先手必输,后者必胜,否则反之第二个类型:反尼姆游戏:定义有n堆各若干个物品,两个人轮流从某一堆取任意多的物品,规定每次至少取一个,多者不限,最后取光者输。先手必胜的条件为①:所有堆的石子数均=1,且有偶数堆。②:
- HDU1907 John
tanjunming2020
题解c++题解
HDU1907John题目大意JohnJohnJohn和弟弟玩游戏。有nnn堆石子,每个玩家轮流从其中一堆取若干个,取到最后一棵石子的人失败。JohnJohnJohn先手,双方都采用最优策略,问谁能获胜,如果JohnJohnJohn能获胜则输出JohnJohnJohn,否则输出BrotherBrotherBrother。题解首先,如果这nnn堆石子中每堆石子都只有一个石子,那么显然当nnn为偶数时
- 【每日一道智力题】之 轮流取石子(简单的尼姆博弈)
张栩睿(已黑化)
每日一题智力题c语言算法开发语言
题目:一共有N颗石子(或者其他乱七八糟的东西),每次最多取M颗最少取1颗,A,B轮流取,谁最后会获胜?(假设他们每次都取最优解)。解答:结论:假如A先取,NM,若N能被(M+1)整除时,A失败;若N不能被(M+1)整除时,A获胜;假如B先取,(同上);分析:(以A先手为例)NM时,A要想赢,必须要在自己倒数第二次取完的时候还剩下(M+1)颗石子(此时A和B还可以再取一次就可以分出胜负游戏就结束了)
- 【每日一道智力题】之 轮流取石子(尼姆博弈的详解)
张栩睿(已黑化)
智力题算法每日一题开发语言学习算法
博客主页:张栩睿的博客主页欢迎关注:点赞+收藏+留言系列专栏:c语言学习家人们写博客真的很花时间的,你们的点赞和关注对我真的很重要,希望各位路过的朋友们能多多点赞并关注我,我会随时互关的,欢迎你们的私信提问,也期待你们的转发!希望大家关注我,你们将会看到更多精彩的内容!!!前言:在昨天的每日一题里面,我们对于尼姆博弈相关的问题有了一定的了解简单的尼姆博弈,今天我们就来进一步了解这个博弈。母题:有若
- hdu1907John(反nim博弈)
baizhen6460
java数据结构与算法
JohnTimeLimit:5000/1000MS(Java/Others)MemoryLimit:65535/32768K(Java/Others)TotalSubmission(s):6162AcceptedSubmission(s):3584ProblemDescriptionLittleJohnisplayingveryfunnygamewithhisyoungerbrother.Ther
- 常见博弈模型
塔子哥来了
博弈论算法共识算法人工智能机器学习
目录:一、巴什博弈(BashGame)二、尼姆博弈(NimmGame)三、威佐夫博奕(WythoffGame)四.斐波那契博弈五.环形博弈一、巴什博弈(BashGame)情形:有n个石子,每个人最少拿a个石子,最多拿b个石子,问先手赢还是后手赢.分析:当n=a+b时,先手必输.推广而来,n=k*(a+b)时,先手必输.其他情况先手必赢.证明:很简单,略了结论:当n%(a+b)==0时,先手必输,否
- 牛客小白月赛2 题解
渲染明天。
竞赛题解欧拉回路算法c++
牛客小白月赛2C.真真假假(签到)E.是是非非(尼姆博弈)G.文B.小马过河D.虚虚实实(并查集判断欧拉路径)H.武A.数字方阵(反魔方阵构造)F.黑黑白白J.美(构造)C.真真假假(签到)题解:将所有的头文件弄成一个字符串,然后直接用find()函数搜,简单粗暴,不愧是签到题#includeusingnamespacestd;intmain(){ios::sync_with_stdio(fals
- (HDU - 2176)取(m堆)石子游戏(尼姆博弈)
AC__dream
博弈论
题目链接:取(m堆)石子游戏-HDU2176-VirtualJudge(ppsucxtt.cn)这道题目考察的还是对尼姆博弈的理解,一开始给定n堆石子,我们将n堆石子数目进行异或,当异或值为0时先手必败,反之先手必胜,如果n堆石子的数目异或值不为0,先手的操作目的就是使其异或值重新归0来使后手进入必败态,不妨假设n堆石子的数目分别为a1,a2,a3,……,an,设a1^a2^a3^……^an=k,
- 课程总结 第六周
钟钟终
课程总结算法
收获:尼姆博奕:看了好多博客,开始还是比较容易理解,深层面的较难看懂,尤其是尼姆博奕的变型,还有后面涉及SG打表那一块。总结一下自己的认识,简单的跳过。先看奇异局势,(s[1],s[2],s[3]……s[n]),逐步进行异或运算。若结果为0:那么先手必败;若不为0,那么先手必胜。(也就是说面对奇异局势的人必输)阶梯博弈算法(尼姆博弈进阶):啃了两三天,头都晕了,证明过程也看的迷迷糊糊。题目形式:一
- ACM常见博弈(更新中)
谁抢了我的happypeople
大佬的博客对比之下,感觉到羞耻,这个博客就平时我自己不记得翻翻看吧巴什博弈(BashGame)题意:n个石子,两人轮流取,可以自己挑选1到m个,谁取完最后一堆谁获胜.结论:n%(m+1)==0n\%(m+1)==0n%(m+1)==0先手必败,否则必胜尼姆博弈论(NimGame)题意:n堆石子,每堆石子有a[i]个,每人轮流取,每次取某堆石子至少一个,最后取完者胜。结论a1⨁a2⨁....⨁ana
- 阶梯博弈算法详解(尼姆博弈进阶)
我爱AI_AI爱我
博弈
1.什么是阶梯博弈?阶梯的序号如图所示,地面表示第0号阶梯。每次都可以将一个阶梯上的石子向其左侧移动任意个石子,没有可以移动的空间时(及所有石子都位于地面时)输。2.阶梯博弈的算法阶梯博弈等效为奇数号阶梯的尼姆博弈。为什么呢?假设我们是先手。我们按照尼姆博弈的原则进行第一次移动。如果对方移动奇数号阶梯的石子,我们继续按照尼姆博弈的原则移动。如果对方移动的是偶数号阶梯的石子,及对方将偶数号阶梯的石子
- 连续取k个石子游戏(sg函数模板题)
run around
博弈论
/*一个状态的sg值就是不等于它的后继状态的sg值的最小非负整数sg[x]为n代表在当前x的状态下,我通过操作可以到达任意一个小于n的状态,就可以转移成尼姆博弈了。给n个连续的石子,每次操作取走连续的k个,问先手胜负*/#include#includeusingnamespacestd;intsg[55];intn,k;intmex(intpos)//求当石子数为pos个时的sg函数值{if(po
- hdu 1850 Being a Good Boy in Spring Festival (尼姆博弈)
Alzh
尼姆博奕
BeingaGoodBoyinSpringFestival一年在外父母时刻牵挂春节回家你能做几天好孩子吗寒假里尝试做做下面的事情吧陪妈妈逛一次菜场悄悄给爸爸买个小礼物主动地强烈地要求洗一次碗某一天早起给爸妈用心地做回早餐如果愿意你还可以和爸妈说咱们玩个小游戏吧ACM课上学的呢~下面是一个二人小游戏:桌子上有M堆扑克牌;每堆牌的数量分别为Ni(i=1…M);两人轮流进行;每走一步可以任意选择一堆并取
- 蓝桥杯 历届试题 高僧斗法(尼姆博弈)
想要成为富婆的我每天都在努力
C/C++蓝桥杯算法设计与分析博弈论
历届试题高僧斗法时间限制:1.0s内存限制:256.0MB问题描述古时丧葬活动中经常请高僧做法事。仪式结束后,有时会有“高僧斗法”的趣味节目,以舒缓压抑的气氛。节目大略步骤为:先用粮食(一般是稻米)在地上“画”出若干级台阶(表示N级浮屠)。又有若干小和尚随机地“站”在某个台阶上。最高一级台阶必须站人,其它任意。(如图1所示)两位参加游戏的法师分别指挥某个小和尚向上走任意多级的台阶,但会被站在高级台
- HDU 1730 Northcott Game 博弈论 尼姆博弈
harry1213812138
每年一题博弈论
原题链接:HDU1730NorthcottGame题目描述思路我们先从最终态也就是必败态看,最终所有黑白两棋之间的距离为0,也就是说,每个黑白棋之间的距离异或起来是0,这就是必败态。为什么呢,我们来推一下,当前一个人走完,后一个人一定可以走到使得所有距离异或起来为0的某个位置,而另一个人只能面对这个状态走棋而不能再创造这个状态,如此反复,直到最后一轮,其面对的状态仍是必败态,也就是最终态,所有黑白
- Slime and Stones(威佐夫博弈扩展)
Kurihada
博弈
SlimeandStones题目传送门SlimeandStones附上大佬博弈博客简单易懂的博弈论讲解(巴什博弈、尼姆博弈、威佐夫博弈、斐波那契博弈、SG定理)题目大意给你两堆石子,每次可以单独拿一堆中的任意值,或者两堆都拿,但是两堆拿的值需满足∣x−y∣≤k|x−y|≤k∣x−y∣≤k思路显然的威佐夫博弈的扩展威佐夫博弈中如果想拿两堆的话,拿的石子必须相同,即x=yx=yx=y也就是从原来的y=
- 尼姆博弈(Nimm Game)
小酷miki
算法
引用:http://blog.csdn.net/shuangde800/article/details/7443566问题模型:有三堆各若干个物品,两个人轮流从某一堆取任意多的物品,规定每次至少取一个,多者不限,最后取光者获胜。Bouton定理:先手能够在非平衡博弈中获胜,而后手能够在平衡博弈中获胜。平衡条件:所有堆二进制表示时,每一位上1的1的个数都是偶数。若游戏开始时处于非平衡博弈。这样,先手
- atcoder D - Game on Tree(树形dp+尼姆博弈)
awow80285
题目链接:http://agc017.contest.atcoder.jp/tasks/agc017_d题解:简单的树上的尼姆博弈,这个应该看的出来然后就是简单的树形dp然后异或一下就行。#include#include#include#includeusingnamespacestd;constintM=1e5+10;vectorvc[M];intdp[M];intdfs(intu,intpre
- 博弈论(巴什博弈,威佐夫博弈,尼姆博弈,附有模板及题目)
nefu_zc
一、巴什博弈描述:n个数,一次最多报m个,最后取光的人获胜结论:当n为m+1的倍数时,后手必胜,其它情况均是先手必胜模板题及模板:A题hdu1846BraveGame#includeusingnamespacestd;intt,m,n;intmain(){ios::sync_with_stdio(false);cin>>t;while(t--){cin>>n>>m;if(n%(m+1)==0)co
- HDU 取(2堆)石子游戏 2177 威佐夫博弈+尼姆博弈
xinwen1995
ACM博弈
#include取2堆#includeusingnamespacestd;//取任意一堆的时候,为什么不对量少的那一堆取呢,因为(k2-k1)*t==k1k1减小,这个等式永远成立不了intmain(){doublet=(sqrt(5)+1)/2.0;intm,n,k,i,k1,k2,temp;while(cin>>m>>n,m+n){k=n-m;if((int)(k*t)==m){cout0;i
- 三个博弈-巴什博奕、威佐夫博弈、尼姆博弈。acm博弈算法笔记HDU 2149,1850,1527
winter2121
ACM**博弈*******
博弈论(一)、acm博弈基础算法BashGame,NimGame和WythoffGame(即巴什博奕、尼姆博弈、威佐夫博弈)BashGame:同余理论NimGame:异或理论WythoffGame:黄金分割(二)、三个博弈。1、巴什博奕。只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者得胜。如果n=m+1,那么由于一次最多只能取m个,所以,无论先取者拿走多少
- ACM三大常用博弈
my_acm
数学博弈
尼姆博弈(NimmGame)http://baike.baidu.com/link?url=QITS5sNMwXZsoxh5tAwYBsa-_GgUd66Vb4fjreoKkqlXmXSyPEE5qVXfxnq1IGRe4AgTxC6lFwROoKx7hZNwbK威佐夫博弈(WythoffGame)http://baike.baidu.com/link?url=X8KSAgEQ2b86gs6bFx
- LeetCode:Nim Game - 尼姆博弈
chenzai1946
1、题目名称NimGame(尼姆博弈)2、题目地址https://leetcode.com/problems/nim-game/3、题目内容英文:YouareplayingthefollowingNimGamewithyourfriend:Thereisaheapofstonesonthetable,eachtimeoneofyoutaketurnstoremove1to3stones.Theon
- ztree异步加载
3213213333332132
JavaScriptAjaxjsonWebztree
相信新手用ztree的时候,对异步加载会有些困惑,我开始的时候也是看了API花了些时间才搞定了异步加载,在这里分享给大家。
我后台代码生成的是json格式的数据,数据大家按各自的需求生成,这里只给出前端的代码。
设置setting,这里只关注async属性的配置
var setting = {
//异步加载配置
- thirft rpc 具体调用流程
BlueSkator
中间件rpcthrift
Thrift调用过程中,Thrift客户端和服务器之间主要用到传输层类、协议层类和处理类三个主要的核心类,这三个类的相互协作共同完成rpc的整个调用过程。在调用过程中将按照以下顺序进行协同工作:
(1) 将客户端程序调用的函数名和参数传递给协议层(TProtocol),协议
- 异或运算推导, 交换数据
dcj3sjt126com
PHP异或^
/*
* 5 0101
* 9 1010
*
* 5 ^ 5
* 0101
* 0101
* -----
* 0000
* 得出第一个规律: 相同的数进行异或, 结果是0
*
* 9 ^ 5 ^ 6
* 1010
* 0101
* ----
* 1111
*
* 1111
* 0110
* ----
* 1001
- 事件源对象
周华华
JavaScript
<!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
- MySql配置及相关命令
g21121
mysql
MySQL安装完毕后我们需要对它进行一些设置及性能优化,主要包括字符集设置,启动设置,连接优化,表优化,分区优化等等。
一 修改MySQL密码及用户
 
- [简单]poi删除excel 2007超链接
53873039oycg
Excel
采用解析sheet.xml方式删除超链接,缺点是要打开文件2次,代码如下:
public void removeExcel2007AllHyperLink(String filePath) throws Exception {
OPCPackage ocPkg = OPCPac
- Struts2添加 open flash chart
云端月影
准备以下开源项目:
1. Struts 2.1.6
2. Open Flash Chart 2 Version 2 Lug Wyrm Charmer (28th, July 2009)
3. jofc2,这东西不知道是没做好还是什么意思,好像和ofc2不怎么匹配,最好下源码,有什么问题直接改。
4. log4j
用eclipse新建动态网站,取名OFC2Demo,将Struts2 l
- spring包详解
aijuans
spring
下载的spring包中文件及各种包众多,在项目中往往只有部分是我们必须的,如果不清楚什么时候需要什么包的话,看看下面就知道了。 aspectj目录下是在Spring框架下使用aspectj的源代码和测试程序文件。Aspectj是java最早的提供AOP的应用框架。 dist 目录下是Spring 的发布包,关于发布包下面会详细进行说明。 docs&nb
- 网站推广之seo概念
antonyup_2006
算法Web应用服务器搜索引擎Google
持续开发一年多的b2c网站终于在08年10月23日上线了。作为开发人员的我在修改bug的同时,准备了解下网站的推广分析策略。
所谓网站推广,目的在于让尽可能多的潜在用户了解并访问网站,通过网站获得有关产品和服务等信息,为最终形成购买决策提供支持。
网站推广策略有很多,seo,email,adv
- 单例模式,sql注入,序列
百合不是茶
单例模式序列sql注入预编译
序列在前面写过有关的博客,也有过总结,但是今天在做一个JDBC操作数据库的相关内容时 需要使用序列创建一个自增长的字段 居然不会了,所以将序列写在本篇的前面
1,序列是一个保存数据连续的增长的一种方式;
序列的创建;
CREATE SEQUENCE seq_pro
2 INCREMENT BY 1 -- 每次加几个
3
- Mockito单元测试实例
bijian1013
单元测试mockito
Mockito单元测试实例:
public class SettingServiceTest {
private List<PersonDTO> personList = new ArrayList<PersonDTO>();
@InjectMocks
private SettingPojoService settin
- 精通Oracle10编程SQL(9)使用游标
bijian1013
oracle数据库plsql
/*
*使用游标
*/
--显示游标
--在显式游标中使用FETCH...INTO语句
DECLARE
CURSOR emp_cursor is
select ename,sal from emp where deptno=1;
v_ename emp.ename%TYPE;
v_sal emp.sal%TYPE;
begin
ope
- 【Java语言】动态代理
bit1129
java语言
JDK接口动态代理
JDK自带的动态代理通过动态的根据接口生成字节码(实现接口的一个具体类)的方式,为接口的实现类提供代理。被代理的对象和代理对象通过InvocationHandler建立关联
package com.tom;
import com.tom.model.User;
import com.tom.service.IUserService;
- Java通信之URL通信基础
白糖_
javajdkwebservice网络协议ITeye
java对网络通信以及提供了比较全面的jdk支持,java.net包能让程序员直接在程序中实现网络通信。
在技术日新月异的现在,我们能通过很多方式实现数据通信,比如webservice、url通信、socket通信等等,今天简单介绍下URL通信。
学习准备:建议首先学习java的IO基础知识
URL是统一资源定位器的简写,URL可以访问Internet和www,可以通过url
- 博弈Java讲义 - Java线程同步 (1)
boyitech
java多线程同步锁
在并发编程中经常会碰到多个执行线程共享资源的问题。例如多个线程同时读写文件,共用数据库连接,全局的计数器等。如果不处理好多线程之间的同步问题很容易引起状态不一致或者其他的错误。
同步不仅可以阻止一个线程看到对象处于不一致的状态,它还可以保证进入同步方法或者块的每个线程,都看到由同一锁保护的之前所有的修改结果。处理同步的关键就是要正确的识别临界条件(cri
- java-给定字符串,删除开始和结尾处的空格,并将中间的多个连续的空格合并成一个。
bylijinnan
java
public class DeleteExtraSpace {
/**
* 题目:给定字符串,删除开始和结尾处的空格,并将中间的多个连续的空格合并成一个。
* 方法1.用已有的String类的trim和replaceAll方法
* 方法2.全部用正则表达式,这个我不熟
* 方法3.“重新发明轮子”,从头遍历一次
*/
public static v
- An error has occurred.See the log file错误解决!
Kai_Ge
MyEclipse
今天早上打开MyEclipse时,自动关闭!弹出An error has occurred.See the log file错误提示!
很郁闷昨天启动和关闭还好着!!!打开几次依然报此错误,确定不是眼花了!
打开日志文件!找到当日错误文件内容:
--------------------------------------------------------------------------
- [矿业与工业]修建一个空间矿床开采站要多少钱?
comsci
地球上的钛金属矿藏已经接近枯竭...........
我们在冥王星的一颗卫星上面发现一些具有开采价值的矿床.....
那么,现在要编制一个预算,提交给财政部门..
- 解析Google Map Routes
dai_lm
google api
为了获得从A点到B点的路劲,经常会使用Google提供的API,例如
[url]
http://maps.googleapis.com/maps/api/directions/json?origin=40.7144,-74.0060&destination=47.6063,-122.3204&sensor=false
[/url]
从返回的结果上,大致可以了解应该怎么走,但
- SQL还有多少“理所应当”?
datamachine
sql
转贴存档,原帖地址:http://blog.chinaunix.net/uid-29242841-id-3968998.html、http://blog.chinaunix.net/uid-29242841-id-3971046.html!
------------------------------------华丽的分割线--------------------------------
- Yii使用Ajax验证时,如何设置某些字段不需要验证
dcj3sjt126com
Ajaxyii
经常像你注册页面,你可能非常希望只需要Ajax去验证用户名和Email,而不需要使用Ajax再去验证密码,默认如果你使用Yii 内置的ajax验证Form,例如:
$form=$this->beginWidget('CActiveForm', array( 'id'=>'usuario-form',&
- 使用git同步网站代码
dcj3sjt126com
crontabgit
转自:http://ued.ctrip.com/blog/?p=3646?tn=gongxinjun.com
管理一网站,最开始使用的虚拟空间,采用提供商支持的ftp上传网站文件,后换用vps,vps可以自己搭建ftp的,但是懒得搞,直接使用scp传输文件到服务器,现在需要更新文件到服务器,使用scp真的很烦。发现本人就职的公司,采用的git+rsync的方式来管理、同步代码,遂
- sql基本操作
蕃薯耀
sqlsql基本操作sql常用操作
sql基本操作
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
蕃薯耀 2015年6月1日 17:30:33 星期一
&
- Spring4+Hibernate4+Atomikos3.3多数据源事务管理
hanqunfeng
Hibernate4
Spring3+后不再对JTOM提供支持,所以可以改用Atomikos管理多数据源事务。Spring2.5+Hibernate3+JTOM参考:http://hanqunfeng.iteye.com/blog/1554251Atomikos官网网站:http://www.atomikos.com/ 一.pom.xml
<dependency>
<
- jquery中两个值得注意的方法one()和trigger()方法
jackyrong
trigger
在jquery中,有两个值得注意但容易忽视的方法,分别是one()方法和trigger()方法,这是从国内作者<<jquery权威指南》一书中看到不错的介绍
1) one方法
one方法的功能是让所选定的元素绑定一个仅触发一次的处理函数,格式为
one(type,${data},fn)
&nb
- 拿工资不仅仅是让你写代码的
lampcy
工作面试咨询
这是我对团队每个新进员工说的第一件事情。这句话的意思是,我并不关心你是如何快速完成任务的,哪怕代码很差,只要它像救生艇通气门一样管用就行。这句话也是我最喜欢的座右铭之一。
这个说法其实很合理:我们的工作是思考客户提出的问题,然后制定解决方案。思考第一,代码第二,公司请我们的最终目的不是写代码,而是想出解决方案。
话粗理不粗。
付你薪水不是让你来思考的,也不是让你来写代码的,你的目的是交付产品
- 架构师之对象操作----------对象的效率复制和判断是否全为空
nannan408
架构师
1.前言。
如题。
2.代码。
(1)对象的复制,比spring的beanCopier在大并发下效率要高,利用net.sf.cglib.beans.BeanCopier
Src src=new Src();
BeanCopier beanCopier = BeanCopier.create(Src.class, Des.class, false);
- ajax 被缓存的解决方案
Rainbow702
JavaScriptjqueryAjaxcache缓存
使用jquery的ajax来发送请求进行局部刷新画面,各位可能都做过。
今天碰到一个奇怪的现象,就是,同一个ajax请求,在chrome中,不论发送多少次,都可以发送至服务器端,而不会被缓存。但是,换成在IE下的时候,发现,同一个ajax请求,会发生被缓存的情况,只有第一次才会被发送至服务器端,之后的不会再被发送。郁闷。
解决方法如下:
① 直接使用 JQuery提供的 “cache”参数,
- 修改date.toLocaleString()的警告
tntxia
String
我们在写程序的时候,经常要查看时间,所以我们经常会用到date.toLocaleString(),但是date.toLocaleString()是一个过时 的API,代替的方法如下:
package com.tntxia.htmlmaker.util;
import java.text.SimpleDateFormat;
import java.util.
- 项目完成后的小总结
xiaomiya
js总结项目
项目完成了,突然想做个总结但是有点无从下手了。
做之前对于客户端给的接口很模式。然而定义好了格式要求就如此的愉快了。
先说说项目主要实现的功能吧
1,按键精灵
2,获取行情数据
3,各种input输入条件判断
4,发送数据(有json格式和string格式)
5,获取预警条件列表和预警结果列表,
6,排序,
7,预警结果分页获取
8,导出文件(excel,text等)
9,修