Total Pageviews

2010/01/14

Plugin Flex Formatter in your Flex Builder


1. Go to download zip file from http://sourceforge.net/projects/flexformatter/

2. As you unzip it, you can find out three jar files

3. Navigate to Flex Builder's folder, copy the three jar files into plugin folder. Before you do it, please close your Flex Builder first.




4. Restart your Flex Builder

5. You will have five new formating-related buttons in your Flex Builder

Formating result

Or just right-click your mouse, then you can see its menu.

2010/01/13

Insall Flex SDK on Mac

1. go to download Flex SDK: http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk
2. open terminal
3. Type in cd ~. Move to home directory
3. Type in sudo vi .bash_profile
4. Type in your root password

You might see a screen that looks like this

6. Type i for Insert

7. Hit Escape to stop editing
Type :wq (this will write the file and then quit) and hit enter

9. Close Terminal
10. Open up Terminal again
11. Type in echo $PATH to verify that the path has been saved.

12. type in mxmlc -help to verify

If you want to modify the path, just do this process again.
If you want to remove this path, just remove .bash_profile[rm .bash_profile]

Install debug version of flash player



If you do not install debug version of flash play, you will get this warning message in Flex Builder as you run debug mode


1. Go to http://www.adobe.com/support/flashplayer/downloads.html, choose suitable version to download

2. And install it, step by step





Finally, you can see the debug message in debug console

2009/12/19

How to change IBM WebSphere Business Modeler language settings

By default, the language used in the WebSphere® Business Modeler user interface and messages is determined by the locale setting on your computer.

If you have installed additional languages in your WebSphere Business Modeler package, you can change the WebSphere Business Modeler language by changing your computer locale setting.





If you want to change to English, you have to do these steps
1. Close WebSphere Business Modeler.

2. Navigate to the eclipse.ini file located in the WebSphere Business Modeler installation directory. For example, if you installed the files in your Program Files directory, the eclipse.ini file resides in the C:\Program Files\IBM\WBModeler61 directory.



3. Make a backup of the eclipse.ini file.

4. Open the eclipse.ini file in a text editor.


5. add the following line after -vmargs:
-Duser.language=en


6. Startup WebSphere Business Modeler.



2009/12/16

five technologies that will keep shaping the web in 2010

1. CSS3, HTML5 and Fonts as a Service
2. Ways we browse the web
3. Social media
4. JavaScript
5. Software as a Service (SaaS)

http://sixrevisions.com/web-development/five-technologies-that-will-keep-shaping-the-web-in-2010/

2009/12/14

VTD-XML: The Future of XML Processing

Check out this SlideShare Presentation:

2009/11/17

Eclipse Tips and Shortcuts

http://shawnkercher.com/2009/11/15/eclipse-tips-and-shortcuts/

Shortcuts

Most Common

Delete linectrl + d
Go to Methodctrl + o

Format Codectrl + shift + f
Last Editctrl + q
Line Numberctrl + l
Move line(s)alt + up/down
Open Resourcectrl + shift + r

Open Proj Propalt + enter
Open Typectrl + shift + t
Run Java Appalt + shift + x, j
Run JUnitalt + shift + x, t
Shortcut Listctrl + shift + l

Refactoring Tips

Extract Methodalt + shift + m
Extract Variablealt + shift + l
Renamealt + shift + r
Surroundalt + shift + z

Templates

Go to Windows->Preferences->Java->Editor->Templates

To Activate templates press ctrl + space after command

For loopfor
If statementif
Main Methodmain
System.out.println()sysout

System.err.println()syserr
While statementwhile

Custom Templates

  • Logger

    • private static final Logger logger = Logger.getLogger(${enclosing_type}.class);

2009/10/30

2009/10/23

nHibenrate Exception: Unable to locate appropriate constructor on class [Persistence.vo.CaseTypeReportBean, Persistence]

I'm using aggregate functions in my HQL, it looks like this



and the CaseTypeReportBean is as bellowing


But as I run this function, system report this error message: Unable to locate appropriate constructor on class [Persistence.vo.CaseTypeReportBean, Persistence] [select new CaseTypeReportBean(t1.caseType, count(t1)) from Persistence.vo.Cases t1 group by t1.caseType]


It results from the inappropriate data type for CaseTypeReportBean constructor



Hence, I modify the constructor just like this(from int to Int64), then it works now



Reference: https://www.hibernate.org/407.html#A22