вторник, 22 января 2013 г.

A few tips to speed up the display of a site in Chrome. / Несколько советов по ускорению отображения сайта в Chrome.

Everything below this is true for Chrome version 24.0.1312.52 m. In newer versions of behavior can change.
  • Moving elements need to position and move completely changing the left and top. Static positioning change margin / padding creates a redraw the entire page.
  • Absolutely positioned elements to hide in visibility, and not through the display. display - generates a redraw the entire page. When you hide you should not forget to set the top and left to 0 to not show the band prokurutki when resizing the parent unit.
  • When you hide the item directly to the style of the set. Assigning a class to hide the rules involves redrawing the page.

четверг, 10 января 2013 г.

Eliminate errors compile FreeTDS on Windows | Устранение ошибок компиляции FreeTDS на Windows

If you compile FreeTDS for Windows and get nmake error that looks like this:
   Creating library Release_TS\php_dblib.lib and object Release_TS\php_dblib.exp

dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tdsdump_log referenced in function _dblib_add_connection
dblib.lib(rpc.obj) : error LNK2001: unresolved external symbol _tdsdump_log
dblib.lib(dbutil.obj) : error LNK2001: unresolved external symbol _tdsdump_log
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_alloc_context referenced in function _dblib_get_tds_ctx
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_free_context referenced in function _dblib_release_tds_ctx
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_free_results referenced in function _buffer_free_row
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_free_row referenced in function _buffer_free_row
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_alloc_rowreferenced in function _buffer_save_row
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_strlcpy referenced in function _db_env_chg
dblib.lib(rpc.obj) : error LNK2001: unresolved external symbol _tds_strlcpy
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_free_login referenced in function _dbloginfree
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_bulk referenced in function _dbsetlbool
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_willconvert referenced in function _dbwillconvert
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_prtype referenced in function _dbprtype
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_vstrbuildreferenced in function _dbperror
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_library referenced in function _dblogin
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_alloc_login referenced in function _dblogin
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_language referenced in function _dbsetlname
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_client_charset referenced in function _dbsetlname
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_app referenced in function _dbsetlname
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_passwd referenced in function _dbsetlname
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_user referenced in function _dbsetlname
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_host referenced in function _dbsetlname
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_packet referenced in function _dbsetllong
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_process_tokens referenced in function __dbresults
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tdsdump_dump_buf referenced in function _dbsetnull
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_convert referenced in function _dbconvert
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_get_size_by_type referenced in function _dbconvert
dblib.lib(rpc.obj) : error LNK2001: unresolved external symbol _tds_get_size_by_type
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_get_conversion_type referenced in function _dbbind
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_interfaces_file_loc referenced in function _dbsetifile
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_process_cancel referenced in function _dbcancel
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_send_cancel referenced in function _dbcancel
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_strftime referenced in function _dbspr1row
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_datecrackreferenced in function _dbspr1row
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _asprintf referenced in function _dbsetopt
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_peek referenced in function _dbsqlok
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_flush_packet referenced in function _dbsqlok
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_statereferenced in function _dbmoretext
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_put_n referenced in function _dbmoretext
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_submit_query referenced in function _dbsqlsend
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_free_socket referenced in function _dbclose
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _STD_DATETIME_FMT referenced in function _dbprrow
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_put_int referenced in function _dbwritetext
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_process_simple_query referenced in function _dbwritetext
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_submit_queryf referenced in function _dbwritetext
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_free_connection referenced in function _tdsdbopen
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_connect referenced in function _tdsdbopen
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_read_config_info referenced in function _tdsdbopen
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_parent referenced in function _tdsdbopen
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_alloc_socket referenced in function _tdsdbopen
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_set_server referenced in function _tdsdbopen
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _vasprintf referenced in function _dbfcmd
dblib.lib(dblib.obj) : error LNK2019: unresolved external symbol _tds_quote_id referenced in function _dbuse
dblib.lib(rpc.obj) : error LNK2019: unresolved external symbol _tds_alloc_param_data referenced in function _param_row_alloc
dblib.lib(rpc.obj) : error LNK2019: unresolved external symbol _tds_free_param_results referenced in function _param_info_alloc
dblib.lib(rpc.obj) : error LNK2019: unresolved external symbol _tds_set_param_type referenced in function _param_info_alloc
dblib.lib(rpc.obj) : error LNK2019: unresolved external symbol _tds_get_null_type referenced in function _param_info_alloc
dblib.lib(rpc.obj) : error LNK2019: unresolved external symbol _tds_alloc_param_result referenced in function _param_info_alloc
dblib.lib(rpc.obj) : error LNK2019: unresolved external symbol _tds_submit_rpc referenced in function _dbrpcsend
dblib.lib(dbutil.obj) : error LNK2019: unresolved external symbol _tds_set_version referenced in function __dblib_setTDS_version
Release_TS\php_dblib.dll : fatal error LNK1120: 57 unresolved externals
NMAKE : fatal error U1077: '"D:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.exe"' : return code '0x2'
Stop.
That means that you need to open Makefile in a text editor, find the line:
LIBS=kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_32.lib Dnsapi.lib  
And add library libTDS.lib:
LIBS=libTDS.lib kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_32.lib Dnsapi.lib 
Also, the library must be copied to a folder of your libs compiled. The library itself can be found in one of the folders where you copied dblib.lib.

Then again run nmake and finish compiling.

Effective Mootools usage tips | Cоветы эффективного использования Mootools

  • Never use the search by selector, beginning with the class:
    $$('.class some other selectors')
    The search results that will select all elements in the document, and then some of them will be filtered. If you add a name tag at the beginning, then the document will be selected only those elements, the name tag of the specified. Performance gains can be tens of times for large documents! Sample code:
    console.time("fast");
    console.log($$('div.tabmenu-icon').length);
    console.timeEnd("fast");
    
    console.time("slow");
    console.log($$('.tabmenu-icon').length);
    console.timeEnd("slow");
    
    console.time("all");
    console.log($$('*').length); // count all elements on page
    console.timeEnd("all");
    Output:
    164
    fast: 5ms
    164
    slow: 13ms
    3991
    all: 9ms