202405

关于投资建议
https://retire50blog.wang/wp-content/uploads/7038138252_博客图片/关于投资建_files_9bbe285294f3059a76a55f60ed91b249ea8a1d0b/1.png

https://retire50blog.wang/invest/imp/关于我-2.html

多少钱可以财务自由?
https://xueqiu.com/5819606767/60786196

举一个例子,如果你历史上的投资复利是15%,GDP是7%,CPI是3%,每年计划开销25万,则
1、实现基本的财务自由,可投资资产>25万/(15%-3%)=208万,未来的花销每年可以按照CPI=3%的速度增加
2、实现高级的财务自由,可投资资产>25万/(15%-3%-7%)=500万,未来的花销每年可以按照GDP+CPI=10%的速度增加

《微信公开课》读后感&做期权的思考
https://retire50blog.wang/invest/读《2018微信公开课》后感.html

投资体系演变和最新规划
https://retire50blog.wang/invest/投资体系演变历史和最新规划.html

https://retire50blog.wang/invest/关于赚钱.html
https://retire50blog.wang/invest/价投投资思路变化.html
https://retire50blog.wang/invest/躺.html

  • 我这里每年的开销不多,一般20万以下。
  • 10%,300万的现金,获取3-4%的存款理财收益,可以提供10万。另外我还有一些增收手段,一年能有个50万。
  • 长江电力,有个转债132018,在2024年4月9日转债到期之前,可以做到一些增收。今年下半年开始做,到目前增收约15万。
  • 沪深300,我用期货代替510310,每年可以增收3%左右,大约27万。今年7月底开始实施,到现在10月基本满了一个季度,增收7.5万。如果全年四个季度,会有25-30万。
  • 贵州茅台,分仓4个号,打新股有些额外收益。今年前十个月打新收益7万。长电由于经常和转债切换,且大量集中在了一个低佣金的账号里,所以没法稳定提供打新市值。
  • 一年合计有60万收益,足够覆盖不到20万的开销。如果有其他重要开支,可以从10%的现金里出。

https://retire50blog.wang/invest/这么想.html

mysql 修改认证插件
# 查看日志
tail -f /var/log/mysql/error.log
2024-05-09T00:57:25.534340Z 206919 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ‘‘mysql_native_password’ is deprecated and will be removed in a future release. Please use caching_sha2_password instead’

# 修改默认插件并重启
vi  vi /etc/mysql/mysql.conf.d/mysqld.cnf
    default_authentication_plugin=mysql_native_password
systemctl restart mysql
systemctl status mysql

# 确认插件修改成功
show plugins;
show variables like '%auth%';

# 以指定认证插件创建账号并分配权限
create user 'user'@'6.6.6.6' identified with mysql_native_password by '****';
select host, user, plugin from mysql.user;
grant all privileges on testdb.*  TO 'user'@'6.6.6.6';

视频音频比特率(码率)与采样率之间的联系
https://zhuanlan.zhihu.com/p/486101944

qbasic Beginner Tutorials
http://www.petesqbsite.com/sections/tutorials/beginners.shtml
http://www.petesqbsite.com/sections/tutorials/zines/qboa/4-beginner.txt

Is there a resource that teaches math through programming?
https://www.reddit.com/r/compsci/comments/y79zd/is_there_a_resource_that_teaches_math_through/

How and where can I learn programming and mathematics simultaneously?
https://www.quora.com/How-and-where-can-I-learn-programming-and-mathematics-simultaneously

How can someone combine programming and mathematics while learning both?

I will preface this by saying that it really depends on what area of mathematics you’re learning. For instance, when I was in set theory, fundamental logic and some of those strains of classes, I wasn’t really programming up a lot of the course materials. There are options but they are limited for these type of classes.

But lets assume first that you’re in an area like one of the Algebra classes before Modern / Abstract Algebra.

Here you will learn many ways to solve equations, about polynomials, trigonometry, and the likes.

