- 博客(84)
- 问答 (3)
- 收藏
- 关注

原创 Chevereto使用docker启动,nginx开启https
whatTo solve some problemssome web only use markdown and can’t upload pictures,such as v2ex.comsome pics you don’t want to give it to others for long time,such as your interesting storygive your blog’s can speed when download bigger picsand so onP
2020-09-15 11:12:11
1049
原创 关于Promise和async声明的区别
题目可以添加任务,任务包含任务数据,任务延迟触发的等待时间。在任务到达触发时间点时,自动触发执行此任务。队列中任务保持先进先出原则:假设 A 任务的触发等待时间为 X,B 任务的触发等待时间为 Y,B 在 A 之后被添加入队列,则 A 的前驱任务执行完成后等待时间 X 后,才执行 A,同理在 A 执行完成后,等待时间 Y,才执行 B。思路过程1.Java上线读题目就是延时队列的特征,...
2020-01-07 23:23:05
413
原创 SearchInsertPosition-LeetCode
LeetCode38EasyGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates ...
2020-01-03 17:25:09
253
原创 Node日志感受
why日志是用来记录程序运行重要的工具记录请求日志,关键节点打上日志,可以追踪问题(生产)方便调试,定位故障监控应用的运行状态what(egg.js为例)日志分为:appLogger应用日志,也是我们自定义的日志coreLogger核心框架,插件日志errorLoggeragentLogger用于监控agent日志日志级别:ctx.logger.debug()c...
2019-09-21 09:45:30
307
原创 LengthofLastWord
problemGiven a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word i...
2019-04-07 09:49:18
238
原创 安全防范
分类XSS 攻击:对 Web 页面注入脚本,使用 JavaScript 窃取用户信息,诱导用户操作。CSRF 攻击:伪造用户请求向网站发起恶意请求。钓鱼攻击:利用网站的跳转链接或者图片制造钓鱼陷阱。HTTP参数污染:利用对参数格式验证的不完善,对服务器进行参数注入攻击。远程代码执行:用户通过浏览器提交执行命令,由于服务器端没有针对执行函数做过滤,导致在没有指定绝对路径的情况下就执行命令...
2019-04-05 18:37:28
358
原创 学习之路,欢迎mark,follow
Knowledgeall in Knowledge个人博客LeetCode专业课计算机网络计算机操作系统数据结构Node.jsfeature异步IO异步编程内存控制理解buffer网络编程web应用多进程测试即调试eventLoop模型Java基础集合ListMapSet线程类加载...
2019-04-05 18:36:12
276
原创 Java问题排查工具
一下文字摘自JAVA公众号Linux命令类tail最常用的tail -ftail -300f shopbase.log #倒数300行并进入实时监听文件写入模式grepgrep forest f.txt #文件查找grep forest f.txt cpf.txt #多文件查找grep 'log' /home/admin -r -n #目录下查找所有符合关键字的文件...
2019-04-05 18:27:07
375
原创 如何将域名绑定到hexo
problem很多人可能都有hexo博客,会有一个githubname.github.io的地址,然后自己可能想去买一个域名,方便记忆,但是解析后迟迟用不了,该文章就来详细描述一下步骤。solution1.拥有一个githubname.github.io可以正常访问的域名,如我的GitHub博客:https://shawngoethe.github.io2.购买域名,个人推荐阿里云,首年年...
2019-04-05 18:25:14
330
原创 mysql事务
whatMYSQL事务主要用于保证一串事情要么都成功,要么就回滚,例如付款后,要先写入支付订单表,再个人信息中加入会员权益。这两个操作要么顺序执行成功,要么就回滚原则ACIDAtomicity原子性确保事务内的所有操作都成功完成,否则事务将被中止在故障点,以前的操作将回滚到以前的状态。Consistency一致性数据库的修改是一致的Isolation隔离性事务是彼此独...
2019-04-05 18:24:19
228
原创 FindMinimumInRotatedSortedArray-LeetCode
problemFind Minimum in Rotated Sorted ArrayMediumSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1...
2019-04-05 18:23:23
256
原创 计算机网络
更多信息请访问我的博客基础概念速率(比特率):在数字信道传送数据位数的速率,b/s,kb/s,Mb/s(mbps:Mb per second)(运营商常用,进制10进制),也可以理解为带宽的概念存储容量,1Byte=8bit(进制1024)时延:发送时延+传播时延+排队时延+处理时延RTT:往返时延,发送开始到发送方收到接收方的ack,即2*传输时延,不含发送时延,处理时延等信源:...
2019-04-05 18:20:19
1455
原创 [转载]春节12响
// File: twelve_biubiu.c// Permission: CN-2082-2// Author: Li.YiYi// Dept: PE-362, UG// Origin: TI-352132// 春节十二响 biu biu biu!#env "planet_engine"int init() { set_engine_number_mask(ENGI...
2019-04-05 18:18:05
432
原创 eventLoop
whatEvent Loop是一个程序结构,用于等待和发送消息和事件a programming construct that waits for and dispatches events or messages in a program.简单说,就是在程序中设置两个线程:一个负责程序本身的运行,称为"主线程";另一个负责主线程与其他进程(主要是各种I/O操作)的通信,被称为"Event L...
2019-04-05 18:16:51
226
原创 JumpGame-LeetCode
problemGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determin...
2019-03-13 16:40:51
275
原创 MaximumSubarray-LeetCode
problemMaximum SubarrayEasyGiven an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,...
2019-03-13 09:58:30
202
原创 SpiralMatrix-LeetCode
54.problemGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.Example 1:Input:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]Output: [1,2,3,6,9,8...
2019-03-13 09:54:06
173
原创 pow(x,n)-LeetCode
problem\50. Pow(x, n)MediumImplement pow(x, n), which calculates x raised to the power n (xn).Example 1:Input: 2.00000, 10Output: 1024.00000Example 2:Input: 2.10000, 3Output: 9.26100Examp...
2019-03-12 20:26:41
266
原创 docker
why docker解决“在我的机子上可以正常工作”的问题运维更好地管理服务更好地迁移和拓展(任意平台运行)what is dockerdocker属于Linux容器的一种封装,和VM类似,但他不像VM一样虚拟在操作系统之上,而是和操作系统平级,程序运行在容器里,就和在真实的物理机上面运行一样简单一点理解就是:程序运行在docker上和真机上几乎误差,将程序包装起来管理名词解释...
2019-03-04 20:54:03
191
原创 ShoppingOffers
problemIn LeetCode Store, there are some kinds of items to sell. Each item has a price.However, there are some special offers, and a special offer consists of one or more different kinds of items w...
2019-03-02 21:51:15
261
原创 Egg支持JS智能提醒
本文章思路来自https://zhuanlan.zhihu.com/p/56780733定位其实由于Egg本身的动态加载机制,所以JavaScript很难去做智能提醒(如变量定义检查),本次借鉴TS的动态生成d.ts,使用ts的Declaration Merging(声明合并)特性,读取JSDoc注释。获取更新egg-bin模块package.json 添加 “egg”: { “d...
2019-02-23 15:06:19
996
原创 缓存
缓存why高性能例如:把查完的值缓存,下次直接访问高并发例如:把请求排队difference(vs memcached)特征redismemchched数据结构更复杂的数据结构,更丰富的数据操作集群支持不支持性能单核多核redis线程模型redis 内部使用文件事件处理器 file event handler,这个文件...
2019-02-19 21:57:32
352
原创 树的后序遍历
definition private static class BinaryNode<AnyType> { BinaryNode(AnyType theElement) { this(theElement, null, null); } BinaryNode(AnyType the...
2019-02-19 21:56:54
791
原创 14LongestCommonPrefix
title: 2019-02-18-LongestCommonPrefix.mddate: 2019-02-18 22:47:36tags:categories:LeetCodeProblemWrite a function to find the longest common prefix string amongst an array of strings.If the...
2019-02-18 22:52:26
226
原创 07ReverseInteger
ProblemGiven a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dealing ...
2019-02-17 13:22:49
151
原创 递归优化
递归优化原因:在 Java 中,每个线程都有独立的 Java 虚拟机栈。栈具有后入先出的特点,递归调用也是需要后调用的方法先返回,因此使用栈来存储递归调用的信息。这些信息存储在栈帧中,每个 Java 方法在执行时都会创建一个栈帧,用来存储局部变量表、操作数栈、常量池引用等信息。在调用方法时,对应着一个栈帧入栈,而方法返回时,对应着一个栈帧出栈。随着栈帧frame的增多,将会导致Stack ...
2019-01-23 17:17:33
319
原创 【合租帮手】Node+Ejs+Mongooe搭建的一个全栈demo
原因今年刚毕业,从java转node后有很多东西不是很熟悉,一直处于自学状态,这个demo比较简单,却也是一个全栈项目,如果用得好,可以做成一个寻找舍友的非常好的平台,博主住的是自如,如果按年交的话,就大概是2万多,无奈只能选择分期付款,每个月2400(包含了基础费和100多的利息),而按季度,一次性也上万的费用,所以开发这个平台旨在熟人的基础上帮助大家寻找舍友拼房(不是拼床!)功能①调用a...
2018-12-09 16:56:11
245
原创 面试二三事(待更新)
由于子苏最近离职了,也一直在面试,所以,一直没有更新博客总结一下,最近两周的面试情况,去了不少公司吧,不过大部分都是中小型的企业,面试的内容也涵盖了很多方面,也谈一谈自己对这方面的看法吧,如果有什么,欢迎留言一起讨论1.扎实的软件工程基础(以下为自己的答案,可能会有错误,欢迎讨论)底层的技术、node的特性、mongo数据库的优势,以下分点描述:访问baidu有哪些过程:访问本地DN...
2018-10-16 22:39:41
700
原创 node单线程?多线程?
结论1)Node是使用了v8引擎的服务器端,主要采用C/C++实现底层,底层libuv为多线程,执行不同的I/0任务2)Node中v8引擎的JavaScript实现事务,是单线程的,每一个请求进入线程队列,若为IO则分给线程池执行,并等待结果,否则自己执行,另外:队列在单线程无新的请求的时候,所有事件开始循环执行(结束出队)图解:JavaScript所在的v8是单线程的,即上述2中描述的,...
2018-10-11 21:54:44
1330
转载 SQL语句的解析过程
转载自:http://www.cnblogs.com/myprogram/archive/2013/01/24/2874666.html 由于最近需要做一些sql query性能提升的研究,因此研究了一下sql语句的解决过程。在园子里看了下,大家写了很多相关的文章,大家的侧重点各有不同。本文是我在看了各种资料后手机总结的,会详细的,一步一步的讲述一个sql语句的各个关键字的解析过程,欢迎...
2018-10-10 14:13:40
686
原创 async & await
async function getxxx(id){}getxxx(‘xxx’).then(xx=>{})可以直接调用可以将函数封装到class里面然后通过async,await进行调用await 可以将promise里面的resolve返回给resultawait 报错:try catch捕获,reject里面的内容以及报错信息多个并行:多个await比单个快(就连续声明两...
2018-10-10 10:41:06
215
原创 ES6新特性
1.变量var 重复声明,函数级别let 不可重复,块const 不可重复,块#2.箭头函数方便方便(只有一个参数()可省略,只有一个return,大括号可省略修正this3.函数扩展(…)收集//将剩余的参数,转到arg中(arg必须放到最后!)function show(a,b,…args){//}show(1,2,3,4,5)//args=[3,4,5]扩...
2018-10-10 10:38:06
274
原创 prototype
why扩充类的属性和方法(全局性),无论在哪里声明,会修改全部的类howPerson.prototype.age=30;Person.prototype.speak = function(){printf('Ich kann Deutsch sprechen')}//当我们调用let person = new Person();person.age;//30person.spea...
2018-10-08 17:25:23
227
原创 this指向及更改this指向
定义在函数执行时,this 总是指向调用该函数的对象。要判断 this 的指向,其实就是判断 this 所在的函数属于谁。出现的场景有对象就指向调用对象没调用对象就指向全局对象用new构造就指向新对象通过 apply 或 call 或 bind 来改变 this 的所指。1)函数有所属对象时:指向所属对象函数有所属对象时,通常通过 . 表达式调用,这时 this 自然指向所属对...
2018-10-08 15:35:33
198
原创 闭包通读解释
//一下文章为个人理解产物,仅供参考概念:使内部函数可以访问定义在外部函数中的变量作用:保护: 私有变量不污染全局,且不受外界影响保存: 形成不被销毁的栈内存,把一些值保留下来应用场景: 多人协同开发合代码可能出现同样的函数名,就将各自的代码块用闭包的思想包装起来,也可以使得一些方法可以常驻内存,不会被垃圾回收机制销毁如何供外部使用1在闭包函数中,通过给全局变量赋值,外部可以...
2018-10-08 14:50:05
171
原创 Big Countries
There is a table World±----------------±-----------±-----------±-------------±--------------+| name | continent | area | population | gdp |±----------------±----------...
2018-10-06 20:34:17
223
原创 To Lower Case
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase.Solution:最简单的就是调用java的toLowerCase去解决class Solution { public String toLowerCase(String ...
2018-10-06 20:27:30
364
原创 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 to fit within the range of a 32-...
2018-10-06 20:10:57
235
原创 原码、反码、补码
How原码反码补码正数符号位+0本身本身负数符号位+1符号位不变,其余取反补码+1[+1] = [00000001]原 = [00000001]反 = [00000001]补[-1] = [10000001]原 = [11111110]反 = [11111111]补why为什么用原码解决计算机不认识减法的问题,1-1变成1+(-1)...
2018-10-06 17:59:04
242
空空如也
MFC工程,切换标签页后出现叠影,多按两次就好了,这是什么问题?
2017-04-05
MFC中dialog制作的一个状态栏,可以进行分页吗?
2017-03-12
Android studio 生成apk报错
2016-10-11
TA创建的收藏夹 TA关注的收藏夹
TA关注的人