Wednesday, September 30, 2009

Useful apps for web design and development

Some list that I grabs from the source listed below

Mind Mapping
XMind http://www.xmind.net/ (Thanks to @David_Shen for introducing this .. much nicer than Freemind! I use this for meeting notes, to-do lists and jotting down ideas)

Color Palette
ColorSuckr http://colorsuckr.com/
Color Palette Generator http://www.degraeve.com/color-palette/

On Screen Rulers
JR Screen Ruler http://www.spadixbd.com/freetools/jruler.htm
Pixus http://code.google.com/p/pixus/

Screen Capture
MWSnap http://www.mirekw.com/winfreeware/mwsnap.html

Hard Core Editing (i.e. know your markup)
Notepad++ http://notepad-plus.sourceforge.net/uk/site.htm

Firefox Addons
Web Developer Toolbar https://addons.mozilla.org/en-US/firefox/addon/60
Screengrab! https://addons.mozilla.org/en-US/firefox/addon/1146
User Agent Switcher https://addons.mozilla.org/en-US/firefox/addon/59
Firebug https://addons.mozilla.org/en-US/firefox/addon/1843
Pagespeed http://code.google.com/speed/page-speed/

FTP
Filezilla http://filezilla-project.org/
Fireftp http://fireftp.mozdev.org/

IE Tools
IE 6 and 7 Internet Explorer Toolbar http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en
IE 8 has built-in developer toolbar

IDE
Eclipse http://www.eclipse.org/
Adobe Dreamweaver CS4 (it really does its job well, have tried hard to replace it without much success)

Wireframes/Design
Adobe Fireworks CS4 (started using Fireworks since Macromedia days and its my favorite program when a mock or design is needed)
Balsamiq http://www.balsamiq.com/ (Just started using this recently to improve my pen n paper process and its working out nicely)

Great reading for design/dev ideas
Web Resources Depot http://www.webresourcesdepot.com/
Smashing Magazine http://www.smashingmagazine.com/

source:http://www.on9systems.com/2009/10/01/useful-applications-to-make-life-easier-in-web-design-and-development/

Resource Access Protocol

Mutual Exclusion: to reserve data consistency, shared resources must be accessed in mutual exclusion

Priority inversion: high priority task is blocked by low priority task for unbounded interval of time

Resource Access Protocol:
  1. non preemptive protocol - NPP
  2. highest locker priority - HLP
  3. priority inheritance protocol - PIP
  4. priority ceiling protocol - PCP

NPP
  • Pcs = max{P1...Pn}
  • when a task enters CS, its priority increased at the max value
  • problem: high priority task that do not use the same cs can't preempt it

HLP
  • Pcs = max{Pk | Tk usese CS}
  • a task in a cs gets the highest priority among the tasks that use it
  • problem: t1 have a condition test that may enter cs that uses by t2, t2 will get t1 priority when enter cs and block t1 even t1 may not be using the cs

PIP
  • Pcs = max{Pk | Tk blocked on CS}
  • a task in a CS increases its priority only if it blocks other tasks
  • a task in a CS inherits the highest priority among those tasks it blocks
  • Blocking : a delay caused by a lower priority task
  • Direct blocking : a task blocks on a locked resource
  • Push through blocking : a task blocks because a lower priority task inherited a higher priority
  • Ti can be blocked at most once by each of such resources
  • Ti can be blocked at most for the duration of min(n,m) critical sections
  • advantage: transparent, bounds priority inversion
  • problem: does not avoid deadlocks and chained blocking
  • chain blocking: Ti can be blocked at most once by each lower priority task
PCP
  • PIP+ access test
  • a task can enter a CS only if its is free and there is no risk of chained blocking
  • a task may stop at the entrance of a free CS
  • C(rk) = max{pj:Tj uses rk}
  • a task tj can enter a CS only if
  • Pi > max{C(rk): rk locked by tasks != Ti}
  • advantage: blocking reduced to one CS, prevent deadlocks
  • problems: not transparent to programmer, resource need ceilings

source : lecture notes

Tuesday, September 29, 2009

人生

人生吧,
0歲出場,
10歲快樂成長;
20為情彷徨;
30基本定向;
40拼命打闖;
50回頭望望;
60告老還鄉;
70搓搓麻將;
80曬曬太陽;
90躺在床上;
100掛在牆上..

生的偉大,死得淒涼!
能牽手的時候,請別只是肩並肩,
能擁抱的時候,請別只是手牽手,
能在一起的時候,請別輕易分開!
當大部分人都在關注你飛得高不高時,
只有少部分人關心你飛得累不累--
這就是友情,再忙也要照顧好自己,
朋友雖不常聯繫卻一直惦念!

source: from an email forwarded by a friend...

Things related to VPN

setting vpn server in xp

connecting vpn in xp

setting up vpn server in win 7

connecting vpn in ubuntu

Sunday, September 27, 2009

Disassembly in ubuntu

Disassembly in ubuntu,

solution: use dissy
sudo apt-get install dissy

eg:
gcc -0 hello hello.c
dissy hello

Friday, September 25, 2009

scenario: ubuntu 9.04, FF, amule

(1.) Launch Firefox.

