Thứ Tư, 20 tháng 5, 2009

[Seminars] BKITSun Weekends : JavaFX + SunSPOT






BKITSun Weekends


Breaking Technologies












Session 1: JavaFX


Thứ 7 ngày 23/05/2009


THỜI GIAN: từ 09:00 đến 11:30


ĐỊA ĐIỂM: 302B2 Đại Học BK TpHCM



JavaFX Seminar Outline



*Objectives:


- Grab an overview of JavaFX technology


- Go through some simple demos and get the direction to develop your applications using Netbeans 6.5


*Contents:


Session 1: Introduction



- What is JavaFX?


- Why using JavaFX?


- What can be built with JavaFX?



Session 2: JavaFX SDK



- JavaFX SDK


- JavaFX code: old style vs new style



Session 3: Demos



Session 4: Resources – Q&A











Session 2: Lập trình Robot cho riêng bạn với SunSPOT


Chủ nhật ngày 24/05/2009


THỜI GIAN: từ 09:00 đến 11:30


ĐỊA ĐIỂM: 302B4 Đại Học BK TpHCM



SunSPOT Seminar Outline


*Objectives:


- Knowing about the architecture of SunSPOT and its features - Go through some simple demos and get the direction to develop your applications under SunSPOT platform


*Contents:Session 1: Introduction


- What is SunSPOT ? - SunSPOT devices and hardware - Squawk Java Virtual Machine


Session 2: Java on SunSPOT


- Build and deploy on Netbeans IDE - Some snippets of Java codes


Session 3: Demos


- SunSPOT LED Balls - SunSPOT Airtext (using Accelerometer sensor) - SunSPOT mouse emulator (using Accelerometer and Radio Communication) + demo with Games - Some video clips about applications developed by SunSPOT community


Session 4: Resources – Q&A


Project Sun SPOT http://www.sunspotworld.com/
David's Blog: http://blogs.sun.com/davidgs/
The Squawk Project http://research.sun.com/projects/squawk/



Tham gia buổi hội thảo các bạn sẽ có cơ hội nhận được các phần quà thú vị từ SUN MICROSYSTEMS.

Chủ Nhật, 17 tháng 5, 2009

GCC 4.3 : C++ language issues

Header dependency cleanup

As detailed here (Header dependency streamlining), many of the standard C++ library include files have been edited to only include the smallest possible number of additional files. As such, many C++ programs that used std::memcpy without including , or used std::auto_ptr without including will no longer compile.

Usually, this error is of the form:

error: 'strcmp' was not declared in this scope

Therefore, find out how to include suitable libaries at http://gcc.gnu.org/gcc-4.3/porting_to.html

Thứ Sáu, 15 tháng 5, 2009

What is a Rich Client Platform?

There are some confusion with the definition of Rich Client Platform. Below definition may satisfy yours.

"A Rich Client Application is basically a Desktop Application. A Desktop Application is an application in which most of the implementation is running on the user's local system. This is in contrast with a web application where most of the implementation is on a different system. A Rich Client Platform is a framework for developing Rich Client Applications. The framework provides commodity implementations like window management, menus, help systems, etc. so you, the developer, can focus on implementing the business logic."

Thứ Năm, 7 tháng 5, 2009

Sun Studio and OpenMP

Sun Studio natively support OpenMP.

Specify : Project Properties -> Build -> C Compiler -> Multithreading Level -> OpenMP.

Now, you can easily build and run OpenMPI program with Sun Studio ^_^

Sun Studio to build/run MPI programs

To build/run MPI programs is a little bit stricky and need much effort to complete.

Thank you Nik for his exhautive instruction regarding this issue in Sun Studio Forum ^_^

1)Create a collection tool to build a MPI project

Yes, it is also important to use MPI compilers to build MPI projects.
If you have "mpicc", "mpiCC" and "mpif90" in the same directory,
where "mpirun" is located, you can create a new "Tool Collection",
and use it to build MPI projects. Here is an example. I installed
MPI "Cluster Tools 8.1" in standard location: /opt/SUNWhpc/HPC8.1/sun
To use it from the Sun Studio IDE I created a new "Tool Collection":

- main menu Tools -> Options
this opens "Options" dialog

- select "C/C++", "Build Tools" tab

- press "Add ..." button (in the left bottom corner)
specify Tool Collection name, for example: MPISunStudioExpress

- set the fields:
Base Directory: /opt/SUNWhpc/HPC8.1/sun/bin
C Compiler: /opt/SUNWhpc/HPC8.1/sun/bin/mpicc
C++ Compiler: /opt/SUNWhpc/HPC8.1/sun/bin/mpiCC
Fortran Compiler: /opt/SUNWhpc/HPC8.1/sun/bin/mpif90
Make Command: /opt/SSX200903/SUNWspro/bin/dmake

- press "Ok" button

Now, select your MPI project, right click -> Properties
this opens "Project Properties" dialog
- select "Build" and change the "Tool Collection" - select "MPISunStudioExpress" from the list
- press "Ok" button

Now it should be able to build this project.
If you don't have "mpicc" and other necessary wrappers, you can download MPI "Cluster Tools 8.1"
from this page:
http://www.sun.com/software/products/clustertools/

2)Create script file to run a standard project

Yes, you are right, this is a hack (to use a shell script), and it may not work well in some cases.
First of all, I'm using a "Project with Existing Sources" - this type of projects gives more freedom.
Standard projects (like Sample projects) are not convenient (IMHO), because they use their own
makefiles, and it is hard to understand what is wrong is something goes wrong.
So, if you use a standard project, you can try to add this shell script to the project.
Here is an example:

1. Create a new shell script "mpirun.src.sh" in the same directory where your sources are.
You can do it in the IDE, or in terminal window:

echo '#!/bin/sh' >> mpirun.src.sh
echo 'mpirun -n 16 $*' >> mpirun.src.sh

2. Add these commands to the Makefile, so that it will build mpirun16.sh

# build build: .build-post                 pwd                 ls -l src                 cp mpirun.src.sh mpirun16.sh                 chmod 777 mpirun16.sh



3. Do "Clean and Build", make sure it was successful. It is possible that in your case
there is a "src" directory, so adjust the location of the source script accordingly.
(It is compulsory to fisnish this stage before commencing fourth stage)


4. As soon as the build is successful, specify this "mpirun16.sh" as Output for Linker in Project Properties (for standard project) or as Build Result (if you use a project with existing sources)

5. Insert the name of the executable in the list of arguments (in Project Properties. Run section).
Example:

dist/Debug/MPISunStudioExpress-Solaris-x86/mpi_prime_numbers_5 1 2

where "dist/.../mpi_prime_numbers_5" is the name of my executable, and "1 2" - its arguments.

I hope this solution is acceptable for you, though it looks very complicated :-)
The main problem with the existing projects is that one important field is missed in project properties: Command to Run. That's why we have to invent our own hacks to implement this feature.