DBConfig.properties的文件内容:
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/wireless_db?useUnicode=true&characterEncoding=utf-8
username=root
password=123
1.创建对象
Properties prop =...
分类:
其他好文 时间:
2015-08-25 21:52:14
阅读次数:
99
自定义函数,需要写def、函数名、括号、参数、冒号。
函数遇到return则会停止运行并返回值。
如果没有return语句,则也是会返回值的,只不过返回的是None:...
分类:
其他好文 时间:
2015-08-25 21:53:00
阅读次数:
156
#include
#include
#include
#include using namespace std;typedef vector vec;
typedef vector mat;
const int M=10007;
typedef long long LL;
mat mul(mat &A...
分类:
其他好文 时间:
2015-08-25 21:54:13
阅读次数:
153
该题一开始我用multiset写了一发,写的比较裸,TLE了 。 后来队友想到了一个比较好的方法 :将两个结构体排序之后,从大到小枚举Alice的h,对于每个h,将Bob中满足h小于当前h的牌的w加进multiset,然后用二分函数查找一下大于等于当前w的第一个数,当前迭代器的上一个指针就是小于当前w的最大w,找到就删除。那么也就是我们用了这样的贪心策略:对于Alice的每一张牌,要覆盖一张Bob...
分类:
其他好文 时间:
2015-08-25 21:52:14
阅读次数:
134
题目:
Travelling Salesman Problem
Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 906 Accepted Submission(s): 331
Special Judge
Probl...
分类:
其他好文 时间:
2015-08-25 21:52:05
阅读次数:
189
Camera驱动相关文件:
1、ProjectConfig.mk 配置相关信息,定义主副摄像头。和其他信息
2、kd_imgsensor.h 定义Sensor_id 的信息文件, kernel和vendor下都需要有一份
3、kd_camera_hw.c kd_camera_hw.h 控制Camera上下电,宏在kd_camera_hw.h中定义
4、kd_sensor...
分类:
其他好文 时间:
2015-08-25 21:52:56
阅读次数:
7484
1710: 最后一个1
时间限制: 1 Sec 内存限制: 128 MB
提交: 51 解决: 32
[提交][状态][讨论版]
题目描述
对于一个十进制的数字x,将他转化为2进制,他的2进制将由0和1组成,求里面的最后一个1在第几位
输入
第一行输入T,代表T组数据,
接下来T行,每行输入一个X。
0
0
输出
输入x的2进制中最后一个1在第几位,...
分类:
其他好文 时间:
2015-08-25 21:51:48
阅读次数:
101
题目链接:https://leetcode.com/problems/missing-number/
题目:
Given an array containing n distinct numbers taken from 0,
1, 2, ..., n, find the one that is missing from the array.
For example,
Give...
分类:
其他好文 时间:
2015-08-25 21:51:39
阅读次数:
126
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath
*)indexPath
测试始终不走这个代理方法的原因肯定是因为UICollectionViewFlowLayout *layout = [[[UICollectionV...
分类:
其他好文 时间:
2015-08-25 21:50:12
阅读次数:
187
A message containing letters from A-Z is being encoded to numbers using the
following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine the total nu...
分类:
其他好文 时间:
2015-08-25 21:52:38
阅读次数:
137
传送门:BZOJ1052傻逼题。二分一个长度,注意到每次正方形必然落在某个角上,枚举判断即可。好久不见的1A……代码上的小细节见下。#include
#include
#include
#include
#include
using namespace std;const int INF=0x3f...
分类:
其他好文 时间:
2015-08-25 21:49:42
阅读次数:
146
开启apache的mod_rewrite功能模块
引入http-vhosts.conf文件
添加VirtualHost配置
配置hosts文件
重启apache
新建php文件
访问www.phpexcel.com/index.php...
分类:
其他好文 时间:
2015-08-25 21:50:20
阅读次数:
181
Climbing Worm
Problem Description
An inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minute before climbing agai...
分类:
其他好文 时间:
2015-08-25 21:49:30
阅读次数:
190
伴随着信息科技日新月异的发展,信息呈现出爆发式的膨胀,人们获取信息的途径也更加多样、更加便捷,同时对于信息的时效性要求也越来越高。举个搜索场景中的例子,当一个卖家发布了一条宝贝信息时,他希望的当然是这个宝贝马上就可以被卖家搜索出来、点击、购买啦,相反,如果这个宝贝要等到第二天或者更久才可以被搜出来,估计这个大哥就要骂娘了。再举一个推荐的例子,如果用户昨天在淘宝上买了一双袜子,今天想买一副泳镜去游泳...
分类:
其他好文 时间:
2015-08-25 21:51:31
阅读次数:
150
A - Closest Common Ancestors(8.4.9)
Time Limit:2000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
Write a program that takes as input a rooted ...
分类:
其他好文 时间:
2015-08-25 21:48:27
阅读次数:
223