One of the reasons that the law of sines stuck with me so much was because it was one of the first programs I wrote on my TI calculator.

The programming concepts were pretty simple: I/O (user input, display results), modes of calculations (degrees vs radians), and possibly loops (for doing multiple exercises).

excel 根据 email 获取域名

=RIGHT(A1, LEN(A1) - SEARCH("@", A1))

https://www.nytimes.com/2019/11/13/books/review/the-man-who-solved-the-market-gregory-zuckerman.html

https://makemoneyonlinetutorials.quora.com/
https://blogsked.com/make-money-online-2024/

How much time does it realistically take to start seeing results from online money-making methods like blogging or YouTube?

DOS game “F-15 Strike Eagle II” reverse engineering/reconstruction war stories
https://news.ycombinator.com/item?id=40347662

具备反脆弱特性的期权波动率多头,如何控制Theta消耗?
https://mp.weixin.qq.com/s?__biz=MzU5NDc0MTkyNw==&mid=2247492445&idx=1&sn=933c24a9555eeeffbe3a4412331615d5&chksm=fe7e3c95c909b583a9ceef9d7ade0e6f9d122dbae5e711e097b38806441c1f6a550173373287&scene=21#wechat_redirect

Write 8-bit code in your browser.
https://8bitworkshop.com/

mysql 查看回滚进度

mysql> select now(),trx_state,trx_rows_modified from INNODB_TRX where trx_id=5795845153 limit 10;
+---------------------+--------------+-------------------+
| now()               | trx_state    | trx_rows_modified |
+---------------------+--------------+-------------------+
| 2024-05-16 07:12:21 | ROLLING BACK |           7525492 |
+---------------------+--------------+-------------------+
1 row in set (0.00 sec)

https://aws.amazon.com/cn/tutorials/create-manage-nonrelational-database-dynamodb/
https://aws.amazon.com/cn/solutions/case-studies/dropbox-dynamodb-case-study/?pg=dynamodb&sec=cs#dropbox
https://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/SQLtoNoSQL.WhyDynamoDB.html

查询多个数据源
https://docs.aws.amazon.com/zh_cn/athena/latest/ug/running-federated-queries.html

The main purpose of this project is to power sco and neco, which are more general purpose coroutine libraries.
https://github.com/tidwall/llco

https://github.com/tidwall/hashmap.c
Hash map implementation in C.

用 python 写一个函数,把函数调用表达式 a(1, b(2, c(0))) 解析成 json 格式的抽象语法树,如下

{
  "type": "CallExpression",
  "callee": {
    "type": "Identifier",
    "name": "a"
  },
  "arguments": [
    {
      "type": "NumberLiteral",
      "value": 1
    },
    {
      "type": "CallExpression",
      "callee": {
        "type": "Identifier",
        "name": "b"
      },
      "arguments": [
        {
          "type": "NumberLiteral",
          "value": 2
        },
        {
          "type": "CallExpression",
          "callee": {
            "type": "Identifier",
            "name": "c"
          },
          "arguments": [
            {
              "type": "NumberLiteral",
              "value": 0
            }
          ]
        }
      ]
    }
  ]
}

一探究竟:深挖网关性能异常背后的秘密
https://mp.weixin.qq.com/s/zN9m4r-frwpkFN3tzsVXjQ

手撕红黑树!使用C语言带你实现一个平衡搜索树【正文】
https://mp.weixin.qq.com/s?__biz=Mzg3ODg3Mzg3Nw==&mid=2247483882&idx=2&sn=f1f8ed6baa834cf767bac33cf26765f4&chksm=cea3dbcdcfba1239a3b6c591675904b2af5b6e5669015aa4779e688198f3cc867930bf1dc628&scene=132&exptype=timeline_recommend_article_extendread_extendread_for_notrec&show_related_article=1&subscene=0&scene=132#wechat_redirect

