Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- property



  Chrome to provide native image lazyload support

Previously we have introduced how Medium achieved loading images lazily, basically what they did was using lots of HTML tags and CSSs to change the images at different stage. It needs lots of code to do this. With the high demand of this feature for resource consumption and performance consideration, Chrome is now working on a feature to provide native support for loading images/iframes lazily. This feature is named lazyload. lazyload will allow three values: auto: the default behavior of ...

   CHROME,LAZYLOAD,IMAGE,IFRAME     2018-09-22 23:04:35

  Understand this in JavaScript

In JavaScript, this is always pointing to the owner of a function or a method. Function Let's check out function first. function introduce() {      alert("Hello, I am Laruence\r\n"); } For this function, what does this point to? In JavaScript, a global function's owner is the current page, i.e, the window object. Because its a method of the window object if we define a global function. Now you should know the this will point to the window object in the above function. ...

   JavaScript,this,event,call     2013-04-03 04:10:03

  Finding selected checkbox items in a JSF dataTable

This is one of those problems that I couldn’t find a complete example for when I needed it, so hopefully this will save somebody else the extra time it took me to piece it together. We frequently need to have data tables in our UI, and allow the user to select a subset of those items for action. In JavaServer Faces, this means having a DataTable, each row having its own checkbox. But when the action is triggered, how to we find which items the user has selected. The first step is to ...

   JavaServer Faces,JSF,Datatable,Checkbox,Example     2012-01-03 03:02:46

  JavaScript efficiency catch up

JavaScript is a very flexible language, we can write JavaScript code freely with various styles, different kinds of codes will have different execution efficiency. Here we summarize some tips we get from our development. Efficiency of JavaScript itself JavaScript has execution context chain, closures, prototype inheritance, eval etc. It brings us some magic features, but it also introduces the performance issue, if we don't use them properly, it will affect the codes execution efficiency. 1. Glo...

   JavaScript,efficiency,event delegation,eval     2013-04-02 04:08:46

  Short SASS tutorial

If you learned CSS before, you should know that CSS is not a programming language. You can use it to design webpage style, but you cannot use it for programming, i.e, CSS is what designer uses, not what programmer uses. Programmer may think that CSS is very troublesome, it has no variables, no conditional statements, it just allows line-by-line description of HTML elementsLuckily, CSS preprocessor appear which makes CSS programmable. The general idea of CSS preprocessor is using a programming la...

   CSS,SASS,programmable,variable,condition,comment     2012-06-22 08:38:18

  JavaScript: Passing by Value or by Reference

In JavaScript, we have functions and we have arguments that we pass into those functions. But how JavaScript handles what you’re passing in is not always clear. When you start getting into object-oriented development, you may find yourself perplexed over why you have access to values sometimes but not other times. When passing in a primitive type variable like a string or a number, the value is passed in by value. This means that any changes to that variable while in the function are com...

   JavaScript,Function,Pass by reference,Pa     2011-07-28 11:05:25

  How to be jQuery-free?

jQuery is now the most famous JavaScript library. There are around 57.3% websites in the world using jQuery, i.e, 6 out of 10 websites are using jQuery. If we only consider those websites which use libraries, then the percentage is even higher which is 91.7%. Although jQuery is very popular, its size is still a headache to many websites maintainers. The uncompressed jQuery 2.0 has a size of 235KB, the size is 81KB after optimization.The jQuery 1.8.3 which supports IE 6/7/8 has a uncompressed si...

   jQuery,JavaScript,ECMAScript,CSS3     2013-05-13 11:53:20

  An easy way to log client side information to server

JavaScript debug is a very troublesome thing in web application development. Because many web browsers will not notify you if there is any error in the JavaScript codes you write. They just silently fail and block the following codes execution. In order to debug JavaScript codes, we need a good log mechanism which will help us log the error information,, we often need to log errors in JavaScript codes to server for debug purpose in a production web application, What should we do? The first ...

   JavaScript log, Ajax,Image,Debug     2012-12-30 09:16:50

  Why Objective-C is Hard

As an active member of "The Internet" and vocal Objective-C coder, I get a lot of questions surrounding the language. They're often framed around thinking about learning the language or trying to write an app, but they also usually involve a phrase like "Objective-C looks really hard" or "what are all those minus signs about?" Both of these are pretty good questions, and I'd like to address why someone might be more hesitant to jump into iOS or OS X development compared to, say, Ruby or J...

   Objective-C,difficult,hard,reason,analysis     2012-03-07 05:11:28

  Instagram gains 78% more visits after acquired by Facebook

Since Instagram was acquired by Facebook, its popularity continually heats up. Some  data shows that independent views of  Instagram surges 78%.In April, Instagram’s website saw a 78 percent uptick in unique visitors in the U.S., making the web property of the photo-sharing phenom the highest gaining site on the Internet for the month, according to analytics firm comScore.. For an application whose all functions are present in the mobile terminal, the site of Instagram is onl...

   Facebook,Instagram,App,Website     2012-05-28 05:45:32