- 博客(102)
- 资源 (4)
- 收藏
- 关注
原创 微信网页分享时不显示描述只显示地址的解决方法
参照:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115附录5-常见错误及解决方法invalid url domain当前页面所在域名与使用的appid没有绑定,请确认正确填写绑定的域名,仅支持80(http)和443(https)两个端口,因此不需要填写端口号(一个appid可以绑定三个有效域...
2019-06-12 17:53:53 5440 3
原创 算法总结1: 数组和链表必知必会(算法笔记)
数组:1. 实现一个支持动态扩容的数组2. 实现一个大小固定的有序数组,支持动态增删改操作3. 实现两个有序数组合并为一个有序数组链表实现单链表, 循环链表,双向链表,支持增删操作实现单链表反转实现两个有序的链表合并为一个有序链表实现求链表的中间结点...
2019-03-17 21:17:02 163
原创 The last packet successfully received from the server was 11,012 milliseconds ago.
最近在生产系统上报如下错误:### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received from the server was 11,...
2019-03-01 13:52:39 1116
原创 kettle windows安装后启动spoon.bat无法启动的问题
修改spoon.bat如下语句: if "%PENTAHO_DI_JAVA_OPTIONS%"=="" set PENTAHO_DI_JAVA_OPTIONS="-Xms1024m" "-Xmx2048m" "-XX:MaxPermSize=256m" 为:if "%PENTAHO_DI_JAVA_OPTIONS%"=="" set PENTAHO_
2019-01-29 04:54:27 1766 1
原创 phpexcel 因为文件格式或文件扩展名无效,请确定文件未损坏,并且文件扩展名与文件的格式匹配
$objPHPExcel = new PHPExcel();$filename = "test.xls";header('Content-Type: application/vnd.ms-excel');header("Content-Disposition: attachment;filename=\"{$filename}\"");header('Cache-Control: ...
2019-01-28 17:34:58 4723
原创 hcache编译安装 && fatal: unable to access 'https://github.com/tobert/pcstat/': SSL connect error
1. 获取hcache源代码:wget https://github.com/silenceshell/hcache/archive/master.zipunzip master2.安装gohcache要求go的版本不得低于1.4.本次使用go1.7 wget https://dl.google.com/go/go1.7.6.linux-amd64.tar.gztar zx...
2019-01-24 11:56:07 3442
原创 struct对齐 && gdb初步使用
struct test{ char a;//1 int b;//4 long c;//4 void* d;//1 int e;//4 char* f;//4};int main(){ struct test t1; printf(t1.f); } gcc -g test.c(需要使用-g来生成符号表)(gdb) file a.outReading sy...
2019-01-16 00:16:48 398 4
原创 php7最小化安装 && vld扩展安装并查看php代码的opcode && ast测试
最小化安装php7cd ~/software/git clone https://github.com/php/php-src.gitcd php-srcgit checkout php-7.2.13cd ../cp -r php-src php7.2cd php7.2./buildconf --force./configure --prefix={家目录}/...
2019-01-15 23:04:07 1539
原创 mycat1.6 通过navicat导入数据的时候报错的问题
navicat连接mycat 8066端口执行时,如果执行的sql有类似如下单行注释时,会导致导入失败。SET FOREIGN_KEY_CHECKS=0;-- ------------------------------ Table structure for test-- ----------------------------DROP TABLE IF EXISTS `test...
2019-01-08 18:55:51 1155
原创 mycat 常见配置详解
在配置多schema的时候,如果有如下问题:The content of element type "mycat:schema" must match "(schema*,dataNode*,dataHost*)".需要排查 schema.xml中:schema,dataNode,dataHost的书写顺序,我出错的原因就是,我是按照:schema,dataNode,dataHos...
2019-01-08 15:49:32 902
原创 php5.4 编译原理第一弹--autoconf && 最小化安装php5.4
执行./buildconf --force后,在php5.4目录下会自动生成如下文件只在 php5.4/ 存在:aclocal.m4只在 php5.4/ 存在:autom4te.cache只在 php5.4/ 存在:buildmk.stamp只在 php5.4/ 存在:configure只在 php5.4/ 存在:generated_lists只在 php5.4/ 存在:instal...
2019-01-02 23:47:50 248
原创 ubuntu安装source insight
安装方法:sudo apt-get install wine下载sourceInsight,以sourceInsight3为例:假设exe的位置在~目录下,则直接执行:wine SourceInsight_V3.5.76.0_Setup.1429178754.exe安装依赖包后,会跳到安装 ttf-mscorefonts-installer安装界面,使用tab切换到确认按钮,...
2019-01-02 22:25:52 379
原创 php 使用反射设置方法可见性
$ref_class = new ReflectionClass('class_demo'); $instance = $ref_class->newInstance(); $method = $ref_class->getmethod('method_demo');$method->setAccessible(true);$itemInfo = $method-&g...
2018-12-25 18:10:19 336 1
原创 [easy][leetcode面试] majorityElement 的js解法
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element alwa...
2018-12-19 16:40:49 149
原创 微信统一下单接口报: 201 商户订单号重复 解决方案
项目中遇到一个问题:h5发起的订单。在小程序端进行微信支付的时候,报 201 商户订单号重复。解决方法如下:h5微信支付的时候:trade_type是MWEB小程序微信支付的时候:trade_type是JSAPI支付接口中 对微信支付的这两种场景:h5支付,小程序支付作区分。调用统一调单接口的时候: 商户订单号:out_trade_no 使用 {针对h5支付和小程序支付...
2018-12-19 15:11:55 13498 2
原创 [easy][leetcode面试] 罗马字符转换成对应的数字
Roman numerals are represented by seven different symbols: I, V, X, L, C, Dand M.Symbol ValueI 1V 5X 10L 50C 100D ...
2018-12-18 23:05:39 237
原创 mysql导入csv文件
load data infile '{csvpath}' into table {表名} fields terminated by ',' lines terminated by '\r\n' ; 导入过程中可能的问题:1 . [Err] 1300 - Invalid utf8 character string: ''csv文件必须是utf8格式, windows可以使用no...
2018-12-14 12:41:42 840
原创 [easy][leetcode面试] reverseList 反转单链表
Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULLFollow up:A linked list can be reversed either iteratively or recursi...
2018-12-12 23:27:11 116
原创 mysql:MySQL error 1449: The user specified as a definer does not exist
最近在删除表数据的时候报如上错误。查看无法删除的表结构时发现。该表存在触发器。且该表的definer--即创建表触发器的用户并不存在。进而导致的标题所示的问题。目前查到的解决方法,比较靠谱的有两个:1. 创建触发器所需要的用户。2. 删除触发器并重新创建。过程如下:SELECT CONCAT("DROP TRIGGER ", trigger_name, ";", ...
2018-12-12 15:34:30 241
原创 java使用xstream 双下划线的解决方法
xstream = new XStream(new DomDriver("UTF-8")); 修改为:xstream = new XStream(new DomDriver("UTF-8", new XmlFriendlyReplacer("_-", "_"))) ;参考:https://stackoverflow.com/questions/9333035/xstream-...
2018-12-12 11:14:04 1451
原创 [easy][leetcode面试] sum-of-two-integers && js 中 有符号 int 的二进制表示
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example 1:Input: a = 1, b = 2Output: 3Example 2:Input: a = -2, b = 3Output: 1js推荐方法:/**...
2018-12-11 22:11:10 154
原创 java普通工程转换为web工程
1. 转换过程 2. 转化之后启动tomcat报错:警告:警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:{工程名}' did not find a matching property.的解...
2018-12-11 14:35:58 633
原创 charles 手机抓包设置
1. 安装charles: https://www.7down.com/soft/133829.html2. 安装好后, proxy->windows proxy 点击后,可以抓取windows本身的网络包3. 安装证书:help---->ssl proxying----->install charles root certificate手机端访问:androi...
2018-12-10 11:39:07 146
原创 [easy][leetcode面试] Single Number
Given a non-empty array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without us...
2018-12-06 23:08:49 96
原创 php解析webservice response的方法
soap response的xml示例:<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs...
2018-12-06 17:48:17 472
原创 [easy][leetcode面试题] Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Note: A leaf is a node with no childre...
2018-12-05 22:53:55 104
原创 [easy][leetcode面试] Fizz Buzz js方法 && java方法
Write a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”. Fo...
2018-12-04 22:54:55 209
原创 vscode 报:Classpath is incomplete的解决方法
https://github.com/redhat-developer/vscode-java/wiki/%22Classpath-is-incomplete%22-warning[Java] The declared package "reverseString" does not match the expected package "" 安装插件: Eclipse New ...
2018-12-02 23:24:52 5722
原创 github创建项目, 本地获取并提交
git 工具下载地址: https://git-scm.com/downloads 1. 在github上创建一个项目比如: python_learn.2. 本地创建一个工程目录。名称同git上创建的项目,也为 python_learncd python_learngit initgit config --global user.name "awesomeQ"git c...
2018-12-01 16:56:12 148
原创 java处理字符串的空格 (包括char code 160, \t \s \r\ \n)
替换字符串左右两端的空格。并且将文件中 &nbsp(char ASCII code 160);, 回车,换行符 替换;字符串中间连续的空格替换成一个的方法:public class regexTest{ public static void main(String[] args) { // TODO Auto-generated method s...
2018-11-30 14:02:56 2382
原创 [Easy] [leetcode面试] reverseString java版本
原题目: https://leetcode.com/problems/reverse-string/Write a function that takes a string as input and returns the string reversed. Example 1:Input: "hello" Output: "olleh"Example 2:Input:...
2018-11-29 22:26:22 129
原创 [Easy] [leetcode面试] moveZeroes java方案, 使用main函数测试
原题目: https://leetcode.com/problems/move-zeroes/Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.Example:Input...
2018-11-29 00:04:44 216
原创 centos6.5 Percona XtraBackup 2.4.12 安装 && 通过xtrabackup扩展mgr节点
Percona XtraBackup 简介参照: https://blog.csdn.net/eaglejiawo1120/article/details/84583186centos安装yum install http://www.percona.com/downloads/percona-release/redhat/0.1-6/percona-release-0.1-6.noarc...
2018-11-28 17:57:15 628
翻译 Percona XtraBackup 简介及特点, Percona XtraBackup 与 mysqlbackup对比;
Percona XtraBackup简介Percona XtraBackup是世界上唯一的开源免费MySQL热备份软件,可为InnoDB和XtraDB数据库执行无阻塞备份。使用Percona XtraBackup,您可以获得以下好处:备份快速可靠地完成备份期间不间断的事务处理节省磁盘空间和网络带宽自动备份验证由于更快的恢复时间,正常运行时间更长Percona XtraBack...
2018-11-28 14:32:25 1343
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人