当前位置: 首页 > 编程日记 > 正文

企业支付宝账号开发接口实现

转载自:http://my.oschina.net/xshuai/blog/313809

关于即时到账的开发。审核通过。简单测试如下。

希望看的可以收藏或者赞一下哦。

1:拥有自己的支付宝企业账号。去产品商店选择适合自己的方案。并签约合同。

2:选择合适的商家收款产品并去签约。填写相应的信息

3:在商家服务会有PID和KEY是关键的东西。

4:选择自己签约的产品类型,下载对应的接口api与测试代码

  • 即时到账收款 --alipaydirect

  • 网银支付 --alipaydirect_bankpay_single

  • 担保交易收款 --alipaytescow

  • 双功能收款 --alipaydualfun

  • 快捷支付(无线) --WS_SECURE_PAY_SDK

  • 手机网站支付 --WS_WAP_PAYWAP

  • 扫码即时到账 --alipaymobileqrcode

  • 扫码担保交易 --alipaymobileqrcode

  • 批量付款到支付宝账户 --alipaytranspay

  • 快捷登录 --alipayfastlogin

官方给用户自己提供了10种功能的代码。

5:alipaydirect_bankpay_single 测试

在核心代码alipayconfig需要更改自己的partner和key


6:测试界面

 

7:网银银行简码

网银银行简码
BOCB2C中国银行
ICBCB2C中国工商银行
ICBCBTB中国工商银行(B2B)
CMB招商银行
CCB中国建设银行
CCBBTB中国建设银行(B2B)
ABC中国农业银行
ABCBTB中国农业银行(B2B)
SPDB上海浦东发展银行
SPDBB2B上海浦东发展银行(B2B)
CIB兴业银行
GDB广东发展银行
SDB深圳发展银行
CMBC中国民生银行
COMM交通银行
CITIC中信银行
CEBBANK光大银行
NBBANK宁波银行
HZCBB2C杭州银行
SHBANK上海银行
SPABANK平安银行
BJRCB北京农村商业银行
fdb101富滇银行
PSBC-DEBIT中国邮政储蓄银行
BJBANK北京银行

8:错误代码错误说明

误代码说明
EXPARTNER_INFO_UNCORRECT传入外部商户接口信息不正确
TRADE_BUYER_NOT_MATCH买家账户与交易中不一致
TRADE_SELLER_NOT_MATCH卖家账户与交易中不一致
TRADE_DATA_NOT_MATCH请求数据与交易中不一致
SELLER_NOT_IN_SPECIFIED_SELLERS卖家不在指定的商户限制卖家中
ILLEGAL_SIGN签名验证出错
ILLEGAL_ARGUMENT输入参数有错误
HASH_NO_PRIVILEGE没有权限访问该服务
ILLEGAL_SERVICEservice参数不正确
ILLEGAL_PARTNER合作身份者ID不正确
HAS_NO_PUBLICKEY没有上传公钥
USER_NOT_EXIST会员不存在
OUT_TRADE_NO_EXIST外部交易号已经存在
TRADE_NOT_EXIST交易不存在
ILLEGAL_PAYMENT_TYPE无效支付类型
BUYER_NOT_EXIST买家不存在
SELLER_NOT_EXIST卖家不存在
BUYER_SELLER_EQUAL买家、卖家是同一帐户
ILLEGAL_SIGN_TYPE签名类型不正确
COMMISION_ID_NOT_EXIST佣金收取帐户不存在
COMMISION_SELLER_DUPLICATE收取佣金帐户和卖家是同一帐户

出现的错误代码为ILLEGAL_PARTNER_EXTERFACE 

1、没有签约这个接口的合同。 
2、签约了相应的接口合同,但没有生效。 
3、签约了相应的接口合同,但由于违规违法等原因被审核部门强制关闭。 

9:页面需要修改的东西alipayapi.jsp

10:跳转页面第6步有截图。卖家账号收款的账号。不是付款的账号哦。

如果调试登录了收款的支付宝账号。会出错的哦。错误截图如下

错误代码:BUYER_SELLER_EQUAL

如果调试登录了收款的支付宝账号。而且页面填写的卖家账号非卖家账号(收款账号)会出现如下错误

错误代码:SELLER_NOT_IN_SPECIFIED_SELLERS

如果没有错误。则会直接跳转付款页面。输入买家账号即可。

