Elementary Data Structures ~ Compound Data Structures

Arrays, linked lists, and strings all provide simple ways to structure data sequentially. They provide a first level of abstraction that we can use to group objects in ways amenable to processing the objects efficiently. Having settled on these abstractions, we can use them in a hierarchical fashion to build up more complex structures. We can contemplate arrays of arrays, arrays of lists, arrays of strings, and so forth. 继续阅读“Elementary Data Structures ~ Compound Data Structures”

Elementary Data Structures ~ Linked Lists II

Linked lists bring us into a world of computing that is markedly different from that of arrays and structures. With arrays and structures, we save an item in memory and later refer to it by name (or by index) in much the same manner as we might put a piece of information in a file drawer or an address book; with linked lists, the manner in which we save information makes it more difficult to access but easier to rearrange. Working with data that are organized in linked lists is called list processing. 继续阅读“Elementary Data Structures ~ Linked Lists II”

晶体三极管驱动继电器电路及其抗干扰的一些建议

1、连接方法

用晶体三极管驱动继电器时,建议连接集电极使用。另外,继电器为 ON 时外加额定电压、继电器为 OFF 时使电压为零是一种避免故障的使用方法。并且,在低电压线路(5V 以下)中,请选择考虑到晶体三极管电压降落的电源电压、继电器品种。(在 5V 线路中,建议使用线圈额定电压为 4.5 V型) 继续阅读“晶体三极管驱动继电器电路及其抗干扰的一些建议”