红黑树可以称得上几乎平衡的二叉搜索树,能够在最坏的情况下把插入、检索和删除的时间复杂度都控制在$O(\lg(n))$,如果把一系列数据结构都当成是学生的话,把插入、随机检索和删除作为考核科目,那么红黑树可以比喻成每科都能拿90分的学霸,而二叉平衡树(AVL)在“检索”拿到95分,哈希表更是在“检索”科目拿到97分,不过后面两位学生在插入和删除方面拿到的分数就比90分低多了。

https://time.geekbang.org/column/article/312589
大力水手Jerry
一课一思:service mesh是软硬一体化,基础设施软件化,系统的模块被分割为业务代码和基础设施代码,团队既要负责业务的开发,也要负责基础设施代码的开发,实现开发和运维的一体化,这对团队提出了很高的要求。换句话说,云原生和网格统一了软件业务开发和生产运维,它将基础设施软件化,并为生产运维提供了工具和手段。类似于monolithic发展到micro-services,复杂性并不会消失,而是转换到另外一个维度,云原生的目的并不是消除复杂性,而是更加专业和灵活的管理软件的复杂性和基础设施的复杂性。云原生的主要矛盾可能就是面向业务的代码开发管理和面向基础设施的运维管理,后者会消耗资源,从某种角度说相当于侵占了前者的资源,因此下一次的软件架构,可能会屏蔽掉所有面向基础设施的管理内容,整体软件架构只呈现出业务的关联依赖。

不管是做单体应用还是微服务,在系统设计之初就要做好领域分析建模,在开发阶段要严格按照领域设计分层开发,将来即使要拆分也会很容易。

SpringFU、Spring Graal Native

awk 里用 FPAT 解析 csv

$ echo -e "1,2\n\"3\\\"a\",\"4,5\"" | awk  'BEGIN{FPAT="[^,]+|\"[^\"]+\""}{print NF,$1"|"$2}'
2 1|2
2 "3\"a"|"4,5"

pv data.csv |awk  'BEGIN{FPAT="[^,]+|\"[^\"]+\""}NF==13{print $0' | clickhouse-client --query 'insert into data FORMAT CSV'

为什么现在没人读Linux源码了?
https://www.sohu.com/a/731268212_121124376

https://mp.weixin.qq.com/s?__biz=MzIzOTU0NTQ0MA==&mid=2247538751&idx=1&sn=9382ab61af6648c2e4c099f70e1078cf&chksm=e8e519b4508b139afbfd4b75cf0c5189b807f31e87e235f6fd821804ee14e2b70c220e63c5ac&scene=132&exptype=timeline_recommend_article_extendread_samebiz&show_related_article=1&subscene=0&scene=132#wechat_redirect

  • 确认使用的对象(ToC:高并发,ToB:高可用)
  • 系统的服务场景(即时通信:低延迟,游戏:高性能,购物:秒杀-一致性)
  • 用户量级(万级:双机、百万:集群、亿级:弹性分布式、容器化编排架构)
  • 百万读:3主6从,每个节点的读写高峰QPS可能可以达到每秒5万,可以实现15万,30万读性能
  • 亿级读,通过CDN、静态缓存、JVM缓存等多级缓存来提高读并发
  • 百万写,通过消息队列削峰填谷,通过hash分拆,水平扩展分布式缓存
  • 亿级写,redis可以定制数据结构、SSD+内存LRU、冷数据异步多线程复制
  • 持久化,(Mysql)承受量约为 1K的QPS,读写分离提升读并发,分库分表提升写并发

https://mp.weixin.qq.com/s?__biz=MzIzOTU0NTQ0MA==&mid=2247538395&idx=1&sn=de3fd76a18d3d08806ff09a5ab59142f&chksm=e8e11d6334dac1a75aed9e4fc597b523eb96859350ffcb744ec30e21312d543643c0a4f2f67b&scene=132&exptype=timeline_recommend_article_extendread_samebiz&show_related_article=1&subscene=132&scene=132#wechat_redirect