11:成功付款的页面。付款页面需要输入购买用户的支付宝账号和支付密码

12:使用springMVC封装写符合自己网站需求的代码。以下代码仅参考

这个是ALIPAYAPI代码要获取数据的

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Date date = new Date();
        //支付类型  必填 不必修改
        String payment_type = "1";
        
        //服务器异步通知页面路径
        //需http://格式的完整路径,不能加?id=123这类自定义参数
        String notify_url = "http://localhost:8080/alipay/async";
        
        //页面跳转同步通知页面路径
        //需http://格式的完整路径,不能加?id=123这类自定义参数,不能写成http://localhost/
        String return_url = "http://192.168.0.222:8080/alipay/return_url";
        
        //订单名称
        //必填
//        String subject = new String(request.getParameter("WIDsubject").getBytes("ISO-8859-1"),"UTF-8");
        String subject = new String("测试商品".getBytes("ISO-8859-1"),"UTF-8");
        
        //付款金额
        //必填
//        String total_fee = new String(request.getParameter("WIDtotal_fee").getBytes("ISO-8859-1"),"UTF-8");
        String total_fee = "0.01";
        
        
        Map<String, String> sParaTemp = new HashMap<String, String>();
        sParaTemp.put("service""create_direct_pay_by_user");//接口服务----即时到账
        sParaTemp.put("partner", AlipayConfig.partner);//支付宝PID
        sParaTemp.put("_input_charset", AlipayConfig.input_charset);//统一编码
        sParaTemp.put("payment_type", payment_type);//支付类型
        sParaTemp.put("notify_url", notify_url);//异步通知页面
        sParaTemp.put("return_url", return_url);//页面跳转同步通知页面
        sParaTemp.put("seller_email", Constants.SELLER_EMAIL);//卖家支付宝账号
        sParaTemp.put("out_trade_no", date.getTime()+payment_type);//商品订单编号
        sParaTemp.put("subject", subject);//商品名称
        sParaTemp.put("total_fee", total_fee);//价格
        
        //建立请求
        String sHtmlText = AlipaySubmit.buildRequest(sParaTemp, "get""立即付款");
        request.setAttribute("sHtmlText", sHtmlText);
        
        return null;

付款是否成功的代码

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
        Map<String , String> params = new HashMap<String, String>();
        Map requestParams = request.getParameterMap();
        for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext();) {
            String name = (String) iter.next();
            String[] values = (String[]) requestParams.get(name);
            String valueStr = "";
            for (int i = 0; i < values.length; i++) {
                valueStr = (i == values.length - 1 )? valueStr + values[i]:valueStr+values[i]+",";
            }
            params.put(name, valueStr);
        }
        String tradeNo = request.getParameter("out_trade_no");
        String tradeStatus = request.getParameter("trade_status");
        if(AlipayNotify.verify(params)){
            if(tradeStatus.equals("TRADE_FINISHED") || tradeStatus.equals("TRADE_SUCCESS")){
                System.out.println("ok!>>>>>>>>" + tradeNo);
            }
            return "success";
        }else{
            return "fail";
        }
    }

13:使用springMVC封装写符合自己网站需求的代码。以下代码仅参考 全部都写在一个Controller里面

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/**
 * 支付宝Controller
 * @author 宗潇帅
 * @修改日期 2014-9-25下午1:29:53
 */
@Controller
@RequestMapping(value="/aliapi")
public class AlipayApiController {
    private static Log log = LogFactory.getLog(AlipayApiController.class);
    
    @RequestMapping(value="/index")
    public String index(HttpServletRequest request,
            HttpServletResponse response){
                return "web/pay/fund";//付款的页面。本页面是为了测试而使用的
    }
    
