随笔分类 - csdiy
摘要:Lecture4 What are streams? “stream: an abstraction for input/output. Streams convert between dataand the stringrepresentation ofdata.” 流: 对输入输出的一种抽象。留
阅读全文
摘要:lecture8 Template Classes + Const Correctness Classes Recap “Template Class: A class that is parametrized over some number of types. A class that is c
阅读全文
摘要:lecture7 class 类简介 “Class: A programmerdefined custom type. An abstraction of an object or data type.” 类:由程序员定义的特殊类型。是对一种对象或者数据类型的抽象 但是这个问题已经有struct 了
阅读全文
摘要:依照csdiy和名校公开课评价网的计算机自学指南 其中csdiy我自己在我的linux系统中fork了一下 这里就列举目前为止所有自学课程的网站cs50和cs61a以及MIT18.01已经上完了就不加了 cs61b 课程主页:(https://sp18.datastructur.es/) intro
阅读全文
摘要:Lecture 5 命令行环境 课后练习 任务控制 我们可以使用类似 ps aux | grep 这样的命令来获取任务的 pid ,然后您可以基于pid 来结束这些进程。但我们其实有更好的方法来做这件事。在终端中执行 sleep 10000 这个任务。然后用 Ctrl-Z 将其切换到后台并使用 bg
阅读全文
摘要:Lecture 4 数据整理 练习 学习一下这篇简短的 交互式正则表达式教程. 统计words文件 (/usr/share/dict/words) 中包含至少三个a 且不以's 结尾的单词个数。这些单词中,出现频率前三的末尾两个字母是什么? sed的 y命令,或者 tr 程序也许可以帮你解决大小写的
阅读全文
摘要:Lecture 3 vim 完成 vimtutor。 备注: 它在一个 80x24(80 列,24 行) 终端窗口看起来最好。 直接执行 vimtutor 下载我们的vimrc,然后把它保存到 ~/.vimrc。 通读这个注释详细的文件 (用 Vim!), 然后观察 Vim 在这个新的设置下看起来和
阅读全文
摘要:Lecture 2 Shell Tools and Scripting homework: 1.Read man ls and write an ls command that lists files in the following manner 读取 man ls 并编写按以下方式列出文件的 l
阅读全文
摘要:Streams Sequence Operations Map, filter, and reduce express sequence manipulation using compact expressions Example: Sum all primes in an interval fro
阅读全文
摘要:Scheme scheme fundamentals scheme programs consist of expressions, which can be: primitive expression: 2, 3.3, true, +, quotient …… combination: (quti
阅读全文
摘要:Higher Order Funcrtions 让我们做一个功能组合 >>> def combine_funcs(op): >>> """combine funcs(OP)(f,g)(x)=OP(f(x),g(x))""" >>> def combine(f,g): >>> def val(x):
阅读全文
摘要:Debugging Assert def fact(x): if x==0: return 1 else: return x*fact(x-1) def half_fact(x) return fact(x/2) 当按照以下调用时half_fact(5)时传入fact中的是一个非整数,不会出发ret
阅读全文
摘要:Control Print and None 区分python中两种类型的函数 纯函数(pure functions): 函数中有一些输入(参数)并返回一些输出(调用返回结果) abs(-2) 可将内置函数abs描述为接受输入并产生输出的小型机器 abs在调用时除了返回值外不会造成其他任何影响,而且
阅读全文
摘要:Chapter 2 Building Abstract ions with Data Native Data Types 到目前为止,我们使用的值都是 Python 语言中内置的少量的原始数据类型的实例。原始数据类型具有以下属性: ^13b410 有一些可以求解为原始数据类型的表达式,被称为字面量(
阅读全文
摘要:4_3 Declarative Programming In addition to streams, data values are often stored in large repositories called databases. A database consists of a data
阅读全文
摘要:3_5 Interpreters for Languages with Abstraction The Calculator language provides a means of combination through nested call expressions. However, ther
阅读全文
摘要:2_9 Recursive Objects Objects can have other objects as attribute values. When an object of some class has an attribute value of that same class, it i
阅读全文
摘要:2_7 Object Abstraction The object system allows programmers to build and use abstract data representations efficiently. It is also designed to allow m
阅读全文
摘要:2_5 Object-Oriented Programming Object-oriented programming (OOP) is a method for organizing programs that brings together many of the ideas introduce
阅读全文
摘要:lecture9 Welcome! Static to Dynamic Flask Layout POST Frosh IMs Flask and SQL Session Store API JSON Summing Up Welcome! In previous weeks, you have l
阅读全文

浙公网安备 33010602011771号