CopyCodeThe Code is as follows: public static string truncation (this htmlhelper, string STR, int Len)
{
If (STR = NULL | Str. Length = 0 | Len {
Return string. empty;
}
Int L = Str. length;
# Region calculation length
Int clen = 0;
While
I. base64 encoding rules Base64 encoding uses 64 basic ASCII characters to re-encode the data. It splits the data to be encoded into byte arrays. Take 3 bytes as a group. Sort the 24-bit data in order and divide the 24-bit data into four groups,
Develop applicationsProgramLogic
1. Open the dailyrate project in the \ microsoft press \ visual CSHARP step by step \ Chapter 3 \ dailyrate subfolder under the My Documents folder in Visual Studio 2005.
2. In Solution Explorer, double-click the
Using system;
Using system. Data;
Using system. Data. sqlclient;
Using system. configuration;
Using system. Web;
Using system. Web. Security;
Using system. Web. UI;
Using system. Web. UI. webcontrols;
Using system. Web. UI. webcontrols.
To achieve this purpose, you can adopt the following two methods:
◆ Use the xmlconvert class.
◆ Use An XSLT conversion set to XML Representation of dataset data.
Program Example
This example uses the xmlconvert class to format fields.
CopyCode
CopyCode The Code is as follows: using system;
Using system. Collections. Generic;
Using system. text;
Using system. drawing;
Using system. IO;
Using system. Drawing. imaging;
Using system. Web;
Using system. Drawing. drawing2d;
Using system.
As required by the project, use JS encryption and submit it to C # for decryption,
After searching for the Internet for half a day, there are no versions available on the Internet, but no one can be found for mutual use.
Even the JS version cannot
1. sqldmo
Sqldmo is an ideal way to operate sqlserver. If your database is sqlserver, you can consider using this method. To use sqldmo in C #, you need to add reference to sqldmo, and then using sqldmo in the current file; that is, you can use
The following is my implementation method:
Code
Copy codeThe Code is as follows:
This may have some limitations and cannot be as intuitive and easy to use as the sleep functions in Java and C.But I think it's quite interesting to share it with
Code As follows:
Copy code The Code is as follows: var ST = "A [B] C [d] E [f] G ";
VaR Reg =/\ [\ W \]/ig;
VaR S1 = ST. Replace (Reg ,"");
VaR S2 = [];
VaR arr;
While((arr=reg.exe C (ST ))! = NULL) s2.push (ARR [0]);
Alert (S1 );
Alert (s2.join (""
1. Common T-SQL statementsQuery: SELECT * FROM tb_test where id = '1' AND name = 'xia'
SELECT * FROM tb_test
INSERT: insert into tb_test VALUES ('xia ', '123 ')
Insert into tb_test (name) VALUES ('xia ')
UPDATE: UPDATE tb_test SET password = '000000'
The procedure is as follows:
Copy codeThe Code is as follows: public static string english-Chinese (string english, the translation result is one or more)
{
String English-Chinese dictionary = Settings. Default. dictionary directory + "haou_dict.xml
Private static void start and end time of a certain day (DateTime day, out DateTime start time, out DateTime End Time)
{
Var Date = which day. Date;
Start time = Convert. ToDateTime (DateTime. Now. ToString ("yyyy-MM-dd 00:00:00 "));
Deadline =
Including system hooks, thread hooks, global hooks, and private hooks. A separate DLL is required for system hooks, which may lead to a long delay and may not be used as a separate DLL on the Internet.
Now I am posting Code. The Code is referenced
Copy codeThe Code is as follows: $. request = (function (){
Var apiMap = {};
Function request (queryStr ){
Var api = {};
If (apiMap [queryStr]) {
Return apiMap [queryStr];
}
Api. queryString = (function (){
Var urlParams = {};
Var e,
D = function (s)
I. Basic Concepts
Heap: this refers to a data structure, not the place where we mentioned in C # used to store referenced objects. It can be regarded as a Complete Binary Tree.In order to store the heap with arrays, each node is marked in order.
1.
Result: only the first character a with the string replaced is returned.
2. replace () supports regular expressions. It can match characters or strings according to the regular expression rules and then replace them!
1. xml parsing (in javascript ):
The specific code is as follows. The root of the parsed result is the Dom tree.
Copy codeThe Code is as follows: if (window. ActiveXObject ){
Var doc = new ActiveXObject ("Microsoft. XMLDOM ");
Doc. async = "false ";
C # Call The. bat file
Use namespace: using System. Diagnostics;
System. Diagnostics. Process. Start (Server. MapPath ("ah. bat "));
========================================================== ==================================
Files with the
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