上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 28 下一页
摘要: Problem A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and returni 阅读全文
posted @ 2020-03-08 12:22 凌雨尘 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Problem Write an efficient algorithm that searches for a value in an m x n matrix, return the occurrence of it. This matrix has the following properti 阅读全文
posted @ 2020-02-16 20:37 凌雨尘 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Problem Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are 阅读全文
posted @ 2020-02-16 20:25 凌雨尘 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Problem Given a sorted array of n integers, find the starting and ending position ofa given target value. If the target is not found in the array, ret 阅读全文
posted @ 2020-01-12 15:47 凌雨尘 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Mysql与MongoDB查询互转 mongo查询严格要求数据格式! 1、只想查出某些数据,不想全部数据都查出来 mysql: select name from user; mongo: db.user.find( {}, { _id : 0, name : 1 } ) 说明:user是集合的名称, 阅读全文
posted @ 2020-01-04 14:07 凌雨尘 阅读(5803) 评论(0) 推荐(0) 编辑
摘要: 一、时间戳计算前N天后N天并转化为日期,本例是将某个时间戳转为日期,并计算出与该日期前后相差7天的日期: select DATE_SUB(FROM_UNIXTIME(1577150717, '%Y-%m-%d'),INTERVAL 7 DAY)as 'before',FROM_UNIXTIME(15 阅读全文
posted @ 2019-12-24 20:23 凌雨尘 阅读(2224) 评论(0) 推荐(0) 编辑
摘要: Windows: 遍历D:\www\这个文件夹,逐个执行git pull,由于跨盘了,必须加上D: echo off & color 0A for /d %%f in (D:\www\*) do ( D: cd %%f chdir git pull ) pause Linux & Mac: #/bi 阅读全文
posted @ 2019-12-23 20:50 凌雨尘 阅读(1605) 评论(0) 推荐(0) 编辑
摘要: 一、定义 本福特定律,也称为本福德法则,说明一堆从实际生活得出的数据中,以1为首位数字的数的出现机率约为总数的三成,接近期望值1/9的3倍。推广来说,越大的数,以它为首几位的数出现的机率就越低。它可用于检查各种数据是否有造假。[1] 二、数学 本福特定律说明在b进位制中,以数n起头的数出现的概率为 阅读全文
posted @ 2019-12-22 12:30 凌雨尘 阅读(2452) 评论(0) 推荐(0) 编辑
摘要: 起因 最近接触到一些国外的项目,由于国内外有时差这个东西,对于某些基础数据存到数据库的时候需要记录时间,为了方便,这里采用了时间戳(int或者timestamp)记录。由于时间戳全球都是一样的,需要的时候根据时区进行转换就能够拿到当地的时间。 嗯~ o(* ̄▽ ̄*)o,这样看起来确实没什么毛病。众所 阅读全文
posted @ 2019-11-25 20:53 凌雨尘 阅读(7015) 评论(1) 推荐(3) 编辑
摘要: 在使用mongodump导出单个表的时候,遇到了一个错误 # mongodump --host xxx --port 27017 --username 'admin' -p '123456' -d 数据库 -c 表 --out backup.bakFailed: error connecting t 阅读全文
posted @ 2019-11-09 13:59 凌雨尘 阅读(3564) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 28 下一页