- 博客(22)
- 资源 (4)
- 收藏
- 关注
原创 android错误之android.content.res.Resources$NotFoundException:
很久之前也有这个错误,是http://blog.youkuaiyun.com/jason0539/article/details/11699647 这位博主提到的,今天还发现一个。在values文件夹下定义了corlors.xml文件 #ffff4444 在代码中引用的时候就会报NotFoundException: 异常,后将这些颜色的定义放到strings.xml中就正常了。
2015-03-04 10:29:57
714
原创 图解AndroidStudio 配置 github
晚上好奇,倒腾AS的git,中间出了不少篓子,弄了好久,总算弄好了,记录一下。Androidstudio如何连接github首先,连接github需要一个github账户,这个自备。点击如图选项,到达整个AS的设置界面。 之后,按照图示,找到如下图的选项(也可以直接在输入框输入github来快速定位),用来输入github的账号,输入完之后,可以点
2014-12-23 01:27:29
2054
翻译 android activity生命周期(自我备忘)
原文的地址:http://developer.android.com/training/basics/activity-lifecycle/pausing.html英文内容:Generally, you should not use onPause() to store user changes (such as personal information entered
2014-12-21 15:55:38
726
原创 android:layout_weight的含义
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orie
2014-12-20 21:18:59
720
转载 关于Adapter的The content of the adapter has changed问题分析
【出处】http://www.cnblogs.com/monodin/p/3874147.html
2014-11-13 18:06:02
682
原创 listactivity中的适配器获取有时为空指针
有时,在继承了listactivity的activity中覆写onListItemClick的时候,huoq
2014-07-15 14:11:38
673
原创 OC学习之路之内存管理
cocoa中的内存管理机制--引用计数autorelease是一种支持引用计数的内存管理方式,它可以暂时的保存某个对象,然后在内存池自己的销亡的时候对其中的每个对象发送release消息。注意,这里只是发送release消息,如果当时的引用计数依然不为0,则该对象依然不会被释放。可以用该方法来保存某个对象,也要注意保存之后要释放该对象。
2014-03-04 22:57:25
679
原创 OC学习之路:[NSNumber alloc]和NSNumber numberWith的区别
今天学习到基础框架,看到两种写法都有,上网查看以后发现:NSNumber *number1 = [[NSNumber alloc] initWithInteger:7]; // 用完之后,必须手动的释放内存NSNumber number2= [NSNumber numberWithInteger:7]; // bar is autoreleased
2014-03-01 15:03:43
1020
原创 OC学习之路:@class和#import的区别
@class只是表示可以用这个类;#import表示将这个类中的所用信息导入进来,要是想要使用类对象的实例变量或者实例方法,都需要用#import;@class一般用于.h文件;#import用于.m实现文件中。
2014-02-28 12:12:21
795
转载 Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
问题提示:Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check
2014-01-18 15:24:36
650
原创 android导入源码缺少R.java
导入一个现存的android源码项目的时候会缺少R.java,有的的确可以通过android tools解决,有的不行,编译android时,遇到报错: Errors occurred during the build.Errors running builder 'Android Pre Compiler' on project 'XXX' java.lang.NullPointe
2013-10-20 13:30:51
873
原创 关于servlet和structs2的共存问题(续),structs2与ajax
起初要二者一起使用是处于要用ajax的考虑,假如在structs2当中也能支持ajax的实现,那么就没必要使用servlet了。我们知道,action的作用是根据返回值跳转页面。这点让使用ajax有点麻烦,其实,action是完美支持ajax的,在其中有一个ServletActionContext.getResponse()方法,可以获得到response,让这个action的执行方法返回值是nu
2013-06-19 23:20:59
856
原创 Structs2和servlet共存问题
今天写了一个ajax的刷新,用了servlet,同时还有许多的structs2的东西,后来发现servlet无法访问,一直报错警告: No configuration found for the specified action: 'save.action' in namespace: '/'. Form action defaulting to 'action' attribute's lite
2013-06-17 17:40:30
944
原创 表格数据,表单统一提交问题
现在有一个情况,需要对所有学生的成绩进行登记,然后再存入数据库(模拟)1. 先写一个pojo类package com.teacher.pojo;/** * 这个类负责 * @author lenovo * */public class StudentScore { private int oid; private String sid; private String
2013-06-14 15:04:09
997
原创 structs2的POJO类的属性不存在问题
今天写一个程序的时候,明明存在,访问的时候,报告属性不存在问题,后来将属性的名字大写换成小写就可以了。起初的时候sid被写成Sid。package com.teacher.pojo;public class StudentScore { private int oid; private String sid; private String name; private String
2013-06-13 15:14:02
769
转载 MD5算法java实现
package com.genggeng;//生成MD5public class MD5Encrypt { static final int S11 = 7; static final int S12 = 12; static final int S13 = 17; static final int S14 = 22; static final int S21 = 5; st
2013-06-12 23:32:25
720
原创 javaweb多行数据提交问题
今天突然想到多行数据怎么提交的问题。一个javabean,代表一个人;package com.geng;public class User { private String name; private String age; private String sex; public String getSex() { return sex; } public vo
2013-06-12 14:42:30
918
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人