`
文章列表
  .log:hover .log_manage { display: block;/*display while hove on*/ } .log_manage { position: absolute; left:0; bottom:3px; display: none;/*not display by default*/ }  
    $(window).scroll(function() { if ($(window).scrollTop() > ($(document).height() - $(window).height() - 3) && me.isFetchAutomatically()) { me.fetchNextMonth(1000);// fetch next page } });  
Javascript does not have block scope, but it does have function scope. A variable defined anywhere within a function is visible everywhere within the function.   function foo(){ console.log("a:",a);//variable a is visible here but it is still undefined console.log("f:",f) ...
    function updatejScrollPaneTextArea(textareaSelector, settings) { var textareaClone = $('<div style="word-wrap:break-word" />').appendTo($(textareaSelector).parent()); var copyAttributes = ['font-family','font-size','font-weight','letter-spacing','word-spacing','line-he ...
http://en.wikipedia.org/wiki/Functional_programming http://en.wikipedia.org/wiki/Imperative_programming   http://msdn.microsoft.com/en-us/library/bb669144.aspx   λ演算 http://www.hudong.com/wiki/%CE%BB%E6%BC%94%E7%AE%97
[1,2,3].slice(1)//[2, 3] function t(){ //arguments.slice(1);//won't work. Can not directly slice the arguments. You can think it is not an array var b=[].slice.call(arguments,1); console.log(b); } t(1,2,3);
clear the current input Ctrl + U clear the screen Ctrl + L

CSS positioning

    博客分类:
  • css
Positioning The CSS positioning properties allow you to position an element. It can also place an element behind another, and specify what should happen when an element's content is too big. Elements can be positioned using the top, bottom, left, and right properties. However, these properti ...
1. A block element is an element that takes up the full width available, and has a line break before and after it. Examples of block elements: <h1> <p> <div> 2. An inline element only takes up as much width as necessary, and does not force line breaks. Examples of inline ...
visibility:hidden hides an element, but it will still take up the same space as before. The element will be hidden, but still affect the layout.   display:none hides an element, and it will not take up any space. The element will be hidden, and the page will be displayed as the element is not ...
Javascript has many asynchronous functions. Sometimes, we need to wait until the asynchronous function returns than go on. Following give an sample function for waitfor waitfor = function(){ var preFns = arguments; var thenFn = function(){ var postFns = arguments; var cou ...

Mercuial Hg configuration

    博客分类:
  • SCM
  In mac or linux, put the following text in ~/.hgrc. In windows, .hgrc is under the install directory   [paths] default = /Users/twer/learn/hg/sandbox [ui] username = zhangruimin [extensions] color = fetch = hgk = highlight = mq = purge = rebase = bookmarks = ...
just give an example function Controller(){ } Controller.prototype=(function(){ var p1=function(){ console.log(this); }; var p2=function(){ console.log("in p2"); }; return { //create an object as the prototype, supposed it is named as "p1" fun1:function(){ console ...
1. Hibernate default to a lazy fetching plan for all entities and collections. Lazy setting decides the time to fetch related objects. 2. difference between load and get   Item item = (Item)session.load(Item.class, new Long(123));// get a proxy for item Item item = (Item)session.get(Item.class, n ...
Javascript does not have the concept of class. It is a prototyal language which means objects inherits directly from other projects. The book introduces several ways to implement the inheritance. 1. Pseudoclassical 2. Prototypal 3. Functional 4. Parts   Below, I give an example of Functional i ...
Global site tag (gtag.js) - Google Analytics