Blog

ICEfaces new components are copied from PrimeFaces!

WOW! I didn’t expected this from a supposed-to-be-professional company, today I’ve read this article about how the new component set from ICEfaces is almost completely copied from PrimeFaces 2 (so not even the latest version!):

http://blog.primefaces.org/?p=1692

Nice part of the story is that the CEO has published a forum post justifying that “that’s the open source way”:

http://www.icefaces.org/JForum/posts/list/20499.page

I don’t think it is, that’s not “enhancing”, that’s copying and just 1 sentence in the forum is not giving the appropriate importance to how much PrimeFaces code was “used” in producing the ICEfaces one.

ICEfaces CEO, Brian McKinney, writes:

As we started this endeavor we did invite the team from PrimeFaces to participate in the enhancement of the open source components they sourced. Regrettably they declined and we proceeded on our own.

Of course they declined, you are a competitor and you wanted not to contribute to their component but to use them! Their components is their company’s value (even if open source they created it).

Also he says:

Integrated so that they work seamlessly together. Enhanced to provide access to new features. Elevated to a grade of performance and quality required by enterprise… and finally re-introduced back into open source so that others are free to use them. Take it, enhance it, and give it back. Isn’t that what open source is all about?

Yes, so you double checked an old component library (version 2 now we are almost on 3.2) and even if we believe you did all this, do you think it is justified to delete the copyright from the source code files, change the package name, add something and repackage it?

At least I would have liked to know that, and in the latest newsletter I got from ICEfaces they didn’t mention it so it is not something “advertised”.

Btw who would use an old component set when the new one is there and it’s also open source?

R.I.P. ICEfaces

Demetrio

VOIP on Android with CSipSimple

Once again, Android confirms my beliefs about the platform. The level of integration that external apps can offer to users is in fact very high, especially if we compare it with what iOS has to offer in this aspect. This is one of the strongest features of Android and certainly one of them that convinced me to move on Android and leave my iPhone 4 at home.

I’ve an account with Eutelia, with a real number associated and I’ve just downloaded the VOIP client CSipSimple to manage it. It’s very easy to use (a lot of configurations, also the Eutelia one, are built-in) and it worked without any problem. What is very nice (beside the fact that the software is completely Open Source) is the integration that the app offers with the OS: I can make call by using my Eutelia account (for the demo I’ve set up multiple accounts) from the standard Phone app (so I don’t have to open the CSipSimple client to compose the number) and also receive calls without having to configure anything! Very nice..now some screenshot to clarify what I mean:


Multiple Eutelia accounts


Make calls from the standard Galaxy SII Phone app


Missed calls notifications


Answering a call is very nice as well

That’s it! Hope you like this tip!

Dem

Using s3fs

After installing it, using fuse is pretty simple.

First, create a bucket in your s3 AWS account (you can use the AWS MAnagement Console for that), after that you should follow the following steps:

  1. create the directory where to mount the drive: sudo mkdir -p /mnt/myS3Bucket
  2. mount it: s3fs bucketname -o accessKeyId=XXX -o secretAccessKey=YYY -o use_cache=/tmp -o allow_other /mnt/myS3Bucket

To un-mount it: umount /mnt/myS3Bucket

You can also store your password in a file:

  1. export AWS_ACCESS_KEY_ID=XXX
  2. export AWS_SECRET_ACCESS_KEY=YYY
  3. echo “$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY” > /etc/passwd-s3fs
  4. chmod 600 /etc/passwd-s3fs

And then mount it directly: s3fs bucketname -o use_cache=/tmp -o allow_other /mnt/myS3Bucket

Please notice that the 2 options I’ve used are (guess what!) not mandatory :P

Dem

Installing the latest version of s3fs (and fuse) in CentOS 5.5

 

Hello,

I was struggling trying to find a way to install the latest fuse version needed by s3fs. Yum hasn’t got the latest one in CentOS 5.5 so looking around in Google I’ve found a very nice and useful step-by-step how to, you can find it here bu I paste it as well to make it simpler:

1. yum remove fuse fuse* fuse-devel
2. yum install gcc libstdc++-devel gcc-c++ curl curl* curl-devel libxml2 libxml2* libxml2-devel openssl-devel mailcap
3. cd /usr/local/src
4. wget “https://downloads.sourceforge.net/project/fuse/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz?r=&ts=1299709935&use_mirror=cdnetworks-us-1″
5. tar -xzvf fuse-2.8.4.tar.gz
6. rm fuse-2.8.4.tar.gz
7. mv fuse-2.8.4 fuse
8. cd fuse/
9. ./configure –prefix=/usr
10. make
11. make install
12. export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
13. ldconfig
14. modprobe fuse
15. pkg-config –modversion fuse (confirm that 2.8.4 is the version displayed)
16. cd ../
17. wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz (get URL for latest version)
18. tar -xzvf s3fs-X.XX.tar.gz
19. rm s3fs-X.XX.tar.gz
20. mv s3fs-X.XX s3fs
21. cd s3fs
22. ./configure –prefix=/usr
23. make
24. make install

It worked wonderfully for me!

Now I can create and FTP user pointing to a s3fs mounted directory so to backup all my Plesk server data in an S3 bucket!

Dem

“All the electronic devices must be switched off”

I travel a lot, no only to attend work meetings but also to relax a bit while discovering a new place during the weekend.

I’m very used to the flight instruction for take off and landing, especially the fact the everyone must switch all the electronic devices off. Not that if you keep it on the flight will break or something, it’s just a precautions because some device (especially old ones) could interfere with the navigation system and create troubles (possibly dangerous if landing or taking off) to the plane.

In my experience I’ve seen a lot of people trying to call during take off or landing and, especially non-italians, don’t really care about this rule. The crew itself, in Ryan Air or EasyJet, doesn’t even keep an eye to see if someone is using the phone. I think it’s a very bad habit for travellers.

