摘要: C写文件#include<stdio.h> main(){ // java // File file = new File("1.txt") // 打开一个文件的c语言的函数 // sharedpreference db content.openoutput() // 获取到文件的指针 FILE* fp = fopen("1.txt","wt"); char* str ="haha wirte file"; // fwrite方法接受4个参数 // 第一个参数 写什么内容 ... 阅读全文
posted @ 2012-11-16 20:52 sfshine 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 自定义dialog肯定是用的很多了 但是感觉每次做都是很乱 单纯完成任务而已,现在封装了一下 以后用到直接copy把UI没有做 有时间自己搞把主activitypackage com.su.testcustomdialog; import com.su.testcustomdialog.MyDialog.Dialogcallback; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.wid.. 阅读全文
posted @ 2012-11-16 13:21 sfshine 阅读(227) 评论(0) 推荐(0) 编辑
摘要: MP3文件乱码的原因:这个问题出现在mp3文件里,由于大陆大多数MP3文件都是用GBK/GB18030编码写入标签信息的,而大多数的linux播放器默认以utf-8编码读取,这就产生了乱码。解决方法:使用Mutagen来修改Mp3文件的标签信息,具体方法如下(只针对GBK/GB18030编码的情况):安装Mutagen(ubuntu下终端运行 sudo apt-get install python-mutagen)后,在终端执行:mid3iconv -e gbk *.mp3如果想转换当前目录下的所有 mp3 (包括子目录):find . -iname \"*.mp3\" - 阅读全文
posted @ 2012-11-16 12:00 sfshine 阅读(309) 评论(0) 推荐(0) 编辑