May 3, 2020
WWDC
Image
Debug
Memory
This is an pretty good session about iOS memory. iOS Memory Deep Dive - WWDC 2018 - Videos - Apple Developer. I saw it and took some notes here.
...
Read more
April 25, 2020
Debug
Flipper
Recently, Facebook launched Flipper, A desktop debugging platform for mobile developers. And there is an embedded network plugin, FlipperKitNetwo ...
Read more
February 5, 2020
WWDC
Popular Article
Debug
Simulator
xcrun simctl is command utils to control iOS simulator, just like adb for Android. Sometimes, in CI server script, We need these simulator-integr ...
Read more
January 21, 2020
Popular Article
Dive into React Native
If you want to get viewable items in the [FlatList], you had better take a look at the onViewableItemsChanged prop. For example, suppose you have ...
Read more
July 12, 2019
CV
高斯函数在学术领域运用的非常广泛。 写工程产品的时候,经常用它来去除图片或者视频的噪音,平滑图片, Blur处理。我们今天来看看高斯滤波, Gaussian Filter。1D的高斯函数一维的高斯函数(或者叫正态分布)方程跟图形如下:$$G(x) = \frac{1}{\sqrt{2\pi\ ...
Read more
July 6, 2019
题目Solution 1思路:存储 + 二分查找
首先将字符一集对应的下标存储在26 * n的二维数组中。比如对字符串 ‘abcdea’存储为
Char
Index
0
[0, 5]
1
[1]
2
[2]
3
[3]
4
[4]
…
25
...
Read more
June 14, 2019
Algorithm
题目分析来自Vlad神的解答https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/discuss/256737/C%2B%2B-Binary-Search
先定下可能的承重范围:
最大 maxCap ...
Read more
June 11, 2019
Algorithm
题目: 1014. Best Sightseeing Pair分析这道题求 the maximum score of a pair of sightseeing spots; score = A[i] + A[j] + i - j)。 是个最优解问题。迭代中,当前idx为i; 要考虑 (0, ...
Read more
June 8, 2019
本文取材自 TED教学视频How does your smartphone know your location? - Wilton L. Virgo我们的手机是如何准确定位的呢? 答案在离我们2000多英里的卫星上。
第一个问题: 为啥卫星上的时间对GPS定位如此重要? 因为我们要知道手机 ...
Read more
June 6, 2019
Algorithm
题目分析定义两个状态变量:
buy_profit: 若i-1天,持有股票,最大利润是 $(buy_profit)
sell_profit: 若i-1天,卖出股票, 最大利润是 $(sell_profit)
买卖利润情况:最开始: i == 0; int buy_profit = -pri ...
Read more