2014年9月17日

c读取文本文档

摘要: 想数一下文本文档一共有多少行,写了个小程序1.用fopen()以只读方式打开文件2.用fgetc()获取文件流中的字符内容3.如果字符内容为'\n'换行符,count++最后输出count的值 1 #include 2 #include 3 #include 4 #include 5 6 ... 阅读全文

posted @ 2014-09-17 09:09 luckygxf 阅读(478) 评论(0) 推荐(0) 编辑

2014年8月29日

java类中定义接口

摘要: 今天看到一个java类中定义了接口,写个备忘录,记录一下 1 package com.gxf.test; 2 3 public class Test_interface { 4 public interface show{ 5 public void show(); 6 ... 阅读全文

posted @ 2014-08-29 21:02 luckygxf 阅读(832) 评论(0) 推荐(0) 编辑

2014年8月25日

android selector

摘要: android 选择器的使用1.在drawable文件夹下面建一个xml文件,如item.xml,在eclipse中有selector这个选项2.可以在布局文件.xml(配置android:listSelector="@drawable/item")中或者,java代码中使用Drawable dra... 阅读全文

posted @ 2014-08-25 15:50 luckygxf 阅读(320) 评论(0) 推荐(0) 编辑

android listview

摘要: 闲来无事,随便看点东西,突然想看看listVew这个控件的使用listview的使用1.listview控件一枚2.adapter适配器一枚3.数据,用于显示listview这里只想看看listview的使用,上个最简单的小例子,感觉挺漂亮的 1 public class MyListView ex... 阅读全文

posted @ 2014-08-25 15:22 luckygxf 阅读(167) 评论(0) 推荐(0) 编辑

android继承Dialog实现自定义对话框

摘要: 有时需要自定义对话框,可以使用AlterDialog.Bulider,比如下面的代码片段1 new AlertDialog.Builder(self) 2 3 .setTitle("标题")4 5 .setMessage("简单消息框... 阅读全文

posted @ 2014-08-25 15:02 luckygxf 阅读(612) 评论(0) 推荐(0) 编辑

2014年8月10日

移植net-snmp到开发板(mini210)

摘要: 1.安装交叉编译工具arm-linux-gcc2.下载net-snmp源码安装包3.解压安装包4../configure --build=i686-linux --host=arm-linux CC=arm-linux-gcc --with-endianness=little --enable-mi... 阅读全文

posted @ 2014-08-10 10:48 luckygxf 阅读(1040) 评论(0) 推荐(0) 编辑

2014年8月6日

snmp4j 编程

摘要: 从www.snmp4j.org下载snmp4j的jar包,用eclipse新建一个java项目。将jar包导入工程(只有一个jar包),开始编程一个简单的测试程序//create target//create pdu//snmp.sendokay,上代码package com.gxf.snmp;im... 阅读全文

posted @ 2014-08-06 22:28 luckygxf 阅读(1630) 评论(0) 推荐(0) 编辑

2014年8月4日

ubuntu 13.04 163源(亲测可用)

摘要: # deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ - Release i386 (20140417)]/ trusty main restricted# See http://help.ubuntu.com/community/UpgradeNotes for ... 阅读全文

posted @ 2014-08-04 10:45 luckygxf 阅读(692) 评论(0) 推荐(0) 编辑

2014年7月29日

c语言中static 用法总结(转)

摘要: 惨痛教训:假设在test.h中定义了一个static bool g_test=false;若test1.c和test2.c都包含test.h,则test1.c和test2.c分别生成两份g_test,在test1.c 中置g_test=true,而test2.c中仍然为false并未改变!shit!... 阅读全文

posted @ 2014-07-29 00:44 luckygxf 阅读(1306) 评论(0) 推荐(0) 编辑

2014年5月22日

Spring入门

摘要: 看了一晚上的海贼王,感觉得学点东西才行。急急忙忙的搭了个Spring环境(spring官网:www.spring.io)eclipse4.3.2jdk 1.7.0_45spring 4.0.5下载spring所需的jar包这里我新建了一个web项目spring,将spring.jar和commons... 阅读全文

posted @ 2014-05-22 01:08 luckygxf 阅读(297) 评论(0) 推荐(0) 编辑

导航