How to create a temporary file to store data

Print Friendly, PDF & Email

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…

Fastest way to get the first n elements of a List into an Array

Print Friendly, PDF & Email

def s = ‘Hello Groovy world!’ assert s.take(5) == ‘Hello’ assert s.drop(6) == ‘Groovy world!’ Python Let’s assume an arbitrary list/array: in_list = list(range(10)) // Python2: in_list = range(10) //…

Checking existence of an element in an array with JavaScript

Print Friendly, PDF & Email

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

Print Friendly, PDF & Email

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…

Lire et écrire avec fichier CSV dans Python

Print Friendly, PDF & Email

[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…

Comment boucler un dictionnaire en Python

Print Friendly, PDF & Email

Désolé, cet article est seulement disponible en Anglais.

(English) ArrayList in Java

Print Friendly, PDF & Email

Désolé, cet article est seulement disponible en Anglais.

How to implement an array with string index

Print Friendly, PDF & Email

    How to implement an array with string index

Array, List, etc avec cordes Indices

Print Friendly, PDF & Email

(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.

Compter combien de fois chaque chaîne apparaît dans une liste

Print Friendly, PDF & Email

Pour compter combien de fois chaque chaîne apparaît dans une liste