#include
#include
using namespace std;
const int N = 100005;
struct Elem
{
long long height;
long long width;
int begin;
int count;
};
Elem stack[N];
int top;
int main()
{
int num, n;
long...
分类:
其他好文 时间:
2014-09-28 23:31:56
阅读次数:
300
1。 指定路径下 单个文件夹data中所有图像
file_path = '.\data\';% 图像文件夹路径
img_path_list = dir(strcat(file_path,'*.jpg'));%获取该文件夹中所有jpg格式的图像
img_num = length(img_path_list);%获取图像总数量
if img_num > 0 %有满足条件的图像
for...
分类:
其他好文 时间:
2014-09-28 21:12:25
阅读次数:
192
mysql主键设置成auto_increment时,进行并发性能测试出现主键重复Duplicate entry 'xxx' for key 'PRIMARY'
解决方法:
在my.cnf的[mysqld]片段中添加设置innodb_autoinc_lock_mode=0
同时注意调大jdbc的活跃链接数,如设置 jdbc.maxActive=300,因为设置innodb_autoinc_lo...
分类:
数据库 时间:
2014-09-28 19:51:05
阅读次数:
209
1.Ruby常用数据类型Numbers, Strings, Booleansmy_num = 25my_boollean = true (or false)my_string = "Ruby"2.Ruby常用数学计算操作符加(+) 减 (-)乘 (*)除(/)幂次方 (**)求余 (%)3...
分类:
其他好文 时间:
2014-09-28 19:38:45
阅读次数:
213
1 内存分析1.1 jmap -histo 命令pid=`jps | awk '{if ($2 == "Jps") print $1}'`jmap -histo $pid >>1.txt 查看pid中类的内存占用num #instances(实例数) #bytes(占用字节) class name ...
分类:
其他好文 时间:
2014-09-28 18:01:53
阅读次数:
176
针对一些运营商的锁网需求,MTK平台已经对其有很好的支持。绝大多数的海外需求可以通过直接配置相关文件来完成。这里简单描述一下配置方法,不做原理分析。相关数据结构分析:Modem中与SML锁网配置相关的数据结构有:Sml_context_struct:SML上下文,cat:SML种类,目前MTK平台共...
分类:
其他好文 时间:
2014-09-28 14:09:42
阅读次数:
261
1、简单模型)1、io.write函数: 函数模型为io.write(...))2、io.read函数: io.read(*all) 读取当前输入的整个文件 io.read(*line) 读取下一行 io.read(*number) 读取一个整数 io.read(num) 读取当前输入的不超过num...
分类:
其他好文 时间:
2014-09-28 11:30:51
阅读次数:
173
第12题:拥有超过500个因数的第一个三角数(1+2+3+4+......)def findivisionnum(num): count = 0 n=1 import math while count<num: count = 0 for i in...
分类:
编程语言 时间:
2014-09-27 19:44:50
阅读次数:
489
1.结构Lock的实现类其实都是构建在AbstractQueuedSynchronizer上,每个Lock实现类都持有自己内部类Sync的实例二。LockSupportThis class associates, with each thread that uses it, a permit (in...
分类:
其他好文 时间:
2014-09-27 18:00:40
阅读次数:
217
1.一个简单的单例类:
class Singleton
{
public:
static Singleton *getInstance()
{
if(pInstance_ == NULL){
mutex_.lock();
if(pInstance_ == NULL){
...
分类:
其他好文 时间:
2014-09-27 14:43:19
阅读次数:
132