在开发中难免会遇到要控制字符数量的输入限制,比如用户的名字会让你输入10个字符(意思是英文可以输入10个但是汉字只可以输入5个),也许第一反应会在xml中设置EditText的长度,这种情况肯定是达不到我们的要求的。下面介绍一下自己的方法。
1.声明一个类继承InputFilter,实现filter中的方法,下面有详细的注解读者可以仔细看下
public class MyLenght...
分类:
其他 时间:
2015-01-27 16:19:11
收藏:
0 评论:
0 赞:
0 阅读:
272
1、filesep
返回当前平台的目录分隔符,Windows是反斜杠(\),Linux是斜杠(/)
2、pathsep
返回当前平台的路径分隔符。Windows是分号(;),Linux是冒号(:)
3、fullfile
将若干字符串连接成一个完整的路径。例如:
>> f=fullfile('D:','Matlab','example.txt')
f=D:\Matlab\exa...
分类:
其他 时间:
2015-01-27 16:18:02
收藏:
0 评论:
0 赞:
0 阅读:
300
可以定义dp[i][j]表示第一个串的前i个字符中含有第二个串的前j个字符的总情况数;
则:如dp[i][j]=dp[i-1][j],如果str1[i]==str2[j]则dp[i][j]+=dp[i-1][j-1];
初始时讲所有的dp[i][0]赋值为1,其他为0。
然后这个题目需要用到大数,可以用C++重载运算符,或者是java的大数类;
我用的是java,第一次用java的大数,感...
分类:
其他 时间:
2015-01-27 16:17:41
收藏:
0 评论:
0 赞:
0 阅读:
272
观察者模式定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象。这个主题对象在状态上发生变化时,会通知所有观察者对象,让它们能够自动更新自己。...
分类:
其他 时间:
2015-01-27 16:17:21
收藏:
0 评论:
0 赞:
0 阅读:
260
hdu 4786 Fibonacci Tree ( 最小生成树 ) —— black 的专栏 —— waShaXiu...
分类:
其他 时间:
2015-01-27 16:17:11
收藏:
0 评论:
0 赞:
0 阅读:
237
1 package sundemo2; 2 3 import java.io.File; 4 import java.io.FileReader; 5 import java.io.FileWriter; 6 7 public class MainClass{ 8 ...
分类:
其他 时间:
2015-01-27 16:15:41
收藏:
0 评论:
0 赞:
0 阅读:
181
角色QA:测试人员RD:开发人员BI:数据分析师PD:需求人员UED:交互设计ttid:用来统计数量。随着业务线的增加, 及每个业务的扩展, 为统计不同渠道下单量, 会为每个渠道申请一个ttid, 使用订单信息查询可以确认最终下单的ttid是否正确埋点测试:检查埋点数据正确性,埋点作用于PV、UV、...
分类:
其他 时间:
2015-01-27 16:15:21
收藏:
0 评论:
0 赞:
0 阅读:
287
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using DPC.Domain;namespace DPC.CreateMo...
分类:
其他 时间:
2015-01-27 16:14:01
收藏:
0 评论:
0 赞:
0 阅读:
267
#include #include #include #include #define IncreSize 10#define InitSize 10typedef int status;typedef int Elemtype;typedef struct sStack{ Elemtype ...
分类:
其他 时间:
2015-01-27 16:13:41
收藏:
0 评论:
0 赞:
0 阅读:
240
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using DPC.Domain;namespace DPC.CreateMo...
分类:
其他 时间:
2015-01-27 16:13:11
收藏:
0 评论:
0 赞:
0 阅读:
147
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using DPC.Domain;namespace DPC.CreateMo...
分类:
其他 时间:
2015-01-27 16:13:01
收藏:
0 评论:
0 赞:
0 阅读:
285
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;//装饰模式Demonamespace DisCountApplication...
分类:
其他 时间:
2015-01-27 16:12:41
收藏:
0 评论:
0 赞:
0 阅读:
218
一个cron表达式有至少6个(也可能7个)有空格分隔的时间元素。按顺序依次为1.秒(0~59)2.分钟(0~59)3.小时(0~23)4. 天(月)(0~31,但是你需要考虑你月的天数)5.月(0~11)6.天(星期)(1~7 1=SUN 或 SUN,MON,TUE,WED,THU,FRI,SAT)...
分类:
其他 时间:
2015-01-27 16:12:11
收藏:
0 评论:
0 赞:
0 阅读:
299
需要先解决基本性能问题, 如果性能仍无法被接受, 才来考虑以下方法.物化视图 materialized view, 结果缓存 result cache, 并行处理 parallel prcess, 直接路径插入 direct-path insert, 行预取, 数组接口物化视图视图是一个虚拟表, 基...
分类:
其他 时间:
2015-01-27 16:11:51
收藏:
0 评论:
0 赞:
0 阅读:
228
《Time, Clocks, and the?Ordering of Events in?a Distributed System》(分布式系统的时钟和事件顺序)是分布式领域非常重要的经典论文,由Leslie Lamport 在1978年发表。 我就这么简单理解:在分布式系统中,...
分类:
其他 时间:
2015-01-27 15:10:32
收藏:
0 评论:
0 赞:
0 阅读:
277
特效油画显示p_w_picpath此效果的彩***,某范围内像素随机处理.产生油画效果.非常酷.试试吧!代码:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Draw..
分类:
其他 时间:
2015-01-27 15:08:52
收藏:
0 评论:
0 赞:
0 阅读:
256
由于公司需要做性能测试,所以需要安装LoadRunnerz。1.安装前的准备工作在官网下载loadrunner-11-load-generator-Linux.iso。挂载该ios镜像:mkdir/mnt/LoadRunner
mount-tiso9660-olooploadrunner-11-load-generator-Linux.iso/mnt/LoadRunner2.开始安装/mnt/LoadRunner/Linux..
分类:
其他 时间:
2015-01-27 15:08:22
收藏:
0 评论:
0 赞:
0 阅读:
222
1.查看系统版本:#oslevel7.1.0.0#chdev-lhdisk1-apv=clearhdisk1changed#chdev-lhdisk1-apv=yeshdisk1changed#lspvhdisk000c96db097dbd092rootvgactivehdisk100c96db029fbd85fNonehdisk200c96db00b1e37d5None#extendvg-frootvghdisk1#mirrorvgrootvghdisk10516-1804chvg:Thequ..
分类:
其他 时间:
2015-01-27 15:07:42
收藏:
0 评论:
0 赞:
0 阅读:
338
以前用过firefox浏览器,知道有个yslow插件,可以显示,网站图片缓存事件。现在用chrome浏览器,在商城搜索了下,没有找到,最后发现,打开以下地址就可以打开!YSlow下载地址:https://chrome.google.com/extensions/detail/ninejjcohidippngpapiilnmkgllmakh#另外googlechrom..
分类:
其他 时间:
2015-01-27 15:07:32
收藏:
0 评论:
0 赞:
0 阅读:
402
执行结果:总结:struts2的action不支持数组装配。Action中声明数组,然后再页面使用下标命名的方式行不通。只能在Action中定义List,页面元素的命名仍然是使用下标方式,这样就可以实现批量修改了。
分类:
其他 时间:
2015-01-27 15:07:22
收藏:
0 评论:
0 赞:
0 阅读:
316