Wednesday, December 14, 2011

netbeans|XML Schema Editor in NetBeans IDE 7.0.1

XML Schema Editor in NetBeans IDE 7.0.1


XML Schema Editor in NetBeans IDE 7.0.1

Do you need a visual XML schema editor in NetBeans IDE 7.0.1? Here's how:

  1. Go to Tools | Plugins in NetBeans IDE 7.0.1. In the Settings tab, register this update center:

    http://deadlock.netbeans.org/hudson/job/xml/lastSuccessfulBuild/artifact/build/updates/updates.xml

  2. Now go to the Available Plugins tab and search for XML Tools. Install that plugin.

  3. And now you have a pretty cool XML schema editor. Go to the New File dialog and pick an XML schema file:

    You'll see a multiview editor with visual support for editing XML schema files:

Note, however, that the XML schema editor is part of the archived SOA Tools, so you can't file issues against this tool, since there is no longer support for it. Still, it seems to work fine, at least, on first trying it, so give it a try.

References:

http://netbeans.org/bugzilla/show_bug.cgi?id=184379#c23

http://wiki.netbeans.org/NetBeansArchivedFeatures


Source: http://blogs.oracle.com/geertjan/entry/xml_schema_editor_in_netbeans

Saturday, March 5, 2011

BSD|解决ntfs-3g挂载的分区无法显示中文文件的办法

安装了openSUSE10.3后,发现原来保存在NTFS分区上的一些文件不见了,还以为升级的过程中丢失了呢。因为是在10.2版本上根据官方网站进行的ntfs-3g安装,可以读写NTFS分区,当时感觉很好用,没想到升级后对中文支持出现了问题。并且在NTFS分区上新建文件或者文件夹都报错误: “一般错误”,开始没有理解什么是一般错误,后来考虑了一下觉得应该是中文字符的问题,因为在10.3版本上新建的文件夹或文件都是用的中文名字(如果安装选择的中文的话),导致创建不了,然后搜索了一下中文文件无法显示的问题,有很多资料。

This means that your operating system (OS) doesn't have the correct language specific settings (locale, LANG variable, LC_ALL, etc) thus some filenames can't be converted to your language and won't be visible. The reason can be:
The locale setting wasn't configured during installation.
Not the correct locale was configured.
The configured value doesn't exist on the system.
The OS configures the setting in a too late stage during the boot process, only after the NTFS volume was already mounted.
The most common explanation is the latter one. This is why unmounting then mounting such volumes after boot often makes all filenames visible.

其实主要是最后一个原因:ntfs模块加载的时候系统区域配置还没有起作用,导致无法辨别中文字符。解决办法也提供了,其实就是在fstab文件中mount的时候添加“locale=zh_CN.UTF-8”就可以了。

修改后,重启,所有的文件都出现了,并且可以正常创建文件和文件夹。

Monday, January 17, 2011

Mule|error when using java64bit

Starting Mule...
/home/togaprod/apps/mule-standalone-3.0.0/lib/boot/exec/wrapper-linux-x86-64: 1: Syntax error: "(" unexpected

The solution is to rename wrapper-linux-x86-32 to sth else, eg wrapper-linux-x86-32___, so that it will allow mule to continue to load x86_64 wrapper

Wednesday, January 5, 2011

cron job in ubuntu

stephen@hosta:~$ cat /etc/cron.d/cronjoba
* * * * * usera /bin/bash /home/usera/scripa.sh
>/dev/null 2>>/home/usera/logs/error.log

In ubuntu, this is recommended way of using cron job rather than using crontab

Monday, January 3, 2011

source code control|Install git using Macports

Install git using Macports

001.#
002.# Git setup and configuration on Mac
003.# adapted from: http://arthurkoziel.com/2008/05/02/git-configuration/
004.#
005.
006.# first install macports if you don't have it installed
007.#
008.# http://guide.macports.org/#installing.macports
009.
010.# make sure your local ports tree is up-to-date
011.
012.sudo port selfupdate
013.
014.# find out what version of git is available
015.
016.port search git-core
017.
018.# list the port variants available for git
019.
020.port variants git-core
021.
022.# install git and add the variants git-svn and git bash completion scripts
023.
024.sudo port install git-core +svn+bash_completion
025.
026.# you can add "+doc+gitweb" to get the html form of the documentation
027.# and the web application that will serve git
028.
029.# Install bash completion:
030.
031.cp /opt/local/etc/bash_completion.d/git ~/.git-bash-completion.sh
032.echo "[ -f ~/.git-bash-completion.sh ] && . ~/.git-bash-completion.sh" >> ~/.profile
033.. ~/.profile
034.
035.# If you've already installed git using ports and want to know if there
036.# is a newer version of git available
037.
038.sudo port selfupdate
039.port outdated git-core
040.
041.# Installing a newer version of git
042.# The old version is de-activated but will stay installed so it is
043.# easy to deactivate the newer version and activate the older version
044.# if that proves necessary.
045.
046.sudo update git-core +svn+bash_completion
047.
048.# Git configuration
049.
050.# List of configuration variables:
051.
052.git config --help
053.
054.# list your current global git config properties
055.
056.git config --global -l
057.
058.# Global ignore file:
059.
060.echo ".DS_Store" >> ~/.gitignore
061.git config --global core.excludesfile ~/.gitignore
062.
063.# SVN-like shortcuts for often used commands:
064.
065.git config --global alias.st status
066.git config --global alias.ci commit
067.git config --global alias.co checkout
068.git config --global alias.br branch
069.
070.# Information about the author/commiter:
071.
072.git config --global user.name "Your Name Comes Here"
073.git config --global user.email you@yourdomain.example.com
074.
075.# If you want git to send patches via mail from git:
076.
077.git config --global sendemail.smtpserver smtp.my-isp.com
078.
079.# Colorized output:
080.
081.git config --global color.branch auto
082.git config --global color.diff auto
083.git config --global color.interactive auto
084.git config --global color.status auto
085.
086.# TextMate as the default editor:
087.
088.git config --global core.editor "mate -w"
089.
090.# Opendiff (FileMerge) to resolve merge conflicts:
091.
092.git config --global merge.tool opendiff
093.
094.# Change the font in gitk:
095.# Open ~/.gitk and add:
096.
097.set mainfont {Monaco 12}
098.set textfont {Monaco 12}
099.set uifont {Monaco 12}