收获:在运行程序的时候,错误出现。主要是map没有进行判断,是否为空,如果为空,则创建一个对象new
HashMap();然后就注意细节,String name=request.getParameter("name"); String
pass=request.getParameter("pa...
分类:
编程语言 时间:
2014-05-13 17:33:42
阅读次数:
276
由于现在很多业务我都是在copy代码所以代码有的没有用有的对象是null,有的却不是obj=map.get()之后对象的属性有的之前都set好了在map.put的之前又设置了多余吧,应该删掉你
分类:
其他好文 时间:
2014-05-13 17:18:21
阅读次数:
184
题意:给你 n 个坐标(x,y),m 个询问(c,d)
c==0,求出x==d有多少个,并删除这些点;
c==1,求出y==d有多少个,并删除这些点。
map+multiset的多重映射
#include
#include
#include
#include
#include
#include
#include
#include
#include
#includ...
分类:
其他好文 时间:
2014-05-13 15:13:07
阅读次数:
253
Problem Description
Acmers have been the Earth Protector against the evil enemy for a long time, now it’s your turn to protect our home.
There are 2 * n enemies in the map. Your task is to clear a...
分类:
其他好文 时间:
2014-05-13 11:29:40
阅读次数:
308
Pat1016代码
题目描述:
A long-distance telephone company charges its customers by the following rules:
Making a long-distance call costs a certain amount per minute, depending on the time of day w...
分类:
其他好文 时间:
2014-05-13 06:45:05
阅读次数:
460
容器hash_set是以hash table为底层机制的,几乎所有的操作都是转调用hash table提供的接口。由于插入无法存储相同的键值,所以hash_set的插入操作全部都使用hash table的insert_unique接口,代码如下:
pair insert(const value_type& obj)
{
pair p = rep.insert_unique(obj);
...
分类:
其他好文 时间:
2014-05-13 06:33:44
阅读次数:
303
本段程序主要利用数据结构栈的先进后出特点,实现回溯求解迷宫路径问题。
#include
#include
using namespace std;
//坐标类
struct Point
{
int x;
int y;
};
//地图类
template
struct Map
{
int (*p)[A];
int row;//行数
int col;//列数
};
//start起始点, ...
分类:
其他好文 时间:
2014-05-13 05:25:02
阅读次数:
478
一、数据库的概述1、什么是数据库DB,DataBase数据库:依照某种数据模型进行组织并存放到存储器的数据集合DBMS,DataBaseManagementSystem数据库管理系统:用来操纵和管理数据库的大型服务软件DBS,DataBaseSystem数据系统:即DB+DBMS,指带有数据库并整合了数据库管理软件的计..
分类:
数据库 时间:
2014-05-13 00:48:46
阅读次数:
549
1. mongodb创建数据库和集合
mongodb数据库和集合的创建是隐式的。
意思是说不用单独写create database 语句。
直接使用use关键词即可。
在bin/mongo shell下运行:...
分类:
数据库 时间:
2014-05-13 00:28:12
阅读次数:
445
keyboard.S 部分代码分析(key_map)
keyboard中间有这么一段,我一开始没看明白,究竟啥意思
key_map:
.byte 0,27
.ascii "1234567890-="
.byte 127,9
.ascii "qwertyuiop[]"
.byte 13,0
.ascii "asdfghjkl;'"
.byte '`,0
.ascii ...
分类:
系统相关 时间:
2014-05-12 22:41:23
阅读次数:
701