摘要: 本章节主要介绍现代IM系统中的消息系统架构以及基于表格存储(Tablestore)自研的Timeline模型构建的消息系统。基于Timeline构建的现代消息系统能够同时支持消息系统的多种特性,包括多端同步、消息漫游和在线检索,在性能和规模上能够实现全量消息云端存储和索引、百万TPS写入以及毫秒级延 阅读全文
posted @ 2020-04-22 21:11 stackupdown 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 1.光线追踪 实现类:vec3,sphere(球体),ray(射线,由射线起始点+射线方向向量组成) camera.h hitable.h hitable_list.h ray.cpp + ray.h sphere.h vec3.h + vec3.cpp 图显示工具:ffplay.exe spher 阅读全文
posted @ 2019-12-01 19:00 stackupdown 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 1.光线追踪 实现类:vec3,表示三维坐标 #include<bits/stdc++.h> using namespace std; class vec3 { public: vec3() {} vec3(float e0, float e1, float e2) {e[0] = e0, e[1] 阅读全文
posted @ 2019-11-21 00:21 stackupdown 阅读(219) 评论(0) 推荐(0) 编辑
摘要: https://tikv.org/docs/deep-dive/key-value-engine/b-tree-vs-lsm/ The B-tree and the Log-Structured Merge-tree (LSM-tree) are the two most widely used d 阅读全文
posted @ 2019-10-17 15:40 stackupdown 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 常见字符串问题: 闲言少叙,我们直接来解决下面几个问题。 给定字符串s,t,求t在s中匹配的子串位置 给定一个字符串s,求最长回文子串 给定字符串s,t,最长公共连续子串问题 对于问题1,也叫exact matching问题。 朴素的解法是依次从s的起始位置出发,依次比较跟t长度相同的子串,此算法复 阅读全文
posted @ 2019-09-30 18:01 stackupdown 阅读(570) 评论(0) 推荐(0) 编辑
摘要: 描述 913. Cat and Mouse Hard A game on an undirected graph is played by two players, Mouse and Cat, who alternate turns. The graph is given as follows:  阅读全文
posted @ 2019-09-24 17:48 stackupdown 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 初探计算机视觉的三个源头、兼谈人工智能|正本清源 2016-12-12 视觉求索谈话人:杨志宏 视觉求索公众号编辑朱松纯 加州大学洛杉矶分校UCLA统计学和计算机科学教授 Song-Chun Zhu www.stat.ucla.edu/~sczhu 时间: 2016年10月 杨: 朱教授,你在计算机 阅读全文
posted @ 2019-09-21 01:05 stackupdown 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 试题编号: 201703-5 试题名称: 引水入城 时间限制: 2.0s 内存限制: 512.0MB MF城建立在一片高原上。由于城市唯一的水源是位于河谷地带的湖中,人们在坡地上修筑了一片网格状的抽水水管,以将湖水抽入城市。如下图所示: 这片管网由 n 行 m 列节点(红色,图中 n = 5,m = 阅读全文
posted @ 2019-09-20 17:13 stackupdown 阅读(376) 评论(0) 推荐(0) 编辑
摘要: Written By: stackupdown I. BackgroundThis repo is learning notes of the open course **Natural Language Processing** of Dan Jurafsky and Christopher Ma 阅读全文
posted @ 2019-09-20 16:15 stackupdown 阅读(249) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/P1514 NOIP 在一个遥远的国度,一侧是风景秀美的湖泊,另一侧则是漫无边际的沙漠。该国的行政 区划十分特殊,刚好构成一个N行M列的矩形,如上图所示,其中每个格子都代表一座城 市,每座城市都有一个海拔高度。 为了使居民们都尽可能饮用到清 阅读全文
posted @ 2019-09-05 15:57 stackupdown 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 内存泄漏 虽然解决了core dump,但是另外一个问题又浮出了水面,就是高并发测试时,会出现内存泄漏,大概一个小时500M的样子。 valgrind的缺点 出现内存泄漏或者内存问题,大家第一时间都会想到valgrind。valgrind是一款非常优秀的软件,不需要重新编译程序就能够直接测试。功能也 阅读全文
posted @ 2019-08-14 23:33 stackupdown 阅读(635) 评论(0) 推荐(0) 编辑
摘要: Git 命令 stash cherry-pick reset rebase I. 前提:git reflog命令 git stash show(show the file changed) git stash list(show the stash stack) stash的应用场景:本地分支正在开 阅读全文
posted @ 2019-08-14 17:15 stackupdown 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 三种语言的线程实现机制 C/C++ 不同Linux系统下提供的底层线程有好几种,其中POSIX类型的线程最为常用。POSIX线程是pthread开头的一系列C语言API,数据结构包括mutex,condition等。C语言多线程不是必须的,只在一些场合适用,而例如单线程的服务器如redis和ngin 阅读全文
posted @ 2019-07-29 23:03 stackupdown 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 【数据结构】搜索二叉树(BST)和普通二叉树的序列化与反序列化 背景 算法题中经常会用到二叉树的结构: struct TreeNode { TreeNode* left, right; int val; TreeNode(int newval):val(newval), left(NULL), ri 阅读全文
posted @ 2019-06-10 00:22 stackupdown 阅读(399) 评论(0) 推荐(0) 编辑
摘要: options { STATIC = false; } PARSER_BEGIN(Adder) import java.io.*; class Adder { static public void main(String[] args) { for (String arg: args) { try 阅读全文
posted @ 2019-02-01 00:04 stackupdown 阅读(1266) 评论(0) 推荐(0) 编辑