0%

Proxy address 127.0.0.1:xxxx is not a valid URL

1
2
3
4
5
An error occurred during the fetch of repository 'build_bazel_rules_apple':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_yanqizhao/041075cb14947c9864d661ff83fcfc83/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_apple/archive/762e3270c1b45cdf6755ad494ce4069fc9243b9d.tar.gz] to /private/var/tmp/_bazel_yanqizhao/041075cb14947c9864d661ff83fcfc83/external/build_bazel_rules_apple/temp6297134644689352116/762e3270c1b45cdf6755ad494ce4069fc9243b9d.tar.gz: Proxy address 127.0.0.1:7890 is not a valid URL

修改代理为:https://127.0.0.1:xxxx

执行命令:bazel clean --expunge

参考:https://stackoverflow.com/a/39173790/9049347

Error in int: invalid base-10 literal: “0-homebrew”

1
2
3
4
5
6
Traceback (most recent call last):
File "/Users/yanqizhao/examples/tutorial/WORKSPACE", line 46, column 28, in <toplevel>
java_appengine_repositories()
File "/private/var/tmp/_bazel_yanqizhao/041075cb14947c9864d661ff83fcfc83/external/io_bazel_rules_appengine/appengine/java_appengine.bzl", line 321, column 35, in java_appengine_repositories
bazel_version = tuple([int(n) for n in native.bazel_version.split(".")])
Error in int: invalid base-10 literal: "0-homebrew"

修改 appengine 使用的 commit

参考:https://github.com/bazelbuild/rules_appengine/issues/122

[TOC]

视频讲解

JS 版 老毕

https://space.bilibili.com/455848380/

C++ 版 花花酱

https://space.bilibili.com/9880352/

https://www.youtube.com/channel/UC5xDNEcvb1vgw3lE21Ack2Q

Python 版

https://www.youtube.com/channel/UCRCqgMdsAHK3yfvW4en6JpA

C++ 版

https://www.youtube.com/channel/UCE35PnPX7EZi8nHSegjMn6Q/videos

GitHub 仓库代码

Swift 版 故胤道长

https://github.com/soapyigu/LeetCode-Swift

C++ Python

https://github.com/pezy/LeetCode

JS

https://github.com/MisterBooo/LeetCodeAnimation

C++ Python 左耳朵耗子

https://github.com/haoel/leetcode

Java

https://github.com/Blankj/awesome-java-leetcode

Go

https://github.com/halfrost/LeetCode-Go

https://github.com/aQuaYi/LeetCode-in-Go

其他版本

https://github.com/azl397985856/leetcode

https://github.com/apachecn/Interview

https://github.com/soulmachine/leetcode

数据结构与算法

Swift

https://www.jianshu.com/p/ee16bcf50a59

https://github.com/raywenderlich/swift-algorithm-club

https://github.com/apple/swift-algorithms

https://swift.org/blog/swift-algorithms/

https://forums.swift.org/c/related-projects/algorithms/70

https://medium.com/swift-algorithms-data-structures

https://www.udacity.com/course/data-structures-and-algorithms-in-swift--ud1011

工具

数据结构和算法动态可视化

https://visualgo.net/zh

函数图像绘制工具

https://zh.numberempire.com/graphingcalculator.php

二叉树动态可视化

http://520it.com/binarytrees/

二叉树动态可视化(二)

http://btv.melezinek.cz/binary-search-tree.html

二叉树动态可视化(三)

https://yangez.github.io/btree-js/

[TOC]

文档相关

Reducing Your App’s Launch Time

https://developer.apple.com/documentation/xcode/improving_your_app_s_performance/reducing_your_app_s_launch_time?language=objc

WWDC 相关视频

2012-235 iOS App 性能

统计 main 函数到 didFinishLaunching 的时间

iOS App Performance: Responsiveness

https://developer.apple.com/videos/play/wwdc2012/235/

2016-406 优化启动时间

启动各个阶段所做的事情 主要为 main 函数前

Optimizing App Startup Time

https://developer.apple.com/videos/play/wwdc2016/406/

http://yulingtianxia.com/blog/2016/10/30/Optimizing-App-Startup-Time/

https://www.jianshu.com/p/3b0256192e4e

2016-418 Time Profile 的使用

Using Time Profiler in Instruments

https://developer.apple.com/videos/play/wwdc2016/418/

2017-413 App 启动时间:过去、现在与未来

App Startup Time: Past, Present, and Future

https://developer.apple.com/videos/play/wwdc2017/413/

https://www.jianshu.com/p/96f66b0c943c

2017-706 GCD 的使用

Modernizing Grand Central Dispatch Usage

https://developer.apple.com/videos/play/wwdc2017/706/

