javascript: Stacks
A list is the most natural way to organize data. A stack is a data structure similar to a list that can be used to solve many problems in the computer world. Stacks are an efficient data structure because the data can only be
New
var re = new RegExp (' Test ', ' GI ');var re =/test/gi;
functionTest ();//boolexec ();//string match once and returnMatch ();//array multiple matches and returnsSearch ();//similar to indexof ()replace ();//replacementSplit ();//Split
Useful
Let your website advertising no longer affect your site speed: First load the page after loading the advertising method, first load the page, after the loading of ads, advertising finally display, so as to ensure that the Web page of the normal
In fact, I've listed all the "null" and "false" values in JavaScript, except that the Boolean value itself is true and false, "null values" for other data types are mainly undefined and defined. The types of these null values are:
The
Log functionality is needed in recently developed software, and one of the important features is the display of dates and times. So a search on the Internet, search to a large number of date format functions, but compared to the next, the sense of
Method One:
Personally think the best way. Using regular expressions, this is the core principle.Second, this method uses the prototype properties of JavaScript
In fact, you do not use this property can be implemented using the function. But this
See a lot of people have this reserved number of decimal point after the demand, but most of them write a function to intercept, but also consider rounding up what, it is quite complicated to write.
In fact, the number object of JavaScript has a
So what should we do if we're going to encapsulate the property and method (methods) into an object and even generate an instance object from a prototype object?
In general, the object-oriented approach that you are familiar with is based on
JSON syntaxJSON is constructed in two structures:Object-A collection of name/value pairs. In different languages, it is understood as objects, records, structures, dictionaries, hash tables, a list of keys (keyed list), or associative arrays. An
URL is: Uniform Resource Locator (uniform Resource Locator, URL)The complete URL is composed of these parts:Scheme://host:port/path?query#fragmentScheme: Communication protocolCommonly used Http,ftp,maito, etc.
Http://localhost/test/test.htm?id=1
1 what is an array: In memory, storage space for multiple data storage, and then a name why;2 Why: The reality of storing multiple related data, are centralized storage, a common name3 4program = data structure +algorithm5 good data structure can
Concept a lightweight Data interchange format, essentially a string of specific formats, is a common choice for client and server-side interaction dataRules [] collection [value1,value2]{} object {key1:value1,key2,value2}Key indicates the object's
The previous article learned what a module is, this article briefly describes how to define and load a module.I know three kinds of module loading methods are Commonjs, AMD and CMD online about these three kinds of module loading mode of the article
One. JavaScript Array classCreate a JS array in two different ways:var arr = []; Orvar arr = new Array ();() can specify the length, or can not be specified, refers to the non-specified is irrelevant, because the length of the array in JS is
In the previous article we talked about the basic use of regular expressions, and then the blogger wants to talk about the details, starting with the regular modifier today.The regular modifier, also known as the regular tag (flags), defines the
Html Tag learning, html Tag
1. title: - 2. split line: 3. bold: 4. italic: 5. section: 6. line feed: 7. hyperlink: href attribute specifies the link address target (target): _ self (opened on the current page) _ blank (opened on the new page)
Simple implementation of node. js Image Upload and node. js Image Upload
The examples in this article share the code for uploading node. js images for your reference. The details are as follows:
1. node-formidable
Components that help upload files
2
Some interesting CSS questions (9) -- cleverly implementing CSS diagonal lines and css diagonal lines
Start this series and talk about some interestingCSSQuestions and question types are not empty. What to think of is not only to broaden the problem-
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.