上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: 几年以前,Charles Simonyi(他后来成为微软的著名程序员)设计了一种以前缀为基础的命名方法,这种方法后来称为"匈牙利表示法"以记念他.他的思想是根据每个标识符所代表的含义给它一个前缀.微软后来采用了这个思想,给每个标识符一个前缀以说明它的数据类型.因此,整型变量的前缀是n,长整型变量是nl,字符型数组变量是ca,以及字符串(以空类型结尾的字符数组)以sz为前缀.这些名字可能会非常古怪.比如说:lpszFoo表示"Foo"是一个指向以空字符为结尾的字符串的长整型指针.这种方法的优点是使人能够通过变量的名字来辨别变量的类型,而不比去查找它的定义. 阅读全文
posted @ 2012-03-26 20:29 乌托邦. 阅读(7327) 评论(0) 推荐(3) 编辑
摘要: 阅读全文
posted @ 2012-03-26 19:26 乌托邦. 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Windows操作系统的所封装的消息格式:typedef struct tagMSG { HWND hwnd; UINT message; WPARAM wParam; LPARAM lParam; DWORD time; POINT pt;} MSG, *PMSG;注释:hwndHandle to the window whose window procedure receives the message.messageSpecifies the message identifier. Applications can only use the low word; the high word 阅读全文
posted @ 2012-03-22 22:59 乌托邦. 阅读(604) 评论(0) 推荐(0) 编辑
摘要: 组建类只能放到主目录包的子包或主目录包下目前学到两种组件:Activity 、 ContentProvider 阅读全文
posted @ 2011-12-14 22:54 乌托邦. 阅读(99) 评论(0) 推荐(0) 编辑
摘要: import android.app.Activity;import android.content.Context;import android.content.SharedPreferences;import android.content.SharedPreferences.Editor;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.EditText;public class XMLfileActivity extends Activ 阅读全文
posted @ 2011-12-08 17:06 乌托邦. 阅读(1580) 评论(0) 推荐(0) 编辑
摘要: import java.io.IOException;import java.io.InputStream;import java.util.ArrayList;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import javax.xml.parsers.ParserConfigurationException;import org.w3c.dom.Document;import org.w3c.dom.Node;import org.w3c.dom.NodeL 阅读全文
posted @ 2011-12-08 17:05 乌托邦. 阅读(192) 评论(0) 推荐(0) 编辑
摘要: import myAndroid.parseData.*;import java.util.*;import java.io.*;import javax.xml.parsers.*;import javax.xml.parsers.SAXParserFactory;import org.xml.sax.Attributes;import org.xml.sax.SAXException;import org.xml.sax.helpers.DefaultHandler;//XML文件解析类public class parseXML{public List<Student> get 阅读全文
posted @ 2011-12-08 17:04 乌托邦. 阅读(213) 评论(0) 推荐(0) 编辑
摘要: public static void saveXML(ArrayList<Student> students,OutputStream outStream) throws IllegalArgumentException, IllegalStateException, IOException{//获取对象XmlSerializer serial=Xml.newSerializer();//读出到输出流并且设置输出流的编码格式serial.setOutput(outStream, "UTF-8");//文件开始serial.startDocument(" 阅读全文
posted @ 2011-12-08 17:03 乌托邦. 阅读(164) 评论(0) 推荐(0) 编辑
摘要: InputStream in=getClass().getClassLoader.getResourseAsStream("文件名");//返回注:文件放到跟目录直接写文件名FileInputStream instr=context.openFileInput(name);//通过上下文变量获取输入文件流FileOutputStream stream=context.openFileOutput(name, Context.MODE_PRIVATE);//获取文件输出流File file=new File(Environment.getExternalStorageDire 阅读全文
posted @ 2011-12-08 17:01 乌托邦. 阅读(1174) 评论(0) 推荐(0) 编辑
摘要: import java.io.*;import android.content.Context;import android.os.Environment;public class SaveFile{//获取上下文变量private Context context;public SaveFile(Context context){super();this.context = context;} /*** @param name* @param content* @throws IOException*/public void save(String name,String content) t 阅读全文
posted @ 2011-12-08 16:05 乌托邦. 阅读(123) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页