The HTML code is cumbersome to write because it has more tags.
One way to solve this problem is to use templates to fill in your own content in a skeleton written by someone else. Another is the method I want to introduce today----shorthand method.
The commonly used shorthand method, currently mainly is Emmet and Haml two kinds, this article all will introduce.
These two kinds of simple writing, th
Mac defaults to UNIX systems, and the UNIX system itself does not have these shorthand commands, so you can use them by setting aliases for the commandsView all command aliases that have been set on this computer: aliasSet command alias: Alias Ll= ' Ls-alf 'The execution command is valid only in the current shell, and can be set in the user's. Bash_profile for long-term use, so that each login can be used with these
In daily work, javascript some common shorthand skills, will directly affect our development efficiency, now the common skills are organized as follows:1. Null (null, undefined) validation When we create a new variable, we usually verify that the value of the variable is empty (null) or undefined (undefined). This is an often-considered validation for JavaScript programming.Non-optimized code:if NULL ") {Let variable2 = variable1;}Optimized code:In th
If you want to set all values to be displayed, you should limit the use of shorthand property declarations as much as possible.Common abuses:Padding, margin, font, background, border, Border-radius "?? Isn't that what I used to do?In most cases, we do not need to specify all values for the shorthand property declaration. For example, the heading element of HTML only needs to set the value of the top, bottom
offset of i:0x10
This time there was no previous optimization. Can infer:
g++ if the parent class is also a derived class when the parent class is guaranteed to be intact, the parent class will only guarantee the intact integrity of the fragment .That is, in the first code example, the intact integrity of the Father class in the son class is done by guaranteeing the Grandpa class's intact rows and the integrity of the data unique to the Father class char a2 . So though the size of
Remember that margins (margin), padding (padding), and border (border) settings are set in a clockwise direction, up or down in four directions, in the box model: upper right bottom left. Examples of specific applications in margin and padding are as follows:margin:10px 15px 12px 14px;/* set to 10px, right set to 15px, lower set to 12px, left set to 14px*/There are three abbreviations that are commonly used:1. If the values of top, right, bottom, and left are the same, such as the following code
We'll learn how to avoid the boilerplate code in Mapdispatchtoprops () for the common case where action creator arguments Match the callback prop arguments.Current Code:// Visibletodolist.jsConst MAPDISPATCHTOPROPS = (Dispatch) + = { return { Ontodoclick: (id) + = { Dispatch (Toggletodo (ID)); }, };};Const VISIBLETODOLIST = withrouter (Connect ( Mapstatetoprops, Mapdispatchtoprops) (todolist));The ID we pass from Ontodoclick are the same as in Toggletodo and
Shorthand, writing a notebook app with a reminder function.Fanqiang Download:Https://play.google.com/store/apps/details?id=com.revfycd.colorfullDayThe feature is to solve the troublesome way of entering time for other applications,Use a colloquial way to complete the parsing of time,For example, enter "Tomorrow 12 points", the current time will be the same, calculate the 12 points tomorrow.Another example is "Next week 3XX", "20 minutes later", "X-poi
One: "+ +", "--" operation in the judgment and other statements directly used will reduce the code length: Example 1: The following squeeze (s,c) function, which deletes the string s appears to be all characters c:void squeeze (char s[],int c) {int i,j;for (i=j=0;s[i]! = ' s[i '; i++) {if (s[i]! = c) {s[j++] =); }} S[j] = ' + ';}Where the If statement is simplified by the following if statement: if (s[i]! = c) {S[j] = s[i]; j + +;}Three: Define # define with a macro: #define MAX (A, B) ((a) > A)
RBAC ModelCore Concept:user,role,permission,operation,resource
User have many roles, assign role to user; One role can be assigned to many users.
User have many permissions, assign permission to user; One permission can assigned to many users.
Operation is like add, UPDATE, delete, import, download, visible, invisible, etc.
Resource is like a menu, button, or other screen elements.
Permission has many resources and operations; One resource can used by many permissions; One oper
One, Label control (Class)Property:(a) Layout:Width: Available in both pixels and percent type: UnitHeight: Available in pixels, also available as percent type: unitunit.pixel (pixels) unit.percentage (percent)(ii) Background and prospectsBackColor: (color) Background colorForeColor: (color) text colorFontName: Font namesSize: Font sizesBold:Italic:Underline:(c) BorderBorderColor:BorderStyle:BorderWidth:(iv) Other:Text-label textVisable= is visibleEnabled-is available.CssClass-Class in the style
@font-face:CSS3 allows you to use your own font, the user will automatically download the syntax:@font-face{font-family:---; Src:url (---)} If you want to use bold, Another @font-face rule that contains bold text must be added newly css2d ConversionTranslate () method: Based on left and upper given parameter syntax: transform:translate (--px,--px);Rotate () Method: rotation, allowable negative syntax: Transform:rotate (--DEG);Scale () Method: Change the element size syntax: Transform:scale (2,4)
Two ways to define function pointers1#include 2#include 3#include 4 5 intAddintAintb)6 {7 returnA +b;8 }9 Ten //void msg (char s[]) One //method for defining void (*p) (char s[]) function pointers A //type of void (*) (char *s) function pointer - - voidMsgChars[]) the { -MessageBoxA (0, S,s,0); - } - + - voidMain () + { A //Method 1 at //rules for defining function pointers - //1. Take the function first int add (int a, int b), add is an address - //2. Knockout the functio
Masking the right mouse button menuThe document can specify a different component container or control $ (document). Bind ("ContextMenu", function (e) {return false;//intercept does not continue to dispatch events});// For example: In the class= ' Fred ' tab, cancel the right-click menu $ (". Fred"). Bind ("ContextMenu", function (e) {return false;});Monitor mouse buttonSimply give a MouseDown, and a lot of move,up,hover....$ ('. Fred '). MouseDown (function (e) {console.log (E.which);//Print ke
1. Synchronizing with the resource pool2.[conflict Resolution]--may not have this step3. Merge tags4. Clear the project-clean5. Package: Run as-->maven install6. Go to Service Backup original package, download service Pack A to local7. Replace the corresponding class in package A with a local file8. Take package A to cover the server corresponding package9. Overwrite completion requires restart service to take effect, connect to server with Xshell 510. View tomcat for the server, command: Ps-ef|
The MVC Model Controller pattern MVC pattern (model-view-controller) is a software architecture pattern in software project. The software system is divided into three basic parts: model, view, and controller. KVO Observer mode monitoring//KVC encoding mode//cocoa cocoa is the native object-oriented programming environment that Apple created for Mac OS X Cocos2d cocos2d for IPhone, or Cocos2d-iphone is the original framework for Objective-c porting on iOS an
element, 1em = 14px If the element's font-size is 14px, and 1em = 18px If the font-size is 18px. The following code:P{font-size:12px;text-indent:2em;}The code above is the ability to indent the first line of a paragraph by 24px (that is, the distance of two font sizes).A special case is noted below:However, when Font-size is set to EM, the criteria for this calculation are based on the font-size of the parent element of P. The following code:Html:Css:P{font-size:14px}span{font-size:0.8em;}As a
point, we just need to encapsulate its functional code for later invocation. This is the model layer in the MVC pattern. For example:We create a new Java class called tools with the following code:/** * Tool class * */public class Tools {public static void OutPut (Object obj) { System.out.println (obj);} }At this point, if we want to output a data, directly call the Tools.output (parameter) method to output data.4 , using St
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.