var rounded = Math.round( number * 10 ) / 10; // round to one digit var rounded = Math.round( number * 100 ) / 100; // round to two digit function rou... ...
分类:
编程语言 时间:
2019-08-20 20:35:23
阅读次数:
96
背景 几种拷贝方式 方式1:Copying in Two Sample System Calls read(file, tmp_buf, len); write(socket, tmp_buf, len); 1. 首先,调用read时,文件A copy到了kernel模式; 2. 之后,CPU控制将 ...
分类:
编程语言 时间:
2019-08-20 12:32:52
阅读次数:
94
本总结仅有A,B,C,D四题,E题作为交互题,不会! A:Choose Two Numbers 没啥意思,因为CF只要求任意一组解,并且两个数列均为正整数,那么果断求两个数列最大值之和,这样可以保证最大值之和一定不会存在于原数列中。 #include<iostream> using namespac ...
分类:
其他好文 时间:
2019-08-20 01:16:19
阅读次数:
64
1. 基本原理 1. 基本原理 一种典型的非线性滤波器就是中值滤波器,它使用像素的一个领域内的灰度的中值来代替该像素的值。中值滤波器通常是处理椒盐噪声的一种有效的手段。 2. 测试结果 图源自skimage 3. 代码 1 import numpy as np 2 3 def median_filt ...
分类:
编程语言 时间:
2019-08-19 22:43:05
阅读次数:
164
背景 之前热门的目标检测方法都是two stage的,即分为region proposal和classification两个阶段,本文是对one stage方法的初次探索。 方法 首先看一下模型的网络结构,输入的原图片,经过24个卷积层提取特征,全连接层输出一个7*7*30的tensor,这个ten ...
分类:
其他好文 时间:
2019-08-19 19:19:10
阅读次数:
68
Question Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “ ...
分类:
其他好文 时间:
2019-08-19 09:34:44
阅读次数:
92
题目链接 【英文版】https://leetcode.com/problems/two sum/ 【中文版】https://leetcode cn.com/problems/two sum/ 题目 给定一个整数数组 $nums$ 和一个目标值 $target$,请你在该数组中找出和为目标值的那 两个 ...
分类:
其他好文 时间:
2019-08-18 16:04:42
阅读次数:
88
1029 Median (25 分) 1029 Median (25 分) 1029 Median (25 分) Given an increasing sequence S of N integers, the median is the number at the middle position ...
分类:
其他好文 时间:
2019-08-18 15:28:42
阅读次数:
88
原题链接在这里:https://leetcode.com/problems/two-sum-less-than-k/ 题目: Given an array A of integers and integer K, return the maximum S such that there exists ...
分类:
其他好文 时间:
2019-08-17 13:05:38
阅读次数:
91
题意:You are given two arithmetic progressions: a1k?+?b1 and a2l?+?b2. Find the number of integers x such that L?≤?x?≤?R and x?=?a1k'?+?b1?=?a2l'?+?b2, ...
分类:
其他好文 时间:
2019-08-17 12:28:14
阅读次数:
93