Fixed digits in asp.net with 0 functions (Resolved, example)!
In the development, the number achieved 8 digits, but need to be filled with 0. such as: 123, said: 0000123.
Examples are as follows:
Decimal AAA = 123; Numeric type
string bbb = AAA. ToString (); Convert to character
BBB = bbb. PadLeft (7, ' 0 '); A total of 7, before using a 0-padd
Preface basically, all JS data types have these two methods, except null. They solve the javascript value calculation and display problems. Rewriting will increase the optimization of their calls. Test Analysis: varaaa {I: 10, valueOf: function () {returnthis... syntaxHighlighter. a preface basically, all JS data types have these two methods, except null. They solve the javascript value calculation and display problems. Rewriting will increase the optimization of their calls. Test Analysis first
JQuery exercises get objects (3)-Matching Based on attributes and content, and matching with form elements that contain id attributes, such as: $ ("span [id]")
The Code is as follows:
AAA BBB CCC DDD
EEE
FFF
If the specified element does not contain the id attribute, for example, $ ("span: not (span [id])") or $ ("span: not ([id])")
The Code is as follows:
AAA BBB CCC DDD
EEE
FFF
Contain
Delphi Tstrings is an abstract class, in the actual development, in addition to the basic types, the application of the most.General usage We all know, now to discuss some of its advanced usage.Let's start by listing several properties to be discussed:1, CommaText2, Delimiter Delimitedtext3, Names Values ValuefromindexLet's look at the first one: CommaText. How to use it? To speak in code:Constconstr:string = ' aaa,bbb,ccc,ddd ';VarStrs:tstrings;I:
]: = CHR (ord (DOT) + 1 );J: = J + 1;End;STR [J]: = copy (S, I, strlen (pchar (s)-I + 1 );Result: = STR;End;
Procedure tform1.button1click (Sender: tobject );VaRUR: userarray;I: integer;BeginUR: = Split (edit1.text ,';');For I: = 0 to 255 doBeginIf length (UR [I]) = 0 Then exit;Showmessage (UR [I]);End;
End;
End.
Note: When testing this code, please put a text edit box and a button on the form. The string is separated by the ';' sign;
The second method is relatively simple:
Tstringlist usageTstr
Merge column values
Original: zhujian
Adapted from: AI xinjue Luo. Lu Hua (flowers bloom in ice and snow forests in the past 18 years)-12-16 Guangdong and Shenzhen
Table structure. The data is as follows:Id value-----------1 aa1 bb2 aaa2 bbb2 ccc
Expected results:Id values-----------------1 aa, bb2 aaa, bbb, cccThat is: group by id, sum of values (string addition)
1. The old solution (in SQL server 2000, only functions can be used .)-- 1. Create a pr
the directory names that use the space in the directory.
1) view the size of subdirectories in the current directoryRoot @ bkjia:/home/htmlfile # du-sm.1.The "." Of du-sm. indicates the current directory.
2) view the size of the current directory and subdirectoryRoot @ bkjia:/home/htmlfile # du-h16 K./test60 K./bbb84 K.-H indicates the use of K, M, G humanized display.
3) view the size of the bbb directory in the current directory, but do not want to
script creates a Boolean object and converts it to a string:
Script output: true.
Let's take a look at the following example:
var aaa = {i: 10,valueOf: function() { return this.i+30; },toString: function() { return this.valueOf()+10; }}alert(aaa > 20); // truealert(+aaa); // 40alert(aaa); // 50
This is because they secretly call the valueOf or toString method. But how can we tell which method is called? We can test it using another method. Because console. log is used, please experiment in FF
who have to do rookie, rookie not scary, afraid of is no one to guide the direction of progress! This series of articles will describe the basic use of each function module of BBB. There are too few BBB data in Chinese now, they are collected from all corners of the internet in the world, learned, personally tested experience summary. To share with you, I hope everyone (especially beginners) in the
Probably......ObjectiveBasically, all JS data types have these two methods, except for NULL. They both solve the problem of JavaScript value operations and display, and overrides increase the optimizations they call.Test analysisLet's look at one example:var AAA = {I:10,Valueof:function () {return this.i+30;},Tostring:function () {return this.valueof () +10;}}Alert (AAA > 20); Truealert (+AAA); 40Alert (AAA); 50This results because they secretly invoke the valueof or ToString method.But how to d
directoryName: CP Usage rights: All users How to use: CP [Options] Source DestCP [options] source ... directory Note: Copy one file to another file, or copy several files to another directory. (copy) Parameters: -A as far as possible file status, permissions and other information are reproduced as original.-R If the source contains a directory name, the files under the directory are also copied to the destination.-F If a destination already has a file with the same file name, it should be
shelve operation is used to temporarily store ongoing work to the perforce server, but does not submit a changelist.Shelve usage:When you perform multiple development tasks on some files at the same time (for example, you must first process jobs with higher priority or test on other platforms before submitting ).Or code review between developers before submission.
P4 shelve is equivalent to attaching your modifications to the P4 server rack at zero time.P4 unshelve is equivalent to overwri
Array merging problem $ act_arr nbsp ;= nbsp; array (0 = gt; 'AAA', 2 = gt; 'BBB '); I want to change it to the following string 'AAA' and 'BBB 'using implode (', ', $ act_arr). The result is aaa. how can I use the quick method of bbb? it is best not to traverse it, real array merging
$ Act_arr = array (0 => 'AAA', 2 => '
because they secretly call the valueOf or toString method. But how can we tell which method is called? We can test it using another method. Because console. log is used, please experiment in FF with firebug installed!
Copy codeThe Code is as follows:
Var bbb = {
I: 10,
ToString: function (){
Console. log ('string ');
Return this. I;
},
ValueOf: function (){
Console. log ('valueof ');
Return this. I;
}
}
Alert (b
ObjectiveBasically, all JS data types have these two methods, except for NULL. They both solve the problem of JavaScript value operations and display, and overrides increase the optimizations they call.Test analysisLet's look at one example:var AAA = {I:10,Valueof:function () {return this.i+30;},Tostring:function () {return this.valueof () +10;}}Alert (AAA > 20); Truealert (+AAA); 40Alert (AAA); 50This results because they secretly invoke the valueof or ToString method.But how to differentiate w
file system disk space usageShow information about the file system in which each file resides, or all file systems by default.DF Displays the amount of disk space available on the file system containing each file nameargument. If no file name is given, the space available on all currently mounted file systems are shown.duDu's English is: disk usage, meaning the use of space, the function is to step into each subdirectory of the specified directory and show that the directory occupies the file s
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.