`
kerlubasola
  • 浏览: 680608 次
文章分类
社区版块
存档分类
最新评论
文章列表
XML和JSON 都是Web 开发的一种数据交换格式。也可以理解为是一种存储数据的方式。 JSON的数据格式:  1. 一个对象以“{”(左括号)开始,“}”(右括号)结束。每个“名称”后跟一个“:”(冒号);“‘名称/值’ 对”之间使用“,”(逗号)分隔。 名称用引号括起来;值如果是字符串则必须用括号,数值型则不需要。例如:var o={"xlid":"cxh","xldigitid":123456,"topscore":2000,"topplaytime":"2009-08- ...
Using Abstraction to Optimize Runtime Polymorphism by Gabriel T. Delarosa What is the cost of polymorphism? As any experienced C++ programmer knows, virtual functions are slower than normal functions because they require more indirection. Each object must have its v-table p ...
移动互联网时代--Android上的一个例子 http://labs.chinamobile.com/mblog/389_14499 WebView对Javascript的支持也很强 http://www.javaeye.com/topic/376674
&lt; < 小于号 &gt; > 大于号 &amp; & 和 &apos; ' 单引号 &quot; " 双引号
一、基于浏览器语言的国际化配置 使用Spring的MVC,并且配置中有配置Resource文件 <!-- 资源文件绑定器 --> <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename" value="message-info" /> <pr ...
如何获取 res 中的资源 数据包package:android.content.res主要类:ResourcesAndroid SDK中的简介:Class for accessing an application’s resources.Class for accessing an application’s resources. This sits on top of the asset manager of the application (accessible through getAssets()) and provides a higher-level API for gettin ...
按着例子给自己的程序添加了启动浏览器的功能。 启动http://的完全没有问题,启动file://就总是异常 最后发现问题出在了Android 浏览器的配置文件上 自己的调用程序: Uri uri = Uri.parse("file://data/data/test.html"); Intent it = new Intent(Intent.ACTION_VIEW, uri); context.startActivity(it); Android 浏览器的配置文件: packages/apps/Browser/AndroidManifest.xml ...
下面的一些例子是从网上找的,他有点像J2ME的platformRequest,能调用手机平台的一些如SMS,浏览器,MMS,TEL等功能 显示网页 Uri uri = Uri.parse("http://google.com"); Intent it = new Intent(Intent.ACTION_VIEW, uri); startActivity(it); Uri uri = Uri.parse("http://google.com"); Intent it = new Intent(Intent.ACTION_VIEW, uri); st ...
一、基于浏览器语言的国际化配置 使用Spring的MVC,并且配置中有配置Resource文件 <!-- 资源文件绑定器 --> <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename" value="message-info" /> <property name= ...
JNI本地方法支持java对象的传递。本文就java如何传递对象给C++的DLL,在C++中又如何获取java对象的变量,如何调用java函数以及如何接收java传递的中文字符串问题做一个简单的描述。 假设我们需要传递如下所示对象: package Editor; class MyObject{ int value1; String value2; MyObject() { } MyObject(int v1, String v2) { value1 = v1; value2 = v2; } public void setValue(String v2) { value2 = v2; ...
Android通过SQLite库提供了完整的关系型数据库能力,而不用强加额外的限制。 使用SQLite,你可以为每个应用程序创建独立的、关联的数据库。使用它们来储存和管理复杂的、结构化的应用程序数据。 所有的Android数据库都存在 ...
SQLite 是一个实现了完备的(self-contained),可嵌入的(embeddable),零配置(zero-configuration)的SQL数据库引擎的小型的C函数库。它包含以下的特点:. 事务处理原子化(atomic),一致化(consistent),持久化(isolated),绝缘化(durable),即使是在系统崩溃和掉电时 零配置,不需要设置或者管理 实现了SQL92的大部份标准 (不支持特性) 整个的数据库被储存在单个的磁盘文件上 数据库文件能够被不同字节序的机器所共用 支持T字节和G字节大小的字符串和块(blob) 小型的代码痕迹(small code footprin ...
通过设置FLAG_INSISTENT和FLAG_ONGOING_EVENT 标志位可以让Notification成为持续或正在进行的Notification。 Notification标记为ONGOING,如下面的代码所示,它就能用于表示当前正在进行的事件(如来电)。正在进行的事件与“普通的”Notification区别在扩展的状态条窗口中。 notification.flags = notification.flags | Notification.FLAG_ONGOING_EVENT; 持续的Notification一直重复,直到用户取消。下面的代码给出了如何设置Notif ...
1.NotificationManager和Notification用来设置通知。 通知的设置等操作相对比较简单,基本的使用方式就是用新建一个Notification对象,然后设置好通知的各项参数,然后使用系统后台运行的NotificationManager服务将通知发出来。 基本步骤如下: 1)得到NotificationManager: String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService( ...
创建Notification 创建和配置新的Notification需要经历三步。 首先,你要创建一个新的Notification对象,传入要在状态条上显示的图标、文字和Notification的当前时间,如下面的代码片段所示: // Choose a drawable to display as the status bar icon int icon = R.drawable.icon; // Text to display in the status bar when the notification is launched String tickerText ...
Global site tag (gtag.js) - Google Analytics