上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: Android 调用相册 拍照 实现系统控件缩放 切割图片 阅读全文
posted @ 2012-07-03 15:10 吴超文 阅读(111) 评论(0) 推荐(0)
摘要: 一:下载SpringSourceCode:(源代码版本号为spring-framework-3.1.0.RELEASE)http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.0.RELEASE.zip二:将下载后的源码文件解压到某个目录下如:D:\project\spring_src\spring-framework-3.1.0.RELEASE。以后简称为${spring_home}.三:Spring源码项目是用ant编译的;所以需要先确保安装了ant,将正确配置了ANT_HOME四: 阅读全文
posted @ 2012-06-30 13:09 吴超文 阅读(3413) 评论(0) 推荐(0)
摘要: 场景:为了回家过年,我们都要先买火车票,然后坐火车,最后才能和家人团聚。程序:这里我们写个简单程序模拟回家过年。新建了一个NewYear类,它有一个celebrateSpringFestival()的方法,我们把买票,坐车,回家庆祝都写在这个方法。public class NewYear { public void celebrateSpringFestival(){ //1.买票 System.out.println("买票"); //2.乘火车 System.out.println("乘火车"); ... 阅读全文
posted @ 2012-06-29 11:20 吴超文 阅读(222) 评论(0) 推荐(0)
摘要: 1.准备软件NotePad++,官网地址为http://notepad-plus-plus.org/zh/。2.打开软件在语言选择项中先确定好自己要粘贴的是哪种语言的代码。3.之后将代码粘贴进来,排好版后,并依次选择“插件->NppExport->Copy all formats to clipbord”。4.进入你要编辑的word文档中,直接粘贴就可将刚才的代码原样拷贝到文档中。转:http://blog.csdn.net/zx19899891/article/details/7393846 阅读全文
posted @ 2012-06-28 18:00 吴超文 阅读(1287) 评论(0) 推荐(0)
摘要: 最近项目有一个功能,是让EditText组件默认不可编辑的,通过tab来切换成可编辑状态,网上的方法是edittext.setFocusable(false),失去了焦点,就变成了不可编辑;还有一种是重写实现方法的,稍复杂点。 后来论坛看到一帖子,很偷巧的方法,用FrameLayout将TextView和EditText重复在一起显示,默认TextView显示,EditText不显示,当点击TextView时再改变状态,让TextView不显示,EditText显示,EditText再设置获取焦点EditText.requestFocus();就OK了,呵呵。 阅读全文
posted @ 2012-06-28 09:41 吴超文 阅读(4314) 评论(0) 推荐(1)
摘要: /** * 搜索 */ public void searcher(){ IndexReader reader = null; try { //1.创建Directory Directory directory = FSDirectory.open(new File("D:/Lucene/index01"));//索引是建立在硬盘上 //2.创建IndexReader reader = IndexReader.open(directory)... 阅读全文
posted @ 2012-06-08 15:49 吴超文 阅读(194) 评论(0) 推荐(0)
摘要: public class HelloLucene { /** * 建立索引 * @param args */ public void index(){ IndexWriter writer = null; try { //1.创建Directory, // Directory directory = new RAMDirectory();//索引是建立在内存中的 Directory directory = FSDirectory.open(new File(... 阅读全文
posted @ 2012-06-08 13:41 吴超文 阅读(153) 评论(0) 推荐(0)
摘要: package cn.sh.jfreechar.test;import java.awt.Font;import org.jfree.chart.ChartFactory;import org.jfree.chart.ChartFrame;import org.jfree.chart.JFreeChart;import org.jfree.chart.StandardChartTheme;import org.jfree.chart.plot.PlotOrientation;import org.jfree.data.category.DefaultCategoryDataset;/** * 阅读全文
posted @ 2012-06-06 15:48 吴超文 阅读(453) 评论(0) 推荐(0)
摘要: 验证码的用到技术有其中两个基本要点,一是随机数的生成,二是中文,数字,字母的生成,其他的还有加密技术,这里不讲。先讲随机数的生成:/** * 验证码生成技术一:随机数生成 * * @author WuChaoWen * @since Jun 1, 2012 */public class RandomDemo { public static void main(String[] args) { /** * Random类包含两个构造方法,下面依次进行介绍: * a、public Random() 该构造方法使用一... 阅读全文
posted @ 2012-06-01 11:33 吴超文 阅读(831) 评论(0) 推荐(0)
摘要: 如果图片的ImageView设为wrap_content,是可以居中的,但对于我是相册,需要设为fill_parent才能进行缩放。通过网上找资料,只要把组件放到一个LinearLayout下就可以了。项目中的代码是:<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent&quo 阅读全文
posted @ 2012-05-16 16:00 吴超文 阅读(1884) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页