2006/11/28

[HTML] favicon 使用

Site icon
<link rel="icon" type="image/ico" href="favicon.ico" /> (*.ico)
<link rel="icon" type="image/gif" href="icon.gif" /> (*.gif)

WebPage shortcut
<link rel="shortcut icon" href="http://domain/favicon.ico" />

WebPage bookmark
<link rel="bookmark icon" href="http://domain/favicon.ico" />

2006/11/05

[Linux] Fix opening RealPlayer from menu

In Firefox register rtsp portocol:
about:config

Create a new name:
network.protocol-andler.external.rtsp
value set to 'true'

network.protocol-handler.app.rtsp
value set to the location of your realplayer (e.g. /usr/bin/realplay)

Install realplayer:
sudo apt-get install realplayer

If you cannot open RealPlayer from the start menu, it is conflicted with Scim.

To fix the problem:
Modify the file: /usr/bin/realplay

Find:
#!/bin/sh

after ADD:
GTK_IM_MODULE=xim ; export GTK_IM_MODULE

2006/01/13

[JavaScript] Quick cheatsheet

comments:
// comments
/* comments */

keywords:
break, do, if, switch, typeof, case, else, in, this , var, catch, false, instanceof, throw, void, continue, finally, new, true, while, default, for, null, try, with, delete, function, return

reserved words:
abstract, enum, int, short, boolean, export, interface, static, byte, extends, long, super, char, final, native, synchronized, class, float, package, throws, const, goto, private, transient, debugger, implements, protected, volatile, double, import, public

variables:
var variableName = assignedValue;

objects:
var o = new Object();
o.x = 1; o.y=2;
o["x"]=1; o["y"]=2;

arrays:
var a = new Array();
var a = new Array(10);
var a = new Array(1,2,3,4,5);
var a = [1,2,3,4,5];

functions:
function abc() {
// methods
}

JavaScript in HTML:
<script language="javascript">
//code
</script>

<script language="javascript" type="text/javascript" src="source.js"></script>

Event handlers:
<tag onclick="alert('Hello');">

2006/01/05

[Mac] ShortCut for Screenshot

Useful shortcut for capturing screenshots on a Mac

Apple + shift + 3 => Full Screen
Apple + shift + 4 => Selected Area
Apple + shift + 4 + space => Selected Window

2006/01/04

[Mac] C++ Programming

Do C++ Programming in a Mac machine

Here is a simple code (Hello World): Save file as test.cpp

#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!\n\n";
return 0;
}


Compile:
(make output file named test.out)
g++ test.cpp -o test.out

Excute output:
./test.out

2006/01/03

[Mac] Remote Windows Desktop

Remote Desktop Connection Client for Mac
from Microsoft
This is a remote desktop client for mac user.

Connect Steps:
  1. Download the client software from the link above.
  2. Make sure Windows remote control access is allowed.
  3. (My Computer->Properties->Remote->check "Allow users to connect remotely to this computer"->OK)
  4. Open Remote Desktop Connection -> type remote IP address
  5. Enter Windows access username and password
  6. Control Remote Windows!