摘要: protected void onCreate(Bundle savedInstanceState);protected void onStart();protected void onRestart();protected void onResume();protected void onPaus... 阅读全文
posted @ 2014-04-28 17:00 阿黄的苹果 阅读(108) 评论(0) 推荐(0) 编辑
摘要: package com.szy.intent.activity;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.View;import and... 阅读全文
posted @ 2014-04-28 16:53 阿黄的苹果 阅读(164) 评论(0) 推荐(0) 编辑
摘要: package com.szy.button.activity;import android.app.Activity;import android.os.Bundle;import android.view.View;import android.view.View.OnC... 阅读全文
posted @ 2014-04-28 16:38 阿黄的苹果 阅读(114) 评论(0) 推荐(0) 编辑
摘要: View Code 1 2 5 6 7 8 9 10 阅读全文
posted @ 2014-04-28 16:29 阿黄的苹果 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1 1 TextView tv=(TextView)findViewById(R.id.tv);2 String str="欢迎大家收看《Android开发从零开始》系列课程。感谢大家的支持。";3 tv.setText(style); 阅读全文
posted @ 2014-04-28 16:21 阿黄的苹果 阅读(114) 评论(0) 推荐(0) 编辑
摘要: python的模块和包模块一个.py文件就是一个python模块。包把一堆相关的python模块放在一个目录下,再加上一个__init__.py文件就构成了一个python 包,python包可以嵌套,嵌套之后有点像java的包。__init__.py文件可以为空,不过,一般它时而会包含一个__version__的变 量,保存这个包的版本信息,另外还有一个__all__的列表,包括要import时要导入的模块。当然,__init__.py的内容不是绝对的,也可以什么都不写,还可以加上其它任何自己认为需要的代码。* import 和from... import导入模块用import module 阅读全文
posted @ 2013-12-04 17:00 阿黄的苹果 阅读(169) 评论(0) 推荐(0) 编辑
摘要: ANSI,ASCII,Unicode的区别与联系2008-03-27 19:137573人阅读评论(20)收藏举报sqlserver扩展windows网络终端语言快下班时,爱问问题的小朋友Nico又问了一个问题:"sqlserver里面有char和nchar,那个n据说是指unicode的数据,这个是什么意思。"并不是所有简单的问题都很容易回答,就像这个问题一样。于是我答应专门写一篇BLOG来从头讲讲编码的故事。那么就让我们找个草堆坐下,先抽口烟,看看夜晚天空上的银河,然后想一想要从哪里开始讲起。嗯,也许这样开始比较好……很久很久以前,有一群人,他们决定用8个可以开合的晶体 阅读全文
posted @ 2013-10-23 12:32 阿黄的苹果 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 要了解vc中使用#include命令包含头文件所搜寻的路径,必须先了解vc中的几种路径:1. 系统路径系统路径在vc中是"Tools->Options->Directories"中"Include files"指定的路径。打开此对话框会发现默认有这几条路径:C:/Program Files/Microsoft Visual Studio/VC98/INCLUDEC:/Program Files/Microsoft Visual Studio/VC98/MFC/INCLUDEC:/Program Files/Microsoft Visual S 阅读全文
posted @ 2013-09-27 14:31 阿黄的苹果 阅读(377) 评论(0) 推荐(0) 编辑
摘要: # -*- coding=utf-8 -*-import feedparserimport reimport collectionsimport mathimport sysreload(sys)sys.setdefaultencoding("utf8") def info_entropy(words): result = 0 total = sum([val for _, val in words.iteritems()]) for word, cnt in words.iteritems(): p = float(cnt) / total ... 阅读全文
posted @ 2013-09-23 09:10 阿黄的苹果 阅读(583) 评论(0) 推荐(1) 编辑
摘要: 基于统计抽词方法,原理点这里。代码见这里C#,代码比较乱。另有python版本见这里using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;namespace seg_word{ class Program { static void Main(string[] args) { if (args.Length "); return; } ... 阅读全文
posted @ 2013-09-23 09:04 阿黄的苹果 阅读(463) 评论(0) 推荐(1) 编辑