panic会让程序停止,为了防止因panic造成这类问题,需要将panic覆盖掉Painc用法是:用于抛出错误。Recover()用法是:将Recover()写在defer中,并且在可能发生panic的地方之前,先调用此defer的东西(让系统方法域结束时,有代码要执行。)当程序遇到panic的时候(当然,也可以正常的调用出现的异常情况),系统将跳过后面的代码,进入defer,如果defer函数中
分类:
其他好文 时间:
2019-02-05 13:09:49
阅读次数:
221
CSU "2034" Column Addition Description A multi digit column addition is a formula on adding two integers written like this: A multi digit column addit ...
分类:
其他好文 时间:
2019-02-04 16:51:46
阅读次数:
161
#!/bin/env python # -*- coding: utf-8 -*- import sys if sys.platform == 'linux': sys.path.append('/opt/huawei/kg/appspace/cloudword') from flask impor ...
分类:
其他好文 时间:
2019-02-03 14:24:48
阅读次数:
209
ORA-1400 During Import of Export Dump Written in Direct Path Mode
分类:
其他好文 时间:
2019-02-03 11:09:09
阅读次数:
322
主要思想就是每次找一个根使其任意一个子树大小小于$\frac{size} 2$,处理跨根路径的答案然后删掉这个跟,并对于它的每一个子树继续分治 然后就没啦 "luogu模板" cpp include include include include define M 400001 using name ...
分类:
其他好文 时间:
2019-02-01 14:52:24
阅读次数:
197
1.导弹拦截 (+贪心) 两问:一个导弹拦截系统最多能拦多少导弹 要拦截所有导弹至少需要多少拦截系统 第一问感觉是一个比较巧妙的方法: 维护一个单调递减的序列 length[] 记录的是拦截导弹的高度 当下一个导弹小于 length[] 最后一个数(最小的数)则直接把它加在序列后即可 若大于 则找到 ...
分类:
其他好文 时间:
2019-01-30 00:17:49
阅读次数:
173
js原型 js每声明一个function,都有prototype原型,prototype原型是函数的一个默认属性,在函数的创建过程中由js编译器自动添加。 也就是说:当生产一个function对象的时候,就有一个原型prototype。 例如: prototype的属性值是一个对象,是属性的集合,是 ...
分类:
编程语言 时间:
2019-01-29 21:19:35
阅读次数:
202
sd bus.h 例子 cat print unit path.c include include include include include define _cleanup_(f) __attribute__((cleanup(f))) / This is equivalent to: bus ...
分类:
其他好文 时间:
2019-01-28 14:04:31
阅读次数:
772
使用Jprofiler监控分析案例 一、cpu负载过高:http://localhost:8080/PerfTeach/CpuTopServlet?id=1 cpu消耗高的可能原因1、使用了复杂的算法,比如加密、解密2、压缩、解压、序列化等操作3、代码bug,比如死循环 dstat监控起来,先看一下 ...
分类:
其他好文 时间:
2019-01-27 01:09:32
阅读次数:
271
ArrayList简介 ArrayList 是一个数组队列,相当于 动态数组。与Java中的数组相比,它的容量能动态增长。它继承于AbstractList,实现了List, RandomAccess, Cloneable, java.io.Serializable这些接口。 ArrayList 继承 ...
分类:
其他好文 时间:
2019-01-26 21:04:30
阅读次数:
154