yeruowei的博客
yeruowei · 共 19 篇文章
获取RadioButton选中的值
<RadioGroup android:id="@+id/gender" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/gender_male" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="男" android:checked="true"…
2013-03-29 15:39 · Android · 评论(0)
日期选择控件
布局文件: <RelativeLayout android:id="@+id/date_picker" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:id="@+id/birthday_text" android:editable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" andro…
2013-03-29 15:33 · Android · 评论(0)
Android 调用系统短信分享功能时短息内容设置
Android 调用系统短信分享功能时短息内容设置有以下两种: 1、intent.putExtra(Intent.EXTRA_TEXT,"sms_content"); 2、intent.putExtra("sms_body","sms_content"); 经测试发现,部分手机支持第一种,而部分手机支持第二种。
2013-03-06 11:10 · Android · 评论(0)
Android tab 背景及字体颜色设置
final TabHost host = getTabHost(); final TabWidget tabWidget=host.getTabWidget(); host.setOnTabChangedListener(new OnTabChangeListener() { @Override public void onTabChanged(String tabId) { for (int i =0; i < tabWidget.getChildCount(); i++) { LinearLayout view = (LinearLayout) tabWidget.getChildAt(…
2013-01-29 17:29 · Android · 评论(0)
Android SDK更新后 ADT R17 E/AndroidRuntime : java.lang.NoClassDefFoundError问题的解决
更新了Android SDK 和ADT 到 R17 以后出现了一个问题,就是原来所有引入第三方的jar文件的项目,运行到一旦调用了第三方jar文件里的类的地方,都会出现类似 E/AndroidRuntime : java.lang.NoClassDefFoundError 的错误。 后来看国外的网站才解决问题 http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17/comment-page-1#comment-4346 简单的说一下解决方法: 将所有的第三方jar文件从 standard…
2012-06-19 11:44 · Android · 评论(0)
javascript 阻止事件冒泡
event.stopPropagation() 阻止事件冒泡 event.preventDefault() 阻止事件的默认动作 <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <a href="http://jquery.com">default click action is prevented</a> <div id="log"></div> <script> $("a").click(function(event) {…
2012-02-10 15:54 · Web · 评论(0)
Linux修改文件权限
修改命令为 chmod 权限 文件名 linux下权限分为可读、可写、可执行,他们对应的数字分别是:可读—4 可写—2 可执行—1 无权限—0 给权限时只要给定数字或者数字之和就可以了。 每个文件都有固定的3个权限位。第一个表示对该文件的所属者开放的权限,第二个表示对该文件的所属组的,第三个表示该文件的其他用户组的。 比如对1.txt文件,我希望它的拥有者具有可读可写可执行权限,所属组具有可读权限,其他用户无权限, 那么执行命令:chmod 740 1.txt 就可以了 其中 7=4+2+1 4=4+0+0 0=0+0+0
2011-10-11 17:22 · Linux · 评论(0)
Oracle 用户、权限、角色
1、创建用户 CREATED USER user_name IDENTIFIED BY password [DEFAULT TABLESPACE default_tablespace ] [TEMPORARY TABLESPACE temporary_tablespace ]; user_name:用户名 password:密码 default_tablespace:存储数据库对象使用的默认表空间。如果忽略默认表空间,则默认使用system表空间。 temporary_tablespace:保存临时对象所使用的默认表空间。若忽略,则使用system表空间。 2、修改用户密码 ALTER US…
2011-09-29 17:49 · Oracle · 评论(0)
Hibernate+JDBC操作Clob时发生ClassCastException
Hibernate+JDBC操作Clob时发生ClassCastException:$Proxy58 使用System.out.println(blob.getClass().getName())输出信息的时候,显示的是$Proxy58 从Hibernate源码可以看出, <!-- Generated by javadoc (build 1.4.2_11) on Sun Oct 15 22:02:43 CDT 2006 --> public class SerializableClob extends Object implements Serializable, Clob 由Hiberna…
ORA-00932 clob字段不能union的问题
Oracle 使用union查询带有clob字段的两张表,提示错误: ORA-00932:数据类型不一致:应为-,但却获得CLOB 解决办法: 把union改为union all。原因是lob字段不能做group by ,而union中需要使用group by过滤到重复纪录。
2011-09-26 11:38 · Oracle · 评论(0)
Oracle查询外键关联的表
select * from user_cons_columns cl where cl.constraint_name = 'FK_Reference_8'; FK_Reference_8 为外键名称
2011-09-24 17:04 · Oracle · 评论(0)
ORA-01461: can bind a LONG value only for insert into a LONG column
解决方法: 导入数据库安装目录下的ojdbc14.jar,如:D:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar。 导入后即Ok。
2011-09-23 18:05 · Oracle · 评论(0)
java hibernate 获取数据库连接
public Connection getConnection(){ SessionFactory sf = getHibernateTemplate().getSessionFactory(); Session session = sf.openSession(); Connection conn = session.connection(); return conn }
关于 ORA-22990: LOB 定位器无法扩展事务处理
异常堆栈打印如下: java.io.IOException: ORA-22990: LOB 定位器无法扩展事务处理 at oracle.jdbc.driver.DatabaseError.SQLToIOException(DatabaseError.java:764) at oracle.jdbc.driver.OracleBlobOutputStream.flushBuffer(OracleBlobOutputStream.java:296) at oracle.jdbc.driver.OracleBlobOutputStream.close(OracleBlobOutputStream.…
tomcat+MyEclipse部署项目出现的问题
Deployment failure on Tomcat 6.x. Could not copy all resources to E:\apache-tomcat-6.0.16\webapps\HebbnWebServices. If a file is locked, you can wait until the lock times out to redeploy, or stop the server and redeploy, or manually remove the deployment at E:\apache-tomcat-6.0.16\webapps\HebbnWebS…
2011-09-20 10:56 · Java · 评论(0)