If you try to retrieve a non-existed key of a dictionary, you are gonna stuck an exception obviously. To be get safer, you should do check its existence before doing…
Category: Computer Science
Computer Science is a discipline studying how a computer works and how to operates it.
How to create a temporary file to store data
Your application has to write data out in a temporary file to reprocess them before rendering to users. The file will be created temporarily and swept our when the application…
Checking existence of an element in an array with JavaScript
JavaScript is a loosely typed or a dynamic language. Variables in JavaScript are not directly associated with any particular value type, and any variable can be assigned (and reassigned) values…
How to find the mime type of a file in Python
A media type (also known as a Multipurpose Internet Mail Extensions or MIME type) is a standard that indicates the nature and format of a document, file, or assortment of bytes. It is defined…
Read and write with file CSV in Python
[dropcap]I[/dropcap]t is possible to read and write CSV (comma separated values) files using Python 2.4 Distribution. Like most languages, file operations can be done with Python. Writing a CSV file with Python can be…
How to loop a dictionary in Python
Dictionary is one of the most widely used data structures in programming, especially with Python. To understand how to loop on it, extract its keys as well as retrieve all…
What exactly is RESTful programming?
We have heard a lot of people talking about RESTful services. In order to explain it in the simplest way, we think it is a difficult task. This post aims…
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…