This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* https://leetcode.com/problems/132-pattern/ | |
* | |
* @param nums 数字数组 | |
* @return boolean | |
*/ | |
boolean find132pattern(int[] nums) { | |
int s3 = Integer.MIN_VALUE; | |
Stack<Integer> stack = new Stack<>(); | |
for (int i = nums.length - 1; i >= 0; i--) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding=utf-8 | |
import sys | |
import glob | |
sys.path.append('gen-py') | |
from service import * | |
from thrift import Thrift | |
from thrift.transport import TSocket | |
from thrift.transport import TTransport | |
from thrift.protocol import TBinaryProtocol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -an | grep 3306 | |
lsof -i:80 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" ~/.vimrc " | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set number | |
syntax enable | |
set background=dark | |
colorscheme solarized | |
filetype plugin indent on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 将一个字串中含有全角的数字字符、字母、空格或'%+-()'字符转换为相应半角字符 | |
* | |
* @param string $str 待转换字串 | |
* | |
* @return string | |
*/ | |
function convertSemiangle($str){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int getLevenshteinDistance(String s, String t) { | |
if (s == null || t == null) { | |
throw new IllegalArgumentException("Strings must not be null"); | |
} | |
int n = s.length(); // length of s | |
int m = t.length(); // length of t | |
if (n == 0) { | |
return m; | |
} else if (m == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 验证15位营业执照注册号 | |
* | |
* @param string $code 资质编号 | |
* | |
* @return boolean | |
*/ | |
function validateRegistrationLicense($code) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 验证统一社会信用代码 | |
* | |
* @param string code 统一社会信用代码 | |
* | |
* @return boolean | |
*/ | |
function validateUSCCLicense($code) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 验证大陆身份证号码 | |
* | |
* @param string code 身份证号码 | |
* | |
* @return boolean | |
*/ | |
function validateChinaMainlandIDCard($code) | |
{ |
NewerOlder