Java 验证密码复杂度的正则表达式
摘要:复杂(同时包含数字,字母,特殊符号)"^^(?![a-zA-z]+$)(?!\\d+$)(?![!@#$%^&*_-]+$)(?![a-zA-z\\d]+$)(?![a-zA-z!@#$%^&*_-]+$)(?![\\d!@#$%^&*_-]+$)[a-zA-Z\\d!@#$%^&*_-]+$"简单...
阅读全文
posted @
2015-08-28 17:14
豆芽的成长
阅读(11719)
推荐(1)
Java文件下载
摘要:Java文件下载的几种方式public HttpServletResponse download(String path, HttpServletResponse response) { try { // path是指欲下载的文件的路径。 F...
阅读全文
posted @
2015-08-25 17:36
豆芽的成长
阅读(181)
推荐(0)
Android得到屏幕分辨率
摘要:private void getScreenSize(Context context) { DisplayMetrics dm = context.getResources().getDisplayMetrics(); int screen_width = dm.widthPixels;...
阅读全文
posted @
2015-08-25 13:38
豆芽的成长
阅读(181)
推荐(0)
onWindowFocusChanged
摘要:onWindowFocusChanged重要作用 Activity生命周期中,onStart, onResume, onCreate都不是真正visible的时间点,真正的visible时间点是onWindowFocusChanged()函数被执行时。译注:从onWindowFocusChange...
阅读全文
posted @
2015-08-19 09:51
豆芽的成长
阅读(272)
推荐(0)
android获得控件在屏幕中的绝对坐标 getLocationInWindow 和 getLocationOnScreen
摘要:int[] location = new int[2] ;view.getLocationInWindow(location); //获取在当前窗口内的绝对坐标view.getLocationOnScreen(location);//获取在整个屏幕内的绝对坐标location [0]--->x坐标,...
阅读全文
posted @
2015-08-19 09:44
豆芽的成长
阅读(536)
推荐(0)