', '. VG ', '. com.hk ')
REGX = R ' [^\.] +('+'|'. Join ([H.replace ('. ', R ' \. ') for h in Tophostpostfix]) + ') $ 'Pattern = Re.compile (regx,re. IGNORECASE)
Print "--" *40For URL in URLs:Parts = urlparse (URL)Host = Parts.netlocm = Pattern.search (host)res = M.group () if M else hostPrint "UNKONW" if not res else res
The results of the operation are as follows:
Copy Code code as follows:
Meiwen.me
1000chi.com
see.xidian.edu.cn
python.org
google.com.hk
Unk
This article illustrates the method of comparing the key names of PHP array operations with the difference set and the intersection assignment. Share to everyone for your reference. The specific methods are as follows:
This example primarily implements the various common operations of an array. If you compare the difference set of the array to the key name, compute the difference set, insert an element into the specified array, reverse the array, and
When buying a domain name or host on a foreign internet, some products will provide promo code or Coupon code, which can save a lot of money.
In general, Google can search, I also search on the Yahoo has been, today I went to http://www.scoreadeal.com on the search to a promo code, in the Godaddy used, it really works, saving 1 of dollars.
Appendix: GoDaddy Coupon Code:
Code:hash3Discount: $6.95. COM registration, renewal, or transferexpiration:n/a
code:gdh051630Discount:save 15% on any order of
. NET (C #) generates random names, and random Chinese characters are produced
the generation of random Chinese characters
public static object[] Createregioncode (int strlength, bool Israndomcount = False) {if (Israndomcount) {
Random Random = new Random (); Strlength = random.
Next (1, strlength + 1); }//define a string array to store the constituent elements of the encoding string[] rbase = new String[16] {"0", "1", "2", "3", "4",
The database operation function encapsulated in the YII framework, the default output, the database field name is the key to the array of keys output, but sometimes with the key name of the data can not meet the operation of unknown circumstances, such as: the database data exported to Excel, such as more unusual operations.
So this side needs to parse the database result set, and here's a simple way to deal with this particular situation:
Copy Code code as follows:
/**
* @todo opti
The examples in this article describe the methods used by the JavaScript cookie base to record user names. Share to everyone for your reference, specific as follows:
There is a previous article on the basis of cookies, encapsulating the cookie.js, we use an example to apply this JS.
The most common is to remember the user name, when the user logged in once, through a cookie to record the user's account number and password, so the next time you open
articles in A5, very get the search engine's green squint. The more you rank in front, the higher the weight, and the smaller the opposite. Usually the weight of our main site is the highest, then the subdomain will inherit from the main site, inherit the weight of how much it! We have to look at the quality of the subdomain site. such as Figure A5 Webmaster
It's really a lot of channels, there are many subdomains. Because A5 station popularity more and more high, users need mor
ado| Data | database ' Suppose mcnndb is a ado.connection that has a database open
' Get all table names in the database the key is to use the Ado.connection OpenSchema method
' This method returns a read-only dataset, including system tables and user tables.
' Therefore, a collection is needed to save the user table
Public Function Getalltablename () as System.Collections.ArrayList
Dim T as New System.Collections.ArrayList ()
Dim rs as New ADODB. Rec
Environment: SQL Server 2008 R2
Problem: Modifying table column names
Solve:
Modify the table's column name in SQL Server to invoke the stored procedure sp_rename.
Use test;--using the database
sp_rename ' D_s_t.avg_grade ', ' avg_g ', ' column ';
--d_s_t is the table name, Avg_grade is the original column name, Avg_g is the new column name----
exec sp_rename ' d_s_t.avg_grade ', ' avg_g ', ' column ';
Attention:
1.avg_g does not have a t
Tags: BSP write content root URL sharp request character appApache host general support. Htaccess pseudo-static, that can be implemented to bind the domain name to subdirectories, a space multiple sites. Application Example: Binding htaccess.800m.net to htaccess directory root directory. htaccess content Even if the "." In the Http_host It is also possible to implement binding htaccess.800m.net without backslashes, because "." Can match any one character. . htaccess content in the htaccess dire
" CHAR(1 BYTE) NULL ,"id_card" CHAR(18 BYTE) NULL ,"email" VARCHAR2(30 BYTE) NULL ,"tel" CHAR(11 BYTE) NULL ,"address" VARCHAR2(64 BYTE) NULL ,"work_units" VARCHAR2(64 BYTE) NULL ,"monthly_income" NUMBER(8,2) NULL ,"bank_account" CHAR(20 BYTE) NULL ,"credit_rating" NUMBER(1) NULL)
The results are as follows:
It is therefore recommended that:
1. It is recommended that our visual operators develop the habit of writing handwritten SQL statements, and we d
Today colleagues say that the table name you created is lowercase. In the parfile of EXPDP. Include=view: "(' view_name ')", this view_name in lowercase for what hint:Ora-39168:object path VIEW is not found. Ora-31655:no data or metadata objects selected for jobI'm saying that when I build a view it's lowercase, but when it exists in the data dictionary, it becomes uppercase. This is how Oracle is stored.CREATE TABLE Lm.dxmy (ID number); --Lowercase Select d.owner,d.object_name from dba_object
Tags: Oracle Modify user name modify user passwordAfter the Oracle database is copied or cloned, it is often necessary to modify the user name and password, and the following summarizes the methods and steps to modify:1, Query system table user$SELECT name,user# from user$ WHERE UPPER (TRIM (name)) = ' USER NAME ';2. Modify User NameUPDATE user$ SET name = ' NEW name ' where user# = (SELECT user# from user$ WHERE UPPER (TRIM (name)) = ' user NAME ');COMMIT;3. Clear the CacheALTER SYSTEM CHECKPOI
administrator. The use command is then used to switch to the target database, and the Db.createuser () command is used to create the user with the role name "ReadWrite".There are two types of common database user roles, read and ReadWrite. As the name implies, the former can only read data cannot be modified, the latter may read and modify.Here is an example:> Use testSwitched to DB test> Db.createuser ({User: "TestUser", pwd: "Testpass", roles:["ReadWrite"]})Successfully added User: {"user": "
code and change the domain name, directory name just fine
If you are to complete the above stepsYour subdomain should be accessible, but you'll find that accessing the main domain name + the bound domain name directory on the browser is also accessible, but that's not what we want. The next step is to complete the last one, and add a. htaccess file in each of the bound directories, such as the music directoryThe. htaccess code is as follows:
mod_rewrite. C>
Rewriteengine
You go into/etc/mysql. Then there will be a debian.cnf file in the directory, with the sudo cat debian.cnf to see what's inside.If the user name is Debian-sys-maintUse the Mysql-u debian-sys-maint-p command and enter the password in the debian.cnf file above and then log in to MySQL.mysql> use MySQL;Database changedmysql> Update user Set Password=password (' New password ') where user= ' root ';Query OK, 4 rows Affected (0.00 sec)Rows Matched:4 Changed:4 warnings:0mysql> flush Privileges;Query O
Case: Open card information in the bank
Field
Field type
Id
Number
Name
VARCHAR2 (64)
Sex
CHAR2 ()
Birth
Date
Money
Number (10,2)
Create a bank card tableCREATE TABLE Bank_pro (ID number,Name VARCHAR2 (64),Sex char (2),Birth date,Money Number (10,2));In creating a bank card Secondary card tableCREATE TABLE Bank_fam (ID number,Name VARCHAR2 (64));Modify a field in a
Tags: style from LIS SQL statement modify member Bak level backupWhen you use a statement to restore a database, the following error is reported: Msg 3234, Level 16, State 2, line 29thThe logical file ' lenbormealorder_base_2017 ' is not part of the database ' members_01 '. Please use RESTORE filelistonly to list the logical file names.Msg 3013, Level 16, State 1, line 29thRESTORE DATABASE is terminating abnormally. Cause: This database was backed up with an SQL statement, resulting in an error
Label:This is not required, but if the table name or field name references a keyword in SQL Server, the database does not recognize whether this is a keyword or a table name (or field name) that must be added.For example, a table named User,user is a keyword in SQL Server, so you have to do this when querying:SELECT * FROM [user]Otherwise you will get an error.Similarly, if the user belongs to a field name, it is also added, asSELECT * from table name WHERE [user]=1Why do SQL Server table
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.