This article explains a bit of the importance of application logging and log4j API in Java. The following paragraphs will give you an overview of how logging mechanism works in Java application and how use one of the common logging ...
Read More »Running a simple http server
In the world of web engineering and development, developing web-based applications always need a web application server where all web pages are accommodated. Depending on what web technology as well as scripting language is used at server-side, commands to run ...
Read More »Measure running time a routine in Python
I think this helps us a lot for estimation of how long a program runs in Python. When dealing with a huge amount of data, it takes long time. Showing the running time, started time and end time are useful ...
Read More »Delete columns in numpy.array
[crayon-5adbfa682fd0e485160056/] output: array([[ 0, 1, 2, 3], [12, 13, 14, 15]]) [crayon-5adbfa682fd19182111314/] output: array([[ 0, 3], [ 4, 7], [ 8, 11], [12, 15]]) Solution was found here: http://stackoverflow.com/questions/1642730/how-to-delete-columns-in-numpy-array
Read More »Select column from a matrix
[crayon-5adbfa6830064318885391/] Result: [2, 20, 200] Found it here: http://www.gossamer-threads.com/lists/python/python/770606
Read More »Read and write with file csv in Python
(Tiếng Việt) Nhiều phần mềm bảng tính có thể mở được định dạng dữ liệu csv. Trong quá trình đưa kết quả ra màn hình, nhiều giá trị muốn được giữ lại và lưu trong file để tiện sử dụng về sau.
Read More »How to implement an array with string index
I had shown you how to implement an array with string based index in Python programming language in the previous post. In this post, I will explain the same problem but the programming language for the implementation is C++. The ...
Read More »Sự ra đời của lập trình hướng đối tượng
Ngôn ngữ lập trình hướng đối tượng cung cấp cho người lập trình 3 đặc điểm chính mạnh cơ bản với mục đích cải tiến và đơn giản hóa việc thiết kế phần mềm. Đó là: encapsulation, inheritance, và polymorphism ...
Read More »Array, List, etc. with String Indices
(Tiếng Việt) Trong lập trình, chúng ta cũng hay gặp nhiều trường hợp phải tạo một danh mục mà index của nó là các chuỗi kí tự. Có một khái niệm để mô tả loại đối tượng này, thường gọi là HashMap hay HashTable.
Read More »Counting how many times each string appears in a list
To count how many times a word appearing in a list of words, we can do as follows:
Read More »