- 博客(359)
- 资源 (1)
- 收藏
- 关注
原创 js实现页面复选框checkbox记忆功能
需求:在页面中复选框点击选中后,页面刷新或者关闭重新打开,选中的复选框依然是选中状态 开发思路:建立一个数组存放被选中的checkbox的id,将数组放到cookie中存储,复选框选中则往数组中加一个id,取消选中则从数据中删除该id,页面加载时从cookie中取出数组,根据数组中存储的id将checkbox的value值等于id的设置为勾选状态,批量操作时将批量操作的id从数据中删除,单条记录...
2019-09-30 17:19:53
1560
原创 mySql优化-timestamp不走索引及or不走索引优化
swx_order表和swx_order_provider表和swx_order_servicer表联查,where条件是last_modify_time,三张表的数据量都在40万以上,如下sql查询时间非常慢,而且主表(swx_order)时而走索引,时而不走索引,当last_modify_time时间区间很小时走索引,时间区间大之后就不走索引了,原因是如果加了索引的行数比较多,mysql的优化......
2019-03-29 16:48:32
10321
转载 java中的string equals 与 == 的比较
初学 Java 有段时间了,感觉似乎开始入了门,有了点儿感觉但是发现很多困惑和疑问而且均来自于最基础的知识折腾了一阵子又查了查书,终于对 String 这个特殊的对象有了点感悟大家先来看看一段奇怪的程序:public class TestString { public static void main(String[] args) { Str
2014-10-13 15:33:17
837
转载 设置span固定宽度
最近制作网站时发现给span设置宽度会无效,通过查阅CSS2标准中关于width 的定义发现,原来CSS中的 width 属性并不总是有效的,如果对象是 inline 对象,width 属性就会被忽略,Firefox 和 IE 是遵循CSS标准,因而直接设置span宽度会无效。如何设置span宽度:1.修改 span 为block 类型并设置float,但这不是完美的解决方法在sp
2014-07-31 11:24:50
1242
原创 SqlMapConfig.xml中的setting属性设置
maxRequests同时执行 SQL 语句的最大线程数。大于这个值的线程将阻塞直到另一个线程执行完成。不同的 DBMS有不同的限制值,但任何数据库都有这些限制。通常这个值应该至少是maxTransactions(参见以下)的 10 倍,并且总是大于 maxSessions 和maxTranactions。减小这个参数值通常能提高性能。例如:maxRequests=“256”缺省值
2014-07-29 19:04:16
1470
转载 sql之limit
本文整理转载自:http://blog.sina.com.cn/s/blog_53b95aec0100dba1.html一、基本SQL的limit语法的如以下形式SELECT * FROM table LIMIT [offset,]rows|rows OFFSET offset当省略offset的时候,offset作为0处理,表示提取查询到的前rows条数据;
2014-07-29 18:23:03
655
原创 zoj 3714 Java Beans(简单题)
1、http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3714
2014-04-17 11:07:58
1234
原创 zoj 3705 Applications(较复杂的模拟)
1、http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=37052、题目大意:有
2014-04-17 11:05:36
1482
原创 zoj 3713 In 7-bit(题目特难懂,十进制、二进制、十六进制的转换问题)
1、http://acm.hust.edu.cn/vjudge/contest/view.action?cid=44261#overview2、题目大意:给定一个字符串,按照
2014-04-17 10:54:14
2239
原创 Coder-Strike 2014 - Qualification Round A. Password Check(简单字符串)
1、http://codeforces.com/contest/411/problem/A2、题目:A. Password Checktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outp
2014-04-15 16:24:57
1103
原创 Coder-Strike 2014 - Qualification Round B. Multi-core Processor(模拟题)
Coder-Strike 2014 - Qualification Round B. Multi-core Processor(模拟题)The research center Q has developed a new multi-core processor. The processor consists of n cores and has k cells of cache memory. Consider the work of this processor.At each cycle eac
2014-04-15 16:23:12
1206
原创 Coder-Strike 2014 - Qualification Round C. Kicker(推理题)
Coder-Strike 2014 - Qualification Round C. Kicker(推理题)Kicker (table football) is a board game based on football, in which players control the footballers' figures mounted on rods by using bars to get the ball into the opponent's goal. When playing two on
2014-04-15 16:14:04
1131
原创 codeforces 416 A. Guess a number!(简单模拟题)
1、http://codeforces.com/problemset/problem/416/A2、题目:A. Guess a number!time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard ou
2014-04-14 20:04:56
947
原创 codeforces 416C C. Booking System(贪心)
1、http://codeforces.com/problemset/problem/416/C2、思路:贪心题目按照钱数从大到小排序,钱数相同按照人数从小到大排序,然后看是否有合适的椅子分配给这个团队,如果可以,就记录下来,输出即可3、题目:C. Booking Systemtime limit per test1 secondmemory limit
2014-04-13 22:56:02
1705
原创 codeforces 416 B. Art Union
1、http://codeforces.com/problemset/problem/416/B2、题目大意:有m副画,有n个画家,每个画家画完第一幅画之后才可以画第二幅画,每一副画需要n个画家来完成,只有第一个画家完成了,第二个画家才可以开始,求每幅画完成时的最短时间是多少3、思路这是一道dp的题目,dp[i][j]表示第i副画第j个画家完成时的最短时间状态转移方程:dp
2014-04-13 22:51:40
1388
原创 ZOJ 3785 What day is that day? (找规律)
1、http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=37852、题目:What day is that day? Time Limit: 2 Seconds
2014-04-13 22:42:29
2845
原创 编程之美一 旋转的二进制(待确认)
1、http://acm.hdu.edu.cn/contests/contest_showproblem.php?cid=498&pid=1004
2014-04-13 15:22:14
811
原创 fzu 2159 WuYou (中等难度)终于是AC了,太激动了。。。
1、http://acm.fzu.edu.cn/problem.php?pid=21592、题目大意:roblem 2159 WuYou Accept: 59 Submit: 304Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description有两个正整数A和B,这两个数的位数相
2014-04-08 20:20:58
1083
原创 Codeforces Round #239 (Div. 2) C. Triangle(简单数学+暴力)
Codeforces Round #239 (Div. 2) C. Triangle(简单数学+暴力)C. Triangletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a right triangle with legs of length a and b. Your task is to determine w
2014-03-30 17:15:50
1946
原创 Codeforces Round #239 (Div. 2) B. Garland(字符串统计题目,简单题)
Codeforces Round #239 (Div. 2) B. Garland(字符串统计题目,简单题)B. Garlandtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOnce little Vasya read an article in a magazine on how to make beautiful handmad
2014-03-30 17:08:50
1429
原创 Codeforces Round #239 (Div. 2) A. Line to Cashier(简单题)
Codeforces Round #239 (Div. 2) A. Line to Cashier(简单题)Little Vasya went to the supermarket to get some groceries. He walked about the supermarket for a long time and got a basket full of products. Now he needs to choose the cashier to pay for the product
2014-03-30 17:02:38
1582
原创 CodeForces 8A Train and Peter (简单模拟题)
1、http://codeforces.com/problemset/problem/8/A2、题目大意:给定一个字符串作为主串,后边有两个字符串连续的,判断后边的字符串正序和逆序是否都能找到简单的字符串题目A. Train and Petertime limit per test1 secondmemory limit per test
2014-03-29 20:54:16
1997
原创 CodeForces 9A Die Roll(简单题)
1、http://codeforces.com/problemset/problem/9/A2、题目A. Die Rolltime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard output
2014-03-29 11:32:52
1488
原创 CodeForces 7B Memory Manager(中等难度模拟题)
1、http://codeforces.com/problemset/problem/7/B2、这是一道模拟题,细节多,细心点就能对的题目:B. Memory Managertime limit per test1 secondmemory limit per test64 megabytesinputstandard input
2014-03-29 11:29:58
1848
原创 CodeForces 7A Kalevitch and Chess
1、http://codeforces.com/problemset/problem/7/A2、题目:A. Kalevitch and Chesstime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputsta
2014-03-29 11:28:26
1223
原创 codeforces 405A Gravity Flip (模拟题,简单)
1、http://codeforces.com/problemset/problem/405/A2、题目大意:给出一个矩阵,里边方格里有东西,然后将这个矩阵向右到,那么重力作用下就都向右走,求最后每一列有多少个题目不是很难,模拟也较简单3、题目:A. Gravity Fliptime limit per test1 secondmemor
2014-03-25 21:24:15
1119
原创 codeforces 405B Domino Effect (模拟题,中等难度,细心就能一遍AC)
1、http://codeforces.com/problemset/problem/405/B2、题目大意:给出n张牌和他们要倒的方向,我们知道一张倒的牌会压到其余的一边相邻的所有牌,同时题目又给出有往左倒的有往右倒的,如果往左倒的和往右倒的牌数相同的话就可以使得中间的牌还是站立的,最后输出有几张牌站立着3、解题思路题目其实很简单,模拟就行,分这么几种情况,如果第一张方向倒的是往
2014-03-25 21:20:36
1466
原创 Codeforces Round #237 (Div. 2) B. Marathon(模拟题)(待看。。。)
1、http://codeforces.com/contest/404/problem/B2、题目大意:马拉松运动员在一个a*a的举证沿着逆时针跑,每隔d米就喝一瓶水,求每次喝水的坐标,题目不难,但是比赛的时候一直wrong 在第八组样例,应该是乘除影响到了精度问题3、题目:B. Marathontime limit per test1 secondme
2014-03-20 01:28:18
1660
原创 Codeforces Round #237 (Div. 2) A. Valera and X(模拟题)
Codeforces Round #237 (Div. 2) A. Valera and X(模拟题)1、http://codeforces.com/contest/404/problem/A2、题目大意:给出一个n*n的矩阵,如果对角线是相同的字母,并且其余的是相同的字母,但是与对角线的不同,那么输出YES,否则输出NO3、题目:A. Valera and X
2014-03-20 01:27:48
1774
原创 hdu 2603 Wiskey's Power(数学题),待改正
1、http://acm.hdu.edu.cn/showproblem.php?pid=26032、题目大意一个物品重m,从3米处上抛,知道上抛的角度,3.5米处有隔板,撞到隔板后以相同角度往下走,求最终落地的坐标3、这是一道解物理方程的题目,但是不知道哪里错了题目:Wiskey's PowerTime Limit: 2000/1000 MS (Java/Others)
2014-03-19 12:03:46
1024
原创 hdu 2600 War(贪心)题目不难,比赛的时候还是错了一遍
1、http://acm.hdu.edu.cn/showproblem.php?pid=26002、题目大意:给出一个区间pq后边给出n个区间,最后输出没有被覆盖的最大的值3、题目:WarTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Sub
2014-03-18 15:41:36
1388
1
原创 hdu 2608 0 or 1(简单数论的题目)
1、http://acm.hdu.edu.cn/showproblem.php?pid=26082、题目大意:给定一个n,定义S(n) = T(1) + T(2) + T(3)…..+T(n),T(n)是n的所有因子的和,最后输出S(n)%2的值3、解题思路(参考网上)比赛的时候出了这么一道题目,当时拿到题目首先想到的是一个一个的计算,但是发现n的值太大了,这样做无疑会导致超时,然
2014-03-18 11:54:01
1387
原创 hdu 2601 An easy problem(数学题,long long 错了n遍)
1、http://acm.hdu.edu.cn/showproblem.php?pid=26012、题目大意:给定一个n,求i*j+i+j=n,且03.思路:当i=j时i取得最大值,解方程求出i最大值,循环即可4、AC代码:#include#include#include#includeusing namespace std;int main(){ in
2014-03-17 21:22:13
1145
原创 codeforces Round # 236(DIV 2)B. Trees in a Row
1、http://codeforces.com/contest/402/problem/B2、题目大意:有n棵树,知道这n棵树的高度,现在要使得这n棵树满足这样的关系,第i棵树比第i-1棵树高k米,每棵树都可以增加高度或者是减少高度,求经过多少步可以使得这n棵树满足条件,输出最小的步数,然后输出每步的具体操作。3、解题思路:一开始还以为是道DP的题目,看着数据不大,想用模拟试一下,结果测试
2014-03-17 01:48:02
1373
原创 codeforces Round #236(DIV 2)A. Nuts(数学类计算题)
1、http://codeforces.com/contest/402/problem/A2、题目大意:一个箱子可以最多被分成k部分,现在有a个坚果,有b个隔板,x个隔板可以将箱子分成(x+1)个部分每一部分最多装v个坚果,求将这些坚果全部装进箱子里,最少用几个箱子?3、解题思路:先计算出这些隔板可以隔多少个满的箱子(到最大限度k), 求出一个这样满的箱子能装的坚果数,然后分这
2014-03-17 01:37:59
1251
原创 hdu 1677 Nested Dolls(贪心+LIS模板题)
1、http://acm.hdu.edu.cn/showproblem.php?pid=16772、题目大意:有n个盒子,知道宽和高,如果第一个盒子的宽和高是w1,h1,第二个的宽和高是w2,h2,如果w13、思路分析:这道题目和装娃娃的题目有点像,首先得排序,这个很关键,按照w从大到小排序,再按照h从小到大排序,一开始还以为只要都按照从大到小就可以,但是对于w相同的盒子此排序就不
2014-03-12 22:30:45
1918
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人