tomcat的配置,进入conf->context.xmlweb中调用Context c=new InitialContext(); DataSource ds=(DataSource)c.lookup("java:comp/env/mysql"); out.println(ds.getConn.....
分类:
其他好文 时间:
2014-10-20 21:17:42
阅读次数:
169
CoreImage是IOS5中新增框架,通过这个框架我们可以轻松地对图片进行各种特效处理使用CoreImage的主要流程如下(需要添加CoreImage框架至项目中):1 创建CIContext,IOS系统提供了3种方法创建CIContexta.基于CPUCIContext *context = [...
分类:
移动开发 时间:
2014-10-20 21:04:50
阅读次数:
174
一.步骤第一步:继承Service类public class SMSService extends Service { }第二步:在AndroidManifest.xml文件中的节点里对服务进行配置:二.Context.startService()和Context.bindService服务不能自己...
分类:
其他好文 时间:
2014-10-20 19:06:40
阅读次数:
158
package com.mediatek.mobileportal;
import android.app.Activity;
//import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
public ...
分类:
其他好文 时间:
2014-10-20 17:19:23
阅读次数:
190
错误报告:10-20 14:34:46.565: E/AndroidRuntime(23098): FATAL EXCEPTION: main10-20 14:34:46.565: E/AndroidRuntime(23098): android.view.WindowManager$BadToke...
分类:
其他好文 时间:
2014-10-20 16:38:32
阅读次数:
151
提供wifi管理的各种主要API,主要包含wifi的扫描,建立连接,配置等获取WifiManagerWifiManager wm = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);设置wifi功能开启bRet = wifiMana...
分类:
其他好文 时间:
2014-10-20 14:59:30
阅读次数:
1263
注册广播监听开机状态,启动应用和服务等;
监听开机的广播接收器:
public class BootCompletedReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
//开机启动服务
...
分类:
移动开发 时间:
2014-10-20 11:50:21
阅读次数:
235
============问题描述============ 再做一个闹铃服务,我在A类里面通过PendingIntentpi_1=PendingIntent .getBroadcast(context,re_1.getAlarm_id(),intent_1,0);aManager.set(AlarmM...
分类:
移动开发 时间:
2014-10-19 23:04:43
阅读次数:
349
============问题描述============ MyGameView:privateDrawablemyBackground;publicMyGameView(Contextcontext){ super(context); //TODOAuto-generatedconstructors...
分类:
其他好文 时间:
2014-10-19 22:57:16
阅读次数:
248
通过路径我们可以实现更加复杂的图形的绘制,比如多边形,弧,圆角矩形等等- (void)drawRect:(CGRect)rect{ //获取图像上下文对象 CGContextRef context = UIGraphicsGetCurrentContext(); CGContext...
分类:
移动开发 时间:
2014-10-19 21:09:52
阅读次数:
220