摘要: 某日上班,登服务器后编译Android ROM,增量编译时间比平时长了 3~4 倍,htop 看一下 ![](https://img2023.cnblogs.com/blog/818645/202307/818645-20230730134154777-1721635038.png) 好奇怪,怎么前 阅读全文
posted @ 2023-07-30 14:44 SupperMary 阅读(861) 评论(0) 推荐(0)
摘要: perfetto 是从安卓9.0开始可用的安卓系统性能监测相关的一个工具,可以参考官网: [perfetto](https://developer.android.google.cn/studio/command-line/perfetto?hl=zh_cn) 通常我们使用 ui.perfetto. 阅读全文
posted @ 2023-07-23 18:43 SupperMary 阅读(2881) 评论(0) 推荐(0)
摘要: 记录一下,方便取用 #include <thread> #ifdef _WIN32 #include <Windows.h> const char* timenow() { static thread_local char str[32]; SYSTEMTIME st; GetLocalTime(& 阅读全文
posted @ 2022-10-19 00:22 SupperMary 阅读(408) 评论(0) 推荐(0)
摘要: linux 里面写一些命令行小玩意儿有 getopt 这个函数方便使用,Windows 上是不自带的,从 libevent 的仓库里扣了出来 // getopt.h #ifndef __GETOPT_H__ #define __GETOPT_H__ #ifdef __cplusplus extern 阅读全文
posted @ 2022-10-18 23:27 SupperMary 阅读(347) 评论(0) 推荐(0)
摘要: 话不多说,直接上示例代码 std::string Base64Encode(const unsigned char* data, size_t size) { size_t base64_len = (size + 2) / 3 * 4; if (base64_len == 0) { return 阅读全文
posted @ 2022-08-07 20:41 SupperMary 阅读(3873) 评论(0) 推荐(0)
摘要: 在 java 上进行 AES128/ECB/PKCS5Padding 加密解密是很简单的 public static String aesDecrypt(String str,String key) throws Exception{ Cipher cipher = Cipher.getInstan 阅读全文
posted @ 2022-08-07 20:33 SupperMary 阅读(4879) 评论(1) 推荐(0)
摘要: 使用 wxWidgets 时,可能遇到自定义的 Dialog 创建之后,总是在最顶层窗口上,可以尝试一下在自定义dialog 的构造函数内 SetWindowStyle(GetWindowStyle() & ~wxSTAY_ON_TOP); 阅读全文
posted @ 2022-07-23 22:04 SupperMary 阅读(233) 评论(0) 推荐(0)
摘要: 以下载链接https://www.openssl.org/source/openssl-1.1.1o.tar.gz为例 下载解压之后,查看根目录的 NOTES.ANDROID,其中有 export ANDROID_NDK_HOME=/home/whoever/Android/android-sdk/ 阅读全文
posted @ 2022-06-09 21:43 SupperMary 阅读(783) 评论(0) 推荐(0)
摘要: unordered_map有一些隐形的坑,下面的代码 #include<unordered_map> #include<map> #include<iostream> using namespace std; int main() { unordered_map<int, int> map1; ma 阅读全文
posted @ 2022-04-26 23:09 SupperMary 阅读(2270) 评论(0) 推荐(0)
摘要: 想要分析安卓的启动过程中的详细信息,比如耗时、CPU/IO占用情况,我们可以通过这样一条命令 adb shell 'touch /data/bootchart/enabled' 然后重启安卓设备。开机之后,执行命令 $ANDROID_BUILD_TOP/system/core/init/grab-b 阅读全文
posted @ 2022-04-11 22:09 SupperMary 阅读(340) 评论(0) 推荐(0)