登录
首页 » Java » 11

11

于 2013-08-10 发布 文件大小:2KB
0 234
下载积分: 1 下载次数: 3

代码说明:

  网页上可以使用的手机号抽奖代码,细化一下即可使用(Web pages can use the phone number lottery code, refine it, you can use)

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

发表评论

0 个回复

  • zhenhaoso_UTF8
    真好搜小偷程序整站完整包(UTF8)需用asp.net2.0以上环境支持 App_Data和bin文件夹要放到根目录 网站名称可在web.config内修改 如果您使用是其中之一的搜索小偷,覆盖相应的bin文件夹内的文件就可以。(Nice to search the entire station thief program complete package (UTF8) required environment asp.net2.0 more support the App_Data and a bin folder into the root directory name of the site if you use one of the search can be modified in web.config thief, covering the bin file inside that folder you can.)
    2013-01-14 22:27:30下载
    积分:1
  • moage_Android_ImageView
    moage Android ImageView图片循环跑马灯效果源码(the the moage Android ImageView picture cycle Marquee effect source)
    2013-04-07 22:49:47下载
    积分: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
  • zhongyiAD
    中易广告联盟PHP源码。 空间要求: 操作系统:Linux/Unix/NT;推荐使用Linux或Unix/Win2003操作系统,版本不限 服务环境:Apaceh(IIS)+PHP5.0.x+GD+MySQL5.0.2+Zend Optimzer3.0.x;推荐最新版本; 要保证空间至少能绑定两个域名。 用虚拟主机的如不清楚服务器环境配置,请咨询你的空间服务商 必需保证你的服务器或虚拟主机支持以上环境,特别是MySQL数据库版本需5.02以上!!大部分问题都是出现在数据设置上!(中易程序本身在低版本数据库就会容易出现问题)(Easy advertising alliance PHP source. Space requirements: operating system: Linux/Unix/NT recommended operating system Linux or Unix/Win2003 version Open-service environment: Apaceh (IIS)+PHP5.0.x+GD+MySQL5.0.2+Zend Optimzer3.0.x recommend the latest version To ensure that the space can bind at least two domain names. Server environment configured virtual host such as unclear, please consult your service provider space necessary to ensure your server or virtual host support environment, especially MySQL database version needs 5.02!! Most of the problems are in the data set (easy to program in a low version of the database will be prone to problems))
    2012-12-11 21:01:35下载
    积分:1
  • 79207011wenjuandiaocha
    一个很全面的问卷调查系统,其中包含了源代码哦,强烈建议下载.(A very comprehensive survey system, which includes the source code Oh, it is strongly recommended to download.)
    2013-11-01 10:54:12下载
    积分:1
  • JSP+Serlvet+JavaBean+Maven+MySql 学生学籍信息管理系统实战 Idea版本(源码+数据库脚本)
    为新学习 JSP 的开发爱好者小白写下这篇文章,教你若何创建一个自己的学生信息管理系统,可能有很多小白也在迷茫中,建议你不要灰心啊,在下面我讲给你叙述如何进行完成一套自己的系统,并且提供两套版本,一套为 IntelliJ IDEA 进行开发的版本,一套为 eclipse 开发的系统版本,接下来我以 Idea 开发为基础,整套开发方式完全基于 MVC 架构思想为新入门的小白们进行一步一步的讲解这一块的知识。以下所有信息都是个人完成,若有转载或者借鉴请注明出处。大家可以参考我的博客进行参考部署开发。
    2019-07-28下载
    积分:1
  • 基于android手机的蓝牙串口调试助手(源码)
    基于android手机的蓝牙串口调试助手(源码)(Bluetooth Serial Port Debugging Assistant (Source Code) Based on Android Mobile Phone)
    2019-02-08 08:47:05下载
    积分:1
  • android 自定义Toast颜色 实例源码
    android 自定义Toast颜色 实例源码
    2014-08-21下载
    积分:1
  • http协议 文件下载功能
    应用背景 通过HTTP协议的方式下载文件 http(超文本传输协议)是一个基于请求与响应模式的、无状态的、应用层的协议,常基于TCP的连接方式。HTTP协议的主要特点是:      1.支持客户/服务器模式。      2.简单快速:客户向服务器请求服务时,只需传送请求方法和路径。由于HTTP协议简单,通信速度很快。      3.灵活:HTTP允许传输任意类型的数据对象。类型由Content-Type加以标记。      4.无连接:即每次连接只处理一个请求,处理完客户的请求,并收到客户的应答后,即断开连接。采用这种方式可以节省传输时间。      5.无状态:无状态是指协议对于事务处理没有记忆能力。       http1.0协议默认的是非持久连接, HTTP1.1默认的连接方式为持久连接。 非持久连接:每次服务器发出一个对象后,相应的TCP连接就被关闭,也就是说每个连接都没有持续到可用于传送其他对象。每个TCP连接只用于传输一个请求消息和一个响应消息。 持久连接:服务器在发出响应后让TCP连接继续打开着。同一对客户/服务器之间的后续请求和响应可以通过这个连接发送。HTTP/1.1的默认模式使用带流水线的持久连接。 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
    2023-08-31 15:20:03下载
    积分:1
  • 词法分析器
    应用背景它被用于序列识别。生物信息学算法用于检测基因序列的相似性。所以这个动态规划算法也被使用过。到目前为止,它的工作很好。生物算法需要更多的改进。这只是一个基本步骤。有更复杂的算法。关键技术生物信息学,DNA,字符串,字符串对齐。 ;没有嫉妒,整个世界为你敞开。嫉妒,你只是把一条底线,你永远不会越过它。 ;与阿布纳塞尔先生进一步接触该信息。 ;信,证书及复印件;标记表和两张照片应送交处长,东北大学孟加拉国,telihaor。
    2023-07-14 15:05:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载