2012 年文章归档
共 58 篇文章
IOS UIView的clipsToBounds属性
clipsToBounds属性介绍: 值:BOOL(YES/NO) 作用:决定了子视图的显示范围。具体的说,就是当取值为YES时,剪裁超出父视图范围的子视图部分;当取值为NO时,不剪裁子视图(超出部分继续显示,例如在scrollview中。。。)。默认值为NO。
2012-09-10 17:38 · iOS
使用LoadRunner测试WMS
LoadRunner是一款非常强大的测试工具,本文为笔者在对LoadRunner有了初步了解后对WMS的压力测试过程,因为接触时间比较短,不对之处欢迎大家指出。由于Licence的原因,对WMS的测试只支持最多100个虚拟用户。下面就开始测试了。 1 要有一个可用的WMS的地址,可以在本机的流媒体服务中创建,也可以使用远程的。 2 打开LoadRunner8.1,并运行窗口中点击Create/Edit Srcirpts ,如下图: 2 在弹出的窗口中点击New VUser Scripts,如下图: 3 点击New VUser Script后,会弹出一个窗口让选择脚本协议,在这里我们选择Str…
2012-06-18 17:58
android 控制软键盘消失
InputMethodManager imm =(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(mEditText.getWindowToken(), 0);
2012-06-07 11:35 · android
android 固定屏幕显示方向
如果需要设定应用程序的显示方向,可以增加android:screenOrientation参数 1.landscape 横向显示 2.portrait 纵向显示 3.unspecified 默认值 4.user 用户当前方向 5.sensor 根据重力感应显示 6.nosensor 不接受重力感应
2012-06-07 11:27 · android
动态更新gridview列表
首先是更新adapter所需要的数据列表,如果增加一个,或者删除一个。然后加入一下语句 ListAdapter ad = gridView.getAdapter(); ((MyUploadVideoDataAdapter)ad).notifyDataSetChanged();
2012-05-19 15:12 · android
将自己的应用成为android系统关联软件
<activity android:name=".MainActivity" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.cat…
2012-05-14 20:44 · android
CentOS 安装nload(流量统计)
yum install gcc gcc-c++ ncurses-devel wget http://www.roland-riegel.de/nload/nload-0.7.2.tar.gz tar zxvf nload-0.7.2.tar.gz cd nload-0.7.2 #./configure #make & make install 然后通过#nload -m即可查看实时流量。
2012-05-11 13:23
Android APK反编译详解(附图)
这段时间在学Android应用开发,在想既然是用Java开发的应该很好反编译从而得到源代码吧,google了一下,确实很简单,以下是我的实践过程。 在此郑重声明,贴出来的目的不是为了去破解人家的软件,完全是一种学习的态度,不过好像通过这种方式也可以去汉化一些外国软件。 一、反编译Apk得到Java源代码 首先要下载两个工具:dex2jar和JD-GUI 前者是将apk中的classes.dex转化成Jar文件,而JD-GUI是一个反编译工具,可以直接查看Jar包的源代码。以下是下载地址: dex2jar: http://laichao.googlecode.com/files/dex2jar…
2012-05-09 11:35 · android
TextView自动分段
从网络获取文字数据后,TextView不能自动识别段落符号\r\n,需要将所有的\r\n替换成\n\n,这样就能够识别段落了。
2012-05-07 13:30 · android
popwindow中EditText无法弹出软键盘的问题
在popwindow中的EditText,如果popwindow没有设置setFocusable(true)属性,软键盘是无法弹出的,所有一定要设置此属性。记得哦,是popwindow的属性,不是设置Eidttext的属性。
2012-05-03 14:08 · android
ActivityGroup 内的activity 启动另一个activity方法
RelativeLayout rl = (RelativeLayout) this.getParent().getWindow() .findViewById(R.id.datacontainer); rl.removeAllViews(); Intent intent = new Intent(this, NewsDetailsActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Window sub = ((ActivityGroup) this.getParent()) .getLocalActivityMa…
2012-04-26 19:04 · android
android 中系统自带的主题与样式
android中自带的主题(theme)的集锦: •android:theme="@android:style/Theme.Dialog" 将一个Activity显示为对话框模式 •android:theme="@android:style/Theme.NoTitleBar" 不显示应用程序标题栏 •android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 不显示应用程序标题栏,并全屏 •android:theme="@android:style/Theme.Light" 背景为白色 •android:theme="@android…
2012-04-26 16:48 · android
android popwindow 弹出位置
pw.showAtLocation(v, Gravity.TOP, -100, 50);执行此方法后,执行完成后,要执行下面方法: pw.update(v, -100, 50, 300, 200);
2012-04-26 15:31 · android
android seekbar问题
问题描述:seekbar 虽然设置了“fill_parent”进度条右侧不能充满父组件,然后thumb左滑动会隐藏。 解决办法:给seekbar设置android:thumbOffset="1dp",解决thumb隐藏的问题,设置android:paddingRight="1dp"解决不能充满父组件的问题,当然,两个1dp都可以写成0dp或其他值。
2012-04-24 10:30 · android
宋体字体添加到LINUX
1.将simsun.ttc拷贝到/usr/share/fonts/zh_CN/TrueType #cp simsun.ttc /usr/share/fonts/zh_CN/TrueType # 使用以下命令来更新字体信息: ttmkfdir -d /usr/share/fonts/zh_CN/TrueType/ -o /usr/share/fonts/zh_CN/TrueType/fonts.dir" 然后: 把 fonts.dir 拷贝出来一份 fonts.scale. #chkfontpath --add /usr/share/fonts/zh_CN/ 2.更新字体缓存 #fc-cach…
2012-04-23 14:12 · 其他
ireport部署到linux系统字体问题
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font '宋体' is not available to the JVM. See the Javadoc for more details. 解决方法: 1、把需要用到的字体(可以直接拷贝windows系统的C:\WINDOWS\Fonts 下的相关字体)拷贝当前项目的classpath下,一般为classes目录下 2、在classpath里添加 jasperreports.properties 属性文件 文件内容为: net.sf.jasperreports.awt.i…
2012-04-23 13:40 · 其他
windows media server 2008 Limit user rights
Microsoft tell us,you can limit user rights in WMS by: By default, Windows Media Services can only be accessed by users in the Administrators group. To limit user rights effectively while still enabling users to administer Windows Media Services, you can remove users from the Administrators group a…
2012-04-23 10:17 · 其他