    @RequestMapping(value = "/deposit", method = RequestMethod.POST,produces = "application/json")  
    public String deposit(HttpServletRequest request,HttpServletResponse response,Model model) throws Exception { 
//        PrintWriter out = response.getWriter();
        String result = "";
        Date date = new Date();  
        // 支付类型  
        // 必填,不能修改  
        String payment_type = "1";  
        // 服务器异步通知页面路径  
        // 需http://格式的完整路径,不能加?id=123这类自定义参数  
        String notify_url = "http://192.168.0.222:8080/live/aliapi/async";  
        // 页面跳转同步通知页面路径  
        // 需http://格式的完整路径,不能加?id=123这类自定义参数,不能写成http://localhost/  
        String return_url = "http://192.168.0.222:8080/live/aliapi/return_url";  
        // 商户订单号.  
        // 商户网站订单系统中唯一订单号,必填  
        //String out_trade_no = date.getTime() + "";  
        // 订单名称  
        // 必填  
        String subject = "充值测试";  
        // 防钓鱼时间戳  
        // 若要使用请调用类文件submit中的query_timestamp函数  
        String anti_phishing_key = "";  
        // 客户端的IP地址  
        // 非局域网的外网IP地址,如:221.0.0.1  
        String exter_invoke_ip = "";  
          
          
        String total_fee = ServletRequestUtils.getStringParameter(request, "amount","");
        
        String body = ServletRequestUtils.getStringParameter(request, "body","test");
        //商品展示地址
        String show_url = ServletRequestUtils.getStringParameter(request, "show_url","http://www.elve.cn");
        //需以http://开头的完整路径,例如:http://www.xxx.com/myorder.html
        
        
        
        Map<String, String> sParaTemp = new HashMap<String, String>();
        sParaTemp.put("service""create_direct_pay_by_user");//接口服务----即时到账
        sParaTemp.put("partner", AlipayConfig.partner);//支付宝PID
        sParaTemp.put("_input_charset", AlipayConfig.input_charset);//统一编码
        sParaTemp.put("payment_type", payment_type);//支付类型
        sParaTemp.put("notify_url", notify_url);//异步通知页面
        sParaTemp.put("return_url", return_url);//页面跳转同步通知页面
        sParaTemp.put("seller_email", Constants.SELLER_EMAIL);//卖家支付宝账号
        sParaTemp.put("out_trade_no", date.getTime()+payment_type);//商品订单编号
        sParaTemp.put("subject", subject);//商品名称
        sParaTemp.put("total_fee", total_fee);//价格
        sParaTemp.put("body", body);
        sParaTemp.put("show_url", show_url);
        sParaTemp.put("anti_phishing_key", anti_phishing_key);
        sParaTemp.put("exter_invoke_ip", exter_invoke_ip);
         
        //建立请求
        try {
            String sHtmlText = AlipaySubmit.buildRequest(sParaTemp,"post","确认");  
            Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
            String s = gson.toJson(sHtmlText);
            model.addAttribute("sHtmlText", s);
            request.setAttribute("sHtmlText", s);
            result = "{\"success\":true,\"msg\":\"跳转成功\"}";
            StringUtil.writeToWeb(sHtmlText, "html", response);
            return null;
        catch (Exception e) {
            if(log.isErrorEnabled()){
                log.error("ddddddddddddddddddddd");
            }
            result = "{\"success\":false,\"msg\":\"跳转失败,请稍候再试!\"}";
            StringUtil.writeToWeb(result, "html", response);
            return null;
        }
    }  
    /**
     * 同步通知的页面的Controller
     * @param request
     * @param response
     * @return
     * @author 宗潇帅
     */
    @RequestMapping(value="/return_url")
    public String Return_url(HttpServletRequest request,HttpServletResponse response){
        return "web/pay/success";
    }
    /**
     * 异步通知付款状态的Controller
     * @param request
     * @param response
     * @return
     * @author 宗潇帅
     */
    @SuppressWarnings("rawtypes")
    @RequestMapping(value="/async",method = RequestMethod.GET)
    public String async(HttpServletRequest request,
            HttpServletResponse response){
         Map<String,String> params = new HashMap<String,String>();  
            Map requestParams = request.getParameterMap();  
            for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext();) {  
                String name = (String) iter.next();  
                String[] values = (String[]) requestParams.get(name);  
                String valueStr = "";  
                for (int i = 0; i < values.length; i++) {  
                    valueStr = (i == values.length - 1) ? valueStr + values[i]: valueStr + values[i] + ",";  
                }  
                params.put(name, valueStr);  
            }  
            String tradeNo = request.getParameter("out_trade_no");  
            String tradeStatus = request.getParameter("trade_status");  
            //String notifyId = request.getParameter("notify_id");  
            if(AlipayNotify.verify(params)){//验证成功  
                if(tradeStatus.equals("TRADE_FINISHED") || tradeStatus.equals("TRADE_SUCCESS")) {  
                    //要写的逻辑。自己按自己的要求写
                    log.error("ok.......");
                    System.out.println(">>>>>充值成功" + tradeNo);  
                }  
                return "web/pay/success";  
            }else{//验证失败  
                return "web/pay/fail";  
            }  
        
    }
}

