在Java中,经常会将一个Object类型转成自己想要的Map、List等等。通常的做法是:Object 
obj = ....;Map castMap = (HashMap) obj;在这里会产生unchecked cast 
warning,有代码洁癖的就会想办法干掉它。解决办法就是在方法上添加一个...
                            
                            
                                分类:
其他好文   时间:
2014-05-17 00:32:10   
                                阅读次数:
311
                             
                    
                        
                            
                            
                                收获:在运行程序的时候,错误出现。主要是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
                             
                    
                        
                            
                            
                                定义接口packagecom.example.android_db.service;
importjava.util.List;
importjava.util.Map;
publicinterfacePersonService{
publicbooleanaddPerson(Object[]params);
publicbooleandeletePerson(Object[]params);
publicbooleanupdatePerson(Object[]params);
publicMa..
                            
                            
                                分类:
移动开发   时间:
2014-05-13 13:06:04   
                                阅读次数:
454
                             
                    
                        
                            
                            
                                importjava.util.HashMap;
importjava.util.Map;
importandroid.content.Context;
importandroid.content.SharedPreferences;
publicclassMySharedpreference{
privateContextcontext;
publicMySharedpreference(Contextcontext){
//TODOAuto-generatedconstructorstub
this.co..
                            
                            
                                分类:
移动开发   时间:
2014-05-13 12:10:38   
                                阅读次数:
346
                             
                    
                        
                            
                            
                                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
                             
                    
                        
                            
                            
                                本段程序主要利用数据结构栈的先进后出特点,实现回溯求解迷宫路径问题。
#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
                             
                    
                        
                            
                            
                                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