Posts

Showing posts from April, 2019

what is character encoding and decoding

Characters are abstract entities that can be represented in many different ways. A character encoding is a system that pairs each character in a supported character set with some value that represents that character. For example, Morse code is a character encoding that pairs each character in the Roman alphabet with a pattern of dots and dashes that are suitable for transmission over telegraph lines. A character encoding for computers pairs each character in a supported character set with a numeric value (also known as code point) that represents that character. A character encoding has two distinct components:   An encoder, which translates a sequence of characters into a sequence of numeric values (bytes). A decoder, which translates a sequence of bytes into a sequence of characters.    A computer can only work with 0s and 1s. It does not understand human languages like English, Hindi etc. Hence you need to mention the correct character set while either rendering or transferrin

Understanding character set and collations

An important yet most ignored part in software concepts is Character Set and Collations. It is a vital thing that every developer must familiar with. The objective of this article is to make you understand what is meant by character set and collations. I will take help of MySQL in the process. Please remember that character set and collation are valid for text data like CHAR, VARCHAR, TEXT etc. It has no significance for data of type INT, BINARY etc. Character Set decides which characters you are allowed to use while storing information in your application. Collation decides how the two piece of information will be compared or sort in case you do an operation on the data in your application. mysql> CREATE TABLE `person` -> ( -> `id` int not null auto_increment, -> `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, -> PRIMARY KEY (`id`), -> UNIQUE KEY (`name`) -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode

MongoDB database Data Types

MongoDB is a No SQL database that uses document as its data structure to store user's data. MongoDB is a schema-less database in the sense that you do not require to define your fields in advance as well as different structured document can reside in the same collection. This is not possible in case of traditional RDBMS like MySQL, SQL Server, Oracle etc. A document in MongoDB consists of key value pairs. Keys are written as strings but values can belong to one of the several data types allowed in MongoDB. Please always refer to the documentation or online resources for your specific version of MongoDB as an application features are always tend to change. DataType Description String This commonly used datatype contains a string of text (or any other kind of characters). This datatype is used mostly for storing text values (for example, "Country" : "India"}. Integer (32b and 64b) This type is used to store a numerical value (for example, { &quo

Online editors and useful links

HTML, CSS and JavaScript jsFiddle HTML, CSS and JavaScript Demo - Liveweave Unix SHELL ShellCheck - shell script analysis tool Bash Pitfalls - Greg's Wiki Bash Guide - Greg's Wiki
Back To Top