14:JSP付款页面表单提交数据并弹出付款页面

    只做了简单的表单提交。可以根据自己的要求修改

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@ include file="/common/webMeta.jsp"%>
<title>www.elve.cn</title>
<meta content="www.elve.cn" name="keywords" />
<meta content="www.elve.cn" name="description" />
</head>
<script type="text/javascript">
    $(function(){
    $("#amount").focus();
    $("#doSubmit").click(function(){
        form1.submit();
    });
});
</script>
<body>
    <form id="form1" action= "${ctx }/aliapi/deposit" method="post" target="_blank">  
                <table cellpadding="10">  
                    <tr>  
                        <td>充值测试</td>  
                        <td class="balance" id="userBalance"></td>  
                    </tr>  
                    <tr>  
                        <td><i class="zfb"></i></td>  
                        <td style="padding-bottom: 0px;">亲爱的<span  
                            class="suppliment_user" id="suppliment_user"></span>,您可以使用支付宝充值积善分,请填写以下信息  
                        </td>  
                    </tr>  
                    <tr>  
                        <td></td>  
                        <td>
                                金额<input type="text" name="amount" id="amount">
                        </td>  
                    </tr>  
  
                    <tr>  
                        <td></td>  
                        <td><a href="javascript:void(0);" id="doSubmit" class="blank_btn">确认</a></td>  
                    </tr>  
                </table>  
    </form>  
</body>
</html>

总结:企业支付宝接口开发基本完善。页面和小功能需要自己修改就可以了。没有什么可难的。接口开发。只要明白怎么跳转就可以了。支付宝开发文档说的很明白的。

转载于:https://www.cnblogs.com/jym-sunshine/p/4726186.html

相关文章:

Fastadmin管理Mysql_FastAdmin-CMS模版制作(6)-正式部署

一、工具信息介绍(1)服务器系统&#xff1a;CentOS7.2 64位系统&#xff1b;(2)服务器面板&#xff1a;宝塔&#xff0c;官网地址&#xff1a;https://www.bt.cn/&#xff1b;(3)PHP7.2&#xff1b;(4)mysql5.6&#xff1b;(5)Nginx&#xff1b;二、运行环境安装(1)进入宝塔官网…

使用微软提供的Office Online实现Office文档的在线查看,编辑等功能

使用微软提供的Office Online平台只需要一个网址即可在线查看Xls,doc,PPT等文档http://view.officeapps.live.com/op/view.aspx?src要查看的文档地址在线编辑需要登录live.com并从onedrive中打开或新建文档也可以来自在线模板(下面的Excel来自Excel Online模板&#xff0c;编辑…

HDU(1847)Good Luck in CET-4 Everybody!

利用PN分析求解此题。递推下去会发现3和3的倍数都是P点。 #include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <set> using namespace std; int main() {int n;while(~scanf("%d",&n)){i…

uboot引导kernel - 1 - Flash的分区

uboot启动Linux内核过程分为4大步骤&#xff1a; 问题1&#xff1a;Flash的分区相关问题 在 上述步骤1/2/4 中都提到了从启动介质(iNand/SD)中读取uboot/kernel到SRAM/DDR中&#xff0c;那么具体从启动介质的什么位置分别读取呢&#xff1f;  上述步骤1中&#xff0c;iROM的…

fedora mysql默认密码忘记_Linux fedora 24 忘记密码图形化界面修改root密码的方法

方法及其简单&#xff0c;只需要两步即可&#xff1a;1、第一步&#xff1a;打开终端&#xff0c;输入sudo su命令。–此处的密码为普通用户的密码&#xff0c;也就是开机时输入的密码。2、第二步&#xff1a;直接sudo passwd root就重置了roor密码了。此时输入新的密码即可&am…

Java Web项目结构

Java Web项目结构&#xff08;一般&#xff09; 1、Java src 2、JRE System Library 3、Java EE 6 Libraries 4、Web App Libraries 5、WebRoot 版权声明&#xff1a;本文博客原创文章&#xff0c;博客&#xff0c;未经同意&#xff0c;不得转载。转载于:https://www.cnblogs.c…

WTForms 小计1 forms

