• Kĩ thuật lập trình - Chapter 26: TestingKĩ thuật lập trình - Chapter 26: Testing

    What’s wrong with this? for (int i=0; i

    ppt27 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 948 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 25: Embedded systems programmingKĩ thuật lập trình - Chapter 25: Embedded systems programming

    Failing how? In general, we cannot know In practice, we can assume that some kinds of errors are more common than others But sometimes a memory bit just decides to change (cosmic ray, silicon fatigue, ) Why? Power surges/failure The connector vibrated out of its socket Falling debris Falling computer X-rays Transient errors are the wor...

    ppt36 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1037 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 2: NumericsKĩ thuật lập trình - Chapter 2: Numerics

    They are important to low-level tool builders If you think you need them, you are probably too close to hardware, but there are a few other uses. For example, void f(const vector& vc) { // pedestrian (and has a bug): int smallest1 = v[0]; for (int i = 1; i < vc.size(); ++i) if (v[i] < smallest1) smallest1 = v[i]; // better: in...

    ppt41 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 963 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 23: Text processingKĩ thuật lập trình - Chapter 23: Text processing

    Header line Regular expression: ^[\w ]+( [\w ]+)*$ As string literal: "^[\\w ]+( [\\w ]+)*$" Other lines Regular expression: ^([\w ]+)( \d+)( \d+)( \d+)$ As string literal: "^([\\w ]+)( \\d+)( \\d+)( \\d+)$" Aren’t those invisible tab characters annoying? Define a tab character class Aren’t those invisible space characters annoying? Us...

    ppt27 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1031 | Lượt tải: 0

  • Kĩ thuật lập trình - Software ideals and historyKĩ thuật lập trình - Software ideals and history

    “To make life easier for the serious programmer” i.e., primarily me and my friends/colleagues I love writing code I like reading code I hate debugging Elegant and efficient code I really dislike choosing between the two Elegance, efficiency, and correctness are closely related in many application domains Inelegance/verbosity is a major sour...

    ppt40 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1007 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 21: The STL (maps and algorithms)Kĩ thuật lập trình - Chapter 21: The STL (maps and algorithms)

    // a very useful algorithm (missing from the standard library): template Out copy_if(In first, In last, Out res, Pred p) // copy elements that fulfill the predicate { while (first!=last) { if (p(*first)) *res++ = *first; ++first; } return res; }

    ppt37 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1098 | Lượt tải: 0

  • Bài giảng Lập trình C trên Windows - Thư viện lập trình Multi - MediaBài giảng Lập trình C trên Windows - Thư viện lập trình Multi - Media

    Chỉ play dạng chuẩn dành cho audio kĩ thuật số trên nền tảng PC của Intel. File audio phải có kích thước thích hợp với bộ nhớ có sẵn. Không thể được sử dụng một cách đồng thời bởi nhiều tiểu trình trong cùng một tiến trình

    pdf7 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1130 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 20: The STL (containers, iterators, and algorithms)Kĩ thuật lập trình - Chapter 20: The STL (containers, iterators, and algorithms)

    By default, use a vector You need a reason not to You can “grow” a vector (e.g., using push_back()) You can insert() and erase() in a vector Vector elements are compactly stored and contiguous For small vectors of small elements all operations are fast compared to lists If you don’t want elements to move, use a list You can “grow” a list (e...

    ppt43 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1066 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 19: Vectors, templates, and exceptionsKĩ thuật lập trình - Chapter 19: Vectors, templates, and exceptions

    An introduction to the STL, the containers and algorithms part of the C++ standard library. Here we’ll meet sequences, iterators, and containers (such as vector, list, and map). The algorithms include find(), find_if(), sort(), copy(), copy_if(), and accumulate().

    ppt43 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1014 | Lượt tải: 1

  • Kĩ thuật lập trình - Chapter 18: Vectors and ArraysKĩ thuật lập trình - Chapter 18: Vectors and Arrays

    We’ll see how we can change vector’s implementation to better allow for changes in the number of elements. Then we’ll modify vector to take elements of an arbitrary type and add range checking. That’ll imply looking at templates and revisiting exceptions.

    ppt38 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1015 | Lượt tải: 0