摘要: GeoIP + PHP的使用 方法一: 下载 GeoIP 的 PHP 文件geoip.inc,保存为 geoip.inc.php http://sjolzy.cn/php/GeoIP/bak/geoip.inc php使用代码 <?php include("geoip.inc.php"); $gi 阅读全文
posted @ 2017-04-19 14:23 yfceshi 阅读(1102) 评论(0) 推荐(0)
摘要: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements ofnums except n 阅读全文
posted @ 2017-04-19 13:27 yfceshi 阅读(198) 评论(0) 推荐(0)
摘要: 题目链接:http://www.patest.cn/contests/pat-a-practise/1028 题目: 1028. List Sorting (25) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 阅读全文
posted @ 2017-04-19 12:13 yfceshi 阅读(147) 评论(0) 推荐(0)
摘要: HDU 2883 kebab 题目链接 题意:有一个烧烤机,每次最多能烤 m 块肉。如今有 n 个人来买烤肉,每一个人到达时间为 si。离开时间为 ei,点的烤肉数量为 ci,每一个烤肉所需烘烤时间为 di。注意一个烤肉能够切成几份来烤 思路:把区间每一个点存起来排序后。得到最多2 * n - 1个 阅读全文
posted @ 2017-04-19 11:02 yfceshi 阅读(141) 评论(0) 推荐(0)
摘要: request.getSession.setAttribute()是获得当前会话的session,然后再setAttribute到session里面去,有效范围是session而不是request。 而request.setAttribute()是setAttribute到request中去。有效范 阅读全文
posted @ 2017-04-19 10:21 yfceshi 阅读(626) 评论(0) 推荐(0)
摘要: 字典树查询 #include<iostream> #include<cstring> #include<malloc.h> using namespace std; const int maxn = 30; typedef struct Trie{ int v; Trie *next[ maxn ] 阅读全文
posted @ 2017-04-19 09:22 yfceshi 阅读(163) 评论(0) 推荐(0)
摘要: 矩阵高速幂: 依据关系够建矩阵 , 高速幂解决. Arc of Dream Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 2164 Accep 阅读全文
posted @ 2017-04-19 08:25 yfceshi 阅读(153) 评论(0) 推荐(0)
摘要: 1.绑定的Class中加入一个Bool类型的属性 2. 该属性无需初始赋值,你执行就可以看到如图: Bool类型数据自己主动变成了复选框 3.当然了,你肯定想知道用户选择了哪些复选框,从而你就想获取选中复选框相应的这一行后面的数据做操作 --这一点我当时非常头疼,想有什么事件触发什么方法解决,感谢@ 阅读全文
posted @ 2017-04-18 21:41 yfceshi 阅读(813) 评论(0) 推荐(0)
摘要: 题目链接 题意:g(x) = k * x + b。f(x) 为Fibonacci数列。求f(g(x)),从x = 1到n的数字之和sum。并对m取模。 思路: 设A = |(1, 1),(1, 0)| sum = f(b) + f(k + b) + f(2k + b)...+f((n-1)k + b 阅读全文
posted @ 2017-04-18 20:16 yfceshi 阅读(142) 评论(0) 推荐(0)
摘要: 多线程编程 条件变量 假设说相互排斥锁是用于同步线程对共享数据的訪问的话。那么条件变量则是用于线程之间同步共享数据的值。条件变量提供了一种线程间的通信机制:当某个共享数据达到某个值得时候,唤醒等待这个共享数据的线程。 条件本身是由相互排斥量保护的。线程在改变条件状态前必须首先锁住相互排斥量,其它现成 阅读全文
posted @ 2017-04-18 19:10 yfceshi 阅读(312) 评论(0) 推荐(0)