(2.) Then, insert about:config in the address bar. Right click on the list, select New, then Boolean; insert network.protocol-handler.external.ed2k as Preference Name and true as Value.

(3.) Now another right click, select New and String; insert network.protocol-handler.app.ed2k as Preference Name and /usr/bin/ed2k (or path to where the file is installed on you system) as Value.

(4.) Restart Firefox.

Compiling Kernel Module in Ubuntu 9.04

scenario: compiling module
  1. ubuntu 9.04
  2. kernel 2.6.28-15-generic
sample code:
#include
#include /* Needed by all modules */
#include /* Needed for KERN_INFO */
#include /* Needed for the macros */

static int __init hello_start(void)
{
printk(KERN_INFO "Loading hello module...\n");
printk(KERN_INFO "Hello world\n");
return 0;
}

static void __exit hello_end(void)
{
printk(KERN_INFO "Goodbye Mr.\n");
}

module_init(hello_start);
module_exit(hello_end);

instruction guide:
sudo apt-get install linux-headers-`uname -r`
vi hello.c
copy the code into it
vi Makefile
insert
obj-m := nothing.o
in the command line type
make -C /lib/modules/`uname -r`/build M=`pwd` modules



Wednesday, September 23, 2009

Transfer file through ssh

Scenario: having a server and a client. need to transfer file between these two host
server name: remote_server
client: my_client

to transfer file from server to client
open local terminal:
scp user@remote_server:myfile ~/mydir

send a local file, a.file
me@remote-server.com:~$ sendfile localfile remotefile


Ubuntu Internet Sharing Connection

Scenario: having multiple client, one switch and one eeepc that can connect to the internet through wireless connection.

At Host (the eeepc):
sudo gedit /etc/network/interfaces

copy these
auto eth0
iface eth0 inet static
address 10.8.16.1
netmask 255.255.255.0
broadcast 10.8.16.0
network 10.8.16.0

gsku gedit /etc/sysctl.conf
net.ipv4.conf.default.forwarding=1
sudo apt-get install dhcp3-server
gksu gedit /etc/dhcp3/dhcpd.conf

copy these:
ddns-update-style none;
option domain-name "mynetwork";
option domain-name-servers Nameserver1, Nameserver2;
option routers 10.8.16.1;

default-lease-time 42300;
max-lease-time 84600;
authoritative;

log-facility local7;

subnet 10.8.16.0 netmask 255.255.255.0 {
range 10.8.16.50 10.8.16.150;
}

Nameserver can be found from "cat /etc/resolv.conf"
gksu gedit /etc/default/dhcp3-server
INTERFACES="eth0"

enable ip packet forwarding:
gksu gedit /etc/rc.local
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --table nat -A POSTROUTING -o ra0 -j MASQUERADE

Saturday, September 12, 2009

A Post that Reflects What Software Developer Face

The title is "if architects had to work like software developers", by Neil Middleton.

The article is fun to read but in the mean time feel sad for software developers.

Wednesday, September 9, 2009

A man of character: Benjamin Franklin

13 Virtues
  1. Temperance. Eat not to dulness. Drink not to elevation.
  2. Silence. Speak not but what may benefit others or yourself. Avoid trifling conversation.
  3. Order. Let all your Things have their Places. Let each part of your Business have its Time.
  4. Resolution. Resolve to perform what you ought. Perform without fail what you resolve.
  5. Frugality. Make no Expense but to do good to others or yourself: i.e., Waste nothing.
  6. Industry. Lose no time. Be always empoly'd in something useful. Cut off all unnecessary Actions.
  7. Sincerity. Use no hurtful deceit. Think innocently and justly, and, if you speak; speak accordingly.
  8. Justice. Wrong none, by doing injuries or omitting the Benefits that are your Duty.
  9. Moderation. Avoid Extremes. Forbear resenting Injuries so much as you think they deserve.
  10. Cleanliness. Tolerate no Uncleanness in Body, Cloaths, or Habitation.
  11. Tranquility. Be not disturbed at Trifles, or at Accidents common or unavoidable.
  12. Chastity. Rarely use Venery but for Health or Offspring, never to Dulness, Weakness, or the Injury of your own or another's Peace or Reputation.
  13. Humility. Imitate Jesus and Socrates.
source: Paul Darin & Sharon Kilarski (Jul 17, 2008), Epoch Times

Recovering photos

PhotoRec

Taken from the site description:
PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from Hard Disks and CDRom and lost pictures (thus, its 'Photo Recovery' name) from digital camera memory. PhotoRec ignores the filesystem and goes after the underlying data, so it will still work even if your media's filesystem has been severely damaged or re-formatted.




Why Linux Isn't Real Time

5 Main points on why Linux isn't real time by Doug Abbott
  • "Coarse-grained Synchronization" - kernel system calls are not preemtible
  • Paging - The process of swapping pages in and out of virtual memory is, unbounded
  • "Fairness" in scheduling - multi-user time-sharing sstem
  • Request Reordering - Linux reorders I/O request from multiple processes to make more efficient use of hardware.
  • "Batching" - Linux will bach operations to make more efficient use of resources.

source: Doug Abbott (2003), Linux for Embedded and Real-time Applications, Newnes