Support Wikipedia

Friday, November 13, 2009

Google SideWiki : Path to Web 4.0?

Google has launched a new product called SideWiki which I think will revolutionize the web possibly paving path to Web 4.0?

Here is why?

I mean, Web 3.0 correlates data in a way that machines could retrieve anything and everything out there and Sidewiki ranks and retrieves them by tying the user interactions to the pages. Do I smell Web 4.0? (a funny depiction of web 4.0 is here)

May be this will pave path to the New Generation browsers being redesigned to capture user interactions as part of the built-in information fetch. Seriously, who needs textbooks? we could save alot of forests and this could also solve Global Warming!

This is graph that I stole from here in order to support my theory.



The graph depicts the web trends over time and data in the confines of Productivity of Keyword search. My take away from this is that the web is bound to become more intelligent and the only way it could do that is by leveraging the human interactions with the web. Sidewiki is exactly that. Let us see how this goes!

While you are at it, try the "Also post to" feature to post the same sidewiki on to your blog simultaneously. This is amazing!

BottomLine : I think this sidewiki concept combined with web 3.0 (i.e. Symantic Web) could possibly the future of web.

Friday, October 09, 2009

How to create ringtones for iPhone (m4r) for free

I wasted so much time and money on creating ringtones for my iPhone from iTunes. It's so frustrating to pay $0.99 for each ringtone that you create from the song that you already purchased. And the worst part is iTunes will not let you create ringtones from songs that you have already owned since forever. It only lets you create ringtones from the songs you bought in iTunes. This is a major problem I had with Apple. I mean, I have the best mobile in the whole world and I cannot create ringtones for it unless I buy the song again and pay $0.99 again to create a ringtone from it. To add to that, iTunes will only let you create a ringtone for 15 sec. Ideally, it's ok but what if I want it to be 20 secs. And you cannot cut and paste different sections of the song you love. It has to be a continuous segment of 15 seconds. That's lame so I decided to venture out and find a free solution. As always, there is an open source (FREE) alternative to this craziness. Once you go through the following steps, you will never pay a single penny to anyone for ringtones. It's quite simple really. Just follow the instructions and Enjoy!

The Software
1. Download Audacity -The best Open source Sound Editor (version 1.3.9 beta or greater) NOT THE STABLE VERSION i.e. 1.2.6 currently from the Site. Remember this does not work with 1.2.6 or older.
2. Install Lame MP3 encoder library (Needed to work with mp3 files) (Instructions here)
3. Install FFmpeg library(Needed to convert to m4r) (Instructions here). NOTE: I am guessing you need ffmpeg installed already on your Mac/PC to use this plugin. Google it!

The Actual Creation of Ringtone
4. Open a mp3 file you want to create ringtone from in the Audacity application.
5. Select the part you want and copy it.
6. Create a new file (Ctrl + N)
7. Paste the copied part onto the new file.
8. Export the new file as m4r by clicking (File -> Export)
9. Select the format "M4A (AAC) Files (FFmpeg)"
10. Save as "somefilename.m4r"

Now, import this ringtone into iTues (Ctrl +O). And Sync your iPhone to get the new ringtone. That's all there is to it. Hope you will find it easy. Let me know how it goes!

NOTE: If you wanna check out the ringtones I created, here are some :

1.Eye of the Tiger

2.Chris Brown - Forever Ringtone

3.Miley Cyrus - Party in the USA

4.Natasha Beddingfield - Pocketful of sunshine

5.Micheal Franti - Say Hey I Love You

6.Summer Overture

7.Venessa Carlton - Thousand Miles

All in one zip along with some more - Click Here

Tuesday, September 15, 2009

Wikiality: There are 1,332,970,000 AHs in the world. Seriously!







True Story : I was just curious how the population of the world was distributed on the planet and just searched wikipedia for "list of countries by population" and to my surprise this is what I saw on my iPhone.
According to Stephen Colbert, this has got to be true as it's a wikiality. So, it's official that there are 1,332,970,000 AHs in the world as of September 15, 2009.


Sorry, if that offended anyone but it's damn funny. See for yourself!

Wednesday, August 05, 2009

