*推荐一下隔壁朋友的CPT101笔记一文带你速通CPT101计算机系统概念(含笔记下载链接)-程序员宅基地 *
本课程CPT111对于毫无编程基础和编程思想的小白来说有一定难度,在后面的课程十分凌乱和跳跃。如果说想只通过本课程掌握Java,这是错误的,如果说只通过某些大众JAVA网课学习来学习本课程,这是困难且耗时的。可以理解为,本课程类似于制定游戏规则,而你在游戏规则下get higher score。谨记从上课材料和上课要求的库出发解决问题,多写多练多讨论多花时间多用gpt和搜索引擎,相信你能获得一个不错的成绩。此外,英语学习是本课程最重要的部分之一。
本文并不能保证所有内容都为正确,有错误见谅。禁止任何商业目的的转载和摘编。(文中有很多超链接,按住ctrl点击访问)
本学期课程学分分布如下(平时分拿到了之后基本不挂科,但是高分难度很高)
小占比:Lab出勤签到+每周CW
大占比:学期中后CW大作业得分(CW3)+期末考试
23-24期末考试:形式:机考
内容:31道题。MCQs居多,定义&理论题占比大。大题除了一题递归其余都是填空(继承等..)注意上下大题可能会有关联。大题难度不高其实。
开卷考试:允许携带U盘(仅pdf文件)和纸质资料。(当时我携带的就是这份笔记!)
考试模式:考试时开启监控软件。只能使用四个窗口,LMO、两个编译器、PDF查看器。
我的评价:看懂理论题的英文>我会写代码。(u1s1可以带一本字典)
修订于24/1/10
I.The first java class
public class Hello {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Output:Hello world
New project 后大概如图所示 src是文件目录 以下是创建文件示意图
class / main method / statement / semicolon / braces / squared / brackets / parentheses / parameter
public class Hello { //class
public static void main(String[] args) { //main method
System.out.println("Hello World"); //statement
} //parentheses圆括号 parameter参数
} //semicolon 分号 braces大括号 squared方括号brackets中括号
面向对象设计语言:JAVA
Java is an Object-Oriented Language:
○ every Java file must contain a class类declaration声明
○ all code代码 is written inside在 a class 类
○ to run a Java program, need to define a main method定义主方法
public class Hello {
public static void main(String[] args) {
int num = 5;
num = num + num;
System.out.println(num);
}
}
The input is 10.
○ single quote \' 单引号’
○ double quote \" 双引号”
○ new line character \n 新一行Enter
○ backslash \\ 反斜线\
7 + 4 = num1
6 + 4 = num2
System.out.println(‘\’num1 + num2 = ‘ + (num1 +num2) + ‘\’’)
INPUT ‘num1 + num2 = 21’
Println输出换行 print 输出接上
To a modern computer, everything is binary
○ 1 bit is 1 binary digit: 0 or 1 ; ON or OFF ; TRUE or FALSE
● Every bit we add doubles the total we can represent
○ 1 bit – 2
○ 2 bits – 4
○ 3 bits – 8
○ 4 bits – 16
○ ...
○ 8 bits – 256 – one Byte
● Mathematically: n bits yields 2n patterns (2 to the n-th power)
○3 Ways to Convert from Decimal to Binary - wikiHow
8 bits = 1 byte ≈ often 1 character, e.g. "a"
1024 bytes = 1 kilobyte ≈ several paragraphs
1024 kilobytes = 1 Megabyte ≈ about 200 pages of text
1024 Megabytes = 1 Gigabyte ≈ 256 MP3 files
1024 Gigabytes = 1 Terabyte ≈ 40 large movies
● Base 16 numbering system
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
● Represented with 0x__
i.e. 255 in decimal is 0xFF
● More readable than binary 比二进制更可读
decimal 121 10进制
binary 01111001 2进制
hex 0x79 16进制
● Stores more information than binary 存储比二进制文件更多的信息
hex and binary relate well 十六进制和二进制之间的关系很好
1 hex digit can always be represented with 4 binary digits 1个十六进制数字总是可以用4个二进制数字表示
no relationship like this between decimal and binary
● 24-bit colour means that there are
24 bits allocated for RGB channels
为RGB通道分配了24位
○ 8 bits for red, 8 bits for green,
8 bits for blue 红绿蓝
● How to represent this colour purple?
○ rich purple? deep purple?
● Need a better representation
○ often use hexadecimal 0xd400ff
○ what does that mean? 0x是十六进制的开头
● Hex 0xd400ff
○ d4 – red bits
○ 00 – green bits
○ ff – blue bits
● Compact, as opposed to 24-bit value for this colour purple
○ 110101000000000011111111
● Recall, computers can only store binary
○ includes characters
● ASCII is an encoding scheme 编码方案
that represents each character
with a 7-bit value
●Created by James Gosling
Modern object-oriented language
Continuously improved since 1990s
● Widely used
Mars rover, cell phones, web servers, ...
● Unfortunately, Java is verbose
Using more words – compare with Python!
● More importantly, it is not about the language
The programming skills that you learn in this course will apply to many Languages
Case sensitive:Java is case sensitive, This means that the identifier Hello is different from the hello. 大小写区分
Class name: For all classes, the initials of the class name should be capitalized. If the class name consists of several words, then the first letter of each word should be capitalized, such as MyFirstJavaClass. 类名命名:每个单词首字母大写
Method name: All method names should start with lowercase letters. If the method name contains a number of wordm90 |s, the following first word is capitalized. 方法名命名:小写字母开头,但是若干单词后面每个单词首字母大写
Source file name: The source file name must be the same as the class name. When saving a file, you should save the class name as a file name (remember that Java is case sensitive), and the file name is 后缀suffix. java.(If the file name is not the same class name).文件名必须是类名
Main method entry: All Java programs are executed starting by the public static void main (String [] args) method.(所有程序必须从该方法开始执行)
II.The second class
Integers (to non-mathematicians) are whole numbers, numbers with no fractional part, no decimal point. 以下四种
8 bits -128 to 127 (0 to 255)
Bytes. e.g., individual bytes of image data; in 32 bit images there is 1 byte each for red, green, blue and alpha (transparency) 字节数。例如,图像数据的单个字节;在32位图像中,红、绿、蓝和alpha(透明度)各有一个字节
16 bits -32,768 to 32,767
To save memory – instead of int. However, in most JVMs they are 32-bit anyway, so useless. 要保存内存-而不是int。然而,在大多数jvm中,它们都是32位的,非常没用。
32 bits -2^31 to 2^31 - 1
Everything except very big/very negative values. This is the default. 除了非常大的/非常负的值。这是默认值。
64 bits -2^63 to 2^63-1
long bigNumber = 300000000000000000L;
You will probably use int 95%+ of the time, long sometimes, and byte occasionally. 实用度 int>long>byte
32 bits
+-10^38 approx. 7 significant digits (decimal) float f = 1.375f;
64 bits +-10^38 approx. 15 significant digits (decimal) Default
e.g.
int a = 1000000000;
long b = 1000000000000000000l;
double c = 31.32;
float d = 31.01f;
As introduced last week, can also use Strings
Strings are objects, and have many methods
○ At basic level, can store text data
○ Note, double quotes needed around string
E.g. String str = "This is a String";
represents a character ('a', 'b', 'c', etc)
A different data type
includes non-Roman characters (Chinese, Cyrillic, Arabic, Greek
etc)
○ It is actually a 16 bit integer, range 0 - 65,535
● We can also store True/False information
(means true or false)
Discussed later in the module
Cannot store anything except this
Very useful for checking if conditions are met
Its size varies; it only uses 1 bit, but can take up to 32 bits of memory!
boolean bool = false;
>>全部内容看这里>> 百度网盘链接 <<(或者等我自己搭博客(X))<<懒得打
//能进行一些常识判断即可
一般只考一题选择。
文章浏览阅读1.4k次。UE4的AI基础学习_ue4行为树
文章浏览阅读2.5k次。摘要:自互联网行业发展以来,web前端不断发展变化着。在前人的基础上,后人有幸能够站在前人的肩膀上行走。前端的发展变化不仅是继承式的迭代,同时也是不断的变革和创造。一、前端到底是个什么?简单点说,浏览器呈现出来的页面,给用户看的、操作的就是前端(客户端);你看不到的,类似一些游戏数据、应用数据之类的就是后端(服务端)。那么再简单点就可以说,前端指的就是浏览器端,后端指的就是为浏览器提供服务和数据的服务器端。这是比较准确的描述,如果往大了讲,你所有看到的一切,网页、移动端网页、小程序、甚._华为云前端发版
文章浏览阅读783次,点赞18次,收藏26次。监听DOM变化(属性变动、目标子节点变化、观察后代节点等)_mutationobserver.observe
文章浏览阅读9.8k次,点赞13次,收藏65次。freopen 和 fopen 都是C的标准库函数被包含于C标准库头文件中。fopen就是我们最熟悉的打开一个文件用于写入or读取freopen 是打开一个文件,用于接收输入输出流的数据。_freopen
文章浏览阅读3.8k次。转载自: https://blog.csdn.net/dcrmg/article/details/79546962python程序中使用 import XXX 时,python解析器会在当前目录、已安装和第三方模块中搜索 xxx,如果都搜索不到就会报错。 使用sys.path.append()方法可以临时添加搜索路径,方便更简洁的import其他包和模块。这种方法导入的路径会在python程..._sys. addpath
文章浏览阅读7.8k次,点赞7次,收藏44次。我的官网地址原文链接Qt中的矩阵计算库eigen在实际工程中由于需要使用矩阵计算,网上搜罗了下,发现 eigen 库比较靠谱,这里简要介绍下食用方法,以及如何避免运行断言下载库eigen 官网引入到 Qt 工程中将 源码中的 的 Eigen 目录拷贝到 Qt 工程的目录目录中新建 eigen.pri 文件内容如下INCLUDEPATH += $$PWD使用新建 C+..._qt矩阵运算
文章浏览阅读539次,点赞11次,收藏9次。正向的LSTM网络接受序列数据的初始状态,逐步学习前向信息并更新内部隐藏状态,最终生成前向隐藏状态序列。反向的LSTM网络则以相反的顺序处理序列数据,并生成相应的反向隐藏状态序列。本文将介绍使用Matlab实现的BiLSTM算法,并展示其在多输入单输出回归问题上的应用。然后,我们定义了BiLSTM模型的层次结构,包括序列输入层、BiLSTM层、全连接层和回归层。与传统的单向LSTM相比,BiLSTM能够同时利用序列数据的前向和后向信息,从而提高模型在长期依赖关系上的学习能力。_双向bilstm模型
文章浏览阅读295次,点赞9次,收藏11次。D78XX系列是用于各种电视机、收录机、电子仪器、设备的稳压电源电路。包括D7805、D7806、 D7808、 D7809、 D7810、 D7812、 D7815。● 输出电流大,IOMAX= 1A.● 封装形式: T0-220。● 内设过热、短路保护电路。
文章浏览阅读456次,点赞8次,收藏2次。じゃ、始めましょう。--最近在学外语,对于IT从业者来说,会是一项优势。_stm32f103c8t6csdn
文章浏览阅读7.1k次,点赞41次,收藏196次。文章目录1.Anaconda是什么2.Anaconda下载3.Anaconda安装4.Anaconda环境变量配置5.检验是否安装成功6.检验Anaconda Navifator是否安装成功7.修改Anaconda镜像修改为清华大学镜像移除清华大学镜像8.PyCharm配置Anaconda方式一(建立新的项目时)方式二(已经打开项目)9.总结1.Anaconda是什么Anaconda指的是一个开源的Python发行版本,其包含了conda、Python等180多个科学包及其依赖项。Anaconda也是P_anaconda环境变量e:\anaconda3\library\usr\bin
文章浏览阅读2k次,点赞11次,收藏44次。电脑快捷键不仅可以帮助我们熟练的操作电脑,还可以帮助我们快速提升自己的工作效率,从此跟加班说拜拜!但由于电脑快捷键过于繁多不方便我们记忆!那么今天小编为大家整理的70个Wordows、Ctrl、Alt、Shift组合快捷键,运用好的话能够帮你工作效率提升100倍!希望能为大家派上用途!下面以图片&文字的形式展现给大家!文字可以直接复制!图片也可以直接拿去收藏!..._快捷键可以帮助自己
文章浏览阅读2.2w次,点赞317次,收藏636次。明天就是女朋友的生日了, 是时候展现专属于程序员的浪漫了!你打算怎么给心爱的人表达爱意?鲜花礼物?代码表白?还是创意DIY?或者…无论那种形式,快来秀我们一脸吧!_用html做一个生日快乐网页