- 博客(27)
- 收藏
- 关注
转载 react 开发中的问题简记
1、什么时候用props 什么时候用state ? 不能使用props:当页面组件存在URL跳转问题时候,原因:若单独刷新,他会报错,拿不到前面的数据; 使用props场景:当组件为页面组件的一部分即没有专有的URL配置的时候可以使用。 state:保持当前状态请求一般都会放在state里。2、开发中遇到的问题,路径状态改变前一个状态不会消失(BUG) 例如:弹出浮...
2017-07-31 14:44:00
142
转载 深复制浅复制
链接:https://www.zhihu.com/question/23031215/answer/31944721转载于:https://www.cnblogs.com/YFeiY7/p/6774017.html
2017-04-27 14:16:00
102
转载 HTML和CSS实现常见的布局
https://segmentfault.com/a/1190000003931851#articleHeader15转载于:https://www.cnblogs.com/YFeiY7/p/6772842.html
2017-04-27 10:16:00
130
转载 node express 跨域问题
express = require('express');var app = express();//设置跨域访问app.all('*', function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-H...
2017-04-06 13:03:00
111
转载 StringUtils工具类介绍
1 abbreviate方法缩写一段文字StringUtils.abbreviate("abcdefghijklmno", -1, 10) = "abcdefg..."2 isBlank和isEmpty区别StringUtils.isBlank(" ") = trueStringUtils.isEmpty(" ") = false3 j...
2017-03-02 09:44:00
98
转载 两个List中的补集
/** * 获取两个List的不同元素 * @param list1 * @param list2 * @return */ private static List getDiffrent(List list1, List list2) { List diff = ...
2017-03-01 19:17:00
172
转载 BigDecimal 的除法
金额的数据类型是BigDecimal通过BigDecimal的divide方法进行除法时当不整除,出现无限循环小数时,就会抛异常的,异常如下:java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result. at java.math.BigDe...
2017-02-28 14:29:00
136
转载 网络解析json
public class myActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } publ...
2017-02-18 13:28:00
96
转载 拖拽图片
<html> <head> <meta charset="utf-8"/> <style> #div1{ width: 100px; padding:0px; margin:0px; position: absolute; cursor: pointer; } #parent{ width: ...
2016-12-05 10:44:00
67
转载 IntelliJ IDEA使用技巧一览表
1 、写代码时用 Alt-Insert ( Code|Generate… )可以创建类里面任何字段的 getter 与 setter 方法。2 、右键点击断点标记(在文本的左边栏里)激活速查菜单,你可以快速设置 enable/disable 断点或者条件它的属性。3 、 CodeCompletion (代码完成)属性里的一个特殊的变量是,激活 Ctrl-Alt-Space 可以...
2016-11-06 12:10:00
96
转载 Android studio 常用快捷键
Alt+回车 导入包,自动修正Ctrl+N 查找类Ctrl+Shift+N 查找文件Ctrl+Alt+L 格式化代码Ctrl+Alt+O 优化导入的类和包Alt+Insert 生成代码(如get,set方法,构造函数等)Ctrl+E或者Alt+Shift+C 最近更改的代码Ctrl+R 替换文本Ctrl+F 查找文本Ctrl+Shift+Spa...
2016-11-06 12:08:00
151
转载 android开源项目和框架
http://blog.youkuaiyun.com/stephen255/article/details/9121583转载于:https://www.cnblogs.com/YFeiY7/p/6027869.html
2016-11-03 19:11:00
82
转载 AsyncTask
前言 本章内容是android.os.AsyncTask,版本为Android 2.3 r1,翻译来自"0_1",欢迎访问它的博客:"http://dev.10086.cn/blog/?32546",再次感谢"0_1" !期待你一起参与Android API的翻译,联系我over140@gmail.com。声明 欢迎转载,但请保留文章原始出处:) ...
2016-10-17 11:41:00
89
转载 常用正则表达式
Android中正则的两种简单使用方式例子: 判断一个字符串是否匹配一个正则表达式方式1. String a="123345";a.matches("正则表达式");方式2.Pattern.matches("正则表达式","要匹配的字符串");校验数字的表达式1 数字:^[0-9]*$2 n位的数字:^\d{n}$3 ...
2016-10-13 18:58:00
101
转载 intent用法
1.无参数Activity跳转Intent it = new Intent(Activity.Main.this, Activity2.class);startActivity(it);2.向下一个Activity传递数据(使用Bundle和Intent.putExtras)Intent it = new Intent(Activity.Main....
2016-10-11 00:02:00
136
转载 双击退出
/** * 菜单、返回键响应 */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { // TODO Auto-generated method stub if(keyCode == KeyEvent.KEYCODE_BACK...
2016-10-10 23:54:00
97
转载 设置一个按钮为透明
设置一个按钮为透明,(1)修改配置文件<Buttonandroid:id="@+id/btnAppMore"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="详细信息>>"android:...
2016-10-10 23:42:00
159
转载 listview加载显示图片
public class ImageAndTextListAdapter extends ArrayAdapter<ImageAndText> { private ListView listView; private AsyncImageLoader asyncImageLoader; public ImageAndTextList...
2016-10-10 22:51:00
363
转载 Android中shape中的属性大全
本文章转接于:http://kofi1122.blog.51cto.com/2815761/521605Android中常常使用shape来定义控件的一些显示属性,今天看了一些shape的使用,对shape有了大体的了解,稍作总结:先看下面的代码: <shape><!-- 实心 --> <...
2016-09-29 23:08:00
94
转载 Android实现数据存储技术
本文介绍Android中的5种数据存储方式。文件转载自:http://www.cnblogs.com/hanyonglu/archive/2012/03/01/2374894.html 数据存储在开发中是使用最频繁的,在这里主要介绍Android平台中实现数据存储的5种方式,分别是: 1使用SharedPreferences存储数据 2文件存储数据 3SQL...
2016-09-29 11:41:00
98
转载 Android_ListView适配器
ListView如何优化复用convertView缓存(减少ListView绘制).自定义静态类ViewHolder(减少findViewById次数),通过setTag()、getTag()获取holder实例.使用分页加载.使用软引用WeakReference引用ImageView对象:当item划出屏幕,可以释放对大图片的引用,节省内存,提高效率.另外对图片...
2016-09-28 19:18:00
131
转载 有一个form,包含两个text,和两个按钮,当用户按第一个按扭时把数据提交到url1,按第二个按钮提交到url2,怎么实现呀?...
<form name="form1" method="post" action=""><input type="button" name="Submit1" value="按钮1" onClick="funSub(1)"><input type="button" name="Submit2" value="按钮2" onClick="f...
2016-09-28 18:04:00
206
转载 andriod给ListView中的TextView增加跑马灯效果
正常情况下跑马灯效果只需要在TextView中添加android:ellipsize="marquee" android:singleLine="true"android:focusable="true"属性就可以了,不过这个方法要求指定的TextView必须要获取焦点,而在ListView中这个焦点的获取就变得疑惑了.解决的方法按照惯例分三步:1.作为子控件的TextVie...
2016-09-28 15:49:00
83
转载 Android 编辑框(EditText)属性学习
EditText的属性很多,这里介绍几个:android:hint="请输入数字!"//设置显示在空间上的提示信息android:numeric="integer"//设置只能输入整数,如果是小数则是:decimalandroid:singleLine="true"//设置单行输入,一旦设置为true,则文字不会自动换行。android:password="true"//设置只能输入密...
2016-09-25 20:03:00
180
转载 Java常见异常总结
转自:牛奶、不加糖http://www.cnblogs.com/ITtangtang/archive/2012/04/22/2465382.html1. java.lang.NullPointerException(空指针异常) 调用了未经初始化的对象或者是不存在的对象经常出现在创建图片,调用数组这些操作中,比如图片未经初始化,或者图片创建时的路径错误等等。对数组操作中...
2016-09-21 11:12:00
65
转载 温故而知新:Asp.Net中如何正确使用Session
原文链接作者:菩提树下的杨过出处:http://yjmyzz.cnblogs.comAsp.Net中的Session要比Asp中的Session灵活和强大很多,同时也复杂很多;看到有一些Asp.Net开发人员报怨说Session不稳定,莫名其妙的丢失,其实这正是Asp.Net改进的地方之一.我们知道Session与Cookie最大的区别在于:Cookie信息全部存放...
2016-09-20 12:02:00
86
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人