回复: 3
收起左侧

數據狗VO senior sde

 
本楼:   👍  3
100%
0%
0   👎
全局:   5
100%
0%
0

2024(10-12月) 码农类General 本科 全职@datadog - 猎头 - Onsite  | 😐 Neutral 😐 AverageFail | 在职跳槽

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x

coding1: log query
coding2: buffer write, follow up: what happen if multithread write same file
experience: 會問你一個你工作過的一個系統,要選一個複雜的系統,不要用太簡單的,我用了一個read only service with cache, 他們覺得太簡單。
valu
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
為什麼要RESTful,為什麼不用web socket等等,不要直接跳進去用一個tool/technology

评分

参与人数 3大米 +7 收起 理由
zerx_java + 1 很有用的信息!
whoisyourdaddy + 1 很有用的信息!
清道神君 + 5 欢迎分享你知道的情况,会给更多大米奖励!

查看全部评分


上一篇:TT店面
下一篇:Freddie Mac Hiring Manger面(Quantitive Analyst Profesional)
地里匿名用户
匿名用户-00LVE  2024-12-9 04:29:25
本楼:   👍  1
100%
0%
0   👎
jjtylerho 发表于 2024-12-8 06:44
很像依伍妻

follow up multi threading, 你可以說要加 lock = threading.Lock(), with lock:

谢谢楼主!给你加米了!
回复

使用道具 举报

地里匿名用户
匿名用户-00LVE  2024-12-8 14:37:11
本楼:   👍  0
0%
0%
0   👎
楼主能详细说一下coding 2 buffer write的题目要求吗?
扫码关注一亩三分地求职移民公众号
更多干货内容等你发现
回复

使用道具 举报

 楼主| jjtylerho 2024-12-8 22:44:35 | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   5
100%
0%
0
匿名用户 发表于 2024-12-8 01:37
楼主能详细说一下coding 2 buffer write的题目要求吗?
  1. # Assume we have a File class whose constructor takes a filepath string as an argument. It has a single method called write, which persists bytes directly to disk.

  2. # f = File('/tmp/my/file.txt')
  3. # f.write(b"hello world")
  4. # Write a wrapper class for the file object which allows us to buffer the writes in-memory. The wrapper class, BufferedFile is initialized with a File class object and a buffer size. It has two methods: write and flush. The data should be flushed to disk when the buffer is full, or on demand with a method called flush. All bytes must be stored in the buffer first before being written to disk. The buffer cannot use more memory than the max bytes allowed.

  5. # Example usage:

  6. # f = File('/tmp/my/file.txt')
  7. # buf_size = 1000

  8. # b = BufferedFile(f, buf_size)
  9. # b.write(b"hello world")
  10. # b.flush()
复制代码
很像依伍妻

follow up multi threading, 你可以說要加 lock = threading.Lock(), with lock:
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

Advertisement
>
快速回复 返回顶部 返回列表