https://blog.csdn.net/wuhuayangs/article/details/121830094

布隆过滤器中一个元素如果判断结果为存在的时候元素不一定存在,但是判断结果为不存在的时候则一定不存在。

布隆过滤器适合的场景

  • 区块链中使用布隆过滤器来加快钱包同步;以太坊使用布隆过滤器用于快速查询以太坊区块链的日志
  • 数据库防止穿库,Google Bigtable,HBase 和 Cassandra 以及 Postgresql 使用BloomFilter来减少不存在的行或列的磁盘查找。避免代价高昂的磁盘查找会大大提高数据库查询操作的性能
  • 判断用户是否阅读过某一个视频或者文章,类似抖音,刷过的视频往下滑动不再刷到,可能会导致一定的误判,但不会让用户看到重复的内容
  • 网页爬虫对URL去重,采用布隆过滤器来对已经爬取过的URL进行存储,这样在进行下一次爬取的时候就可以判断出这个URL是否爬取过了
  • 使用布隆过滤器来做黑名单过滤,针对不同的用户是否存入白名单或者黑名单,虽然有一定的误判,但是在一定程度上还是很好的解决问题
  • 缓存击穿场景,一般判断用户是否在缓存中,如果存在则直接返回结果,不存在则查询数据库,
    • 如果来一波冷数据,会导致缓存大量击穿,造成雪崩效应,
    • 这时候可以用布隆过滤器当缓存的索引,只有在布隆过滤器中,才去查询缓存,如果没查询到则穿透到数据库查询。
    • 如果不在布隆过滤器中,则直接返回,会造成一定程度的误判
  • WEB拦截器,如果相同请求则拦截,防止重复被攻击。用户第一次请求,将请求参数放入布隆过滤器中,当第二次请求时,先判断请求参数是否被布隆过滤器命中。
  • 可以提高缓存命中率。
  • Squid 网页代理缓存服务器在 cache digests 中就使用了布隆过滤器。
  • Google Chrome 浏览器使用了布隆过滤器加速安全浏览服务
  • Google 著名的分布式数据库 Bigtable 使用了布隆过滤器来查找不存在的行或列,以减少磁盘查找的IO次数
  • Squid 网页代理缓存服务器在 cache digests 中使用了也布隆过滤器
  • Venti 文档存储系统也采用布隆过滤器来检测先前存储的数据
  • SPIN 模型检测器也使用布隆过滤器在大规模验证问题时跟踪可达状态空间
  • Google Chrome浏览器使用了布隆过滤器加速安全浏览服务

如果允许误判率的话,可以使用布隆过滤器,只有你想不到的,没有你做不到的。

判断用户是否阅读过某一个视频或者文章,类似抖音,刷过的视频往下滑动不再刷到,可能会导致一定的误判,但不会让用户看到重复的内容

布隆过滤器在这个场景用的对吗?

  • 如果布隆过滤器说这个视频不存在,那肯定不存在,用户就会刷到它,他肯定没看过这个视频,符合预期
  • 如果布隆过滤器说这个视频存在,但不一定存在,用户就刷不到了这个视频了,那这不就错过一个视频了吗,类似用户丢消息了,这能接受吗?

SpringBoot+Docker:高效容器化的最佳实践
https://mp.weixin.qq.com/s/AkX53sMwx3wiCGufAAFN9w

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

Best Microsoft Office alternative of 2024
https://www.techradar.com/news/best-microsoft-office-alternative

office2003蜻蜓特派员3in1 官方版
https://pan.baidu.com/s/1cCNaCu?at=1717033722095

编译原理(七)——自顶向下语法分析概述
https://blog.csdn.net/weixin_43633784/article/details/108620459

First集、Follow集、Predict集的简单求法 三个重要集合
https://blog.csdn.net/qnsEmma/article/details/107943236

https://blog.csdn.net/m0_61819793/article/details/134274982