First, UML diagramSecond, the conceptDecorating mode: Dynamically adds some additional responsibilities to an object, and the adornment mode is more flexible than generating subclasses for added functionality.Third, the descriptionRole:(1)Component
First, UML diagramIi. OverviewPolicy mode: He defined the algorithm family, respectively encapsulated, so that they can replace each other, this mode allows the algorithm changes, will not affect the use of the algorithm of the customer.Third, the
I. Single principle of responsibility(1) In the case of a class, there should be only one cause for it to change.(2) If a class takes on too much responsibility, it is tantamount to coupling these responsibilities together, and a change in a duty
1. Call-to-value mechanism (Call-by-value machanism)(1). The value of the argument is inserted at the formal parameter position. If the argument is a variable, only the value of the variable is inserted, not the variable itself.(2). The value call
Just read a blog friend wrote "Run the program as an administrator," So I also write a simple and easy-to-understand, simple two-step, do not write any code:The first step:Right-click to select Project > Add > New Item;Locate the application
C # Custom designer--File name selection editorSummer time with MCI encapsulated a music playing class, recently learned GDI +, think of this class into a custom control, then in the process of doing a property, as follows:public string
1. Incoming serialport and commbox to display the serial portprivate void Search_addserialtocombobox (SerialPort myport, ComboBox mybox){Add the available port numbers to the ComboBoxString[] MyString = new STRING[20]; Up to 20, too many will affect
A year of contact with C # is generally a perfect language, but some details are not perfect. Here is a note of some of the future expectations I have for it now. more powerful generic constraints similar to templates for C + +, generics in C #
Select Sorting Algorithm and Sorting Algorithm
1. Select sorting
# Include # include # define N 5 // Number of sorted data typedef struct Num {int data [N-1]; int length;} Num; int main (int argc, char * argv []) {int I, j, min; struct Num La;
LeetCode Find Peak Element
A peak element is an element that is greater than its neighbors.
Given an input array whereNum [I] = num [I + 1], Find a peak element and return its index.
The array may contain in multiple peaks, in that case return
LeetCode Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Push (x) -- Push element x onto stack.
Pop () -- Removes the element on top of the stack.
Top () -- Get the top element.
GetMin
Find the maximum product of a continuous sub-array in an array
For example, enter [2, 3,-2, 4]?
The child array that meets the condition should be [2, 3], and their product is 6
/*** @ Author jiangfq ***/package com. test;/*** @ author jiangfq
BZOJ 3506 CQOI 2014 sorting manipulator Splay
Give a sequence, give a sort method, simulate this sort method, and output the position of each node found.
Idea: it is nothing more than a Reverse to let you do what you do. Pay attention to the case
Poj 2723 Get Luffy Out 2-sat
Question:
There are 2 * n pairs of keys, and only one pair can be used for each pair. In addition, there is m-way door, and each door can be opened with 2 keys, ask how many doors can be opened in sequence from
POJ 2367 Genealogical tree topological sorting
DescriptionThe system of Martians 'blood relations is confusing enough. actually, Martians bud when they want and where they want. they gather together in different groups, so that a Martian can have
HDU 4768 binary ApplicationQuestion:N communities send leaflets to students. There are so many students (1--2 ^ 31), each of which has three numbers: A, B, and C. OnlyMeet A, A + C, A + C... A + KC Ideas:
"The test data provided by the question is
Three basic sorting types (insert, bubble, select)
The insertion is stable. The bubble stability depends on whether there is an equal sign. The selection is unstable.
# Include
# Include
# Include
# Include
#
Hdu 5023 A segment upt Mayor & amp; #39; s Performance Art (segment tree Interval Update)
# Include
# Include
# Include
# Define deusing namespace std; int tree [5001000], add [5001000]; int color [50]; int n, m; void pushup
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