Go语言从入门到进阶实战(视频教学版)
电子书推荐
-
Go语言程序设计 评分:
国外最经典的Go语言著作,Go语言编程的先驱者Mark Summerfield的实践经验总结。 这是一本Go语言实战指南,帮你了解Go语言,按Go语言的方式思考,以及使用Go语言来编写高性能软件。 作者展示了如何编写充分利用Go语言突破性的特性和惯用法的代码,以及Go语言在其他语言之上所做的改进,并着重强调了Go语言的关键创新。 注重实践教学,每章都提供了多个经过精心设计的代码示例。 由国内第一个核心服务完全采用Go语言实现的团队——七牛团队核心成员翻译。
上传时间:2018-05 大小:7.23MB
- 169KB
Go语言程序设计(Mark Summerfield)-源代码
2018-10-01Go语言程序设计(作者Mark Summerfield),书中的所有示例,在Linux、Mac OS X和Windows平台上的gc编译器测试通过。具体使用方法参见原著第一章的说明。
- 4.85MB
The way to go
2014-06-19go程序设计语言 Contents Preface................................................................................................................................. xix PART 1—WHY LEARN GO—GETTING STARTED Chapter 1—Origins, Context and Popularity of Go...............................................................1 1.1 Origins and evolution................................................................................................1 1.2 Main characteristics, context and reasons for developing a new language....................4 1.2.1 Languages that influenced Go.........................................................................4 1.2.2 Why a new language?......................................................................................5 1.2.3 Targets of the language....................................................................................5 1.2.4 Guiding design principles...............................................................................7 1.2.5 Characteristics of the language........................................................................7 1.2.6 Uses of the language........................................................................................8 1.2.7 Missing features?.............................................................................................9 1.2.8 Programming in Go......................................................................................10 1.2.9 Summary......................................................................................................10 Chapter 2—Installation and Runtime Environment............................................................11 2.1 Platforms and architectures.....................................................................................11 (1) The gc Go-compilers:..................................................................................11 (2) The gccgo-compiler:....................................................................................13 (3) File extensions and packages:.......................................................................14 2.2 Go Environment variables........................................................................................14 2.3 Installing Go on a Linux system...............................................................................16 2.4 Installing Go on an OS X system.............................................................................21 2.5 Installing Go on a Windows system.........................................................................21 2.6 What is installed on your machine? .........................................................................26 2.7 The Go runtime.......................................................................................................27 2.8 A Go interpreter ......................................................................................................27 Chapter 3—Editors, IDE’s and Other tools.........................................................................28 3.1 Basic requirements for a decent Go development environment.................................28 3.2 Editors and Integrated Development Environments.................................................29 3.2.1. Golang LiteIDE ..........................................................................................32 3.2.2. GoClipse......................................................................................................33 3.3 Debuggers................................................................................................................34 3.4 Building and running go-programs with command- and Makefiles..........................35 3.5 Formatting code: go fmt or gofmt............................................................................39 3.6 Documenting code: go doc or godoc........................................................................40 3.7 Other tools...............................................................................................................41 3.8 Go’s performance.....................................................................................................41 3.9 Interaction with other languages...............................................................................43 3.9.1. Interacting with C .......................................................................................43 3.9.2. Interacting with C++....................................................................................45 PART 2—CORE CONSTRUCTS AND TECHNIQUES OF THE LANGUAGE Chapter 4—Basic constructs and elementary data types.......................................................49 4.1. Filenames—Keywords—Identifiers..........................................................................49 4.2. Basic structure and components of a Go-program...................................................50 4.2.1 Packages, import and visibility......................................................................51 4.2.3 Comments....................................................................................................56 4.2.4 Types............................................................................................................57 4.2.5 General structure of a Go-program...............................................................58 4.2.6 Conversions..................................................................................................60 4.2.7 About naming things in Go..........................................................................60 4.3. Constants................................................................................................................60 4.4. Variables..................................................................................................................63 4.4.1 Introduction.................................................................................................63 4.4.2 Value types and reference types.....................................................................66 4.4.3 Printing........................................................................................................68 4.4.4 Short form with the := assignment operator..................................................69 4.4.5 Init-functions................................................................................................70 4.5. Elementary types and operators...............................................................................73 4.5.1. Boolean type bool........................................................................................73 4.5.2. Numerical types...........................................................................................75 4.5.2.1 ints and floats.............................................................................................75 4.5.2.2 Complex numbers.....................................................................................79 4.5.2.3 Bit operators..............................................................................................79 4.5.2.4 Logical operators........................................................................................81 4.5.2.5 Arithmetic operators.................................................................................82 4.5.2.6 Random numbers......................................................................................82 4.5.3. Operators and precedence............................................................................84 4.5.4. Aliasing types...............................................................................................84 4.5.5. Character type.............................................................................................85 4.6. Strings.....................................................................................................................86 4.7. The strings and strconv package..............................................................................88 4.7.1—Prefixes and suffixes:...................................................................................88 4.7.2—Testing whether a string contains a substring:.............................................89 4.7.3—Indicating at which position (index) a substring or character occurs in a string:...................................................................................................89 4.7.4—Replacing a substring:................................................................................90 4.7.5—Counting occurrences of a substring:..........................................................90 4.7.6—Repeating a string:.....................................................................................90 4.7.7—Changing the case of a string:....................................................................91 4.7.8—Trimming a string:.....................................................................................92 4.7.9—Splitting a string:........................................................................................92 4.7.10—Joining over a slice:..................................................................................92 4.7.11—Reading from a string:..............................................................................93 4.8. Times and dates.......................................................................................................95 4.9. Pointers...................................................................................................................96 Chapter 5—Control structures...........................................................................................101 5.1—The if else construct............................................................................................101 5.2—Testing for errors on functions with multiple return values..................................106 5.3—The switch keyword............................................................................................110 5.4—The for construct................................................................................................114 5.4.1 Counter-controlled iteration.......................................................................114 Character on position 2 is:...........................................................................................116 5.4.2 Condition-controlled iteration ...................................................................117 5.4.3 Infinite loops .............................................................................................118 5.4.4 The for range construct...............................................................................119 5.5—Break / continue..................................................................................................121 5.6—Use of labels with break and continue—goto.......................................................123 Chapter 6—Functions.......................................................................................................126 6.1 Introduction...........................................................................................................126 6.2 Parameters and return values..................................................................................129 6.2.1 Call by value / Call by reference..................................................................129 6.2.2 Named return variables...............................................................................131 6.2.3 Blank identifier...........................................................................................133 6.2.4 Changing an outside variable......................................................................134 6.3 Passing a variable number of parameters.................................................................135 6.4 Defer and tracing...................................................................................................137 6.5 Built-in functions...................................................................................................142 6.6 Recursive functions................................................................................................143 6.8 Closures (function literals).....................................................................................147 6.9 Applying closures: a function returning another function ......................................150 6.10 Debugging with closures......................................................................................153 6.11 Timing a function ...............................................................................................154 6.12 Using memoization for performance....................................................................154 Chapter 7—Arrays and Slices.............................................................................................157 7.1 Declaration and initialization.................................................................................157 7.1.1 Concept......................................................................................................157 7.1.2 Array literals................................................................................................161 7.1.3 Multidimensional arrays..............................................................................162 7.1.4 Passing an array to a function......................................................................163 7.2 Slices......................................................................................................................164 7.2.1 Concept......................................................................................................164 7.2.2 Passing a slice to a function.........................................................................168 7.2.3 Creating a slice with make()........................................................................168 7.2.4 Difference between new() and make().........................................................170 7.2.5 Multidimensional slices...............................................................................171 7.2.6 The bytes package.......................................................................................171 7.3 For range construct................................................................................................172 7.4 Reslicing.................................................................................................................175 7.5 Copying and appending slices................................................................................176 7.6 Applying strings, arrays and slices...........................................................................178 7.6.1 Making a slice of bytes from a string...........................................................178 7.6.2 Making a substring of a string.....................................................................179 7.6.3 Memory representation of a string and a slice..............................................179 7.6.4 Changing a character in a string..................................................................180 7.6.5 Comparison function for byte arrays...........................................................180 7.6.6 Searching and sorting slices and arrays.......................................................181 7.6.7 Simulating operations with append.............................................................182 7.6.8 Slices and garbage collection.......................................................................182 Chapter 8—Maps..............................................................................................................185 8.1 Declaration, initialization and make.......................................................................185 8.1.1 Concept......................................................................................................185 8.1.2 Map capacity..............................................................................................188 8.1.3 Slices as map values.....................................................................................188 8.2 Testing if a key-value item exists in a map—Deleting an element...........................188 8.3 The for range construct..........................................................................................190 8.4 A slice of maps......................................................................................................191 8.5 Sorting a map.........................................................................................................192 8.6 Inverting a map......................................................................................................194 Chapter 9—Packages.........................................................................................................196 A The standard library..................................................................................................196 9.1 Overview of the standard library.............................................................................196 9.2 The regexp package................................................................................................199 9.3 Locking and the sync package................................................................................200 9.4 Accurate computations and the big package...........................................................202 B Custom and external packages: use, build, test, document, install.............................203 9.5 Custom packages and visibility...............................................................................203 9.6 Using godoc for your custom packages...................................................................208 9.7 Using go install for installing custom packages.......................................................210 9.8 Custom packages: map structure, go install and go test..........................................212 9.8.1 Map-structure for custom packages.............................................................212 9.8.2 Locally installing the package......................................................................215 9.8.3 OS dependent code.....................................................................................216 9.9 Using git for distribution and installation...............................................................216 9.9.1 Installing to github.....................................................................................216 9.9.2 Installing from github.................................................................................217 9.10 Go external packages and projects. ......................................................................218 9.11 Using an external library in a Go program............................................................219 Chapter 10—Structs and Methods.....................................................................................224 10.1 Definition of a struct............................................................................................224 10.2 Creating a struct variable with a Factory method..................................................232 10.2.1 A factory for structs..................................................................................232 10.2.2 new() and make() revisited for maps and structs:.......................................234 10.3 Custom package using structs...............................................................................235 10.4 Structs with tags...................................................................................................236 10.5 Anonymous fields and embedded structs..............................................................237 10.5.1 Definition.................................................................................................237 10.5.2 Embedded structs.....................................................................................238 10.5.3 Conflicting names.....................................................................................239 10.6 Methods...............................................................................................................240 10.6.1 What is a method?....................................................................................240 10.6.2 Difference between a function and a method............................................244 10.6.3 Pointer or value as receiver........................................................................245 10.6.4 Methods and not-exported fields..............................................................247 10.6.5 Methods on embedded types and inheritance............................................248 10.6.6 How to embed functionality in a type.......................................................251 10.6.7 Multiple inheritance..................................................................................253 10.6.8 Universal methods and method naming....................................................256 10.6.9 Comparison between Go types and methods and other object-oriented languages...........................................................................256 10.7 The String()-method and format specifiers for a type...........................................258 10.8 Garbage collection and SetFinalizer......................................................................261 Chapter 11—Interfaces and reflection................................................................................263 11.1 What is an interface?............................................................................................263 11.2 Interface embedding interface(s)...........................................................................270 11.3 How to detect and convert the type of an interface variable: type assertions.........270 11.4 The type switch....................................................................................................273 11.5 Testing if a value implements an interface.............................................................274 11.6 Using method sets with interfaces.........................................................................275 11.7 1st example: sorting with the Sorter interface........................................................277 11.8 2nd example: Reading and Writing......................................................................282 11.9 Empty Interface...................................................................................................284 11.9.1 Concept....................................................................................................284 11.9.2 Constructing an array of a general type or with variables of different types............................................................................................286 11.9.3 Copying a data-slice in a slice of interface{}...............................................287 11.9.4 Node structures of general or different types.............................................288 11.9.5 Interface to interface.................................................................................289 11.10 The reflect package.............................................................................................290 11.10.1 Methods and types in reflect...................................................................290 11.10.2 Modifying (setting) a value through reflection........................................293 11.10.3 Reflection on structs...............................................................................294 11.11 Printf and reflection...........................................................................................296 11.12 Interfaces and dynamic typing............................................................................298 11.12.1 Dynamic typing in Go............................................................................298 11.12.2 Dynamic method invocation...................................................................300 11.12.3 Extraction of an interface........................................................................301 11.12.4 Explicitly indicating that a type implements an interface........................303 11.12.5 Empty interface and function overloading..............................................304 11.12.6 Inheritance of interfaces..........................................................................304 11.13 Summary: the object-orientedness of Go............................................................306 11.14 Structs, collections and higher order functions...................................................306 PART 3—ADVANCED GO Chapter 12—Reading and writing.....................................................................................313 12.1 Reading input from the user.................................................................................313 12.2 Reading from and writing to a file........................................................................317 12.2.1 Reading from a file....................................................................................317 12.2.2 The package compress: reading from a zipped file.....................................321 12.2.3 Writing to a file.........................................................................................322 12.3 Copying files........................................................................................................324 12.4 Reading arguments from the command-line.........................................................325 12.4.1 With the os-package..................................................................................325 12.4.2 With the flag-package...............................................................................326 12.5 Reading files with a buffer....................................................................................328 12.6 Reading and writing files with slices.....................................................................330 12.7 Using defer to close a file.....................................................................................332 12.8 A practical example of the use of interfaces: fmt.Fprintf......................................332 12.9 The json dataformat.............................................................................................334 12.10 The xml dataformat............................................................................................340 12.11 Datatransport through gob.................................................................................342 12.12 Cryptography with go........................................................................................345 Chapter 13—Error-handling and Testing...........................................................................348 13.1 Error-handling.....................................................................................................349 13.1.1 Defining errors..........................................................................................349 13.1.2 Making an error-object with fmt..............................................................353 13.2 Run-time exceptions and panic............................................................................353 13.4 Error-handling and panicking in a custom package..............................................357 13.5 An error-handling scheme with closures...............................................................360 13.6 Starting an external command or program...........................................................363 13.7 Testing and benchmarking in Go.........................................................................364 13.8 Testing: a concrete example..................................................................................367 13.9 Using table-driven tests........................................................................................369 13.10 Investigating performance: tuning and profiling Go programs............................371 13.10.1 Time and memory consumption.............................................................371 13.10.2 Tuning with go test.................................................................................371 13.10.3 Tuning with pprof...................................................................................371 Chapter 14—Goroutines and Channels.............................................................................375 14.1 Concurrency, parallelism and goroutines..............................................................375 14.1.1 What are goroutines?................................................................................375 14.1.2 The difference between concurrency and parallelism.................................377 14.1.3 Using GOMAXPROCS............................................................................378 14.1.4 How to specify the number of cores to be used on the command-line?.....379 14.1.5 Goroutines and coroutines........................................................................381 14.2 Channels for communication between goroutines................................................381 14.2.1 Concept....................................................................................................381 14.2.2 Communication operator <-.....................................................................383 14.2.3 Blocking of channels.................................................................................385 14.2.4 Goroutines synchronize through the exchange of data on one (or more) channel(s)........................................................................................387 14.2.5 Asynchronous channels—making a channel with a buffer.........................387 14.2.6 Goroutine using a channel for outputting result(s)....................................388 14.2.7 Semaphore pattern....................................................................................389 14.2.8 Implementing a parallel for-loop...............................................................391 14.2.9 Implementing a semaphore using a buffered channel................................391 14.2.10 For—range applied to channels...............................................................394 14.2.11 Channel directionality............................................................................396 14.3 Synchronization of goroutines: closing a channel—testing for blocked channels..400 14.4 Switching between goroutines with select.............................................................403 14.5 Channels, Timeouts and Tickers...........................................................................408 14.6 Using recover with goroutines..............................................................................412 14.7 Comparing the old and the new model: Tasks and Worker processes....................413 14.8 Implementing a lazy generator..............................................................................416 14.9 Implementing Futures..........................................................................................420 14.10 Multiplexing......................................................................................................421 14.10.1 A typical client-server pattern..................................................................421 14.10.2 Teardown: shutdown the server by signaling a channel............................424 14.11 Limiting the number of requests processed concurrently....................................427 14.12 Chaining goroutines...........................................................................................428 14.13 Parallelizing a computation over a number of cores............................................429 14.14 Parallelizing a computation over a large amount of data.....................................430 14.15 The leaky bucket algorithm................................................................................431 14.16 Benchmarking goroutines...................................................................................433 14.17 Concurrent acces to objects by using a channel..................................................434 Chapter 15—Networking, templating and web-applications..............................................436 15.1 A tcp-server .........................................................................................................436 15.2 A simple webserver...............................................................................................445 15.3 Polling websites and reading in a web page...........................................................448 15.4 Writing a simple web application.........................................................................452 15.5 Making a web application robust..........................................................................454 15.6 Writing a web application with templates.............................................................456 15.7 Exploring the template package............................................................................461 15.7.1. Field substitution: {{.FieldName}}............................................................462 15.7.2. Validation of the templates.......................................................................463 15.7.3 If-else........................................................................................................464 15.7.4 Dot and with-end.....................................................................................465 15.7.5 Template variables $..................................................................................466 15.7.6 Range-end.................................................................................................467 15.7.7 Predefined template functions...................................................................467 15.8 An elaborated webserver with different functions.................................................468 (works only on Unix because calls /bin/date)........................................................474 15.9 Remote procedure calls with rpc...........................................................................474 15.10 Channels over a network with netchan...............................................................477 15.11 Communication with websocket........................................................................478 15.12 Sending mails with smtp....................................................................................480 PART 4—APPLYING GO Chapter 16—Common Go Pitfalls or Mistakes..................................................................485 16.1 Hiding (shadowing) a variable by misusing short declaration...............................486 16.2 Misusing strings...................................................................................................486 16.3 Using defer for closing a file in the wrong scope...................................................487 16.4 Confusing new() and make()................................................................................488 16.5 No need to pass a pointer to a slice to a function..................................................488 16.6 Using pointers to interface types...........................................................................488 16.7 Misusing pointers with value types.......................................................................489 16.8 Misusing goroutines and channels........................................................................489 16.9 Using closures with goroutines.............................................................................490 16.10 Bad error handling.............................................................................................491 16.10.1 Don’t use booleans:.................................................................................491 16.10.2 Don’t clutter your code with error-checking:...........................................492 Chapter 17—Go Language Patterns...................................................................................494 17.1 The comma, ok pattern........................................................................................494 17.2 The defer pattern..................................................................................................495 17.3 The visibility pattern............................................................................................497 17.4 The operator pattern and interface.......................................................................497 17.4.1 Implement the operators as functions.......................................................497 17.4.2 Implement the operators as methods.........................................................498 17.4.3 Using an interface.....................................................................................499 Chapter 18—Useful Code Snippets—Performance Advice.................................................500 18.1 Strings..................................................................................................................500 18.2 Arrays and slices...................................................................................................501 18.3 Maps....................................................................................................................502 18.4 Structs..................................................................................................................502 18.5 Interfaces..............................................................................................................503 18.6 Functions.............................................................................................................503 18.7 Files......................................................................................................................504 18.8 Goroutines and channels......................................................................................505 18.9 Networking and web applications.........................................................................507 18.9.1. Templating:......................................................................................................507 18.10 General..............................................................................................................508 18.11 Performance best practices and advice................................................................508 Chapter 19—Building a complete application....................................................................509 19.1 Introduction.........................................................................................................509 19.2 Introducing Project UrlShortener.........................................................................509 19.3 Data structure......................................................................................................510 19.4 Our user interface: a web server frontend.............................................................515 19.5 Persistent storage: gob..........................................................................................519 19.6 Using goroutines for performance........................................................................524 19.7 Using json for storage...........................................................................................527 19.8 Multiprocessing on many machines......................................................................528 19.9 Using a ProxyStore...............................................................................................532 19.10 Summary and enhancements..............................................................................536 Chapter 20—Go in Google App Engine............................................................................538 20.1 What is Google App Engine ?...............................................................................538 20.2 Go in the cloud ...................................................................................................540 20.3 Installation of the Go App Engine SDK: the development environment for Go...540 20.3.1. Installation...............................................................................................540 20.3.2. Checking and testing...............................................................................542 20.4 Building your own Hello world app ....................................................................543 20.4.1 Map structure—Creating a simple http-handler........................................543 20.4.2 Creating the configuration file app.yaml...................................................544 20.4.3 Iterative development................................................................................548 20.4.4. Integrating with the GoClipse IDE..........................................................548 20.5 Using the Users service and exploring its API.......................................................549 20.6 Handling forms....................................................................................................551 20.7 Using the datastore...............................................................................................552 20.8 Uploading to the cloud.......................................................................................556 Chapter 21—Real World Uses of Go.................................................................................559 21.1 Heroku—a highly available consistent data store in Go. ......................................559 21.2 MROffice—a VOIP system for call centers in Go................................................561 21.3 Atlassian—a virtual machine cluster management system.....................................562 21.4 Camlistore—a content addressable storage system................................................563 21.5 Other usages of the Go language..........................................................................563 APPENDICES...................................................................................................................567 (A) CODE REFERENCE...........................................................................................567 (B)CUTE GO QUOTES.............................................................................................571 GO QUOTES: TRUE BUT NOT SO CUTE....................................................572 (C) LIST OF CODE EXAMPLES (Listings)...............................................................572 (E) References in the text to Go—packages..................................................................583 (F) References in the text to Go—tools........................................................................586 (G) Answers to Questions............................................................................................586 (H) ANSWERS TO EXERCISES................................................................................590 (I) BIBLIOGRAPHY (Resources and References)........................................................593 Index..............................................................................................................................597 List of Illustrations Chapter 1—Origins, Context and Popularity of Go...............................................................1 Fig 1.1: The designers of Go: Griesemer, Thompson and Pike..........................................1 Fig 1.2: The logo’s of Go..................................................................................................3 Fig 1.3: Influences on Go.................................................................................................5 Chapter 3—Editors, IDE’s and Other tools.........................................................................28 Fig 3.1: LiteIDE and its AST-view..................................................................................33 Fig 3.2: GoClipse and its outline code-view...................................................................34 Chapter 4—Basic constructs and elementary data types.......................................................49 Fig 4.1: Value type..........................................................................................................67 Fig 4.2: Assignment of value types..................................................................................67 Fig 4.3: Reference types and assignment.........................................................................67 Fig 4.4: Pointers and memory usage...............................................................................98 Fig 4.5: Pointers and memory usage, 2...........................................................................99 Chapter 7—Arrays and Slices.............................................................................................157 Fig 7.1: Array in memory.............................................................................................158 Fig 7.2: Slice in memory..............................................................................................166 Chapter 9—Packages.........................................................................................................196 Fig 9.1: Package documentation with godoc.................................................................210 Chapter 10—Structs and Methods.....................................................................................224 Fig 10.1: Memory layout of a struct.............................................................................227 Fig 10.2: Memory layout of a struct of structs..............................................................229 Fig. 10.3: Linked list as recursive struct........................................................................230 Fig 10.4: Binary tree as recursive struct.........................................................................230 Chapter 11—Interfaces and reflection................................................................................263 Fig 11.1: Interface value in memory.............................................................................264 Chapter 14—Goroutines and Channels.............................................................................375 Fig 14.1: Channels and goroutines...............................................................................382 Fig 14.2: The sieve prime-algorithm.............................................................................397 Chapter 15—Networking, templating and web-applications..............................................436 Fig 15.1—Screen of exercise 15.6.................................................................................454 Chapter 19—Building a complete application....................................................................509 Fig 19.1: Handler functions in goto.............................................................................515 Fig 19.2: The Add handler...........................................................................................518 Fig 19.3: The response of the Add handler...................................................................519 Fig 19.4: The response of the Redirect handler.............................................................519 Fig 19.5: Distributing the work load over master- and slave computers........................529 Chapter 20—Go in Google App Engine............................................................................538 Fig 20.1: The Application Control Panel......................................................................558
- 46.34MB
Go语言程序设计(programming in go)中文 高清完整.pdf版
2018-03-08《Go语言程序设计》这本书是学习Go语言的重要资源,它为读者提供了全面而深入的Go语言知识。Go语言,也称为Golang,是由Google开发的一种静态类型、编译型、并发型且具有垃圾回收功能的编程语言。其设计目标是提高...
- 3.86MB
golang 语言程序设计
2018-01-12《Go语言程序设计》这本书是为想要学习和深入理解Go语言的初学者准备的一份宝贵资源。Go语言,也称为Golang,是由Google公司开发的一种静态类型、编译型、并发型、垃圾回收的现代编程语言,其设计目标是提高开发效率...
- 45.81MB
Go语言程序设计(中文) 完整版 带书签
2018-05-25《Go语言程序设计》是为想要深入理解和掌握Go语言的程序员提供的一本全面教程。Go语言,也称为Golang,由Google公司于2009年推出,旨在解决现代软件开发中的性能、并发性和可维护性问题。这本书以其清晰的阐述和丰富...
- 46.39MB
Go语言程序设计 中文扫描版
2018-04-04《Go语言程序设计》这本书是Go语言学习者的宝贵资源,由知名的编程专家撰写,深入浅出地介绍了Go语言的核心概念和技术。Go语言,也被称为Golang,是由Google开发的一种静态类型的、编译型的、垃圾回收的、并发型且...
- 29.92MB
Go语言相关资源:go语言程序设计、go语言圣经、golang Web开发、学习go语言(PDF&mobi;格式)
2018-06-07go语言学习的相关资源,有pdf格式和kindle专用格式mobi,资料包含:go语言程序设计、学习Go语言(Golang)、Go语言圣经、Go语言实战、golang Web开发
- 48.17MB
Go语言程序设计 (中文)
2018-04-03### Go语言程序设计 #### 一、Go语言简介 Go语言,又称Golang,是由Google公司于2007年开始研发的一种开源编程语言。自2009年正式对外发布以来,Go语言凭借其简洁高效的语法特性、强大的并发处理能力以及良好的跨...
- 46.35MB
Go语言程序设计(中文)
2018-02-13标题中的“Go语言程序设计”指的是对Go语言的深入学习和应用,涵盖了Go语言的基础概念、语法特性、编程模式以及高级主题。这通常包括变量、常量、数据类型、控制流(如if语句和for循环)、函数、包和导入、接口、...
- 173.28MB
go语言程序设计
2018-06-07go语言程序设计,是由人们邮电出版社出版的一本关于go语言编程的书籍。本书以深入浅出的方式,详细介绍了go语言的基础知识,包括语言的语法,数据类型,控制结构,函数和方法,面向对象编程,错误处理,并发编程,...
- 0B
Qt 5实现串口调试助手 (源工程文件、0积分下载)
2021-12-06基于Qt 5实现串口调试助手,程序仅供参考,修改了之前十六进制接收0xA0--0xFF有误的问题,新增了窗口自适应(ui文件设置栅格),文件详情可看博客链接https://blog.csdn.net/m0_51294753/article/details/121405661。
- 47.24MB
【SystemVerilog】路科验证V2学习笔记(全600页).pdf
2021-02-25SystemVerilog的听课学习笔记,包括讲义截取、知识点记录、注意事项等细节的标注。 目录如下: 第一章 SV环境构建常识 1 1.1 数据类型 1 四、二值逻辑 4 定宽数组 9 foreach 13 动态数组 16 队列 19 关联数组 21 枚举类型 23 字符串 25 1.2 过程块和方法 27 initial和always 30 function逻辑电路 33 task时序电路 35 动态 静态变量 39 1.3 设计例化和连接 45 第二章 验证的方法 393 动态仿真 395 静态检查 397 虚拟模型 403 硬件加速 405 效能验证 408 性能验证 410 第三章 SV组件实现 99 3.1 接口 100 什么是interface 101 接口的优势 108 3.2 采样和数据驱动 112 竞争问题 113 接口中的时序块clocking 123 利于clocking的驱动 133 3.3 测试的开始和结束 136 仿真开始 139 program隐式结束 143 program显式结束 145 软件域program 147 3.4 调试方法 150 第四章 验证的计划 166 4.1 计划概述 166 4.2 计划的内容 173 4.3 计划的实现 185 4.4 计划的进程评估 194 第五章 验证的管理 277 6.1 验证的周期检查 277 6.2 管理三要素 291 6.3 验证的收敛 303 6.4 问题追踪 314 6.5 团队建设 321 6.6 验证的专业化 330 第六章 验证平台的结构 48 2.1 测试平台 49 2.2 硬件设计描述 55 MCDF接口描述 58 MCDF接口时序 62 MCDF寄存器描述 65 2.3 激励发生器 67 channel initiator 72 register initiator 73 2.4 监测器 74 2.5 比较器 81 2.6 验证结构 95 第七章 激励发生封装:类 209 5.1 概述 209 5.2 类的成员 233 5.3 类的继承 245 三种类型权限 protected/local/public 247 this super 253 成员覆盖 257 5.4 句柄的使用 263 5.5 包的使用 269 第八章 激励发生的随机化 340 7.1 随机约束和分布 340 权重分布 353 条件约束 355 7.2 约束块控制 358 7.3 随机函数 366 7.4 数组约束 373 7.5 随机控制 388 第九章 线程与通信 432 9.1 线程的使用 432 9.2 线程的控制 441 三个fork...join 443 等待衍生线程 451 停止线程disable 451 9.3 线程的通信 458 第十章 进程评估:覆盖率 495 10.1 覆盖率类型 495 10.2 功能覆盖策略 510 10.3 覆盖组 516 10.4 数据采样 524 10.5 覆盖选项 544 10.6 数据分析 550 第十一章 SV语言核心进阶 552 11.1 类型转换 552 11.2 虚方法 564 11.3 对象拷贝 575 11.4 回调函数 584 11.5 参数化的类 590 第十二章 UVM简介 392 8.2 UVM简介 414 8.3 UVM组件 420 8.4 UVM环境 425
- 131.54MB
AutoSAR标准协议4.2.2
2020-01-19AutoSAR标准协议规范4.2.2,里面包含了AutoSAR组织所规定的AutoSAR架构的标准规范协议原文档。对AutoSAR的学习有一定的借鉴意义
- 2.13MB
光伏-储能并网系统仿真.rar
2021-12-31该文件是清华大学储能课的期末大作业。用SIMULINK搭建了一个完整的光伏-储能并网系统。我的博客中介绍了系统实现的具体方法,欢迎查看!
- 1.50MB
XCP协议的规范文档
2020-01-19XCP协议的原规范文档,主要包含了Part1-5共5个部分,其中第三部分又分为CAN、以太网和Sxl等。对于XCP协议的开发者和学习者有借鉴意义
- 339KB
GD32替换STM32注意事项.pdf
2020-04-12GD32 介绍与 STM32 兼容性汇总。STM32的代码直接在GD32上运行需要小部分的修改。按教程做对应修改就行哈。
- 35KB
NPPJSONViewer.zip
2022-01-17NodePad++ JSON格式化插件
- 8.81MB
蓝牙BLE协议中文版.pdf
2020-06-16蓝牙BLE协议中文版,帮助初学者更快掌握协议内容。协议为SIG官方协议的中文版,所有协议内容均与英文原版协议内容保持一致
- 2KB
CANoe通过CAPL脚本实现自动测试
2020-12-12现在汽车行业用vector的工具进行自动测试,但是该自动测试模板很少,本案例是分享CAPL脚本自动化测试的模板,和自动控制测试步骤的XML模板,使用过程可以通过本人分享的文档来实现工程的建立到自动测试的完成。通过CAPL脚本+XML控制测试步骤,实现自动测试,生成测试报告。
- 5.19MB
AD20官方中文教程.pdf
2019-12-17官方提供的入门教材,其中重点讲解了一个简易电路板的开发过程,从元器件的选择,元器件的布置,到最后的产品输出,比较完整的一个实例,适合初次使用软件的开发人员使用。
- 25.1MB
完整版 Microsoft.ACE.OLEDB.12.0 驱动下载.rar
2019-12-30亲测好用,挺不错的资源,大家快来下载吧!挺有用的!需要的话可以来下载哦!Microsoft.ACE.OLEDB.12.0驱动下载,解决 未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序,权限问题
- 17.15MB
电路分析基础第二版PDF电子书免费下载
2021-07-07《21世纪高等院校信息与通信工程规划教材:电路分析基础(第2版)》以电路理论的经典内容为核心,以提高学生的电路理论水平和分析解决问题的能力为出发点,以培养“厚基础、宽口径、会设计、可操作、能发展”,具有创新精神和实践能力人才为目的。《21世纪高等院校信息与通信工程规划教材:电路分析基础(第2版)》较全面地阐述了电路的基本理论,并适当引入电路新技术。内容遵从先易后难,由浅入深,循序渐进的原则。主要包括电路的基本概念及基本元件、等效变换、基本分析方法、基本定理、动态电路分析、非直流动态电路的分析、正弦稳态电路分析、三相电路、频率响应、耦合电感的电路分析、双口网络、拉普拉斯变换及其应用、非线性电路、仿真软件Multisim10。0在电路分析中的应用14章内容。每章精选适量例题及填空、选择、计算题,以加深对理论的理解。在叙述中力求文字简练,通俗易懂。《21世纪高等院校信息与通信工程规划教材:电路分析基础(第2版)》可作为高等院校电子信息、通信、测控技术及仪器、自动化、自动控制、计算机等电类本科专业的教材,也可供有关专业工程技术人员及其他相关人员阅读参考。
- 210KB
Tangent免费.rar
2021-08-04OriginLab也可以安装Tangent 插件 免费下载 请点赞
- 14.34MB
qt样式表一键生成(花狗Fdog)
2020-08-29QT样式表一键生成,避免了无穷无尽的百度搜索,一来方便学习,所以参数都写在左下角,方便了解到使用了什么生成了什么,二来不用重复造轮子,调节后,可直接将左下角生成的QSS代码复制到qt的样式表里面即可显示效果。
- 5.0MB
VS2015安装证书,JavaScript_ProjectSystem.msi,JavaScript_LanguageService.msi
2021-08-06vs2015.iso包安装,不然会卡在安装包丢失或损坏
- 252.21MB
CMSIS-DAP使用说明及驱动.rar
2020-06-10仿真器,含有详细的教程,驱动,使用方法等等,keil和IAR安装及支持CMSIS-DAP工具,CoFlash及Hex2bin工具包,DAP仿真器下载程序说明等等
- 46.4MB
Matlab安装MinGW-w64 C/C++ 编译器
2019-04-01Matlab安装 MinGW-w64 编译器。 包括下载好的MinGW-w64 C/C++和 简单的安装步骤(Readme.doc)