登录
首页 » Java » Wordroid-demo

Wordroid-demo

于 2013-04-01 发布 文件大小:5053KB
0 89
下载积分: 1 下载次数: 15

代码说明:

  安卓单词记忆小程序,用于androi的各种便携式英语记忆,绝对良好(android word memory)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • ActivityManagerRecentTwoActivity
    Activity Manager Running Task Info Test for Andriod.
    2013-10-06 00:32:55下载
    积分:1
  • android lua 在java 中的应用实例
    androlua 使用示例框架
    2014-07-02下载
    积分:1
  • B+树,实现简单算法,可创建树,删除叶子结点,增加关键字等
    B+树实现简单算法,可创建树,删除叶子结点,增加关键字等。创建树,使用文件数据库模拟;删除叶子结点:使用借用或者合并的方式模拟;增加:使用分裂的方式来模拟。
    2022-03-05 09:45:37下载
    积分:1
  • BubbleLiveWallpaper-Sample-master
    Bubble Live Wallpaper for Android
    2015-12-25 09:18:03下载
    积分:1
  • android 仪表盘
    android  仪表盘效果    很实用,自己在网上找的资料,自己实现的,现在已经在项目里面应用。非常适合新手,代码整理的也非常清楚。方便查看,重构,。
    2022-02-05 08:06:21下载
    积分:1
  • 微信公众平台模式(JAVA) SDK/微信app
    【核心代码】package com.gson;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException;import java.lang.reflect.Field;import java.lang.reflect.Method;import java.util.Date;import java.util.Properties;import javax.servlet.Filter;import javax.servlet.FilterChain;import javax.servlet.FilterConfig;import javax.servlet.ServletException;import javax.servlet.ServletInputStream;import javax.servlet.ServletRequest;import javax.servlet.ServletResponse;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.log4j.Logger;import com.gson.bean.Articles;import com.gson.bean.InMessage;import com.gson.bean.OutMessage;import com.gson.bean.TextOutMessage;import com.gson.inf.MessageProcessingHandler;import com.gson.util.Tools;import com.gson.util.XStreamFactory;import com.thoughtworks.xstream.XStream;/** * 请求拦截 * * @author GodSon * */public class WeChatFilter implements Filter { private final Logger logger = Logger.getLogger(WeChatFilter.class); private String _token; private String conf = "classPath:wechat.properties"; private String defaultHandler = "com.gson.inf.DefaultMessageProcessingHandlerImpl"; private Properties p; @Override public void destroy() { logger.info("WeChatFilter已经销毁"); } @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; Boolean isGet = request.getMethod().equals("GET"); String path = request.getServletPath(); String pathInfo = path.substring(path.lastIndexOf("/")); if (pathInfo == null) { response.getWriter().write("error"); } else { _token = pathInfo.substring(1); if (isGet) { doGet(request, response); } else { doPost(request, response); } } } private void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setCharacterEncoding("UTF-8"); response.setContentType("text/xml"); OutMessage oms = new OutMessage(); ServletInputStream in = request.getInputStream(); // 转换微信post过来的xml内容 XStream xs = XStreamFactory.init(false); xs.alias("xml", InMessage.class); String xmlMsg = Tools.inputStream2String(in); logger.debug("输入消息:[" xmlMsg "]"); InMessage msg = (InMessage) xs.fromXML(xmlMsg); // 获取自定消息处理器,如果自定义处理器则使用默认处理器。 String handler = p.getProperty("MessageProcessingHandlerImpl"); if (handler == null) handler = defaultHandler; try { // 加载处理器 Class clazz = Class.forName(handler); MessageProcessingHandler processingHandler = (MessageProcessingHandler) clazz.newInstance(); // 取得消息类型 String type = msg.getMsgType(); Method mt = clazz.getMethod(type "TypeMsg", InMessage.class); oms = (OutMessage) mt.invoke(processingHandler, msg); if (oms == null) { oms = new TextOutMessage(); ((TextOutMessage) oms).setContent("系统错误!"); } setMsgInfo(oms,msg); } catch (Exception e) { logger.error(e); oms = new TextOutMessage(); ((TextOutMessage) oms).setContent("系统错误!"); try { setMsgInfo(oms,msg); } catch (Exception e1) { logger.error(e); } } // 把发送发送对象转换为xml输出 xs = XStreamFactory.init(true); xs.alias("xml", oms.getClass()); xs.alias("item", Articles.class); String xml = xs.toXML(oms); logger.debug("输出消息:[" xml "]"); response.getWriter().write(xml); } private void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { String signature = request.getParameter("signature");// 微信加密签名 String timestamp = request.getParameter("timestamp");// 时间戳 String nonce = request.getParameter("nonce");// 随机数 String echostr = request.getParameter("echostr");// // 验证 if (Tools.checkSignature(_token, signature, timestamp, nonce)) { response.getWriter().write(echostr); } } private void setMsgInfo(OutMessage oms,InMessage msg) throws Exception { // 设置发送信息 Class outMsg = oms.getClass().getSuperclass(); Field CreateTime = outMsg.getDeclaredField("CreateTime"); Field ToUserName = outMsg.getDeclaredField("ToUserName"); Field FromUserName = outMsg.getDeclaredField("FromUserName"); ToUserName.setAccessible(true); CreateTime.setAccessible(true); FromUserName.setAccessible(true); CreateTime.set(oms, new Date().getTime()); ToUserName.set(oms, msg.getFromUserName()); FromUserName.set(oms, msg.getToUserName()); } /** * 启动的时候加载wechat.properties配置 可以在过滤器配置wechat.properties路径 */ @Override public void init(FilterConfig config) throws ServletException { String cf = config.getInitParameter("conf"); if (cf != null) { conf = cf; } String classPath = this.getClass().getResource("/").getPath().replaceAll("%20", " "); conf = conf.replace("classPath:", classPath); p = new Properties(); File pfile = new File(conf); if (pfile.exists()) { try { p.load(new FileInputStream(pfile)); } catch (FileNotFoundException e) { logger.error("未找到wechat.properties", e); } catch (IOException e) { logger.error("wechat.properties读取异常", e); } } logger.info("WeChatFilter已经启动!"); }}
    2014-01-21下载
    积分:1
  • android 简单的截屏 例子源码下载
    android 简单的截屏 例子源码下载
    2014-09-14下载
    积分:1
  • hibernate+struts2+spring/mybatis+struts2+spring两种版本框架整合
    hibernate+struts2+spring/mybatis+struts2+spring两种版本框架整合,两种版本的框架的整合。 
    2022-07-23 11:03:14下载
    积分:1
  • Android获取手机里所安装的应用列表 
    AppManager源代码,Android手机应用管理器之获取应用列表,将得到手机里所有安装的应用名称等信息,内含一个安卓应用程序类,获取到所有安装了的应用程序的信息,包括那些卸载了的,但没有清除数据的应用程序。获取到所有应用信息后,将信息保存到list列表中。有些系统应用是可以更新的,如果用户自己下载了一个系统的应用来更新了原来的,它还是系统应用,加了个判断。另外,开一个线程用于完成对所有应用程序信息的搜索,当搜索完成之后,就把一个成功的消息发送给Handler,然后handler把搜索到的数据设置进入listview里面。
    2022-01-25 22:27:18下载
    积分:1
  • forum
    具有论坛基本功能,但是界面效果稍欠,后期有待修缮(failed to translate)
    2013-05-09 00:24:25下载
    积分:1
  • 696518资源总数
  • 104271会员总数
  • 57今日下载