Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Sunday, September 12, 2010

Numbers Everyone Should Know

LADIS2009 keynote slides: http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf

Following numbers are excerpted from the above slides.

L1 cache reference  0.5 ns 
Branch mispredict  5 ns 
L2 cache reference  7 ns 
Mutex lock/unlock  25 ns 
Main memory reference  100 ns 
Compress 1K bytes with Zippy  3,000 ns 
Send 2K bytes over 1 Gbps network  20,000 ns 
Read 1 MB sequentially from memory  250,000 ns 
Round trip within same datacenter  500,000 ns 
Disk seek  10,000,000 ns 
Read 1 MB sequentially from disk  20,000,000 ns 

Sunday, February 21, 2010

Google Blogger/Blogspot line break conversion

Google Blogger/Blogspot new line conversion

Google blogger/blogspot provides an option to let users decide whether hard-returns in the post are converted to <br/>

Set it by clicking:
    Your blog admin page –> Settings -> Formatting -> Convert line breaks

Originally, I set it to "yes". Latter I decided to manually insert <br/> instead of using automatical hard-return conversion. So I set the option to "no". As a result, my previous posts were messed up because different lines were concatenated into a single line.

I used vim to convert those posts to new format.

Append <br/> to each line
    %s/$/<br\/>/g

Sometimes, you don't want to append new lines to block-level elements such as div, ol.
Use following vim commands:

    %s/\(<\/div>\s*\)\@<!$/<br\/>/g 
    %s/\(<\/ul>\s*\)\@<!$/<br\/>/g 
    %s/\(<\/ol>\s*\)\@<!$/<br\/>/g 
    %s/\(<\/dl>\s*\)\@<!$/<br\/>/g
    ......

Vim regular expression: http://vimdoc.sourceforge.net/htmldoc/pattern.html#pattern-overview

Another option is to write a script to download posts, adjust returns/newlines, and publish them.

Friday, March 14, 2008

Google Apps

I have heard of "Google Apps" for a long time, but I have not tried it. Recently, I am investigating some web2.0 applications including Google YouTube, CodeSearch... Gradually, I knew more about Google Apps. It is integration of various Google Applications including Gmail, doc&Spreadsheet, GTalk... The standard edition of Google Apps is free!! And premier edition is $50 which is much cheaper than Microsoft office. As a result, it may become first choice of small companies which don't want to spend lots of money to buy MS Office. By using Google Apps, users can build web site for their companies and make use of Google Doc, GTalk, Gmail and much more applications made by Google.
However, these two rivals are not counterparts. Google Apps aims to provide a way for businesses to build applications conveniently. The end users don't need to maintain any software and hardware to run the system. The infrastructure is provided and managed by Google. In addition, all applications in Google Apps are web-based which means collaboration and communication become light-weight. In other words, users don't need to install any client-side software. This is the largest advantage of Google Apps.
But, Google Apps is not as powerful as MS Office. For example, Google Doc&Spreadsheets provides just very basic editing functionality, which may not meet requirements of advanced users. If someday Google provide its own desktop tools like MS Office, future of Google Apps will be bright.
After all, it is a good thing because Google Apps is a new choice for users. And it may benefit small companies which own limited amount of money.