共有 30 篇文章
2024-08-10
2024-08-10 ~ 2024-08-29
Data Structure Buffer Traffic light Description https://www.codewars.com/kata/58649884a1659ed6cb000072/ You’re writing code to control your town’s traffic lights. You need a function to handle each change from green, to yellow, to red, and then to green again. Complete the function that takes a string as an argument representing the current state of the light and returns a string representing the state the light should change to. For example, when the input is green, output should be yellow. def update_light(current): pass Solutions Ver
2024-07-16
2024-07-16 ~ 2024-07-16
Introduction Arrays A collection of variables of the same type. An array variable is of an array type, a non-basic data type There are many non-basic data types: Arrays Pointers. Self-defined types. … Basic data types In C++, each variable must be have its data type It tells the system how to allocate memory spaces and how to interpret those 0s and 1s stored there. It will also determine how operations are performed on the variable. Basic (or build-iun or
2024-07-12
2024-07-12 ~ 2024-07-12
Preprocessors Preprocessor commands, which begins with #, performs some actions before the complier does the translation. The include command is to include a header file: Files containing definitions of common variables and functions. Written to be included by other programs. #include <iostream>: Before the compilation, the complier looks for the iostream header file and copy the codes therein to replace this line. We may define our own variables and functions into self-defined header files and include them by ourselves: #include "myHeader" Use double quotation marks instead of angle brackets.
2024-07-03
2024-07-03 ~ 2024-09-28
Computer Science Patt, Y.N., Patel, S., 2019. Introduction to Computing Systems: From Bits & Gates to C/C++ & Beyond, 3rd ed. McGraw Hill. Patterson, D.A., Hennessy, J.L., 2020. Computer Organization and Design RISC-V Edition: The Hardware Software Interface, 2nd ed. Morgan Kaufmann, Cambridge, MA. Programming Savitch, W.J., 2017. Problem Solving with C++, 10th ed. Pearson. 1057/1117 Stroustrup, B., 2015. Programming: principles and practice using C++, 2nd ed. Addison-Wesley. ☃ 338/1313 Stroustrup, B., 2024. Programming: Principles and Practice Using C++, 3rd ed.
2024-07-01
2024-07-01 ~ 2024-11-01
字母顺序(Alphabetic Order) 字母顺序是指根据字母在字母表中的位置对单词或字符串进行排序。例如,在英语字母表中,a 排在 b 之前,b 排在 c 之前,依此类推
2024-06-18
2024-06-18 ~ 2024-08-19
我的网站目前是基于 Hugo 框架,并结合 virgo 主题来构建的。随着内容的扩展,我可能需要在同一篇文章中展示多种编程语言的代码片段。为了提升阅读体验,我希望通过选项卡切换的方式
2024-06-11
2024-06-11 ~ 2024-08-16
Case Study 来源:Lambert, K.A., 2018. Fundamentals Of Python: Data Structures, 2nd ed. Cengage Learning. 目标 该程序允许用户输入一个任意的后缀表达式,并显示表达式的值或错误消息(如果表达式无效)。其核心是展示栈的应用。
2024-05-23
2024-05-23 ~ 2024-07-12
Reference http://www.im.ntu.edu.tw/~lckung/teaching-page.html https://www.youtube.com/watch?v=4H3b5wATFos&list=PLMHSr8fseBzUvwjKtR6pX0Vv9Q9H-V3lY&index=1 Introduction What are computer programs
The elements working in computers Also known as software A Structured combination of data and instructions used to operate a computer to produce a specific result Programming languages
People and computers talk in programming languages. A programming language may be a machine language, and assembly language, or a high-level language (or something else) Machine and assembly languages: Control the hardware directly, but hard to read and program. High-level languages: Easy to read and program, but need a “translator”.
2024-05-20
2024-05-20 ~ 2024-08-16
Installing Complier (Windows) GCC scoop install main/gcc LLVM scoop install main/llvm MS Install Visual Studio Visual Studio Settings How to Setup C++ on Windows 当使用 Visual Studio 管理多个项目时,为了避免编译过程中的文件冲突,建议为每个项目单独设置输出目录(Output Direct
2024-04-16
2024-04-16 ~ 2024-08-27
想象你走进一家星巴克咖啡店。这里有许多不同种类的咖啡杯,每个咖啡杯都具有不同的特性。例如: 容量:有小杯(Tall)、中杯(Grande)、大杯(Venti)等。