wwqy
...
mit 6583 lab1E
GODB的Lab1习题 Exercise 1Q: tuple.goAt this point, your code should pass the unit tests in tuple_test.go. 此时,您的代码应该通过 tuple_test.go 中的单元测试。 TupleDesc类型FileType 12345678// FieldType is the type of a field in a tuple, e.g., its name, table, and [godb.DBType].// TableQualifier may or may not be an emtpy string, depending on whether the table// was specified in the querytype FieldType struct { Fname string TableQualifier string Ftype DBType} 类型...
mit 6583 lab1K
简介 In the lab assignments in 6.5830/6.5831 you will write a basic databasemanagement system called GoDB. For this lab, you will focus on implementingthe core modules required to access stored data on disk; in future labs, youwill add support for various query processing operators, as well astransactions, locking, and concurrent queries. 在 6.5830/6.5831...
mit 6.583 lab0
task1Start an http server and handle requests Q: This task requires you to start up the http server in main.go and handle the user’s GET requests by filling out the HomeHandler method in handlers/handlers.go.The final web app looks like in the screenshot below, where users can select a T line (e.g. red line) and display its ridership statistics in a bar chart. The HomeHandler function first checks which line the user has selected in the drop down menu and then queries ridership numbers...
axios and fetch
0. 概述axios是对XMLHttpRequest的封装,而Fetch是一种新的获取资源的接口方式,并不是对XMLHttpRequest的封装。 它们最大的不同点在于Fetch是浏览器原生支持,而Axios需要引入Axios库。 1. 基本用法1.1 Get axios可以根据headers里content-type自动转换。 fetch需要手动对响应内容进行转换。 1.2 Postjson formdata 1.3 数据流 1.4 中止请求 1.5 请求超时 1.6 进度监控 2. 封装和配置2.1 baseURL 2.2 拦截器 fetch需要自己封装 3. 兼容性与体积 4. 总结
google search
0. about在google search的工具栏中插入中英文切换按钮 1. script油猴脚本 12345678910111213141516171819202122232425262728293031323334353637383940414243// ==UserScript==// @name 看看中文结果// @namespace http://tampermonkey.net/// @version 0.1// @description 查看中文搜索结果// @author IcathianRain// @match *://*.google.com/search*// @match *://*.google.com.hk/search*// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com.hk// @grant none//...
RESTful api
0. RESTful apiapi 设计规范 1. 协议 ProtocolAPI与用户通信的协议,总是使用HTTPs 2. 域名 Site尽量将api部署在专用域名下 1https://api.example.com 如果api很简单,不会有进一步扩展,可以考虑放在主域名下。 1https://example.com/api 3. 版本 Version应该将API的版本号放入URL。 1https://api.example.com/v1/ 另一种做法是,将版本号放在HTTP头信息中,但不如放入URL方便和直观。Github采用这种做法。 4. 路径...
modern tools
0. Modernibraheemdev/modern-unix: A collection of modern/faster/saner alternatives to common unix commands. (github.com) 该仓库提供了许多Linux传统工具的现代化替代工具。 1. delta对git(对比功能)和diff的升级。 仓库: dandavison/delta: A syntax-highlighting pager for git, diff, and grep output (github.com) 文档: Introduction - delta (dandavison.github.io) 1.1 安装参照Installation - delta (dandavison.github.io) windows可以使用winget进行安装,注意事项见Using Delta on Windows - delta (dandavison.github.io) 1.2...
git
1. git log1.1 descriptionshow the commit logs 功能: Commit Limiting:过滤提交 History Simplification : 简化提交历史的 Commit Ordering: 修改默认提交排序的 Commit Formatting : 修改默认提交显示格式的 Diff Formatting: 控制提交显示文件的差异格式的 1.2 commit limitingsearch - 作者1234567//命令格式git log --author=<pattern>git log --committer=<pattern>//示例git log --author=“小明”git log --author=“小明\|小红” search - time12345678910//某个日期之后git log --since=<date>git log --after=<date>//某个日期之前git log --until=<date>git log...
c++ string
0. 背景最近在写KMP的时候遇到了个bug 123456789101112while((a<s[i].length()) && b<s[j].length()){ if((b == -1) || (s[i][a] == s[j][b])) { a++; b++; } else b = nxt[j][b]; if(b == s[j].length()) break;} 编译过程中,存在如下的warning信息,提示表示序号的a类型与string.length()函数的返回类型不一致,一个是int,一个是unsigned int。 在调试过程中,发现函数在while中仅仅循环了一次就退出了,按理说会进行多次循环。 1. 原因分析string.length()函数返回的长度为unsigned...