Showing posts with label Web Technology. Show all posts
Showing posts with label Web Technology. Show all posts

08 May 2011

CSS Font-Size: em vs. px vs. pt vs. percent

Posted from Diigo. The rest of my favorite links are here.

Very well explained comparison and example use of px, pt, em, percent units used in CSS web design. The conclusion is that a combination of em and percent is best suitable for web documents today. You should put that into practice.

06 May 2011

Google App Engine Blobstore API experience

I have been building a small website in the past few days using Google App Engine. During this small project, the most intriguing part is hacking Blobstore API. Luckily, I conquered it again and found a few things:

  1. To create your own blob in blobstore, you'd better follow this example
  2. If you follow that example exactly, you will create a blob without filename. To set the filename when creating a blob, I found this discussion; the original google api document isn't very helpful on that. To get more insights about that API, check the source code here.

04 May 2011

What is an "application/octet-stream" MIME attachment

A MIME attachment with the content type "application/octet-stream" is a binary file. Typically, it will be an application or a document that must be opened in an application, such as a spreadsheet or word processor.

No matter what kind of file it is, an application/octet-stream attachment is rarely viewable in an email, Usenet, or web client.

In addition to the generic application/octet-stream content type, you may also encounter attachments that have different subtypes (e.g., application/postscript, application/x-macbinary, and application-msword). They are similar to application/octet-stream, but apply to specific kinds of files.

22 March 2011

INET6: 理解Open ID

INET6: 理解Open ID: "Open ID簡而言之,就是在瀏覽到某個網站時,不用在這個網站先註冊帳號, 只要透過OpenID機制用自己現成的Yahoo、Google等大網站的帳號登入, 就可以開始使用這個網站所提供的個人化服務。而且自己Yahoo、Google等帳號的密碼也不會透露給這個網站知道。讓使用者可..."

14 February 2011

14 November 2010

Symbian OS: one of the most successful failures in tech history

Guest post: Symbian OS: one of the most successful failures in tech history

An article about Symbian OS. Interesting to look back at some tech history and think about what we have now.

04 November 2010

Defeat Firefox popup blocker

What a hack!

Today I was exploring a hack to web browser. The goal of the hack is simple: to open up an infinite number of popup windows. All I did is a simple javascript with a few functions that cause endless recursion. The only tricky part is what 'name' should be given to the window to be open and avoiding using a timing event to give chance for popup blocker to defend.

The result is my firefox browser opened an countless number of windows and crashed eventually. Also, I ran the same script with Chrome browser; chrome couldn't defend this attack either. After this little experiment, I just realized how vulnerable our web browser is and how dangerous the WEB could be.

27 October 2010

Yet another web development framework - web.py

Posted from Diigo. The rest of my favorite links are here.

Web.py lets you write web apps in python while Django lets you write web apps in Django.

26 October 2010

JavaScript - Popups

Posted from Diigo. The rest of my favorite links are here.

The link above shows you a step-by-step procedure of creating popup windows (not tabs!) using only Javascript.

22 October 2010

jQuery effects

Hide, Show, Toggle, Slide, Fade, and Animate. WOW! With all these, you already can create quite an interactive web pages! Amazing jQuery!

http://www.w3schools.com/jquery/jquery_effects.asp

Okay, enough of jQuery lessons for today!

jQuery selector concept

In HTML DOM terms:

Selectors allow you to manipulate DOM elements as a group or as a single node.

jQuery Element Selectors

jQuery uses CSS selectors to select HTML elements.


$("p") selects all elements.
$("p.intro") selects all elements with class="intro".
$("p#demo") selects the first element with id="demo".


jQuery Attribute Selectors

jQuery uses XPath expressions to select elements with given attributes.


$("[href]") select all elements with an href attribute.


$("[href='#']") select all elements with an href value equal to "#".


$("[href!='#']") select all elements with an href attribute NOT equal to "#".


$("[href$='.jpg']") select all elements with an href attribute that ends with ".jpg".

jQuery syntax for selecting HTML elements

The jQuery syntax is tailor made for selecting HTML elements and perform some action on the element(s).

Basic syntax is: $(selector).action()

  • dollar sign to define jQuery
  • (selector) to "query (or find)" HTML elements
  • jQuery action() to be performed on the element(s)

Examples:

$(this).hide() - hides current element

$("p").hide() - hides all paragraphs

$("p.test").hide() - hides all paragraphs with class="test"

$("#test").hide() - hides the element with id="test"


P.S. jQuery uses a combination of XPath and CSS selector syntax.

20 October 2010

CSS selectors

Posted from Diigo. The rest of my favorite links are here.

Best CSS reference is from W3C!

29 August 2010

LAMP server stack installed

Today I installed full stack LAMP package and have them properly configured on my laptop. This server is only for my own development server and not for public use :)

LAMP rocks! Everything on my laptop now is opensource solution! I might try Drupal next and bundle it with my LAMP!

Here is howto:

https://help.ubuntu.com/community/ApacheMySQLPHP

19 August 2010

Javascript Animation Tutorial

I made my first Javascript animation today! So cool ...

Anyway, here is a tutorial on basic concepts about javascript animation:

http://tinyurl.com/2l2cj2

04 August 2010

A project idea

On the subway back home today, I suddenly came up with an idea about making a web shell. I googled this idea after I got home and found that some people already had that exact project deployed. However I still think this idea is fun and might be a future standard for the upcoming WebOS.

Everybody has creativity, but to realize your idea and sell it to the world is another thing.

05 June 2010

Bookmark service from Diigo

http://www.diigo.com/
Use Diigo so that you don't need to use Google Chrome bookmark or Google Bookmark. Diigo is more powerful and easy to use.

02 June 2010

Django template language

Basic reference for template language. This is the first template language I've every used and learned. I hope that I can master it so that I can accelerate my web development processes.