Glassfish : com.sun.enterprise.util.ASenvPropertyReader setSystemProperties SEVERE: property_reader.unknownHost java.net.UnknownHostException:

I was getting the following error after I installed Glassfish recently.

Aug 5, 2009 1:37:02 AM com.sun.enterprise.util.ASenvPropertyReader setSystemProperties
SEVERE: property_reader.unknownHost
java.net.UnknownHostException: test.corp: test.corp
at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
at com.sun.enterprise.util.net.NetUtils.getCanonicalHostName(NetUtils.java:89)
at com.sun.enterprise.util.ASenvPropertyReader.setSystemProperties(ASenvPropertyReader.java:188)
at com.sun.enterprise.cli.commands.S1ASCommand.(S1ASCommand.java:140)
at com.sun.enterprise.cli.commands.BaseLifeCycleCommand.(BaseLifeCycleCommand.java:86)
at com.sun.enterprise.cli.commands.StartDomainCommand.(StartDomainCommand.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.sun.enterprise.cli.framework.CommandFactory.createCommand(CommandFactory.java:76)
at com.sun.enterprise.cli.framework.CLIMain.invokeCommand(CLIMain.java:150)
at com.sun.enterprise.cli.framework.CLIMain.main(CLIMain.java:63)
Starting Domain domain1, please wait.
Log redirected to /home/testadmin/java/domains/domain1/logs/server.log.

Domain domain1 is ready to receive client requests. Additional services are being started in background.
java.net.UnknownHostException: test.corp: test.corp
CLI156 Could not start the domain domain1.



The Fix

sudo vim /etc/hosts
#add the following line in it. That's all
127.0.0.1 test.corp

Tuesday, June 30, 2009

CSS : Make a Button look like a link

I had to make a button look like a clickable link and here is the CSS I used.
 

.buttonLink{
color:black;
background:none;
text-decoration:underline;
text-shadow:brown;
font-variant:small-caps;
font-weight:bolder;
font-family:sans-serif;
padding:0px;
border-top: 0px solid #fff;
border-left: 0px solid #fff;
border-bottom: 0px solid #4799E6;
border-right: 0px solid #4799E6;
display: inherit;
width:auto;
text-align:center;
}


Usage :
<input id="exampleButton" name="exampleButton" value="Click Here" title="Click Here" class="sortLink" type="submit">

Monday, June 29, 2009

Richfaces & JSF 1.1 ERROR: ClassNotFoundException: javax.faces.component.ActionSource2

Environment:
Richfaces : 3.3.1
JSF : 1.1
WAS: 6.1

Caused by: java.lang.ClassNotFoundException: javax.faces.component.ActionSource2

This is caused if you are using richfaces 3 in JSF 1.1 environment.
Richfaces has a dependency on JSF 1.2 and cannot be used in JSF 1.1 environment.

Fix: Remove all web.xml changes you made for richfaces and remove any pom.xml dependencies.

Refer :
http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/TechnicalRequirements.html

Spring faces & JSF 1.1 : org.springframework.faces.ui.ProgressiveUICommand.getActionExpression()Ljavax/el/MethodExpression;

Caused by: java.lang.NoSuchMethodError: org.springframework.faces.ui.ProgressiveUICommand.getActionExpression()Ljavax/el/MethodExpression;

This is caused if you are using sf:commandLink tag in JSF 1.1 environment.
You should change the commandlink to h:commandlink (i.e. the core component) or t:commandLink (i.e. tomahawk component) and that should work.

SWF 2.0.7 & JSF 1.2 : java.lang.NoSuchMethodError: javax.faces.application.StateManager.saveView(Ljavax/faces/context/FacesContext;)Ljava/lang/Object;

If you get the below error, and you are using JSF 1.1 and SWF 2.0.7
java.lang.NoSuchMethodError: javax.faces.application.StateManager.saveView(Ljavax/faces/context/FacesContext;)Ljava/lang/Object;


Revert back to SWF 2.0.5 and that should fix it.

Its a bug in Spring Web Flow. SWF 2.0.7 makes some JSF 1.2 specific calls that are not supported by JSF 1.1 implementations. Hence the about error. Its supposed to be fixed in 2.0.8.

Refer to :
http://jira.springframework.org/browse/SWF-1112

For more details:
http://jira.springframework.org/browse/SWF-1096

faces-config error : Document is invalid: no grammar found. org.xml.sax.SAXParseException: Document is invalid: no grammar found.

Environment :
JSF 1.1
WAS 6.1


If you get the following error :
org.apache.commons.digester.Digester - Parse Error at line 2 column 14: Document is invalid: no grammar found. org.xml.sax.SAXParseException: Document is invalid: no grammar found.

Courtesy :
http://wiki.apache.org/myfaces/Websphere_Installation

If you have the faces-config.xml file like below :

Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

it must be replaced as follows:

Inc.//DTD JavaServer Faces Config 1.0//EN" "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">

That's all there is to it

Wednesday, March 11, 2009

Setting up SVN repository Hooks : POST-COMMIT

Recently, I tried to setup the svn hook for shooting out emails on a commit. I had to do alot of googling to really get it working. The SVN book doesnt detail the process nor does any blog/wiki/forum out there. May be - the SVN admins are already geeky enough to figure it out I guess.

Anyways, I am posting my experience here so that it might help someone out there who is a newbie to SVN administration. Here we go...



Setting SVN Hooks

1. Go to the repository hooks directory (on the svn box ofcourse)
* cd /var/svn/repoName/hooks
2. Rename the post-commit.tmpl to post-commit (you can find several hook template scripts in the hooks directory under each repository)
* cp post-commit.tmpl post-commit #copy the tmpl into a normal executable
* chmod +x post-commit #Make it executable
3. Download the commit-email.pl from :
* The SVN tools: http://subversion.tigris.org/tools_contrib.html#commit_email_pl
* OR
* wget -o commit-email.pl http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/commit-email.pl.in
#I chose perl script but you can choose ruby or write your own.

4. Install sendmail on the box (I have Centos so I use yum, if you are on Ubuntu then use aptitude)
1. yum search sendmail #do a search for the packages with sendmail
2. yum install sendmail.i386 sendmail-cf.i386 sendmail-doc.i386 #these were the packages for my Centos system. It may vary based on your OS.
3. chkconfig sendmail on #start sendmail on boot.
5. Edit /etc/mail/sendmail.mc and add the following line
* Ft/etc/mail/trusted-users
6. Edit /etc/mail/submit.mc and add the following line
* Ft/etc/mail/trusted-users
7. Generate the sendmail.cf file from sendmail.mc using the m4 command. The m4 usage is simple, you just specify the name of the macro file as the argument, in this case sendmail.mc, and redirect the output, which would normally go to the screen, to the sendmail.cf file with the ">" redirector symbol.
* m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
8. Generate the submit.cf file from submit.mc using the m4 command.
* m4 /etc/mail/submit.mc > /etc/mail/submit.cf
9. Restart sendmail to update the configuration
* service sendmail start #start sendmail now
10. Edit /etc/mail/trusted-users and add the following line (if the apache user is used by apache)
* apache
11. The apache user bydefault is blocked from loggin in or running scripts. So you have to edit the /etc/passwd and delete the /sbin/nologin at the end of the line and add your fav shell like this
* apache:x:48:48:Apache:/var/www:/bin/bash
12. Change the ownership of the following scripts so that they can be executed by apache user & group
* chown apache.apache /var/svn/repoName/hooks/post-commit
* chown apache.apache /var/svn/repoName/hooks/commit-email.pl
13. Edit commit-email.pl and add the following line
* var/svn/repoName/hooks/commit-email.pl "$REPOS" "$REV" -h yourhost.com --from svn@yourhost.com -l /var/svn/logs/mailLog.log -r devteam@yourhost.com --summary --diff n devteam@yourhost.com
14. This is it. You are set.


Resources:
Sendmail Reference
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch21_:_Configuring_Linux_Mail_Servers

Trusted-Users :
http://www.linuxquestions.org/questions/slackware-14/sendmail-trusted-user-617397/

Commit Email
http://subversion.tigris.org/tools_contrib.html#commit_email_pl
http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/commit-email.pl.in
Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia