0.0.1 第二版前言

Preface to the Second Edition

第二版前言

Is it possible that software is not like anything else, that it is meant to be discarded: that the whole point is to always see it as a soap bubble?

软件很可能确实与其他任何东西都不同,它的本意就是被抛弃:这一观点的全部就是总将它看作一个肥皂泡吗?

Alan J. Perlis

The material in this book has been the basis of MIT's entry-level computer science subject since 1980. We had been teaching this material for four years when the first edition was published, and twelve more years have elapsed until the appearance of this second edition. We are pleased that our work has been widely adopted and incorporated into other texts. We have seen our students take the ideas and programs in this book and build them in as the core of new computer systems and languages. In literal realization of an ancient Talmudic pun, our students have become our builders. We are lucky to have such capable students and such accomplished builders.

自 1980 年以来,本书的材料就一直在 MIT 作为计算机科学学科入门课程的基础。在本书第一版出版之前,我们已经用这一材料教了 4 年课,而到这个第二版出版,时间又过去了 12 年。我们非常高兴地看到这一工作被广泛接受,并被结合到其他一些教材中。我们已经看到自己的学生掌握了本书中的思想和程序,并将它们构筑到新的计算机系统或者语言的核心里。这就在文字上实现了一个古犹太教法法典的双关语,我们的学生已经变成了我们的创造者。我们非常幸运能有如此有能力的学生和如此有建树的创造者。

In preparing this edition, we have incorporated hundreds of clarifications suggested by our own teaching experience and the comments of colleagues at MIT and elsewhere. We have redesigned most of the major programming systems in the book, including the generic-arithmetic system, the interpreters, the register-machine simulator, and the compiler; and we have rewritten all the program examples to ensure that any Scheme implementation conforming to the IEEE Scheme standard (IEEE 1990) will be able to run the code.

在准备这一新版本的过程中,我们结合进了成百条澄清性的建议,它们来自我们自己的教学经验,也来自 MIT 和其他地方的同行们的评述。我们重新设计了本书里主要的程序设计系统中的大部分,包括通用型算术系统、解释器、寄存器机器模拟器和编译器,也重写了所有的程序实例,以保证任何符合 IEEE 的 Scheme 标准(IEEE 1990)的 Scheme 实现都能运行这些代码。

This edition emphasizes several new themes. The most important of these is the central role played by different approaches to dealing with time in computational models: objects with state, concurrent programming, functional programming, lazy evaluation, and nondeterministic programming. We have included new sections on concurrency and nondeterminism, and we have tried to integrate this theme throughout the book.

这一版本中强调了几个新问题,其中最重要的是有关在不同的途径中,计算模型里对于时间的处理所起的中心作用:带有状态的对象、并发程序设计、函数式程序设计、惰性求值和非确定性程序设计。这里为并发和非确定性新增加了几节,我们也设法将这一论题集成到整本书里,贯穿始终。

The first edition of the book closely followed the syllabus of our MIT one-semester subject. With all the new material in the second edition, it will not be possible to cover everything in a single semester, so the instructor will have to pick and choose. In our own teaching, we sometimes skip the section on logic programming (section 4.4), we have students use the register-machine simulator but we do not cover its implementation (section 5.2), and we give only a cursory overview of the compiler (section 5.5). Even so, this is still an intense course. Some instructors may wish to cover only the first three or four chapters, leaving the other material for subsequent courses.

本书第一版基本上是按照我们在 MIT 一学期课程的教学大纲撰写的。由于有了第二版中增加的这些新材料,在一个学期里覆盖所有内容已经不可能了,所以教师需要从中做一些选择。在我们自己的教学里,有时会跳过有关逻辑程序设计的第 4.4 节,让学生使用寄存器机器模拟器,但并不去讨论它的实现(第 5.2 节),对于编译器则只给出一个粗略的概述(第 5.5 节)。即使如此,这还是一个内容非常多的课程。一些教师可能希望只覆盖前面的三章或者四章,而将其他内容留给后续课程。

The World-Wide-Web site www-mitpress.mit.edu/sicp provides support for users of this book. This includes programs from the book, sample programming assignments, supplementary materials, and downloadable implementations of the Scheme dialect of Lisp.

