摘要: 先搬上学习的内容文章:https://medium.com/@codenova/useref-in-react-native-b22f52a294b5 useRef的用处是: Component References: useRef is often used to reference React 阅读全文
posted @ 2025-06-28 18:18 saaspeter 阅读(16) 评论(0) 推荐(0)
摘要: 在Mac机器上运行android emulator,用鼠标随手划了下屏幕,想调用app list,结果把emulator划没了,android emulator其实还在,只是在屏幕上看不到了。我search了,最终采用这个方案:https://stackoverflow.com/questions/ 阅读全文
posted @ 2025-04-29 15:06 saaspeter 阅读(29) 评论(0) 推荐(0)
摘要: 当使用Python Gradio框架构建聊天网页程序的时候,我用的是gr.Block来定义组件,但是遇到一个问题就是没法获取request对象,导致我bot机器人回复消息的时候拿不到用户的session身份信息。查阅了官方文档,没有找到合适的,最后在github讨论区发现了类似的方法。https:/ 阅读全文
posted @ 2025-04-24 10:36 saaspeter 阅读(70) 评论(0) 推荐(0)
摘要: python 的asyncio的相关文章:https://realpython.com/async-io-python/#the-event-loop-and-asynciorun https://glyph.twistedmatrix.com/2014/02/unyielding.html 阅读全文
posted @ 2024-12-02 23:29 saaspeter 阅读(18) 评论(0) 推荐(0)
摘要: 运行openai相关api的时候,需要用到代理。 key就在环境变量中建立:OPENAI_API_KEY 和 OPENAI_PROXY 在pycharm中如果想让整个python运行的时候都走代理,可以设置Environment Variables:http_proxy=http://127.0.0 阅读全文
posted @ 2024-11-27 20:52 saaspeter 阅读(27) 评论(0) 推荐(0)
摘要: 在PyCharm的默认颜色中,如果方法名称写错了或变量名称写错了,文字下会有淡黄色波浪线,右侧滚动条也是黄色的,根本看不清楚。 经过一番搜索,发现这个贴子:https://intellij-support.jetbrains.com/hc/en-us/community/posts/11500059 阅读全文
posted @ 2024-11-15 06:24 saaspeter 阅读(44) 评论(0) 推荐(0)
摘要: from: https://weaviate.io/blog/distance-metrics-in-vector-search Vector databases - like Weaviate - use machine learning models to analyze data and ca 阅读全文
posted @ 2024-11-12 16:03 saaspeter 阅读(54) 评论(0) 推荐(0)
摘要: from: https://blog.logrocket.com/react-memo-vs-usememo/ Memoization is one of the ways to optimize performance. In this article, we’ll explore how it 阅读全文
posted @ 2024-11-06 23:18 saaspeter 阅读(32) 评论(0) 推荐(0)
摘要: 国外的不少在线生成二维码网站,但生成后的二维码有猫腻,用相机扫描后发现网址是先经过他们自己的网站,然后再转发到我输入的网址的。 https://www.34qr.com/#text ,这个网站在线生成的二维码没有跳转,输入的是什么网址编入的就是什么网址。 阅读全文
posted @ 2024-11-05 12:07 saaspeter 阅读(48) 评论(0) 推荐(0)
摘要: 组件地址:https://github.com/pgvector/pgvector 我的机器是MacOS,下载的postgreSQL是15,按理下载下来是自动安装了pgvector,但是测试的时候发现并没有这个extension。 按文档执行: make -- 报错,clang: error: un 阅读全文
posted @ 2024-11-03 22:47 saaspeter 阅读(398) 评论(0) 推荐(0)