In fact, there is no other function to support it, just use some of the SQL statements provided by MySQL can be.
For simplicity's sake, take the MySQL system table user as an example to remove all the possible values for the Select_priv column.
Enumeration is a common feature to look at the Python enumeration.
from enum Import enummonth = enum (' Month ', (' Jan ', ' Feb ', ' Mar ', ' April ', ' may ', ' June ', ' Jul ', ' April ', ' Sep ', ' Oct ', ' Nov ', ' Dec '))
@uniqueclass Weekday
Definition of enum typeAn enumeration type (enumeration) is a derived data type in C + +, which is a collection of user-defined enumeration constants.Definition Format : Enumeration type is defined in the following format:Enum {};which
The
The following methods are used to simulate an enum: (Sensory method is simple and practical)
Copy Code code as follows:
# Way1
Class Directions:
Up = 0
Down = 1
left = 2
Right =3
Print Directions.down
# Way2Dirup, Dirdown,
Nature of enum:1. Instances of enumerated types are constants2. To use an enum, you need to create a reference to that type and assign it to an instance3. Common methods:* ToString (): The name of an enum instance* Ordinal (): Declaration order of
Saw something, found that the Java enumeration is not very understanding, and then look for a check to remember.Why use enumerations? The enumeration was not jdk1.5 until after 1.5, and Java was not supported for enumeration. Why use enumerations?If
In the actual development, in the database table design, we tend to use an int type state field to represent the status of the data, this field is convenient to represent the state of the data, but do not want to build a foreign key table of the
Original: some small Tips of Enum in C sharp, sharpenum
(1) Why use Enum?
♥Enums enumeration is a value type. Data is directly stored in the stack, instead of being stored using reference and real data isolation.Enum student {a, B, c, d, e}. enum
Override the ToString () of the class to simplify obtaining the DescriptionAttribute value of enum,Override the ToString () of the class to simplify obtaining the DescriptionAttribute value of enum.
Directory
I. Common enum types
Ii. Evolution:
In general, we use parcelable when we pass objects between activity. such as writing a class, on this class marked implements Parcelable and implementation interface can be used Intent.putextra (String, parcelable). For passing enum objects, it is
Go C # enum,int,string Conversion of reciprocal conversions enumerationAn enum provides a base class for an enumeration whose underlying type can be any integral type except Char. If you do not explicitly declare an underlying type, use Int32.
I. Question proposal
Recently, many blogger in the blog Park proposed to display Chinese names for enumeration.ArticleFor example, [display Chinese information for enumeration members], [use custom attributes to define detailed texts of
In actual development, in database table design, we are often used to using an int type state field to represent the data status. This field is very convenient to represent the status of this data, however, it is unwilling to create a foreign
This article mainly introduces the use of enum in PHP skills, interested in the reference of friends, I hope to help you.
PHP actually has enum class library, need to install Perl extension, so it is not PHP standard extension, so the
DK1.5 introduces a new type--enumeration. In Java, although it is a "small" function, but to my development has brought "big" convenience. Usage One: Constantsbefore JDK1.5, we define constants that are: publicstaticfianl ..... Now, with
I. Appearance of the background:Before JDK1.5, we defined constants like this: public static final String red = "red";The enumeration types are added to JDK1.5, and we can group related constants into an enumeration class:public enum Color {RED,
Tag:c++11 enum strongly typed enumeration C++11 before the enum type is inherited C, tepid;//c++11 to enum dynamic knife, strengthen the type check, the introduction of strong type Enum type, before the light//used Qt know, should have
An enum is a shorthand form of a enumeration (enumeration) that is contained in a Java.lang package. Familiar with c,c++,c#, or Pascal should have an understanding of the list, first look at an example:
Public enum Season {winter, Spring, Summer,
C++11 before the enum type is inherited C, tepid;//c++11 to enum dynamic knife, strengthen the type check, the introduction of strong type Enum type, before the light//used Qt know, should have done so, with very cool!! I. Limitations of enum types
Override the ToString () of the class to simplify obtaining the DescriptionAttribute value of enum,Override the ToString () of the class to simplify obtaining the DescriptionAttribute value of enum.
Directory
I. Common enum versions
Ii.
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.