「全原创系列」
记录我在成为一名PHPer、Gopher路上的学习过程
基础不牢,地动山摇,谨以此句提醒自己。
状态 | 含义 |
---|---|
|
当前未开始总结 |
|
总结中 |
|
目前仅供参考未修正和发布 |
|
总结完毕 |
|
查漏补缺修改中 |
运行脚本: php patterns/[文件夹名称]/test.php
例如,
测试责任链模式: 运行 php patterns/chainOfResponsibility/test.php
运行结果:
请求5850c8354b298: 令牌校验通过~
请求5850c8354b298: 请求频率校验通过~
请求5850c8354b298: 参数校验通过~
请求5850c8354b298: 签名校验通过~
请求5850c8354b298: 权限校验通过~
运行脚本: php algorithm/test.php [算法名称|空获取列表]
例如,
测试冒泡排序: 运行 php algorithm/test.php bubble
运行结果:
==========================冒泡排序=========================
Array
(
[0] => 11
[1] => 67
[2] => 3
[3] => 121
[4] => 71
[5] => 6
[6] => 100
[7] => 45
[8] => 2
)
=========上为初始值==================下为排序后值=============
Array
(
[0] => 2
[1] => 3
[2] => 6
[3] => 11
[4] => 45
[5] => 67
[6] => 71
[7] => 100
[8] => 121
)
运行脚本: php redis/test.php [名称|空获取列表]
例如,
测试悲观锁: 运行 php redis/test.php p-lock
运行结果:
执行count加1操作~
count值为:1
如果大家发现有什么不对的地方,可以发起一个issue或者pull request,我会及时纠正,THX~
补充:发起pull request的commit message请参考文章Commit message编写指南
因为国外开发者的要求和个人的时间有限,征集大家有兴趣的可以把本项目进行英文版翻译。希望国外的developer也可以受益于这个项目~
翻译文件认领申请:https://github.com/TIGERB/easy-tips/issues/36
This project exists thanks to all the people who contribute.
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
Easy-mock基本操作手册:介绍数据类型及响应式数据 1、本地部署Easy-mock或者使用线上平台,目前线上平台证书过期或服务器不稳定,偶尔不能正常访问,而且同步的swagger地址必须是对外访问的,从稳定及安全方面来评估,还是建议本地化部署,恰巧人家也是github的开源项目且支持二次开发。 2、本地化部署步骤略,参照github的md部署文档操作即可,注意环境软件版本及easy-mock
leetcode 258. Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11,
leetcode 541. Reverse String II Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there are
leetcode 171. Excel Sheet Column Number Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For exampl
leetcode 476. Number Complement Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given integer is guaranteed
leetcode 268. Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example, Given nums = [0, 1, 3] r
Given an 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 using extra m
leetcode 237. Delete Node in a Linked List Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 -> 4 a
leetcode 226. Invert Binary Tree Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 AC; /** * Definition for a binary tree node. * str
leetcode 461. Hamming Distance The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the H
leetcode Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a = 1 and b = 2, return 3. AC: int getSum(int a, int b) { int result; wh
很多时候我们拿到服务器的账号,只是一个普通用户,没有root权限,这没有关系。关键是没有pip、没有必要的python包。 参考Stack Overflow给出解决方案,适用于python2.7, python3.x 安装pip wget https://bootstrap.pypa.io/get-pip.py python get-pip.py --user 这里的python如果是2.7就按照
Speaking of Tips and Tricks and as well some tutorials. I found these series of tutorials (“jQuery for Absolute Beginners” Video Series) by Jeffery Way are VERY HELPFUL. It targets those developers wh
Easy News是一个可以让您轻松显示网站新闻或图文内容展示的jQuery插件,可设定Fade In-Out ,Slide Up-Down, Left To Right 的效果,调整显示速度,可自行修改CSS改变您为喜欢的风格。 Easy News 1.0.6 有以下的特点 跨浏览器( 已于 IE7 及 Firefox 2.0 测试正常) 可 "往前" 或 "往后" 自动播放 鼠标移过的暂停功
Easy Slider enables images or any content to slide horizontally or vertically on click. It is configurable with css alone. So, basically you link to plugin file, set the content up and style it with css.
easy-ajax 是为了治理前端乱写 Ajax 方法而生。基于 jquery 封装一些常用方法,后期计划加入前端数据缓存功能。 普通 Aajax 请求,及 GET、POST 封装,以及文件上传 源代码注释清晰,一目了然。 使用方法如下: <script src="easy.ajax.js"></script> API: config配置项:config{ jqueryAjax默认配置外增加
省去复杂的excel代码,使用xml配置的形式完成导入导出 一、jar包依赖 二、如何使用?参考 org.easy.excel.test.ExportTest org.easy.excel.test.ImportTest 支持,复杂对象导航,支持自定义(单元格宽度) 标题样式(背景色,对齐方式,字体颜色) 导出测试使用时,运行org.easy.excel.test.ExportTest类的测试方法
EasyXls 使用EasyXls可以使你很方便的操作Excel。本项目目的是解决简单的(不带任何样式)xls文件的导入导出。 处理XML时由于使用了JAXB,所以需要使用jdk1.6u14以上版本。 JAXB处理中文xml时容易出现乱码,因此这里限制XML为GBK编码,在Windwos中的保存格式为ANSI即可。 EasyXls特点 支持xls转换为List<Pojo>对象 支持xls
为简化开发工作、提高生产效率而生 Easy-Es是一款简化 ElasticSearch 搜索引擎操作的开源框架,全自动智能索引托管。 目前功能丰富度和易用度及性能已全面领先SpringData-Elasticsearch. 简化CRUD及其它高阶操作,可以更好的帮助开发者减轻开发负担 底层采用Es官方提供的RestHighLevelClient,保证其原生性能及拓展性. 项目推广初期,还望大家能够