Tutorial by Topics: converting

Converting strings to integers is one of common tasks. Here we'll show how to convert decimal strings to integers. Psuedo code to do this is: function string_to_integer(str): result = 0 for (each characters in str, left to right): result = result * 10 add ((code of t...
VBA will implicitly convert some types to string as necessary and without any extra work on the part of the programmer, but VBA also provides a number of explicit string conversion functions, and you can also write your own. Three of the most frequently used functions are CStr, Format and StrConv...
The ^M character stands for a carriage return in Vim (<c-m> or just <CR>). Vim displays this character when at least on line in the file uses LF line endings. In other words, when Vim consider a file to have fileformat=unix but some lines do have carriage returns (CR), the carriage r...
Promises have state, they start as pending and can settle to: fulfilled meaning that the computation completed successfully. rejected meaning that the computation failed. Promise returning functions should never throw, they should return rejections instead. Throwing from a promise returnin...
In many applications, records from MongoDB need to be serialized in JSON format. If your records have fields of type date, datetime, objectId, binary, code, etc. you will encounter TypeError: not JSON serializable exceptions when using json.dumps. This topic shows how to overcome this.

Page 1 of 1