Not that italian respect the rule because they are used to, but if you travel with, i.e., Alitalia they will terrorise you about it repeating you the famous sentence more times and by checking (and again) for someone still listening to the music or trying to make a call.

Don’t really know if it’s worth to keep my phone off but this really annoy me when I see someone not respecting it.

Blog update!

I’m currently updating the design and structure of my blog/photography portfolio…have to find the time to finish! sorry for the mess!! :)

Dem

Remove all the .svn directories from a folder (and its sub-folders)

find dir -type d -name .svn -exec rm -rf {} ;

Where dir is the directory name of the project.

Configuring the APR (JBoss Web Native) connectors in Linux (or whatever) and JBoss AS 5.1

Hello,

quick post to summarise all the different information found on the web about this topic.

I assume you already downloaded and configured JBoss AS 5.1.

First step is to download the JBoss Web Native Connectors for the platform you are using. The current version is 2.0.9 and you can download it from the following link:

http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-9.html

Unzip the package and upload the native/ directory (you can find it inside the bin/ one) into the $JBOSS_HOME/bin directory, so now we will have the $JBOSS_HOME/bin/native directory containing the native libraries.

It should be enabled automatically but in the run.sh script a wrong path is set so we have to do a little change.

Open the file $JBOSS_HOME/bin/run.sh (aren’t you really running a Windows server, right? :) ) and find the following line:

JBOSS_NATIVE_DIR=”$JBOSS_HOME/bin/META-INF/lib/$JBOSS_NATIVE_SYS/$JBOSS_NATIVE_CPU”

You need to replace it with the following:

JBOSS_NATIVE_DIR=”$JBOSS_HOME/bin/native”

Done! Restart JBoss AS and you should see in the logs the following messages:

DEBUG [org.apache.catalina.core.AprLifecycleListener] (main) Loaded Apache Tomcat Native library 1.1.20.
INFO [org.apache.catalina.core.AprLifecycleListener] (main) APR capabilities: IPv6 [true], sendfile [true], random [true].

Hope this help!

Demetrio

QT tips: take screenshots and move the mouse around the screen (and simulate clicks)

Hello,
today I’m showing a couple of simple code tips that will save you a bit of research. I did it only for Mac OS X, but the screenshot should work on Linux as well. Will do the Linux version of the mouse move code when I’ll have more time.

In the meantime, while attaching the full QT Creator project here, I’ll write the most important code here.

The code to move the mouse is a composition of code found online plus some correction to make it works :)

Let’s start with the screenshot, in QT is quite simple:

QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());

After getting the pixmap it is possible to use a Label to show it (label->setPixmap(…) as you can see in the example).

About the mouse movement, if you want to move it inside the app you can still use QT:

QPoint point = QPoint(100, 200);
QCursor::setPos(point);

If you want to move it outside the application window we will have to use the Quartz event service library.

there are a lot of example using CGPostMouseEvent but as you can see it is deprecated so we should use the new API and that means CGEventCreateMouseEvent, CGEventSetType and CGEventPost in the following way:

void MainWindow::PostMouseEvent(CGMouseButton button, CGEventType type, const CGPoint point)
{
    // CGPostMouseEvent( CGPoint mouseCursorPosition,
    //                   boolean_t updateMouseCursorPosition,
    //                   CGButtonCount buttonCount,
    //                   boolean_t mouseButtonDown, ... )
    //
    // See CGRemoteOperation.h for more information.
    CGEventRef theEvent = CGEventCreateMouseEvent(NULL, type, point, button);
    CGEventSetType(theEvent, type);
    CGEventPost(kCGHIDEventTap, theEvent);
    CFRelease(theEvent);
}

So starting from this method, if we want to simulate a move movement and a left click we should run:

void MainWindow::LeftClick(const CGPoint point)
{
    PostMouseEvent(kCGMouseButtonLeft, kCGEventMouseMoved, point);
    PostMouseEvent(kCGMouseButtonLeft, kCGEventLeftMouseDown, point);
    PostMouseEvent(kCGMouseButtonLeft, kCGEventLeftMouseUp, point);
}

For the right click:

void MainWindow::RightClick(const CGPoint point)
{
    PostMouseEvent(kCGMouseButtonRight, kCGEventMouseMoved, point);
    PostMouseEvent(kCGMouseButtonRight, kCGEventRightMouseDown, point);
    PostMouseEvent(kCGMouseButtonRight, kCGEventRightMouseUp, point);
}

And for a double click we will also have to call CGEventSetIntegerValueField passing the number of clicks, after that we post 2 events (down and up) for each click:

void MainWindow::DoubleClick(const CGPoint point, int clickCount) {
    CGEventRef theEvent = CGEventCreateMouseEvent(NULL, kCGEventLeftMouseDown, point, kCGMouseButtonLeft);
    CGEventSetIntegerValueField(theEvent, kCGMouseEventClickState, clickCount);
    CGEventPost(kCGHIDEventTap, theEvent);
    CGEventSetType(theEvent, kCGEventLeftMouseUp);
    CGEventPost(kCGHIDEventTap, theEvent);
    CGEventSetType(theEvent, kCGEventLeftMouseDown);
    CGEventPost(kCGHIDEventTap, theEvent);
    CGEventSetType(theEvent, kCGEventLeftMouseUp);
    CGEventPost(kCGHIDEventTap, theEvent);
    CFRelease(theEvent);
}

Hope it’s useful…

Demetrio

Testing OpenNI on Mac OS X (using a Kinect device)

Just basic testing the latest unstable Mac OS X driver build, It’s still fun! :)

[youtube fLSMAYjrJ9A nolink]

Dem

Older Posts →
← No Newer Posts