Functions
Let's Learn Go -- (4) Common Functions
· β˜• 3 min read
1. The main and init Functions A package can contain multiple init functions, but it must contain exactly one main function. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 package main import ( "fmt" ) func init() { fmt.

The h Function in Vue
· β˜• 2 min read
1. The createElement Method The common DOM operations in HTML are modifying DOM nodes and accessing DOM nodes. Beyond those, the W3C has also published technical standards for creating and deleting DOM nodes. The createElement method is used to create a DOM node. createElement() usually needs to be used together

Python's Class Function Methods
· β˜• 3 min read
1. Function Methods A function is an organized, reusable snippet of code used to implement a single or related piece of functionality. Functions improve an application’s modularity and the reuse rate of code. Python provides many built-in functions, such as print() and str(). At the same time, Python also allows

Common Built-in Functions in Python
· β˜• 5 min read
Function Description abs(number) Returns the absolute value of a number apply(function[, args[, kwds]]) Calls the given function, optionally providing arguments all(iterable) Returns True if all elements of the iterable are true, otherwise False any(iterable) Returns True if any element of the iterable is true, otherwise False basestring() Abstract superclass of str and unicode, used for type checking bool(object) Returns True or False depending on the boolean value of object callable(object) Checks whether an object is callable chr(number) Returns the character whose ASCII code is the given number classmethod(func) Creates a class method from an instance method cmp(x, y) Compares x and y β€” returns a positive number if x>y; returns 0 if x==y complex(real[, imag]) Returns the complex number with the given real part (and optional imaginary part) delattr(object, name) Deletes the given attribute from the given object dict([mapping-or-sequence]) Constructs a dictionary, optionally from a mapping or a list of (key, value) pairs.