Friday, June 26, 2009
Tuesday, June 23, 2009
JavaScripts-Examples
{SCRIPT LANGUAGE="JavaScript">
var counter = 0
var timerID
function startCounter() {
document.forms[0].display.value = ++counter;
if(document.forms[0].display.value >= 100){
haltCounter();
}
else{
timerID = setTimeout("startCounter()", 10);
}
}
function haltCounter() {
document.forms[0].display.value = "Time due! ";
clearTimeout(timerID);
counter = 0;
}
{!-- document.onstop = haltCounter; -->
{/SCRIPT>
{/HEAD>
{BODY>
{H1>onStop Event Handler{/H1>
{HR>
{P>Click the browser’s Stop button (in IE) to stop the script counter.{/P>
{FORM>
{P>{INPUT TYPE="text", NAME="display">{/P>
{INPUT TYPE="button", VALUE="Start Counter", onClick="startCounter()">
{INPUT TYPE="button", VALUE="Halt Counter", onClick="haltCounter()">
{/FORM>
{/BODY>
{/HTML>
Saturday, May 2, 2009
Alias in Linux
---------------------------------
QuentinFedoraHome updated @ 20-NOV-2010 SAT 07:09Am
-------------------------------------------------------
[q.yang@QuentinFedoraHome ~]$ alias
alias cp='cp -pi'
alias egrepin='egrep -i -n'
alias fd='find . -name'
alias l.='ls -d .* --color=tty'
alias la='ls -all --color=tty'
alias lax='ls -all -X'
alias lct='ls -all -ct'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias lt='ll -t'
alias lx='ls -X'
alias mda7='mount /dev/hda7 /mnt/hda7 && ls /mnt/hda7 '
alias mda8='mount /dev/hda8 /mnt/hda8 && ls /mnt/hda8 '
alias mda9='mount /dev/hda9 /mnt/hda9 && ls /mnt/hda9 '
alias mv='mv -i'
alias rm='rm -i'
alias sshuni='ssh quentin@thiazi.snrc.uow.edu.au'
alias svnstart='svnserve -d'
alias tardel='tar --delete --file='
alias tartvf='tar -tvf '
alias uda7='umount /mnt/hda7 && echo "successfully unmounted hda7" '
alias uda8='umount /mnt/hda8 && echo "successfully unmounted hda8" '
alias uda9='umount /mnt/hda9 && echo "successfully unmounted hda9" '
alias vi='vim'
alias webstart='/opt/apache/bin/apachectl start'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
CREATE YOUR OWN COMMAND WITH ALIAS
---------------------------------------------------
edit file /home/user/.bashrc
Added the short command name for your easy word typing.
[q.yang@QuentinFedoraHome ~]$ vi ./.bashrc# .bashrc
# Source global definitionsif [ -f /etc/bashrc ]; then . /etc/bashrcfi
# User specific aliases and functions
alias mda8='mount /dev/hda8 /mnt/hda8 && ls /mnt/hda8 'alias uda8='umount /mnt/hda8 && echo "successfully unmounted hda8" '
alias mda7='mount /dev/hda7 /mnt/hda7 && ls /mnt/hda7 'alias uda7='umount /mnt/hda7 && echo "successfully unmounted hda7" '
alias mda9='mount /dev/hda9 /mnt/hda9 && ls /mnt/hda9 'alias uda9='umount /mnt/hda9 && echo "successfully unmounted hda9" '
alias sshuni='ssh quentin@thiazi.snrc.uow.edu.au'
alias l.='ls -d .* --color=tty'alias la='ls -all --color=tty'alias lct='ls -all -ct'alias lt='ll -t'alias lax='ls -all -X'alias lx='ls -X'
alias fd='find . -name'
alias mv='mv -i'alias cp='cp -pi'alias rm='rm -i'
alias vi='vim'
alias tardel='tar --delete --file='alias tartvf='tar -tvf '#egrep, ignore case, print line numberalias egrepin='egrep -i -n'
alias stsvn='svnserve -d'
Check Out Repository using Tortoise SVN
Monday, April 6, 2009
Install and Uninstall Programs in Fedora
rpm -ivh xxxxxx.rpm
1. 以.gz结尾的为压缩文件,用命令:gzip -d filename来解压,得到的文件在当前目录中,但已没有了.gz。
2、以.tar结尾的为归档文件,用命令:tar -xvf filename来展开,生成的文件与源文件在同一目录中,只是少了.tar。
3、以.tar.gz结尾的文件最常见,可直接用命令:gzip -cd filename | tar xfv -来安装
[q.yang@QuentinFedora12 Download]$ gunzip install_flash_player_10_linux.tar.gz
[q.yang@QuentinFedora12 Download]$ ll
total 11700
-rw-rw-r--. 1 q.yang q.yang 11960320 2010-09-25 06:06 install_flash_player_10_linux.tar
[q.yang@QuentinFedora12 Download]$ tar -xvf install_flash_player_10_linux.tar
libflashplayer.so
[q.yang@QuentinFedora12 Download]$ ll
total 23372
-rw-rw-r--. 1 q.yang q.yang 11960320 2010-09-25 06:06 install_flash_player_10_linux.tar
-rwxrwxr-x. 1 q.yang q.yang 11951040 2010-09-15 10:41 libflashplayer.so
# yum install gnash-plugin
# mozilla-plugin-config
Monday, February 16, 2009
Files shared among SVN repositories or projects.
+---COM
| +---Include
| +---IncludeShare
| +---Sources
|
\---DAQ
+---Include
+---IncludeShare (appear after update project from repository)
+---Sources
2. Choose properties for DAQ project in SVN right click menu
3. Click 'ADD' Button and select 'svn:externals' in the drop down list of 'property name'.
4. type text in the edit box
'IncludeShare https://JUPITER:8443/svn/CableTracker/trunk/Firmware/COM/IncludeShare'
5. click 'OK' to close all pop up windows.
6. Update project 'DAQ' using SVN menu, then you will see '\IncludeShare' appeared under DAQ project.
7. Check the SVN revision of \DAQ\IncludeShare, you will see that it's pointing to COM project.
Details, you can refer to tortoise help:
5.2.4. Referenced Projects
Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different locations in a repository, or perhaps from different repositories altogether. If you want every user to have the same layout, you can define the svn:externals properties.
Let's say you check out a working copy of /project1 to D:\dev\project1. Select the folder D:\dev\project1, right click and choose Windows Menu ¡ú Properties from the context menu. The Properties Dialog comes up. Then go to the Subversion tab. There, you can set properties. Select the svn:externals property from the combobox and write in the edit box the repository url in the format name url or if you want to specify a particular revision, name -rREV url You can add multiple external projects, 1 per line. Note that URLs must be properly escaped or they will not work properly. For example you must replace each space with %20. Note that it is not possible to use foldernames with spaces in them. Suppose that you have set these properties on D:\dev\project1:
sounds http://sounds.red-bean.com/repos
quick_graphs http://graphics.red-bean.com/repos/fast%20graphics
skins/toolkit -r21 http://svn.red-bean.com/repos/skin-maker
Now click Set and commit your changes. When you (or any other user) update your working copy, Subversion will create a subfolder D:\dev\project1\sounds and checkout the sounds project, another subfolder D:\dev\project1\quick graphs containing the graphics project, and finally a nested subfolder D:\dev\project1\skins\toolkit containing revision 21 of the skin-maker project.
If the external project is in the same repository, any changes you make there there will be included in the commit list when you commit your main project.
If the external project is in a different repository, any changes you make to the external project will be notified when you commit the main project, but you have to commit those external changes separately.
Note that if you change the URL in an svn:externals property, then next time you update your working copy Subversion will delete the old external folder and make a fresh checkout, so you will see files being Added, rather than being Updated as you might have expected. This situation might occur if you reference a tag from another project. When a new version of that project is released, you change your external reference to point to the new tag.
Thursday, January 22, 2009
教你新建别人进不了删不掉的文件夹
教你新建别人进不了删不掉的文件夹
第二步:在命令行窗口中切换到想要建立文件夹的硬盘分区,如D盘,输入:d: 程序开发,操作系统,服务器,源码下载,Linux,Unix,BSD,PHP,Apach,asp,下载,源码,黑客,安全,技术社区,技术论坛:K,i5m1d4v#D,s!U
第三步:输入md 123..\ 回车,注意文件夹名后有2个小数点
