1 normal function: is a global function, not restricted by specific classes and objects, can be called directly.
For example:
void printf ()
{
printf ("Hello World");
}
2 Ordinary member function: C + + Normal member function is essentially a generic function that contains the this pointer to a specific object, that is, the normal member function of the C + + class implicitly contains a this pointer to the current object.
For example: Define a class:
Class MyClass
{
Public
void Myprint ()
{
prin
Numeric functions:
ABS (m)Absolute Value of mMoD (m, n) m remainder after N DivisionPower (m, n) M's n powerRound (M [, N]) the value of M rounded to N digits after the decimal point (N defaults to 0)Trunc (M [, N]) m truncates the value of N decimal places (N defaults to 0)--------------------------------------------------------------------------------
Character functions:
Initcap (ST) returns the first le
6.3. High-order functions, common built-in functions, and 6.3 Built-in high-order functionsHigher-order functions:
You can pass a function as a parameter to another function;
Returns a function.
# The return value is the function sum = lambda x, y: x + ysub = lambda x, y: x-ycalc_dict = {"+": sum ,"-": sub} def calc (x): return calc_dict [x] print (calc (
right, that is, starting from the fourth position on the right and starting from 1, and then the second occurrence of the word A is still from the left, that is, a S d f a S D f a, but the number is from the right.9 8 7 6 5 4 3 2 1Select InStr (' Asdfasdfasdfasdf ', ' asdf ', -3,1) from dual; --13Starting from right-to-left 3rd, the 1th occurrence of the index position of ' asdf '(5) Uppercase and lowercase conversionsSelect Upper (' Asdfasgas '), lower (' Ghjajdgj ') from dual;Select Lower (en
MySQL functions-other functions, mysql Functions
IF (expr, v1, v2) expr expression is true, v1 is returned; otherwise, v2 is returned.
IFNULL (v1, v2) If v1 is NULL, v2 is returned. If v1 is not NULL, v1 is returned.
CASE expr WHEN v1 THEN r1 [WHEN v2 THEN r2] [...] [ELSE m] END
If expr is equal to the value in v1.v2..., return r1, r2. After THEN. Otherwise, re
'name': i[0],7 'Sex': i[1],8 ' Age': Int (i[2]),9 'Salary': Int (i[3])Ten } One data.append (DIC) A - #[{' Name ': ' Egon ', ' sex ': ' Male ', ' age ': ' Salary ' : - #{' name ': ' Alex ', ' sex ': ' Male ', ' age ': $, ' salary ': 30000}, \ the #{' name ': ' Wupeiqi ', ' sex ': ' Female ', ' age ': +, ' salary ': 20000},\ - #{' name ': ' Yuanhao ', ' sex ': ' Female ', ' age ': +, ' salary ': 10000}] - -Res=max (data,key=Lambdax:x['Sal
Common Functions
A common function (UFUNC) is a function of performing element-level operations on data in Ndarray
# example Array
a = Np.array ([ -1,2.1,0.2,2.6,9.1]) # [ -1. 2.1 0.2 2.6 9.1]
b = Np.arange (1,len (a) +1) # [1 2 3 4 5]A unary function
function
Description
Example
Results
ABS, Fabs
Calculates the absolute value of integers, floating-point numbers, and complex numbers, and fo
, returns twice times the wage (2*sal), if it is 30, returns 3 times times the wage, if not, then returns half the wageSelect Ename,deptno,sal,Case DeptnoWhen Ten then 1*salWhen 2*salWhen 3*salelse SAL/2Endfrom EMP;②decode:decode (EXPR1,EXPR2,EXPR3,.........)Eg: Judge Deptno, if it is department 10th, returns one-fold pay (1*sal), or 0 if not.Sql>select Ename,deptno,sal,decode (deptno,10,sal,0) from EMP;Eg: to judge Deptno, if it is Department 10th, return one-fold salary (1*sal), return 30 time
[Cpp]/** Copyright (c) 2013, computer College, Yantai University* All rights reserved.* File name: test. cpp* Author: Fan Lulu* Completion date: January 1, April 15, 2013* Version: v1.0** Input Description: None* Problem description:* Program output:* Problem analysis:* Algorithm Design: omitted*/# Include # Include Using namespace std;Class CPoint{Private:Double x; // abscissaDouble y; // ordinatePublic:CPoint (double xx = 0, double yy = 0): x (xx), y (yy ){}Double distance1 (CPoint );Friend do
These terms draw the following conclusions:
Suppose f is a function to be correctly declared, and C is a class related to it:
1. The virtual function must be a member function. If F must be a virtual function, make it a member function of C.
2. Operator> and operator
3. Only non-member functions perform type conversion on the leftmost parameters. If f needs to convert the type of the leftmost parameter to make f a non-member function. If F also n
single-record functions in SQL
1.ASCII
Returns the decimal number corresponding to the specified character;
Sql> Select ASCII (' a ') a,ascii (' A ') a,ascii (' 0 ') zero,ascii (') space from dual;
A A ZERO space
--------- --------- --------- ---------
65 97 48 32
2.CHR
Give an integer and return the corresponding character;
Sql> Select Chr (54740) ZHAO,CHR () chr65 from dual;
En C
-- -
Zhao A
3.CONCAT
Connect two strings;
Sql> Select Concat (' 010-
Baidu engineers talk about the implementation principle and performance analysis of PHP functions (2). php Functions
Class MethodIts execution principle is the same as that of user functions, and it is also translated into opcodes for sequential calls. Class implementation, zend is implemented using a Data Structure zend_class_entry, which stores some basic infor
The ORACLE tutorial is: OraclePL/SQL single-row functions and group functions. A 1 function is a program with zero or multiple parameters and a return value. Oracle has a series of built-in functions in SQL, which can be called SQL or PL/SQL statements. functions are mainly divided into two categories:
2
3 single row
The execution process of inline functions is similar to the macro definition with parameters, but the processing of parameters is different. Macro definitions with parameters are not calculated, but replaced directly.
Inline functions are functions first, which means that many of the functions are suitable for inline
The Oracle tutorials being looked at are: Oraclepl/sql single-line functions and group functions. A 1 function is a program that has 0 or more parameters and has a return value. In SQL, Oracle builds a series of functions that can be called SQL or PL/SQL statements, and functions fall into two main categories:
2
3 sing
Reading Notes Objective c ++ Item 23 would rather use non-member, non-friend functions than member functions. Objective tiveitem1. is non-member membership good or is the member function good?
Imagine a class that represents a web browser. Such a class can clear the download cache, clear the URL access history, and remove all cookies from the system:
1 class WebBrowser { 2 3 public: 4 5 ... 6 7 void cl
Common functions that cannot be declared as virtual functions include common functions (non-member functions), static member functions, inline member functions, constructor functions, a
This is a creation in
Article, where the information may have evolved or changed. In this blog post, my goal is to:-revealing some of the specious virtues of small functions-explaining why I personally think it's not as good as suggested-explaining why small functions are sometimes counterproductive-explaining what I think small functions are really useful in a
The ORACLE tutorial is: OraclePL/SQL single-row functions and group functions. A 1 function is a program with zero or multiple parameters and a return value. Oracle has a series of built-in functions in SQL, which can be called SQL or PL/SQL statements. functions are mainly divided into two categories:23 single row Fun
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.