万维网站点 www-mitpress.mit.edu/sicp 为本书的使用者提供支持。其中包含了取自本书的程序,示例程序作业、辅助材料和 Lisp 的 Scheme 方言的可下载实现。
内容概要:本文详细介绍了900W或1Kw,20V-90V 10A双管正激可调电源充电机的研发过程和技术细节。首先阐述了项目背景,强调了充电机在电动汽车和可再生能源领域的重要地位。接着深入探讨了硬件设计方面,包括PCB设计、磁性器件的选择及其对高功率因数的影响。随后介绍了软件实现,特别是程序代码中关键的保护功能如过流保护的具体实现方法。此外,文中还提到了充电机所具备的各种保护机制,如短路保护、欠压保护、电池反接保护、过流保护和过温度保护,确保设备的安全性和可靠性。通讯功能方面,支持RS232隔离通讯,采用自定义协议实现远程监控和控制。最后讨论了散热设计的重要性,以及为满足量产需求所做的准备工作,包括提供详细的PCB图、程序代码、BOM清单、磁性器件和散热片规格书等源文件。 适合人群:从事电力电子产品研发的技术人员,尤其是关注电动汽车充电解决方案的专业人士。 使用场景及目标:适用于需要高效、可靠充电解决方案的企业和个人开发者,旨在帮助他们快速理解和应用双管正激充电机的设计理念和技术要点,从而加速产品开发进程。 其他说明:本文不仅涵盖了理论知识,还包括具体的工程实践案例,对于想要深入了解充电机内部构造和工作原理的人来说是非常有价值的参考资料。
### 部署 SpringBoot 项目到服务器的教程 #### 前言 将 SpringBoot 项目部署到服务器是将其从开发环境迁移到生产环境的关键步骤。通过以下内容,可以了解部署的基本流程和相关注意事项。 #### 一、SpringBoot 与传统 Web 项目的部署优势 SpringBoot 提供了嵌入式的 Tomcat 或 Jetty 容器,因此无需单独配置应用服务器[^1]。这种特性使得部署更加简单,减少了对第三方工具的依赖。此外,SpringBoot 的 jar 包可以直接运行,而无需解压或额外配置。 #### 二、使用步骤 以下是将 SpringBoot 项目部署到服务器的一般步骤: 1. **打 jar 包** 在本地环境中,使用 Maven 构建工具生成可执行的 jar 包。命令如下: ```bash mvn clean package -Dmaven.test.skip=true ``` 此命令会清理旧文件并打包新的 jar 文件,同时跳过单元测试以加快构建速度[^3]。 2. **取 jar 包** 打包完成后,jar 文件通常位于 `target` 目录下。例如,如果项目名为 `webchat`,则生成的文件可能是 `webchat-0.0.1-SNAPSHOT.jar`[^2]。 3. **将 jar 放在服务器上运行** 使用工具(如 Xshell 或 WinSCP)将 jar 包上传至服务器。推荐将 jar 包放置在专门的目录中,例如 `/root/springboot/`[^2]。上传后,可以通过以下命令运行 jar 包: ```bash nohup java -jar webchat-0.0.1-SNAPSHOT.jar > app.log 2>&1 & ``` 上述命令会在后台运行程序,并将日志输出到 `app.log` 文件中[^4]。 #### 三、运行在服务器上的好处 将 SpringBoot 项目部署到服务器上,能够实现以下目标: - 提高系统的可用性和稳定性。 - 减少本地资源占用,便于集中管理。 - 支持更高的并发访问量和更复杂的业务逻辑处理[^1]。 #### 四、使用 Docker 部署 除了直接运行 jar 包外,还可以利用 Docker 容器化技术进行部署。具体步骤包括: 1. 编写 `Dockerfile` 文件,定义镜像内容。 2. 构建镜像并推送到远程仓库。 3. 在服务器上拉取镜像并启动容器[^3]。 #### 五、其他注意事项 - 确保服务器已安装 JDK 和必要的依赖项(如 MySQL 数据库)。如果需要安装 MySQL,可以参考相关文档[^5]。 - 如果使用宝塔面板等工具,可以通过图形界面简化部署过程[^4]。 ```python # 示例代码:检查 Java 本 import subprocess def check_java_version(): result = subprocess.run(['java', '-version'], capture_output=True, text=True) return result.stdout print(check_java_version()) ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值