自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(39)
  • 资源 (27)
  • 收藏
  • 关注

原创 golang 数组、切片用法

* declare.gopackage mainimport ( "fmt")type ElementHandler func (interface{})func slice_for_each(arr []interface{}, n int, fn ElementHandler) { for i := 0; i < n; i++ { fn(arr[i]) }...

2019-03-30 22:45:29 253

原创 shell tetris 终端俄罗斯方块

* tetris.sh#!/bin/bashaBox0_0=(0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0)aBox0_1=(0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0)aBox0_2=(0 0 0 0 0 0 0 0 0 0 0...

2019-03-27 14:45:56 463

转载 beyond compare 附beyond compare密钥被撤销解决方法

beyond compare简介Beyond Compare是一套由Scooter Software推出的共享软件,基本定价30美元。主要用途是对比两个文件夹或者文件,并将差异以颜色标示。但是,在中国你可以随便下载到破解版、绿色版。beyond compare是一款功能强大的文件对比软件。身为SEO,你也许没有用过,甚至没有听说过。这并不代表beyond compare在SEO领域不重要,...

2019-03-27 13:17:40 14852 5

原创 golang 3DES 加密

key, iv 自己随意设定为了让结果可正常打印输入显示,都经过base64处理* TripleDES.gopackage authimport ( "bytes" "crypto/cipher" "crypto/des" "encoding/base64")type TripleDES struct { key string iv string}...

2019-03-27 13:16:57 1803

原创 ubuntu 12.04 安装docker

# 安装软件sudo apt-get autoremove --purge dockersudo apt-get updatesudo apt-get install linux-image-generic-lts-trusty linux-headers-generic-lts-trustysudo apt-get install apt-transport-httpssudo ap...

2019-03-26 14:54:57 595 1

原创 php dos2unix

* LineProcessor.php<?php class LineProcessor { /** @var \SplFileObject */ private $file; /** @var int */ private $linum; /** @var callable */ protected $handler; ...

2019-03-25 09:46:59 381

原创 golang 调用 网易云 滑块验证码 demo

用法PHP示例主要代码 session_start(); $verifier = new NECaptchaVerifier(YIDUN_CAPTCHA_ID, new SecretPair(YIDUN_CAPTCHA_SECRET_ID, YIDUN_CAPTCHA_SECRET_KEY)); $validate = $_POST['NECaptchaValidate']; // 获得...

2019-03-24 23:02:48 3149 2

原创 golang 按key字母顺序遍历map

golang maphttps://ashitani.jp/golangtips/tips_map.html* range.gopackage mainimport ( "fmt" "crypto/md5" "math/rand" "sort" "time")type MapEntryHandler func (string, string)// func p...

2019-03-24 22:13:54 3056

原创 golang xorm 示例 返回临时变量的引用

golang xormhttp://www.xorm.io/docs/// var engine *xorm.Enginevar everyone []Userinfoerr := engine.Find(&everyone)golang 可以返回临时变量的引用, 不会panicxorm 数据库表 实体类定义实体类Entity中有 func (* Ent...

2019-03-23 15:57:15 1871

原创 curl 命令行使用 发送json 提交表单 上传文件 php curl post 测试注册

* curl POST JSONcurl "http://192.168.4.157:8060/v1/validate/getcode" -X POST -d '{"mobilenumber":"18771099612"}' -H "Content-Type:application/json" -v* curl POST Formcurl "http://192.168.4.157...

2019-03-20 11:43:48 930

原创 golang解析json文件

* gopher.json{ "name": "Gopher", "title": "programmer", "contact": { "home":"415.333.3333", "cell":"415.555.5555" }}* gopher.gopackage mainimport ( "encoding/json" "...

2019-03-20 10:37:31 4305

原创 centos 上安装nodejs v8.0.0

centos 上安装nodejs v8.0.0新建目录www下载nodejswget https://npm.taobao.org/mirrors/node/v8.0.0/node-v8.0.0-linux-x64.tar.xz解压tar -xvf node-v8.0.0-linux-x64.tar.xz测试是否安装成功进入解压目录下的bin目录,执行ls...

2019-03-20 09:32:11 229

原创 golang 年级转换入学年份

* map.txt '高三' => '03-2016', '高二' => '03-2017', '高一' => '03-2018', '初三' => '02-2016', '初二' => '02-2017', '初一' => '02-2018', '小六' => '01-2013', // 五四制的初中 '六年级'=&...

2019-03-19 09:53:37 770

原创 golang 实现js 数组 indexOf函数 根据元素找到数组下标

在数组中找到一个元素的下标,找不到返回-1在javascript中可以这样写:var a = ['a','b','c','d']console.log(a.indexOf('c')) // 2* index.goimport ( "fmt" "strings")type CompareFunc func(interface{}, interface{}) int...

2019-03-18 19:00:57 9494

原创 golang 解析xml文件

发送soap请求返回的xml* response.xml&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://dmdelivery.com/...

2019-03-18 10:57:14 1478

原创 golang DP LCS 最长公共子序列的长度

https://medium.com/@codingfreak/top-50-dynamic-programming-practice-problems-4208fed71aa31. 暴力递归* LCS.gopackage mainimport ( "fmt")func LCSLength(x []byte, y []byte, m int, n int) int {...

2019-03-17 22:20:17 1248

原创 emacs golang 模式tab宽度设置为2

* ~/.emacs(add-hook 'go-mode-hook (lambda () (setq indent-tabs-mode 1) (setq tab-width 2)))在emacs中添加以上配置M-x eval-buffer重启emacshttps://emacs.stackexchang...

2019-03-17 21:53:51 941

原创 curl 发送soap请求 webservice

* soap.php<?php$ch = curl_init();$headers = [ // "Content-Type: application/json", // "Content-Type: application/x-www-form-urlencoded", "Content-Type: text/xml; charset=U...

2019-03-16 18:19:10 3234

原创 golang http post 查询短信平台余额, SMS短信接口

* mongate.goconst SMS_ASMX = "http://???.???.??:???:8016/MWGate/wmgw.asmx" // 梦网请求url前缀const SMS_HOST = "???.???.??.???:8016" // 梦网hostconst SMS_USERID = "JA????" // 梦网充值账号const SMS_PASSWO...

2019-03-16 14:07:12 587

原创 golang 日期相关的方法

* 时间戳转换格式字符串 time.Unix(1552699194, 0).Format("2006-01-02 15:04:05")2006-01-02 15:04:05 这个日期是固定的不能改!http://47.93.27.106:6060/pkg/time/#Time.Format* 当前时间戳 s time.Now().Unix()...

2019-03-16 09:21:00 265

原创 Golang RPC Thrift

进入 thrift_file 目录执行:$ thrift -out .. --gen go example.thrift,就会在 thrift_file 的同级目录下生成 golang 的包:example,其中 format_data-remote 是生成的测试代码可以不用特别关注。的源码,解压后进入:thrift-0.10.0/compiler/cpp 目录执行如下命令完成编译后。,下载完成后改名为:thrift.exe 并将其放入到系统环境变量下即可使用。还需要import "context"

2019-03-15 09:41:27 436 1

转载 golang 数据类型转换

总结了golang中字符串和各种int类型之间的相互转换方式:string转成int:int, err := strconv.Atoi(string)string转成int64:int64, err := strconv.ParseInt(string, 10, 64)int转成string:string := strconv.Itoa(int)int64转成string:...

2019-03-14 17:29:15 388

原创 Longest Palindromic Substring (Manchester)

https://leetcode.com/problems/longest-palindromic-substring/Given a strings, find the longest palindromic substring ins. You may assume that the maximum length ofsis 1000.Example 1:Input: "...

2019-03-13 23:07:03 257

原创 php reflection 反射 dump 对象, get_object_vars函数用法

调用thrift接口不能var_dump对象输出到 STDOUT, 只能往数据库或者log文件输出。function objDump($o) { $s = ""; $reflect = new ReflectionObject($o); $props = $reflect->getProperties(); foreach($props as $...

2019-03-13 17:25:22 297

原创 javascript URL参数转换为php数组

* Usage:Form Data =>View source* uri2assoc.jsvar fs = require("fs")function parse_uri(s) { return s.split('&').reduce(function(o, kvs) { var a = kvs.split('=') o[ a[0] ] = decode...

2019-03-13 10:58:37 431

原创 Mock.js 生成测试数据 MockValue.php

* Mock.jsfunction Mock() {}Mock.mobile_prefix = ["134", "135", "136", "137", "138", "139", "150", "151", "152", "157", "158", "159&quot

2019-03-12 15:48:55 668

原创 动态引入javascript

* Script.js/** * 动态引入javascript文件, * Usage: * function script_onload() { * alert(1); * } * var load_js = new Script(script_onload); * load_js.set("http://static.gongju.com/js/jquery-1.4....

2019-03-12 15:46:35 288

原创 启用daytime服务 xinet.d udp fsockopen

1. 安装xinetdcat /etc/services | grep "daytime"# for ubuntusudo apt-get install xinetd 如果是centos/red hatsudo yum install xinetd.x86_64centos默认普通用户不能用sudo:https://blog.csdn.net/fareast_mzh/a...

2019-03-12 09:11:58 414

原创 golang string byte[] slice 数组/字符串 相互转化 以及与javascript对比

* bytes.gopackage mainimport "fmt"func main() { // var str = "hello" str := "hello" // var a = str.split('').map(function(c) {return c.charCodeAt(0)}) data := []byte(str) fmt.Println(data)...

2019-03-11 17:27:42 1613

原创 emacs 中文显示 乱码??

emacs ~/.emacs;; set language environment(set-language-environment 'UTF-8)(set-locale-environment "UTF-8")添加这2行代码即可

2019-03-11 16:09:11 1731 1

原创 用minikube运行一个本地单节点Kubernetes集群

* 安装Minikubemac:curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.23.0/minikube-darwin-amd64linux:curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.23....

2019-03-10 15:39:36 673

原创 start docker daemon linux

ubuntu docker环境配置https://blog.csdn.net/fareast_mzh/article/details/88820445代码以及命令行下载git clone git://github.com/luksa/kubernetes-in-actionStart the Docker daemonStart manuallyOnce Docker is ...

2019-03-10 14:00:49 4901

原创 javascript实现简单的yield语义

* yield.jsfunction yield() { var i = 0, state = 0; return function() { var N = 10; switch (state) { case 0: for (; i &lt; N; i++) { state = 1; return i; } break;...

2019-03-07 16:34:05 353

原创 javascript 生成随机手机号用于测试

* Mock.js// ================= BEGIN Mock.js ===================function Mock() {}Mock.mobile_prefix = ["134", "135", "136", "137", "138", "139", "150", "151", "152&

2019-03-07 10:05:25 1421

原创 golang 生成 6位随机 短信验证码 rand random

* getcode.gopackage mainimport ( "fmt" "math/rand" "strings" "time")func GenValidateCode(width int) string { numeric := [10]byte{0,1,2,3,4,5,6,7,8,9} r := len(numeric) rand.Seed(time.No...

2019-03-06 16:52:24 8558 3

原创 php assoc => golang map php关联数组转换go map

* php assoc private static $_GRADE_NAME_TO_ID = array( 'a' => '03-2016', 'b' => '03-2017', 'zxc' => '03-2018', 'd' => '02-2016', 'e' => '02...

2019-03-06 11:46:52 503

原创 php curl 登录接口测试 token写入token.txt 提取http header

* login.php<?phpfunction build_query($a) { $m = []; array_walk($a, function($item, $key) use (&$m) { $m[] = $key.'='.urlencode($item); }); return implode('&', $...

2019-03-05 16:04:23 2903

原创 gin orm 模板搬砖代码生成 字段批量赋值, 错误码switch case代码生成

* rows.php<?phpfunction fileForEachRow($path, $handler) { $handle = fopen($path, "r"); if (! $handle ) { return; } while (($buffer = fgets($handle, 1024) ) !== false) {...

2019-03-05 11:01:13 773

原创 php扩展开发

1. 下载php代码cd /Volumes/Applications/lnmp/srcwget http://am1.php.net/distributions/php-7.3.2.tar.bz2tar xvjf php-7.3.2.tar.bz2 -C .cd php-7.3.2mkdir -p /Volumes/Applications/lnmp/php/7.3.2./conf...

2019-03-03 15:25:46 591

Hebrew-English Tanakh- The Jewish Bible.pdf

The Jewish Bible.pdf

2024-08-16

计算机结构与解释javascript版(带书签)

计算机结构与解释javascript版(带书签)

2024-08-13

BOOK OF WISDOM 2-Emule.pdf

BOOK OF WISDOM 2-Emule.pdf

2024-07-11

eserver-17.14.x86-64-linux.nptl.gz

ed2k server linux x86_64自建服务

2024-05-31

CRYPTOPP-8-5-0.tar.gz

AES, SHA1, 3DES加密库。aMuled项目用到。 关联资源https://download.csdn.net/download/fareast_mzh/89356325

2024-05-25

aMule源代码,eMule Linux版源代码,amuled

aMule源代码,eMule Linux版源代码。还需要 wxWidgets-3.1.5.tar.bz2, udns-0.5.tar.gz mbedtls-2.16.tar.gz libupnp-1.14.12.tar.bz2 等依赖包

2024-05-25

1119. Metro. dynamic programming, graph theory

https://acm.timus.ru/problem.aspx?space=1&num=1119 题目答案

2024-05-10

https://acm.timus.ru/print.aspx?space=1&num=1002 题目答案

In the present world you frequently meet a lot of call numbers and they are going to be longer and longer. You need to remember such a kind of numbers. One method to do it in an easy way is to assign letters to digits as shown in the following picture: 1 ij 2 abc 3 def 4 gh 5 kl 6 mn 7 prs 8 tuv 9 wxy 0 oqz This way every word or a group of words can be assigned a unique number, so you can remember words instead of call numbers. It is evident that it has its own charm if i

2024-05-06

xxd(hexdump),16进制打印

xxd 打印文件16进制内容

2024-04-25

Combined GCC/Nasm programs

编译asm汇编

2024-04-22

Assembly Language Step-By-Step - (Wiley, 2009, 0470497025).pdf

linux nasm, 汇编语言教程。Assembly Language Step-By-Step - Programming with Linux, 3rd edition (Wiley, 2009, 0470497025).pdf

2024-04-21

线性代数小抄,公式定理手册

线性代数小抄,公式定理手册

2024-04-16

C语言运算符优先级, 位运算容易搞错运算符优先级

C语言运算符优先级

2024-04-16

libevent库, http-server静态文件服务器示例

cd sample mkdir htdocs vim htdocs/index.html ./http-server -p 18080 -v htdocs curl -i http://127.0.0.1:18080/index.html

2023-12-14

nasm-10.09.tar.gz

This is the project webpage for the Netwide Assembler (NASM), an asssembler for the x86 CPU architecture portable to nearly every modern platform, and with code generation for many platforms old and new.

2023-11-21

DNS协议格式文档 DNS-primer.pdf

DNS协议格式文档 DNS-primer.pdf

2023-10-17

windows, which命令找到.exe文件路径

windows, which命令找到.exe文件路径,依赖boost库。目录迭代参考博客 https://www.cppstories.com/2019/04/dir-iterate/

2023-09-30

xxd用16进制打印文件内容,调试代码用

例如输出.png文件的内容 00000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR 00000010: 0000 0096 0000 0096 0806 0000 003c 0171 .............<.q 00000020: e200 0000 0173 5247 4200 aece 1ce9 0000 .....sRGB....... 00000030: 0004 6741 4d41 0000 b18f 0bfc 6105 0000 ..gAMA......a... 00000040: 0009 7048 5973 0000 1274 0000 1274 01de ..pHYs...t...t.. 00000050: 661f 7800 002c 0149 4441 5478 5eed 9d07 f.x..,.IDATx^... 00000060: 5814 57db 86bf 96e4 fbf2 a718 134b d4d8 X.W..........K..

2023-08-23

错误日志库实现打印错误堆栈

错误日志库实现打印错误堆栈,解决apue中if error, 错误处理

2023-08-23

Linux C/C++发起http请求示例

Linux C/C++发起http请求, 多线程示例

2023-03-14

windows Visual Studio dll动态库模板

windows Visual Studio dll动态库模板 https://learn.microsoft.com/en-us/cpp/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp?source=recommendations&view=msvc-170

2022-09-26

windows环境Visual studio创建静态库,项目框架

Walkthrough: Create and use a static library C++ windows环境创建静态库,根据教程,以后创建其他的静态库可以直接用这个项目作为框架代码,改配置。 https://learn.microsoft.com/en-US/cpp/build/walkthrough-creating-and-using-a-static-library-cpp?source=recommendations&view=msvc-170

2022-09-26

PHP分布式事务 YiMQ库

yilu-tech/yimq-laravel-sdk/src/YiMqManager.php

2022-07-13

php base64字符串图片jpeg文本文件转换为jpeg图片

php base64字符串图片jpeg文本文件转换为jpeg图片

2022-04-05

xdebug-3.1.0beta2.tgz

参照安装教程 https://xdebug.org/docs/install

2021-09-14

platform-tools_r31.0.3-linux.zip

android adb调试工具

2021-08-15

platform-tools_r31.0.3-darwin.zip

adb安卓调试命令行工具 Mac版本

2021-08-15

platform-tools_r31.0.3-windows.zip

adb 安卓调试工具

2021-08-15

PHP-TreeMap.zip

用PHP写的红黑树,带测试用例, TreeSet https://blog.csdn.net/fareast_mzh/article/details/119495318 这篇博文的完整代码

2021-08-13

PhpSearchTree.zip

https://blog.csdn.net/fareast_mzh/article/details/109709882 这篇博客的附件代码

2021-05-10

windows环境 gcc/g++ mingw64.zip

解压,把bin目录添加到path环境变量即可。这样就能找到gcc.exe, g++.exe

2021-04-01

axure chrome插件 axure_chrome_extension_V0.6.3.zip

chrome://extensions/ Load unpacked

2021-01-04

DesignPatterns.zip

抽象工厂模式,适配器模式,模板模式,策略模式。先写这几种,对接第3方api可能用到的。http://www.imooc.com/wenda/detail/418385

2020-06-22

composer.phar

安装composer每次需要从外国网站下载,速度慢。直接保存一份,下载快。创建文件composer.bat 内容如下 @php "%~dp0composer.phar" %* 把这2个文件放到跟php.exe一样的目录下,然后把这个目录加入到path环境变量,就可以用composer命令了。

2020-05-19

ThinkPHP电商微信小程序.zip

PHP写的电商小程序,前端小程序,后台接口用的thinkphp。注册微信小程序账号按照文档配置即可使用。可以用来二次开发电商。

2020-04-28

layui_admin_template.zip

layui admin 后台管理模板, 从网站抓取下来的。

2020-04-28

phalcon-stub-3.4.12.zip

phpstorm识别Phalcon语法及提示,需要的包。下载phalcon/phalcon-devtools包,php执行build之后的。phalcon是个C写的扩展,默认phpstorm没有语法提示支持。

2020-04-27

XhUser.vue

下拉选择用户 https://gitee.com/wukongcrm/72crm/blob/master/ux/src/components/CreateCom/XhUser.vue

2020-01-15

梦网短信API V5.5 接口说明.doc

梦网短信API V5.5 接口说明。接口调用代码示例,错误码说明。

2019-12-11

http接口开发文档(国内接口,含接口提交模板).doc

curl socket 调用接口发送短信的文档, 短信模板说明。

2019-11-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除