H5 side of the camera to scan the two-dimensional code and analysis

Introduction: Recently, there is a demand, microblogging client, H5 page of a button can with native interaction call up camera, two-dimensional code scanning and parsing. In the non microblogging client (micro channel or native browser, such as: Safari) called the system to take pictures or upload pictures button, by taking pictures or upload pictures to resolve two-dimensional code. Second programs need to be in front of JS analytic two-dimensional code. This relies on a third party parsing library jsqrcode. This library has been supported in the browser to call up the operation of the camera, but rely on a call getUse...
read(564) comment(0)

2015 - year Kekebanban year-end summary

Every year there is a habit of writing year-end summary, seeing the new year's day has passed several decades, into 2016. Is supposed to be a summary of the 2015. The most recent period of time in order to sort out the experience of the year, but also thinking about their own in which the loss. Perhaps a person is really easy to empty, can not find the direction of the struggle. There are some events themselves confused, pessimism over. Do not talk about flighty and impetuous. Think about that time is really a bit scary, it is a waste of time ah. So, When a person is not thinking of the time, that life is very empty, this...
read(1337) comment(3)

Touch function encapsulation based on zepto

Mobile terminal use zepto to do some of the touch based animation, the need to develop a function library. Function: after the object is to be able to be able to trigger the corresponding event, can return to me, the current movement direction and the X axis or the Y axis movement displacement. TouchDirection var = function (E) { Var startThat = {}, MoveThat = {}; This.touchStartEven = f...
read(568) comment(1)

According to the dynamic calculation of the iPhone6 value of the REM design

REM units in the mobile terminal to do the H5 development is the most frequently used units. In order to solve the adaptive problem, we need to dynamically add font-size value to the document node. Using mediaquery can solve this problem, but each file is referenced to a large string of font-size value is very cumbersome, and the value can not achieve a continuous effect. Using the JS dynamic calculation to document the fopnt-size dynamic assignment to solve the problem. / * * * [to iPhone6 design draft for example JS dynamic setting document rem...
read(1282) comment(0)

Front end development text sublime commonly used plug-ins and configuration

Front-end development sublimeconfigmac configuration file directory in this file is mainly about the sublime plug-in configuration, shortcut key configuration, theme and font configuration. All plug-ins can be installed in the list of Control Package installation, the specific installation method can be installed on their own Google, not in the scope of the introduction of this article. Can also be used to manually install git. 1.autoprefixer this plug-in is mainly to make the preparation of CSS more convenient and fast, you can configure the shortcut key to add the tag attribute browser manufacturers prefix. Before installation, you need to determine the computer...
read(617) comment(4)

Mobile terminal H5 development related content summary - CSS article

1 mobile terminal development as the window to add the H5 side to develop the following paragraph is necessary to configure the other related configuration is as follows: Viewport width width (value /device-width) Viewport height height (value /device-height) In...
read(696) comment(2)

Mobile terminal H5 development related content summary - JavaScript article

1. To change the page title sometimes we develop dynamic H5 page is needed to update your title name, this time using document.titile='modified name'; it can solve our problems. Or use the current Firefox / / Title parameter is not supported on History.pushstate (state, title, URL); this method is not only able to modify the title but also to modify the value of URL, and to save the information...
read(669) comment(0)

Graduation year summary - say good fighting it?

This piece is written in September 2015. Prior to the release of the blog project on their own github. Taking advantage of the opportunity to write a summary of the end of the year to migrate to their own personal blog. Introduction: July 3, 2015 is my work all day for a year. Has always wanted to write an article on this year to do a summary. This article in July 3rd of this year is about the time has been written out, but he read a few times after a few times feel that writing is not how good, thinking about to modify the modified. After that is in the team for an emergency project, bustling about a few weeks, remember this process...
read(1202) comment(4)

Waterfall flow picture lazy loading code examples

Recently, the project has been used to "lazy loading", and now update the general, because usually the main move to make the development of the mobile terminal so the use of the library file is zepto.js. Of course, can also be common and jQuery. The following code: / * * * by Zhiqiang on 2015/10/14. Created * hpuhouzhiqiang@gmail.com * picture lazy loading **/ LoadImgLazy function (node) { LazyN var...
read(873) comment(0)

Python parse HDF file

Some time ago because of a business needs to resolve a HDF format file. Before this also do not know in the end what is the HDF file. Baidu encyclopedia explanation is as follows: HDF is a self description, multi object file format for storing and distributing scientific data. HDF is by the National Supercomputing Center applications NCSA (full name: National Center for Supercomputing application) to create, in order to meet the needs of a variety of field research and the development of a can, storage and distribution of scientific data model number.
read(1284) comment(0)

[from 0 to 1 Web front of the JavaScript] Ajax in the object (1)

The most popular way to get the back end (from the server) is by Ajax. Will come to learn this knowledge in detail today. If you use ajax to access the data, the browser and browser side of the JS do those jobs? I made a picture, please look at: 1 native Ajax JS request way from the above diagram we generally know the Ajax to access the back-end data a process. The most important is to detect the browser, the process of creating a XMLHttpRequest object: The code is as follows: / * To determine whether to support XM...
read(1098) comment(1)

Optimization of conditional judgment in JavaScript

In fact, this is not a problem in the usual code development, but a lot of times we all want their code to be elegant and easy to understand, and to reduce duplication of code as little as possible. For the above problem, there is a `switch` in the JS to replace the multiple `if` statements to determine. ...
read(1155) comment(2)

[from 0 to 1 Web front] CSS pseudo class and pseudo element

In support of the CSS browser, the different states of the link can be displayed in different ways, these states include: active state, the state has been accessed, not to be accessed, and the mouse hover. ...
read(1413) comment(0)

URL, Django, static file, POST request configuration

Before when Django learning, in the configuration of static files spent a lot of time, and does not solve the problem, online search a lot of various solutions, but still does not apply their own projects. Because different versions of the Django will be some changes, it is strongly recommended that the current version, choose to read the official document:...
read(2387) comment(0)

[from 0 to 1 Web front] CSS positioning three (relative positioning, absolute positioning)

Here can be verified when use `top` `right` `bottom` `left` * * * (the four properties can be set the specific number of pixels can also be setting a percentage) * * * such property to change the position of the elements, will not affect the position of the other elements. The use of such attributes as `margin` changes the location of the elements that affect the position of the other elements...
read(1328) comment(0)

Javascript picture pre loaded Xiangjie

Pre loading images is a good way to improve the user experience. The picture is pre loaded into the browser, so that visitors can surf on your web site and enjoy fast loading speed. This picture gallery and a large proportion of the site is very favorable, it ensures that the picture quickly and seamlessly released, but also can help users to browse your site content to get a better user experience. This paper will share three different pre loading techniques to enhance the performance and usability of the website. Method 1: using CSS and JavaScript to achieve pre loaded images have a lot of methods, including the use of CSS,...
read(3802) comment(0)

[from 0 to 1 Web front] CSS positioning two (float and display use)

The display attribute specifies the type of box that the element should be generated. This attribute is used to define the display box type that is created when the layout is created. For HTML and other document types, if the use of display is not cautious will be very dangerous, because it may violate the HTML has been defined in the display hierarchy. For XML, since XML has no built-in this hierarchy, all display are absolutely necessary. Browser support All major browsers support the display attribute. Comment: any version of...
read(1143) comment(1)

[from 0 to 1 Web front of the CSS] positioning problem (box model, floating, BFC)

Primer: When it comes to the CSS positioning of the time to look at a small problem: Known width (if: 100px) div box, the level of the center, about two hundred years, respectively, using the div box to fill. And the left and right div adaptive. Effect as shown below: The difficulty of this problem is the browser width is unknown, and both sides of the div adaptive width. The first implementation of the method, is the use of the new property Calc CSS3, the code is as follows: {body Margin: 0; Padding: 0;...
read(1345) comment(1)

JavaScript concept of width/left screen/client/offset/scroll/inner/avail

The original address: http://caibaojian.com/js-name.htmlJS gets all the width and distance, often makes us confused, all browser incompatibilities let us very headache, now say JS in which the width and distance. 1, noun interpretation screen: screen. This type of access is about the width and distance of the screen, and it has nothing to do with the browser, it should be to obtain the properties of the window object. Client: use area, client area. Refers to the customer area, of course, refers to the browser area. Offset: offset. Refers to the target a...
read(846) comment(0)

[from 0 to 1 Web front] each (jQuery) and $.each (), the use of ()

Introduction: recently encountered a problem, is in the each (for) break in the loop and continue function simulation operation what. So to see the jQuery on the function of the document, and sum up. Demo code is as follows: You are first You are second You are third...
read(1220) comment(0)
101 data a total of 6 pagesOne Two Three Four Five ... Next page Shadowe
    personal data
    • Visit243650 times
    • Integral:Three thousand six hundred and eight
    • Grade
    • Rank:5102nd name
    • Original88
    • Reproduced:12
    • Translation:0
    • Comments:274
    Sina Weibo
    Blog column
    Latest comments