When I want to use DB. SaveChanges (), if some of the columns got validation error and throw Dbentityvalidationexception, and you can ' t tell which One is wrong, maybe try this to help.You can extract all the information from the with the
Associative containers It's like a dictionary whose elements are key-value pairs. The keyword plays an index role. Ordered:Map: associative arrays; Pao-value pairsSet: The keyword is both a value.Multimap: keyword-repeatable mapMultiset: The
1. exception Handling in C + +(1)Catch statement block can throw an exception Exceptions caught in ①catch can be re-thrown② throws an exception that requires an outer try-catch block to capture③catch (...) The method of throwing exceptions in a
Some C + + keywords called storage specifiers (storage class specifier) or cv-qualifiers (Cv-qualifier) provide some information about storage. Here is the store descriptor:* Auto (no longer a specifier in c++11);* REGISTER;* STATIC;* extern;*
1.shared_ptr Analytical:shared_ptr is a count pointer, and when the reference count becomes 0 o'clock, the object that shared_ptr points to will be deleted. For example, as follows:1 voidTest () {2shared_ptr P1 (New int);//count is 13
C + + Queues (queue)The C + + queue is a container adapter that gives programmers a first in, out (FIFO) data structure.1.back () Returns a reference, pointing to the last element2.empty () returns True if the queue is empty3.front () returns the
Class, followed by two chapters that describe the contents of the class. This one is still a generalization. But the general usage has also been introduced.The focus is as follows:1. The Declaration of the member function must be inside the class.2.
Face Test1: Please talk about your understanding of polymorphismMulti-State implementation effectWhen a parent object is directed to a subclass object, the function travels back and forth in the subclass to perform a different pattern.Polymorphism:
I learned something new last night about C # 6.0.There is a table created in the database:CREATE TABLE [dbo].[toollocation]( [TOOLLOCATION_NBR] SMALLINT IDENTITY(1,1) not NULL PRIMARY KEY, [LocationName] NVARCHAR( -) not NULL, [Description]
Project requirements:The database has a table that holds the address of the file to be downloaded, and the service requires the rotation to download the downloaded file.The table structure is as follows:Process:
vs-- file -- New project -->
Today, I studied the web crawler of C #, probably using three ways: webbrowser,webclient,httpwebrequestThe speed of the webbroswer is quite slow, but some operations can be performed, such as simulating clicks and so on;WebClient is simple and easy
※ This article uses int as an example, if you use a custom Datamodel, you need to actually use the Iequatable interface.1. Take intersection (A and b are both)List A: {1, 2, 3, 5, 9}List B: {4, 3, 9}
1
var intersectedList = list1
Hanoi Tower Problems
It is said that A brass plate was placed in the holy temple of benales in ancient India, and three gem columns (A, B, and C columns may be set) were inserted on the plate, on the gem column, from top to bottom, there are 64
SFINAE and is_base_of, SFINAEis_base_of
SFINAE: Substitution Failure Is Not an Error! It can be understood that the matching failure is not an error. More strictly speaking, the parameter matching failure is not a compilation error.
The order of C ++
Merge ordered arrays and ArraysThere are two sorting arrays A1 and A2, and there is enough free space at the end of A1 to accommodate A2. To implement a function, insert A2 to A1 and it is ordered.
Analysis: Compare numbers A1 and A2 from the
Replace spaces. Replace spaces in excel.Question: implement a function to replace each space in the string with "% 20 ". For example, if "We are happy." Is input, "We % 20are % 20happy." Is output .".
Idea: We can traverse the string first, so that
Print the linked list from the end to the end, and print from the end to the endQuestion: Enter the head node of a linked list and print the value of each node from the end to the end.
Idea 1: Use stacks
Idea 2: Recursion
1 # include 2 # include 3
Rtti and rtti mechanisms
RTTI (Run-Time Type Identification) allows the runtime Type information program to check the actual derived types of these pointers or referenced objects using base class pointers or references.
In C ++, RTTI is implemented
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service