Bài tập phần Backtracking

Bài tập phần Backtracking: download.

Ôn tập Olympic 2015

Gửi các bạn tham dự ôn tập Olympic Tin học 2015:

Tài liệu tham khảo:

1. Tài liệu thuật toán của Lê Minh Hoàng: download.

2. Tài liệu “Art of Programming Contest”, 2nd Edition: download.

Bài học ngày 31-01-2015:

1. Bài tập trên lớp và về nhà: download.

2. Bài giải cho các bài tập trên lớp: download.

Tài liệu tham khảo cho các học phần: An toàn và bảo mật thông tin, Kỹ thuật lập trình C, Kỹ thuật lập trình (khoa Điện)

Tài liệu tham khảo cho học phần An toàn và bảo mật thông tin:

1. Cryptography and Network Security: Principles and Practice 5th Edition by William Stallings, 2011

2. Information Security The Complete Reference, 2nd Edition by Mark Rhodes-Ousley, 2013

Tài liệu tham khảo cho học phần Kỹ thuật lập trình C:

1. C Primer Plus, Fifth Edition by Stephen Prata, 2004

2. The C programming language, 2nd Edition by Brian W. Kernighan and Dennis M. Ritchie, 1988

3. Danh sách các bài tập và bài mẫu (cần cài đặt Winrar 5 để giải nén): download.

Tài liệu tham khảo Kỹ thuật lập trình (khoa Điện):

1. Thinking in C++, 2nd Edition by Bruce Eckel

2. Programming embedded systems in C and C++ by Michael Barr, 1999

A list of software and libraries

So they said that

1. “C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off”, Bjarne Stroustrup’s FAQ: Did you really say that?

2. “There are only two kinds of languages: the ones people complain about and the ones nobody uses”, Bjarne Stroustrup’s FAQ: Did you really say that?

3. “Anybody who comes to you and says he has a perfect language is either naïve or a salesman”, Bjarne Stroustrup’s FAQ: Did you really say that?

4. “When you are not practicing, someone else is getting better” , Allen Iverson.

5. “Dear friend, all theory is gray, and green the golden tree of life”, Johann Wolfgang von Goethe.

6. “It will be another million years, at least, before we understand the primes”, Paul Erdos, who, at the age of 18, proved that there is always a prime between every number greater than 1 and its double.

7. “To be sad is to be human”, Anonymous.

8. “One picture is worth more than ten thousand words”, Anonymous.

9. “Education is what, when and why to do things, Training is how to do it”, Richard R. Hamming

10. “Simplicity is the ultimate sophistication”, Leonardo De Vinci.

11. “Genius is one percent inspiration, ninety-nine percent perspiration”, Thomas Edison, Harper’s Monthly (September 1932).

To be continued.

Sách hay mỗi tuần

Giới thiệu một số cuốn sách hay:

1. Discrete mathematics and its applications, 7th edition, 2012, Rosen, Kenneth H. Cuốn sách rất hay và đầy đủ, cập nhật về các chủ đề của Toán rời rạc. Download tại địa chỉ này.

2. Numerical recipes: the art of scientific computing, 3rd edition, 2007, William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery. Một tuyệt tác viết về các phương pháp số. Địa chỉ download.

3. Operating System Concepts, 9th Edition, 2012. Abraham Silberschatz, Peter B. Galvin, Greg Gagne. Một cuốn sách rất hay về nguyên lý của các hệ điều hành (Windows, Unix, Linux, Mac OS và cả các hệ thống di động như iOS, Android). Download tại đây.

4. Data Structures and Algorithm Analysis, Clifford A. Shaffer.  Một cuốn sách viết về cấu trúc dữ liêu, thiết kế và phân tích giải thuật khá hay và đầy đủ về nội dung. Các thuật toán trình bày trong sách có bản cài đặt bằng C++ và Java. Có thể download sách và source code tại đây.

5. Windows System Programming 4th Edition. Lập trình cho hệ điều hành Windows bằng cách sử dụng các hàm API (Win32). Download tại đây (xem link gốc tại đây).

6. Algorithms 4th Edition, cuốn sách hay viết về cấu trúc dữ liệu và giải thuật của hai tác giả Robert Sedgewick and Kevin Wayne, các ví dụ minh họa được cài đặt bằng Java. Địa chỉ Download

Building some open source libraries with VS 2012

Today, after upgrading from VS 2010 to Visual Studio  2012 (with VS 2012 Update 4), I build some open source libraries (Boost 1.55, OpenCV 3.0.0-dev, FLANN 1.8.4, and Point Cloud Library 1.7.1-PCL) and here are some notes for ones who may find them useful.

0. Some thoughts on VS 2012: much bigger than VS 2010, without blend and other options, I just checked the MFC option but the memory required was more than 7 Gbs. The installation has less option as compared with VS 2010 (no option to exclude VB, Web support or C#, SQL Server … like in VS 2010). After update to Update 4, there is another option for MFC or Win32 project with targeting to v110-xp, this is due to the fact that VS 2012 compiled programs (before Update 4) could not run on XP. And the folder C:\ProgramData\Package Cache contains all the packages from VS 2012 installation (about 1.7 Gb, I wonders if this can be deleted). In my feelings, VS 2012 is not slower than VS 2010, it may be faster on stronger machine with 4 or 8 CPU cores. It’s a suprise that VS 2012 include the DirectX library in the C:\Program Files\Windows Kits\8.0 folder, so you can write DirectX based program without any further installation. One of the big improvement of VS 2012 is it is a true multicore compiler which can uses multicore for compiling a project, not a parallel compiler as VS 2010 (see more details from this address).

1. Hardware and software platform: Windows 7 SP1 32 bit on a laptop Core 2 Duo 2.4 Ghz with 3 Gb Ram, VS 2012 Update 4. Some required libraries are: Eigen 3.2 (for PCL), TBB 4.2 Update 2 (for OpenCV) and CMake, CUDA 5.5.2 32 bit. For details of building OpenCV with TBB, please read ref 1 or ref 2. The path to CMake’s bin directory is mandatory added to the PATH environment variable.

2. Building OpenCV 3.0.0-dev. I remove matlab, python and java building options from the file CMakeLists.txt of OpenCV and keep only the CUDA code version >=2.0 (in the file OpenCVDetectCUDA.cmake) to make the process faster. Then cmake-gui is used to generate the VS 2012’s solution and project files. On my machine, this ran for 4 hours and a folder of about 7 GBs was generated, but the install folder was only about 330 Mbs (other files and folders from the build folder can be delete after). The reason for the 4 hours duration may be caused by the /GL building option which was set for all the OpenCV projects.

3. Building Boost 1.55(which is also required by PCL): just run the bootstrap.bat from the command line and .\b2 command after but remember to add the VS 2012 path to the PATH environment variable.

4. Building FLANN 1.8.4: I used cmake-gui to create the solution file and build with VS 2012 without any problem (some python projects were not built, but I don’t need them).

5. Building PCL 1.7.1: Again, cmake-gui was used to generate the solution file, I had to set variables manually for boost and FLANN. Be careful with /GL building option because the whole optimization can caused failed build even your machine (64 bit) may have up to 16 GB of RAM, especially with pcl_feature project. This process took about 2 hours with 2.5 Gb build folder and no error was raised.


Get every new post delivered to your Inbox.