2018-220 高性能自动布局

High Performance Auto Layout

https://developer.apple.com/videos/play/wwdc2018/220/

2018-405 通过日志记录衡量性能

Measuring Performance Using Logging

https://developer.apple.com/videos/play/wwdc2018/405/

2018-407 实现出色 App 性能的实用方法

Practical Approaches to Great App Performance

https://developer.apple.com/videos/play/wwdc2018/407/

2019-411 Instruments 的使用

Getting Started with Instruments

https://developer.apple.com/videos/play/wwdc2019/411/

2019-423 优化 App 启动

启动各个阶段可以做的优化以及 App Launch 的使用示例

Optimizing App Launch

https://developer.apple.com/videos/play/wwdc2019/423/

https://xiaozhuanlan.com/topic/4690823715

博客文章

iOS应用启动性能优化资料(汇总)

https://everettjf.github.io/2018/08/06/ios-launch-performance-collection/

iOS 如何优化 App 的启动耗时

https://gsl201600.github.io/2020/04/01/iOS%E5%A6%82%E4%BD%95%E4%BC%98%E5%8C%96App%E7%9A%84%E5%90%AF%E5%8A%A8%E8%80%97%E6%97%B6/

APP 启动速度优化

描述了启动各个阶段所做的事情

https://medium.com/@EdisonFan/%E5%90%AF%E5%8A%A8%E9%80%9F%E5%BA%A6%E4%BC%98%E5%8C%96-872cbff15859

深入探索 iOS 启动速度优化

https://juejin.cn/post/6844904127068110862

高德 APP 启动耗时剖析与优化实践(iOS 篇)

https://www.infoq.cn/article/xjb3cysclphv5sh5923q

抖音品质建设 - iOS启动优化《原理篇》

https://mp.weixin.qq.com/s/3-Sbqe9gxdV6eI1f435BDg

抖音品质建设 - iOS启动优化《实战篇》

https://mp.weixin.qq.com/s/ekXfFu4-rmZpHwzFuKiLXw

iOS 优化篇 - 启动优化之Clang插桩实现二进制重排

https://mp.weixin.qq.com/s/UlMAvuLuTcWgd3qkEAHYMA

今日头条 iOS 客户端启动速度优化

https://juejin.cn/post/6844903649416577037

马蜂窝 iOS App 启动治理:回归用户体验

https://juejin.cn/post/6844903841410842638

美团外卖 iOS App 冷启动治理

https://tech.meituan.com/2018/12/06/waimai-ios-optimizing-startup.html

[TOC]

Mac 常见安全与隐私问题

文件已损坏

sudo spctl –master-disable

sudo xattr -d com.apple.quarantine /Applications/xxx.app

[TOC]

Adyen SDK 与其他常见的 SDK 不太一样,API Key 与 Client Key 都是需要自己手动生成的,live 与 test 的环境区分也较为严格,想要申请 live 账号必须通过公司,这就导致个人测试时相对比较麻烦。

准备工作

1. 注册账号

https://docs.adyen.com/checkout/get-started#step-1-sign-up-for-a-test-account

2. 生成 API Key

https://docs.adyen.com/checkout/get-started#api-key

生成后 24 小时失效,保存后无法再显示。

1- 选择 API credentials

Adyen-API credentials

2- 选择 ws@Company.{YourCompany}

Adyen-API credentials2

3- 点击 Generate New API Key

Adyen-API credentials3

4- 复制 API Key 并保存起来

5- 点击 Save Generated API Key

6- 弹窗确认

Adyen-API credentials4

3. 测试一笔支付

https://docs.adyen.com/checkout/get-started#step-3-make-a-test-payment

终端测试

将下列代码中的 YOUR_API_KEYYourCompanyECOM 替换掉并拷贝到终端运行。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
curl https://checkout-test.adyen.com/v66/payments \
-H 'x-api-key: YOUR_API_KEY' \
-H 'content-type: application/json' \
-d '{
"merchantAccount": "YourCompanyECOM",
"reference": "My first Adyen test payment",
"amount": {
"value": 1000,
"currency": "EUR"
},
"paymentMethod": {
"type": "scheme",
"encryptedCardNumber": "test_4111111111111111",
"encryptedExpiryMonth": "test_03",
"encryptedExpiryYear": "test_2030",
"encryptedSecurityCode": "test_737"
}
}'
1- YOUR_API_KEY 获取

YOUR_API_KEY 在第二步已经获取到了。

2- YourCompanyECOM 获取
1- 选择 Merchant accounts

Adyen-Merchant accounts

2- Account code 下的内容即 YourCompanyECOM

Adyen-Merchant accounts2

测试结果

Adyen-Test

支付结果在后台也能看到。