When we need to read multiple keywords in the background, we can first read the background database into an array (separated by commas (,) when the database adds multiple keywords ):
CopyCodeCode: Public String [] STR; // Add a public array and
Escape:
CopyCode The Code is as follows: public static string escape (string Str)
{
Stringbuilder sb = new stringbuilder ();
Foreach (char C in Str)
{
SB. append (char. isletterordigit (c)
| C = '-' | C = '_' | C = '\\'
| C = '/' | C = '.')? C.
I looked at some of the gadgets in my hand, many of which are single files but can create shortcuts. So I searched Google and finally found a very powerful class at the Russian Forum rsdn.
Class File Download:
CopyCode The Code is as follows: using system;
Using system. Collections. Generic;
Using system. LINQ;
Using system. Web;
Using system. Web. UI;
Using system. Web. UI. webcontrols;
Using system. Data. LINQ;
Using system. xml;
Using system. xml. LINQ;
The main functions of the client are provided here.CodeThe purpose of open source is to hope more people will study TC and TT. At the same time, you can download the C # source code to continue optimization and improve performance, while searching
In C # generics and arrays in C #2.0, the one-dimensional array with the lower limit of 0 is automatically implemented by IList . This allows you to create generic methods that can access arrays and other collection types cyclically using the same
If you want to use a database in the project, you must use paging sorting. During database query optimization, I wrote the following code overnight to splice SQL statements sorted by page.
Copy codeThe Code is as follows: //
/// Obtain paging SQL
DebugLZQ searches for related file encryption programs on the Internet, and finds that the given programs are basically encrypted and decrypted for "character creation" and "text. There are few encryption and decryption procedures for video files,
C # is an object-oriented language with basic features of object-oriented, such as abstraction, encapsulation, inheritance, and polymorphism. Learning C # apart from some basic syntaxes, you have to learn some new features, such as generics,
Tools/raw materials vs2005 steps/methods
Create an installation and deployment projectOpen VS, click "Create Project", select "other project type"> "installation and deployment"> "Installation Wizard" (the same is true for the installation
First run:
The second runtime:
Copy codeThe Code is as follows: using System;
Using System. Collections. Generic;
Using System. Linq;
Using System. Text;
Using System. IO;
Namespace File Operations
{
Class Program
{
Static void Main
When I checked some information on the Internet today, I accidentally found another method, which was very convenient. I called the system API to achieve the same effect ~
Copy codeThe Code is as follows: [DllImport ("user32.dll")]
Public static
Copy codeThe Code is as follows: // event: When the column width is changed
Private void ColumnWidthChange (object sender, ColumnWidthChangingEventArgs e)
{
// If it is not the first column, no matter
If (e. ColumnIndex> 0) return;
// Cancel
Public
Any other code in the same assembly or other assembly that references the Assembly can access this type or member.
Private
Only the code in the same class or structure can access this type or member.
Protected
C # operator "?" : "What is it?
C # operator "?" : "Is also called a conditional operator.
For conditional expression B? X: y. Calculate Condition B and then judge.
If the value of B is true, the value of x is calculated and the calculation result
View the number of connections on all port 80
Copy codeThe Code is as follows: netstat-nat | grep-I "80" | wc-l
Sort connected IP addresses by number of connectionsCopy codeThe Code is as follows: netstat-ntu | awk '{print $5}' | cut-d:-f1 | sort |
The role of the sealed Keyword:Using sealed in class declaration can prevent other classes from inheriting this class; using sealed modifier in method declaration can prevent extended classes from rewriting this method.
The sealed modifier is mainly
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