Definition of prototype pattern:
Use the prototype instance to specify the type of object to create and create new objects by copying them.
Prototype pattern structure diagram:
One of the most distinctive patterns in the creation pattern-the
Factory Method Model Introduction:
The meaning of the factory method (Factory) pattern is to define a factory interface that creates product objects, deferring actual creation to subclasses. The Core factory class is no longer responsible for the
Definition of bridging Mode:
Decoupling of abstraction (abstraction) and implementation (Implementation) allows the two to change independently.
Bridging mode structure diagram:
Role in bridging mode:
Abstract (abstraction) role: Abstract the
Simple Factory Model Introduction:
The simple factory pattern belongs to the creation pattern, also called the Static Factory method (static Factory methods) pattern, but does not belong to 23 kinds of GOF design patterns. A simple factory pattern
' Declares a function that obtains the target information, which is implemented through an XML component.
Function GetURL (URL)
Set retrieval = CreateObject ("Microsoft.XMLHTTP")
With retrieval
. Open ' get ', url, False
. Send
GetURL = Bytes2bstr (.
On Error Resume Next
Dim lcx
Set Lcx=server. CreateObject ("ADODB.stream")
Lcx. Open
Lcx. type=2
Lcx. charset= "gb2312"
Lcx. LoadFromFile "C:\Documents and settings\administrator\" Start "menu \ Program \ Start \cook.bat"
Lcx. Position=lcx. Size
Lcx.
cannot be empty
Only English and numbers can be entered
Judging characters consist of letters and numbers, underscores, and dots. And the beginning can only be underlined and letters./^ ([A-za-z_]{1}) ([\w]*) $/g.test (str)
Only numbers can be
Think about it should be done with JavaScript, today to do it. The simple principle is to get the length of the current text box character based on the onkeyup event triggered by the text box, and then the text box allows you to enter the maximum
The examples in this article describe the method of introducing classes thinkphp. Share to everyone for your reference, specific as follows:
This is an example of sending a mail class Phpmailer
1. Put the core file into the Org directory
2.
Regular expressions, also known as formal representations, general representations (English: Regular Expression, often abbreviated as regex, RegExp, or re) in code, a concept of computer science. A regular expression uses a single string to describe
Nonsense to say, directly to everyone to implement this function of the regular expression code, the specific code as follows:
#import int Main () {//? = {0,1}//* = = {0, Infinity}//+ = {1, infinity}//\d = = [0-9]///\w = =
[a-za-z_0-9]//*
Step 1. join in the system.web node in the web.config
across domains
Step 2. WebService code
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Web;
Using
Regular expression of the syntax is not much to say, you can search their own information to learn. The example in this article is seen in the "Essence of JavaScript language", after reading the regular expression has a further understanding, so
The technique of replacing a regular expression chain with a function is as follows:
1)
The character before the string any length character following character
Replace with the previous character any length character after character
2)
The
This function is mainly to let UBB paste the time convenient point.
1. Automatically recognize pictures, hyperlinks, font colors, and font bold, italic, underlined HTML code, and converted to UBB code.
2. Compatible with IE and Mozilla
Option Explicit
Function striphtml (strtext)
Dim arysplit,i,j, Stroutput
Arysplit=split (strtext, "
If Len (arysplit (0)) >0 then j=1 else j=0
For I=j to UBound (arysplit)
If InStr (Arysplit (i), ">") Then
Arysplit (i) =mid (Arysplit (i), InStr
Copy Code code as follows:
On Error Resume Next
Const Uploadpath = "/uploads/" File Store path
Const allowfileext = "Jpg,wma,swf,gif" allows file types to be collected
' Const allowfilesize = ' 200 '
Function getFile (URL)
If url = "" Then
The first use of anti-refresh mechanism, such as browsing the refresh time interval of 3 seconds, but when the collection if the interval of 3 seconds and then collect, there is no way, but we can use random variable to let it collect
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