后台代码:public void ProcessRequest(HttpContext context)//只是大概个例子 为了学习{ context.Response.ContentType = "application/json"; string[] ...
分类:
Web程序 时间:
2014-08-21 22:30:34
阅读次数:
242
使用.net创建一个ashx文件,并response.write json格式public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"...
分类:
移动开发 时间:
2014-08-21 18:58:44
阅读次数:
227
8.1、监听器接口和注册
创建监听器的监听器接口属于javax.servlet和javax.servlet.http包的一部分,详情如下:
javax.servlet.ServletContextListener。这是对Servlet Context生命周期事件做出响应的监听器。创建好Servlet Context时会马上调用它的一个方法,并在关闭Servlet Context之前调用它的另一...
分类:
其他好文 时间:
2014-08-21 17:11:24
阅读次数:
228
实现方式:
1. 继承自ViewGroup或Layout ,自定义设置子view的位置、尺寸等
2. 继承自已有的widget View,用于扩展现有组件的功能
3. 继承自View ,完全自定义一个组件
自定义类的构造函数:
public CustomView2(Context context) {//直接在代码中调用时,使用该函数
super(context);
}
p...
分类:
移动开发 时间:
2014-08-21 17:10:54
阅读次数:
268
转自;herependingIntent字面意义:等待的,未决定的Intent。要得到一个pendingIntent对象,使用方法类的静态方法getActivity(Context, int, Intent, int),getBroadcast(Context, int, Intent, int),...
分类:
移动开发 时间:
2014-08-21 15:00:14
阅读次数:
301
一个带删除线的文本标签,继承自UILabel
自绘代码步骤如下:
1,重写控件的drawRect方法
2,首先得到上下文对象
3,设置颜色,并指定是填充(Fill)模式还是笔刷(Stroke)模式
4,在上下文中指定删除线的起点(含x,y)
5,根据标签文字的字体,确定文字的长度(即将被画的线条的长度)
6,指定删除线的终点(含x,y)
7,渲染到上下文,完成路径的绘制...
分类:
移动开发 时间:
2014-08-21 11:38:44
阅读次数:
255
TextView tv=(TextView)findViewById(R.id.tv);
TelephonyManager telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
// 获取SIM卡的IMSI码
String imsi = telManag...
分类:
移动开发 时间:
2014-08-21 11:32:02
阅读次数:
237
Sending SMS And Dialing Numbers without User ConsentSending SMS does not require context or user interaction. A simple call does the job, as shown in ...
分类:
其他好文 时间:
2014-08-21 09:44:43
阅读次数:
170
解决问题:将图像模糊
前提:添加 CoreGraphics.framework
源码:
- (UIImage*) blur:(UIImage*)theImage
{
// create our blurred image
CIContext *context = [CIContext contextWithOptions:nil];
CIImage *inputIma...
分类:
移动开发 时间:
2014-08-21 00:14:03
阅读次数:
232
此例主要是为了展示怎么在画图的指定区域获取监听事件。 1 package com.threew; 2 3 import android.content.Context; 4 import android.graphics.Bitmap; 5 import android.graphics...
分类:
其他好文 时间:
2014-08-20 21:02:32
阅读次数:
290