05 2012 档案
摘要:一、类型转换函数函数 描述 int(x [,base ]) 将x转 换为一个整数 (其中base表示基数)long(x [,base ]) 将 x转换为一个长整数 float(x ) 将 x转换到一个浮点数 complex(real [,imag ]) 创建一个复数 str(x ) 将 对象 x 转换为字符串 repr(x ) 将对象 x 转换为表达式字符串 eval(str ) 用来计算在字符串中的有效Python表达式,并返回一个对象 tuple(s ) 将 序列 s 转换为一个元组 list(s ) 将序列 s 转换为一个列 表 chr(x ) 将一个整数转换为一个字符 unichr(x
阅读全文
摘要:View Code 1 from 模块 import 函数 2 >>> from math import sin 3 >>> sin(1.5) 4 0.9974949866040544 5 6 直接import 7 >>> import cmath 8 >>> cmath.sqrt(-9) 9 3j 10 11 字符串表示,str和repr 12 >>> print 100000L 13 100000 14 >>> print (10000L) 15 10000 16 >>&
阅读全文
摘要:http://lavasoft.blog.51cto.com/62575/27069
阅读全文
摘要:http://ixdba.blog.51cto.com/2895551/569329
阅读全文
摘要:Android应用程序是用java语言写的,通过aapt工具把应用程序所需要的任何数据、资源文件打包成apk文件,这个文件是一个将应用安装到手机上的一个载体。 有很多方式,每个android应用程序存在于不同的世界:(1) 默认的,每个应用在他自己的Linux进程中运行,当应用中的任何代码需要执行时android就启动相应的进程,当不需要执行时并且系统资源被其他应用请求时android就关闭相应的进程。(2) 每个进程都有他自己的虚拟机对象(VM),所以应用程序代码与其他的应用运行是彼此隔离的。(3) 默认的,每个应用被分配一个唯一的Linux user ID,都被设置权限以便应用程序的文件只
阅读全文
摘要:A kind of design pattern.1 public class viewHolder {2 public static ImageButton downButton;3 public static ImageButton upButton;4 public static ImageButton normalButton;5 public static ImageButton muteButton;6 public static ImageButton vibrateButton;7 public static ProgressBa...
阅读全文
摘要:1 Android 2.1 源码结构分析 2 lee 3 Android 2.1 4 |-- Makefile 5 |-- bionic (bionic C库) 6 |-- bootable (启动引导相关代码) 7 |-- build (存放系统编译规则及generic等基础开发包配置) 8 |-- cts (Android兼容性测试套件标准) 9 |-- dalvik (dalvik JAVA虚拟机) 10 |-- dev...
阅读全文
摘要:1 import android.app.Activity; 2 import android.content.SharedPreferences; 3 import android.os.Bundle; 4 import android.view.MotionEvent; 5 import android.view.View; 6 import android.view.View.OnTouchListener; 7 import android.widget.EditText; 8 import android.widget.ImageButton; 9 10 public class .
阅读全文
摘要:1The system calls this method before making the activity vulnerable to being destroyed and passes it aBundleobject. TheBundleis where you can store state information about the activity as name-value pairs, using methods such asputString(). Then, if the system kills your activity's process and th
阅读全文
摘要:目前关注的是Android和Linux,正在阅读诸如《代码大全》、 《Linux私房菜》等书。 目前在Motorola任职,正在观望Moto的前景,下半年可能去考研。 加油!
阅读全文