V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  gfreezy  ›  全部回复第 1 页 / 共 22 页
回复总数  435
1  2  3  4  5  6  7  8  9  10 ... 22  
15 天前
回复了 anson264556364 创建的主题 音乐 繁体批量更改为简体
用 chatgpt
@jukanntenn 字符串模糊匹配性能足够,windows 应该也有剪贴板历史软件吧
无限历史的剪贴板是不是就可以,raycast 自带的剪切板就挺好用的
154 天前
回复了 dtekol 创建的主题 服务器 阿里云 e 系列服务器最低价购买(无 aff)
可以看看这个 UCloud ,1C1G1M 香港一年 120 ,可以买 3 年

https://www.ucloud.cn/site/active/kuaijiesale.html
好奇是什么软件
261 天前
回复了 evada 创建的主题 iOS 不是推广,只是觉得有点意思, 利用 AI 锻炼口语
可以试试我们的产品,叫 “多说”,美区可以搜 talkface 。https://talkface.ai/
ios 不是不支持 sideload 吗?怎么安装第三方 app ?
这是干嘛的?没看明白
324 天前
回复了 coderQiQin 创建的主题 问与答 服务器代理有什么好的方式?
可以看下我写的 https://github.com/gfreezy/seeker ,可以全局代理
351 天前
回复了 0littleboy 创建的主题 Swift Swift 如何优化数据加载方式?
getPredictiveContestList 这个应该是个 publisher
351 天前
回复了 JinTianYi456 创建的主题 问与答 求个算法,均摊问题
```

def reallocate_prices(total: Decimal, prices: List[Decimal], fraction_number: int = 0) -> List[Decimal]:
"""
把总金额按照 prices 里面各自数目比例均分。
:param total: 总金额
:param prices: 金额的数组
:param fraction_number: 保留小数的位数,最大为 2 位小数
返回均分后的金额数组
假设 total = 10 ,prices = [10, 20, 30, 40]
计算过程是,先把 prices 求和为 sum_prices
主要逻辑就是 new_prices = [
total/sum_prices*10,
total/sum_prices*(10+20) - total/sum_prices*10,
total/sum_prices*(10+20+30) - total/sum_prices*(10+20) - total/sum_prices*10,
total/sum_prices*(10+20+30+40) - total/sum_prices*(10+20+30) - total/sum_prices*(10+20) - total/sum_prices*10
]
"""
total = Decimal(total)
prices = [Decimal(str(p)) for p in prices]
sum_price = sum(prices)
new_prices: List[Decimal] = []
# 用 index 来保留原有的位置
accumulated = Decimal('0')
for price in prices:
accumulated += price
# 按比例分配,并且保留特定的小数位数。
new_price = fraction(total * accumulated / sum_price, fraction_number) - sum(new_prices)
new_prices.append(new_price)

if sum(new_prices) != total:
raise PriceCalculationError
return new_prices

```
2023-03-10 17:24:38 +08:00
回复了 wafffle 创建的主题 Surge 求教 surge 增强模式的原理
可能性 1: surge 接管了 DNS ,所有域名都解析到它自己创建的那个网段了,导致应该走 VPN 的流量也都走了 surge 。
可能性 2:surge 改了路由表,优先级比 VPN 高,导致应该走 VPN 的流量也都走了 surge 。
2023-02-13 17:04:56 +08:00
回复了 helloworld2048 创建的主题 Apple mac 可以设置全局代理吗?
可以看看我这个 https://github.com/gfreezy/seeker
已经有 rust 实现的比较成熟的 DNS server trust-dns
2022-10-26 10:59:59 +08:00
回复了 ttgo 创建的主题 程序员 能推荐一个免费的支持自定义域名的邮箱么?
飞书支持自定义邮箱
https://landrop.app/

局域网传输,免费开源,全平台覆盖
2022-09-05 18:47:23 +08:00
回复了 vczyh 创建的主题 Java 不限语言,谈谈如何避免循环依赖?
@vczyh Order 不返回 User 的信息,只返回 user_id 。Order 和 User 在上面加一层 UserOrder ,这一层根据 Order 的信息,从 User 中在获取对应 User 信息,最后拼接后返回。

但实际可能很多别的服务又依赖了 UserOrder 的返回结果,我们的方法是在这一层不要拆得太细,把相关的(依赖 UserOrder 的)都合并到一个模块,在很大程度上可以缓解这个问题。否则再加一层会非常复杂,得不偿失。
1  2  3  4  5  6  7  8  9  10 ... 22  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2791 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 37ms · UTC 15:04 · PVG 23:04 · LAX 08:04 · JFK 11:04
Developed with CodeLauncher
♥ Do have faith in what you're doing.