Monday, November 28, 2005

Transfer Java Program to Cell Phone via Bluetooth

PC way:
1) Drag/drop .jar and .jad files onto Obex Object Push Motorola using the provided Windows Bluetooth software.

Mac way (I think you need OS X 10.2 or higher):
1) Do a google on Blueservice. It is freeware. Basically, once downloaded copy the Blueservice.service file into the Services folder under Library (create Services folder if it does not exist.)
2)Log out of Mac OS. Log back in.
3) Now just select the .jar file for the game go under the Finder menu > Services > Send File to Bluetooth Device...
4) You may have to choose Obex Object Push (something similar) from the right column choices that appear in the Bluetooth File Exchange program. If so, I believe you only have to do this once. Afterwards, it just "knows."
5) All done! Your phone should detect and just accept the incoming transfer. Follow phone displays directions.

UxTheme.dll 破解版

UxTheme.dll 就是XP系统主题支持的核心文件,也就是它让XP无法使用第三方主题。如果你不想安装 StyleXP,那么你可以通过破解 UxTheme.dll 文件来达到目的。实际上, UxTheme.dll 破解版就是推出 StyleXP 的 TGT Soft 在爱好者的强烈要求下放出来的,Microsoft 好像也默认了这种行为,呵呵,真是难得。使用 UxTheme.dll 破解版之后,无需任何其他的软件你就可以在XP的显示属性中管理和调用第三方的主题和风格。



下载 UxTheme.dll 破解版之后,先将 X:\Windows\System32\UxTheme.dll 重命名,例如改成 UxTheme.dll.bak ,然后将破解版的复制过来,重新启动即可。注意,这里还牵涉到 Windows XP 的系统文件保护,请参见下面的内容。



目前有更为方便的修改 Uxtheme.dll 文件的方法,那就是直接使用 UXTheme Multi-Patcher ,它相当于一个补丁程序,会自动根据系统版本修改 Uxtheme.dll 文件,这对那些没什么动手经验的朋友来说是最简单不过的了。



下载:UXTheme Multi-Patcher Neowin Edition v4.0 441KB,可用于任何版本的XP。


Wednesday, November 16, 2005

Free Online Bookmark Manager

  • MyBookmarks is a free Internet service that allows you to keep your browser bookmarks and favorites online so you can access them from anywhere.
  • Spurl.net is a free on-line bookmarking service and search engine. It allows you to store and quickly access again all the interesting pages you find on the web from any Internet connected computer.

Tuesday, November 15, 2005

JSEclipse

JSEclipse is a freeware Javascript plug-in for the Eclipse environment. Designed to help web developers edit JavaScript files with ease, it has built in support for:
  • Code completion for JavaScript function and classes.
  • Code completion for JavaDoc.
  • Function and class names are displayed in the Outline panel for the currently open file.
  • Open declaration
  • Error reporting
  • Warning reporting
  • Code wrap

Monday, November 14, 2005

小软件有大用途

Tuesday, November 08, 2005

Turn off Windows XP's built-in support for ZIP files

regsvr32/u zipfldr.dll

Monday, November 07, 2005

Javascript Popup Menu

<html>
<head>

<style type="text/css">

#popitmenu{
position: absolute;
background-color: white;
border:1px solid black;
font: normal 12px Verdana;
line-height: 18px;
z-index: 100;
visibility: hidden;
}

#popitmenu a{
text-decoration: none;
padding-left: 6px;
color: black;
display: block;
}

#popitmenu a:hover{ /*hover background color*/
background-color: #CCFF9D;
}

</style>

<script type="text/javascript">

/***********************************************
* Pop-it menu- ? Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var defaultMenuWidth="150px" //set default menu width.

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]='<a href="http://dynamicdrive.com">Dynamic Drive</a>'
linkset[0]+='<hr>' //Optional Separator
linkset[0]+='<a href="http://www.javascriptkit.com">JavaScript Kit</a>'
linkset[0]+='<a href="http://www.codingforums.com">Coding Forums</a>'
linkset[0]+='<a href="http://www.cssdrive.com">CSS Drive</a>'
linkset[0]+='<a href="http://freewarejava.com">Freewarejava</a>'

linkset[1]='<a href="http://msnbc.com">MSNBC</a>'
linkset[1]+='<a href="http://cnn.com">CNN</a>'
linkset[1]+='<a href="http://news.bbc.co.uk">BBC News</a>'
linkset[1]+='<a href="http://www.washingtonpost.com">Washington Post</a>'

////No need to edit beyond here

var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById)
return
clearhidemenu()
menuobj=ie5? document.all.popitmenu : document.getElementById("popitmenu")
menuobj.innerHTML=which
menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuobj.contentwidth=menuobj.offsetWidth
menuobj.contentheight=menuobj.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
else
menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
menuobj.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.style.visibility="hidden"
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

if (ie5||ns6)
document.onclick=hidemenu

</script>

</head>
<body>
<a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Webmaster Links</a><br>
<a href="#" onMouseover="showmenu(event,linkset[1], '180px')" onMouseout="delayhidemenu()">News sites</a>
</body>
</html>

Copied from http://www.dynamicdrive.com/dynamicindex1/popit.htm

Wednesday, November 02, 2005

Run Windows XP console utilities from command line























































Computer Management compmgmt.msc
Disk Managment diskmgmt.msc
Device Manager devmgmt.msc
Disk Defrag dfrg.msc
Event Viewer eventvwr.msc
Shared Folders fsmgmt.msc
Group Policies gpedit.msc
Local Users and Groups lusrmgr.msc
Performance Monitor perfmon.msc
Resultant Set of Policies rsop.msc
Local Security Settings secpol.msc
Services services.msc
Component Services comexp.msc

Tuesday, November 01, 2005

run a command-line OR execute a system command in java

import java.io.*;

class Cli{
public static void main(String Argv[]) {
try {
String ls_str;

Process ls_proc = Runtime.getRuntime().exec("ls -l");

// get its output (your input) stream

DataInputStream ls_in = new DataInputStream(
ls_proc.getInputStream());

try {
while ((ls_str = ls_in.readLine()) != null) {
System.out.println(ls_str);
}
} catch (IOException e) {
System.exit(0);
}
} catch (IOException e1) {
System.err.println(e1);
System.exit(1);
}

System.exit(0);
}
}