Tutorial by Topics

global a, b, c nonlocal a, b x = something # binds x (x, y) = something # binds x and y x += something # binds x. Similarly for all other "op=" del x # binds x for x in something: # binds x with something as x: # binds x except Exception as ex: # binds ex inside block ...
class Name #some code describing the class behavior end Class names in Ruby are Constants, so the first letter should be a capital. class Cat # correct end class dog # wrong, throws an error end
new Date(); new Date(value); new Date(dateAsString); new Date(year, month[, day[, hour[, minute[, second[, millisecond]]]]]); ParameterDetailsvalueThe number of milliseconds since 1 January 1970 00:00:00.000 UTC (Unix epoch)dateAsStringA date formatted as a string (see examples for more i...
When it comes to storing, reading, or communicating data, working with the files of an operating system is both necessary and easy with Python. Unlike other languages where file input and output requires complex reading and writing objects, Python simplifies the process only needing commands to open...
try { … } catch (error) { … } try { … } finally { … } try { … } catch (error) { … } finally { … } throw new Error([message]); throw Error([message]); try allows you to define a block of code to be tested for errors while it is being executed. catch allows you to define a block of code ...
navigator.geolocation.getCurrentPosition(successFunc, failureFunc) navigator.geolocation.watchPosition(updateFunc, failureFunc) navigator.geolocation.clearWatch(watchId) The Geolocation API does what you might expect: retrieve information about the client's whereabouts, represented in lat...
For full documentation including version-specific functionality, please check the official documentation. Types Defaults the json module will handle encoding and decoding of the below types by default: De-serialisation types: JSONPythonobjectdictarrayliststringstrnumber (int)intnumber (...
git diff [options] [<commit>] [--] [<path>…​] git diff [options] --cached [<commit>] [--] [<path>…​] git diff [options] <commit> <commit> [--] [<path>…​] git diff [options] <blob> <blob> git diff [options] [--no-index] [--] <path> &l...
The HTML <table> element allows web authors to display tabular data (such as text, images, links, other tables, etc.) in a two dimensional table with rows and columns of cells. <table></table> <thead></thead> <tbody></tbody> <tfoot></tfoot&...
A key component of interactive web systems, input tags are HTML elements designed to take a specific form of input from users. Different types of input elements can regulate the data entered to fit a specified format and provide security to password entry. <input type="" name=&quo...
str.capitalize() -> str str.casefold() -> str [only for Python > 3.3] str.center(width[, fillchar]) -> str str.count(sub[, start[, end]]) -> int str.decode(encoding="utf-8"[, errors]) -> unicode [only in Python 2.x] str.encode(encoding="utf-8"...
timeoutID = setTimeout(function() {}, milliseconds) intervalID = setInterval(function() {}, milliseconds) timeoutID = setTimeout(function() {}, milliseconds, parameter, parameter, ...) intervalID = setInterval(function() {}, milliseconds, parameter, parameter, ...) clearTimeout(timeoutID) cle...
Generator functions (defined by the function* keyword) run as coroutines, generating a series of values as they're requested through an iterator. function* name(parameters) { yield value; return value } generator = name(arguments) { value, done } = generator.next(value) { value, done } = ge...
For more information about errors, see The Swift Programming Language.
Array is an ordered, random-access collection type. Arrays are one of the most commonly used data types in an app. We use the Array type to hold elements of a single type, the array's Element type. An array can store any kind of elements---from integers to strings to classes. Array<Element...
Metaclasses allow you to deeply modify the behaviour of Python classes (in terms of how they're defined, instantiated, accessed, and more) by replacing the type metaclass that new classes use by default. When designing your architecture, consider that many things which can be accomplished with...

Page 11 of 428