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
space, the function is to step into each subdirectory of the specified directory and show that the directory occupies the file system data block, if no directory is specified, the current directory is counted.The command options for du have the following meanings:A: Displays the disk space occupied by all directories and each file under the second directoryS: Show only the sum of each file sizeB: Size is indicated by bytes.X: Skipping directories on different file systems is not countedA: Recur
the directory tree"MkDir" Create a Directorymkdir./AAA Create an AAA directory in the current directory (only one level of directory can be created)Mkdir-p./AAA/BBB/CCC Creating multiple directories (you can create multi-tiered catalogs)[[email protected] admin]# mkdir/aaa[[email protected] admin]# rm/aaarm: Cannot delete "/aaa": is a directory [[email protected] admin]# RM -f/aaarm: Cannot delete "/aaa": is a directory [[email protected] admin]# rm
. But how to differentiate which method is called, we can test it by another method. In the Console.log, please experiment with the FF with Firebug!The code is as follows:var bbb = {I:10,Tostring:function () {Console.log (' toString ');return this.i;},Valueof:function () {Console.log (' valueOf ');return this.i;}}Alert (BBB);//ToStringalert (+BBB); Ten ValueOfAle
Don't understand the data structure bitter AH
The Union occupies only one memory space in memory, the size of which is determined by the largest data type in the Union, and when the Union is initialized, the value of the Union is determined by the last valid parameter
' Created on
2012-9-9
@author: Jincheng ' '
ctypes import *
print "AAA:"
value = Raw_ Input ()
V=int (value)
Vv=long (value)
Vvv=value
Class aaa (Union):
_fields_=[
("AAA", c_ int),
("
Objective
Basically, all JS data types have both methods, except NULL. They both solve the problem of JavaScript value operations and display, and overrides increase the optimizations they invoke.
Test analysis
First look at one example:
Copy Code code as follows:
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 results because they secretl
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
Let's take a look at the following example:Copy codeThe Code is as follows:Var aaa = {I: 10,ValueOf: function () {return this. I + 30 ;},ToString: function () {return this. valueOf () + 10 ;}}
Alert (aaa> 20); // trueAlert (+ aaa); // 40Alert (aaa); // 50This is because they secretly call
Jquery-based each and jqueryeach
$. Each () and $ (selector ). different from each (), the latter is used to traverse jquery objects. The former can be used to traverse any set (whether an array or an object). If it is an array, each time the callback function imports an array index and the corresponding value (the value can also be obtained through the this keyword, but javascript will always wrap this value as an object-although it is a string or a number ), the method returns the first parame
Differences between valueOf and toString in Javascript. For more information, see Introduction.
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
Let's take a look at the following example:
The Code is as follows:
Var aaa = {I: 10,ValueOf: function () {return this. I + 30 ;},ToString: function () {return this. valueOf () + 10 ;}}
Alert (aaa> 2
member from the collection in the Srckey to the collection at Dstkey redis::smove (' sa ', ' sb ', 1);//Moves the 1 in SA to the SB DD (redis::smembers (' SB ')); Returns the union DD of multiple collections (Redis::sunion (' sa ', ' sb ')), return union, coexist in a set of Redis::sunionstore (' SD ', ' sa ', ' SC ');//Combine SA and SC to return to SD in DD (redis::smembers (' SD '));
Hash (hash) type (Hset, Hget, Hlen, Hmget)
Hset Hgethdel Deposit/Query/delete redis::hdel (' a ');//must firs
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
Tstrings is an abstract class that, in actual development, is the most applied except for the basic type.General usage We all know, now to discuss some of its advanced usage.1, CommaText2, Delimiter delimitedtext3, Names values valuefromindexLet's look at the first one: CommaText. How to use it?Constconstr:string = ' aaa,bbb,ccc,ddd ';VarStrs:tstrings;I:integer;BeginSTRs: = tstringlist.create;Strs.commatext: = Constr;For I: = 0 to Strs.count-1 doShowM
, inserted where test1.id = inserted. idEndIf update (name2)BeginUpdate test2 set test2.name = inserted. name2 from test2, inserted where test2.id = inserted. idEnd5. Create a delete triggerCreate trigger triggerDeleteViewTest on viewTestInstead of deleteAsBeginDelete test1 from test1, deleted where test1.id = deleted. idDelete test2 from test2, deleted where test2.id = deleted. idEnd
Currently, the trigger has been created. Now let's start testing.Create raw dataInsert into test1 values ('1', '
TstringsIs an abstract class. In actual development, it has the most applications except the basic type.We all know the general usage. Now we will discuss some of its advanced usage.First, list the several attributes to be discussed:1. commatext2. delimiter delimitedtext3. Names Values valuefromindex
First read: commatext. How to use it? UseCodeSpeaker:ConstConstr: String = 'aaa, BBB, CCC, DDD ';VaRSTRs: tstrings;I: integer;BeginSTRs: =Tstringlis
At last, some strange questions were discussed in the group, and some experts wanted to think about the two things. Although they failed, this spirit is very encouraging. So I decided to write an articleArticleTo introduce them.
Basically, all JS data types have these two methods, except null. They solve the Javascript value calculation and display problems.
Let's take a look at the following example:
// By situ zhengmei var AAA = {I: 10, valueof: function () {return this. I + 30 ;}, tostr
Merge column valuesOriginal: zhujianAdapted 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 p
Author: skateTime: 2012/12/4
Error: Unable to connect to foreign Data source: can't create TCP/IP socket (24)
Environment Description:192.168.213.133:192.168.213.120: B
On BMysql> show Create Table B \ G;* *************************** 1. row ***************************Table: BCreate Table: Create Table 'B '('Id' int (10) default null,'Name' varchar (100) Character Set utf8 default null,'Hostid' int (6) default null) Engine = InnoDB default charset = Latin11 row in SET (0.00 Sec)
OnMysql> show
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.