2019独角兽企业重金招聘Python工程师标准>>> 定义 from wtforms import Form, StringField, validators class MyForm(Form):first_name StringField(uFirst Name, validators[validators.input_required()])last_name StringField(uLast Name, validators[vali…

day32-1 事件Event

事件Event-线程 每一个线程都是独立运行且状态不可预测。你把一个任务丢到子线程中&#xff0c;这个任务将异步执行&#xff0c;如何获取到这个任务的执行状态&#xff1f;使用threading库中的Event对象。对象包含一个可由线程设置的信号标志&#xff0c;线程直到等到该标志为真…

uboot引导kernel - 2- uboot/kernel需要放在DDR什么位置的问题

uboot启动Linux内核过程分为4大步骤&#xff1a; 问题2&#xff1a; uboot阶段DDR的分区的问题 上述步骤2和步骤4中&#xff0c;有将uboot/kernel拷贝纸DDR的步骤&#xff0c;具体要拷贝到DDR的什么位置呢&#xff1f; 分清楚这两个概念&#xff1a; 链接地址&#xff1a;链接…

java ftp pasv_Ftp主动模式和被动模式以及java连接ftp模式设置

FTP的主动模式与被动模式FTP服务器使用20和21两个网络端口与FTP客户端进行通信。FTP服务器的21端口用于传输FTP的控制命令&#xff0c;20端口用于传输文件数据。FTP主动模式&#xff1a;FTP客户端向服务器的FTP控制端口(默认是21)发送连接请求&#xff0c;服务器接受连接&#…

Python2.7 安装numpy报错解决方法

Windows 10下用pip安装numpy包报错&#xff1a; Microsoft Visual C 9.0 is required Unable to find vcvarsall.bat Get it from http://aka.ms/vcpython27 通过报错提示信息&#xff0c;打开http://aka.ms/vcpython27会跳转到Microsoft Visual C Compiler for Python 2.7的下…

异常The Struts dispatcher cannot be found. This is

2019独角兽企业重金招聘Python工程师标准>>> 原因&#xff1a;struts2的过滤器映射路径写错 解决方案&#xff1a;在web.xml中配置struts2的过滤器如下&#xff1a; <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*&…

UNDO表空间损坏,爆满,ORA-600[4194]/[4193]错误解决

模拟手工删除UNDO表空间 在ORADATA 中把UNDOTBS01.DBF 删除模拟启库SQL> STARUP;*第 1 行出现错误:ORA-01157: 无法标识/锁定数据文件 2 - 请参阅 DBWR 跟踪文件ORA-01110: 数据文件 2: C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF利用系统本身的默认手动管理 MAN…

uboot引导kernel - 3 -uboot给内核传参详解

uboot中执行theKernel函数后&#xff0c;kernel正式启动。如下函数&#xff0c;我们发现有3个参数。 1. 参数 0&#xff1b; 2. 参数machid; 如下code 中获取machid, gd是个全局变量. 2.1 bi_arch_number是board_info中的一个元素&#xff0c;含义是&#xff1a;开发板的机器…

hdu 1166 敌兵布阵(树状数组)

题意&#xff1a;区间和 思路&#xff1a;树状数组 #include<iostream> #include<stdio.h> #include<string.h> using namespace std;int n,c[50005];int lowbit(int i){return i&-i; }void update(int i,int val){//更新函数while(i<n){//注意这个n的…

java jdbc 表存在_使用JDBC查询是否存在某表或视图,按月动态生成表

查询数据库是否有某表的存在&#xff0c;主要用的就是Connection对象对元数据的操作&#xff0c;代码很简单&#xff0c;贴出来大家参考。/*** 查询数据库是否有某表* param cnn* param tableName* return* throws Exception*/SuppressWarnings("unchecked")public b…

linux串口驱动分析

linux串口驱动分析硬件资源及描写叙述 s3c2440A 通用异步接收器和发送器&#xff08;UART&#xff09;提供了三个独立的异步串行 I/O&#xff08;SIO&#xff09;port&#xff0c;每一个port都能够在中断模式或 DMA 模式下操作。UART 使用系统时钟能够支持最高 115.2Kbps 的波特…

计算TD-LTE DL 峰值速率的工具和相关参数

前一段时间测试DT 基站&#xff0c;需要配置TDD LTE cell 的UDC、TM模式来验证不同组合下的下行峰值速率&#xff0c;趁此机会我用excel写了一个计算下行峰值速率的工具。工具上传至我的github: https://github.com/greenricky/tdlte_dl_rate 计算峰值速率的常用办法是参考36.2…

java配置中心开源项目_配置中心搭建(spring-cloud-config-server)

1.github创建配置库2.配置服务端①创建项目②导入jarorg.springframework.bootspring-boot-starter-weborg.springframework.bootspring-boot-starter-testorg.springframework.cloudspring-cloud-starter-netflix-eureka-clientorg.springframework.cloudspring-cloud-config-…

detection in video and image

video中的detection&#xff0c;背景更加复杂&#xff0c;目标更加不聚焦&#xff0c;同时由于图片分辨率低于图像&#xff0c;因此更加难做。 image中的Detection,背景相对简单些&#xff0c;目标更加聚焦&#xff0c;同时图片分辨率高&#xff0c;因此更加容易些。 转载于:ht…

烂泥:U盘安装Centos6.5

本文首发于烂泥行天下。使用U盘安装Centos6.5&#xff0c;需要以下几个步骤&#xff1a;1、 制作U盘linux系统2、 设置服务器BIOS3、 安装Centos&#xff0c;注意引导分区的安装首先要把U盘做成linux启动盘。网上有关这方面的软件比较多&#xff0c;在此我使用的是WinSetupFrom…

http status 汇总

http status 汇总 常见HTTP状态码 200 OK301 Moved Permanently302 Found304 Not Modified307 Temporary Redirect400 Bad Request401 Unauthorized403 Forbidden404 Not Found410 Gone500 Internal Server Error501 Not Implemented100 Continue 初始的请求已经接受&#xf…

hdu 4278 2012天津赛区网络赛 数学 *

8进制转为10进制 1 #include<cstdio>2 #include<iostream>3 #include<algorithm>4 #include<cstring>5 #include<cmath>6 #include<queue>7 #include<map>8 using namespace std;9 #define MOD 1000000007 10 const int INF0x3f3f3f…

slub object 内存布局

我在 https://blog.csdn.net/wowricky/article/details/83218126 介绍了一种内存池&#xff0c;它的实现类似于linux 中打开slub_debug (1. make menuconfig: Kenel hacking -> Memory Debugging, 2. comand line中传入slub_debugPZU) 时slub 对象池。 首先我们先看一下slub…

java wait abc_java----wait/notify

解释wait/notify必须配合synchronized使用democlass NotifyStop2 {private final Object lock new Object();public void add(String s) throws InterruptedException {Thread.sleep(1000);synchronized (lock) {System.out.println("add notify qian");//唤醒其他线…

hdu-1166敌兵布阵

这个题目就是考察线段树的基本用法&#xff0c;我自己打了代码&#xff0c;其实就是照模板来的&#xff0c;大概思想已经弄懂了。用c不能过&#xff0c;说我超时&#xff0c;就改成c的读入读出&#xff0c;这坑爹的过了。我最爱的c&#xff0c;你肿么了。。。 这是ac的代码&…

Android数据存储(三)——SQLite

如果需要一个更加健壮的数据存储机制&#xff0c;则需要使用一个关系型数据库&#xff0c;在Android上&#xff0c;则为SQLlite。 SQLite的特点&#xff1a;轻量级、嵌入式的、关系型数据库。可移植性好&#xff0c;易使用&#xff0c;小&#xff0c;高效且可靠&#xff0c;与使…

3GPP组织和协议概述

3GPP组织概述 1. TSG/WG 3GPP是以工作组开展工作的&#xff0c;目前有3个大的技术规范组&#xff1a;RAN, SA, CT, 这一级别的工作组英语写为 TSG (Technical Specification Group)。每个TSG下面又分了很多工作组(WG: work group). 详见下表&#xff1a; https://www.3gpp.or…

mysql被拖垮_说几个拖垮系统的小细节!

本文首发于个人微信公众号《andyqian》,期待你的关注&#xff01;前言有好几天没有更新了&#xff0c;期间确实比较忙些&#xff0c;以至于周末也没休息。在这期间&#xff0c;感触还是蛮深的。现在碎片化的想法等整理好后&#xff0c;再以文章的形式分享出来。今天要说的是另外…

为 区域添加 Tag

tagsinput selectTag 转载于:https://www.cnblogs.com/yunqianduan/p/4740902.html