错误异常处理 syntax error:语法错误 zero eivision error:语意错误 ,异常类 用try拦截服务异常 try: x = 5 / 0 print(x)except:#捕获异常 print('程序遇到错误') try: x = 5 / 0 print(x) except Z ...
分类:
其他好文 时间:
2019-12-13 12:07:32
阅读次数:
85
题目如下: Given a m x n binary matrix mat. In one step, you can choose one cell and flip it and all the four neighbours of it if they exist (Flip is chang ...
分类:
其他好文 时间:
2019-12-11 23:37:50
阅读次数:
142
前篇说过,已经安装好了宝塔,就需要用它做点儿事情。 第一个测试: 宝塔面板——文件管理——新建1.js 编辑 console.log('OrangePI:Zero') 保存。切换到终端:#node 1 看样子正常,再来一个。 启动MQTT服务,居然也正常,看来用它做一个私有云的网关是没有问题的啦。 ...
分类:
其他好文 时间:
2019-12-11 17:19:01
阅读次数:
239
Clipboard 自动复制功能,嵌套app内跳转的页面,ios 自动复制失败(该ios机子,微信,浏览器打开复制没有问题) 暂时换方案 user-select: text ;长按复制 (ios 兼容低版本,长按复制) 最好的 方案是让 app 给出原生复制的 方法。直接调用 可 自动复制 <div ...
分类:
移动开发 时间:
2019-12-10 13:21:32
阅读次数:
121
前言 织女星开发板是 "OPEN ISA社区" 为中国大陆地区定制的一款体积小、功耗超低和功能丰富的 RISC V评估开发板,基于NXP半导体四核异构RV32M1主控芯片。 两个RISC V核:RI5CY + ZERO_RISCY。 两个ARM核: Cortex M4F + Cortex M0+ 。 ...
分类:
其他好文 时间:
2019-12-08 17:10:04
阅读次数:
127
给一个矩阵mat,每个格子都是0或1,翻转一个格子会将该格子以及相邻的格子(有共同边)全部翻转(0变为1,1变为0) 求问最少需要翻转几次将所有格子全部置为0。 这题的重点是数据范围,比赛结束看了眼数据范围想把自己锤死= = m == mat.length n == mat[0].length 1 ...
分类:
其他好文 时间:
2019-12-08 15:55:36
阅读次数:
154
Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. ...
分类:
其他好文 时间:
2019-12-07 21:15:30
阅读次数:
99
#include<iostream> using namespace std; const int MAX=2e5+10; int cnt[MAX]; int ans[MAX]; int a[MAX]; int main() { int n,m,zero=0,one=0; cin>>n>>m; fo ...
分类:
其他好文 时间:
2019-12-07 14:25:29
阅读次数:
93
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: Note: T ...
分类:
其他好文 时间:
2019-12-07 10:41:18
阅读次数:
72
public OrderDTO create(OrderDTO orderDTO) { String orderId = KeyUtil.genUniqueKey(); BigDecimal orderAmount = new BigDecimal(BigInteger.ZERO); //1.查询商 ...
分类:
其他好文 时间:
2019-12-07 01:06:34
阅读次数:
121