- sudo rm -rf ~
/.local/share/Trash/*
Wednesday, January 14, 2009
How To Empty the Ubuntu Gnome Trash from the Command Line
Sunday, November 16, 2008
How to use USB in Sun xVM Virtualbox?
Step 1
- During installation of VB, it creates a group named as "vboxusers". Add yourself to the group.
Step 2
- Create a group named "usbusers" and put yourself in it.
Step 3
- Now uncomment the 4 lines below 'Magic to make /proc/bus/usb work' in mountdevsubfs.sh , they will be commented out by default) so it looks like the following:
sudo gedit /etc/init.d/mountdevsubfs.sh
#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb
Step 4
- Modify the rules in file “/etc/udev/rules.d/40-permissions.rules” for Gutsy, and “/etc/udev/rules.d/40-basic-permissions.rules” for Hardy:
From:
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"
To :
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usbusers", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"
Step 5
- add this line:
- to your /etc/fstab file. Make sure that the "120" is your vboxusers group (use your own number). To find out your number run command "cat /etc/group | grep vboxusers".
Saturday, October 4, 2008
Get paid to surf ads using bux.to
What makes it even more interesting is the fact that you can buy various referral packages that can enable you to jump start your earning capability. All the referrals come with a ‘replacement guarantee’.
There are several forums where bux.to users have shown proof of payment.
An example of potential earnings for 100 active referrals (based on averages):
- 100 referrals click 10 ads per day = $10.00
- Your daily earnings = $10.00
- Your weekly earnings = $70.00
- Your monthly earnings = $300.00
Well, if you can spare 10 minutes each day on bux.to you may earn money from it, as described above. It all depends on how many referrals you can bring into your network.
What do you think? Will such programs be successful in the long run? Can users really earn significant amount from such websites?
Calling All Web Masters and Affiliate Marketers

Get Paid for Every Impression - No Clicks Required: Pay-per-Play
Does ad sense work, the answer to that is yes it does, but just before you login into your adsense account to get your code, Think about how much sense it makes to share your revenue, from your website,
NetAudioAds™ Pay Per Play (PPP) is a new advertising channel that is set to take the web by storm. Because of the size and scope of this deal (which is backed by one of the BIG 5 search engines), Pay Per Play (PPP) advertising will become a world wide business media event.
PPP works on a bid management system similar to Google AdWords and will compensate publishers (website owners) just like Google AdSense but with one critical difference…
Publishers will earn revenue on 100% of their traffic with no clicks necessary!
Thursday, October 2, 2008
ClassNotFoundException on Tomcat startup: ConfigureListener missing ?
SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener.
The ConfigureListener is part of the jsf implementation you must include the jsf jars in to your webapp. It is not sufficient if the jars are in the classpath of your environment.
Checklist:
* Put jsf-api.jar and jsf-impl.jar in WEB-INF/lib of your webapp.
* Give read permissions to the jsf-api.jar and the jsf-impl.jar file.
javax.servlet.jsp.JspException: Argument Error: One or more parameters are null ?
After you narrowed the trouble down to component level, verify if the are any attributes that could possibly be null, or if there are any attributes missing that should be there.
Checklist:
* Verify if there are any attributes that could possibly be null.
* Verify if there are any attributes missing.
* Verify if you have missed to specify an "itemLabel" attribute for a
* If you use resource bundles for an attribute double-check its spelling, because this exception can *hide* a bundle spelling problem.
* Restart your web application in order to see if the problem persists.
ReferenceSyntaxException: how to use numbers as resource bundle message references?
Resource bundle contains entries like this:
134=Please enter your company name.
Jsf tag has the following:
outputText value="#{bundle.134}"
Error Message:
[com.sun.faces.taglib.html_basic.OutputTextTag] -
javax.faces.el.ReferenceSyntaxException: Encountered ".134" at line 5, column 8.
Was expecting one of: ...[long list of characters]
Solution:
You can't refer to number with the dot notation ".134", use the bracket notation instead:
JspException; Duplicate component id: '_id0:_id14', first used in tag: ?
javax.servlet.ServletException: javax.servlet.jsp.JspException: Duplicate component id: '_id0:_id14', first used in tag: 'com.sun.faces.taglib.html_basic.InputTextTag' org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)...
Analysis:
There are two components that have the same id while the JSF components are rendered. You won't necessarily find duplicate ids in your jsp source code, this problem arises very often due to the way JSP and JSF interact.
Checklist:
* If the duplicate id is one that you have created: check if there are duplicate components ids in your jsp source code, do not forget the included components.
* If you use the JSTL core tags, forEach, if, choose and when don't forget that the JavaServer Faces tags nested within these tags must have explicit identifiers. In this case you cannot rely on the generated ids.
* Check if you programmatically add components to the component tree without giving them explicit ids. If so you must give them explicit ids.
* Sometimes you only wrestle with this problem during development and it can be solved by creating a new session.
javax.faces.el.PropertyNotFoundException: Error testing property 'name' in bean of type null ?
If you declared something like
the value binding expression is valid if you can call:
employee.getUser().getName();
getUser() returns null in this case
Checklist:
* Declare the setters and getters for name _and_ user as public (public String getName()... public void setName(String name) etc.)
* Check if the faces-config.xml file is being deployed. This prevents the faces servlet from setting up the beans.
* Check for a typo in the faces-config.xml, where you declare the managed beans.
* Check if your class name is really "User" and not "UserBean" or similar. Even if the accessor methods are getUser() and setUser() there will probably be a cast exception internally.
javax.faces.FacesException: Can't instantiate class: 'com.example.InputPageBean' ?
Checklist:
* Check if your class file (not the ".java" file) is on the class path of your webapp. Your class file should be in webapp/WEB-INF/classes/com/example.
* Check for typos in the faces-config.xml file, verify the package and the class name
* Check the POJO default constructors if are properly implemented because there are cases you have overide it.
* Check for compiler errors
IllegalArgumentException:argument type mismatch
Error Message:
2005-01-18 14:34:18 StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.el.EvaluationException: java.lang.IllegalArgumentException: argument type mismatch at......
What you wanted to use is the value attribute, not the binding attribute.
Solution:
If you declare the "value" attribute you use "Value Binding" expressions. They are used to refer to properties in your bean.
Example: value="${userBean.userName}" refers to the username property in your userBean instance. Your userBean should have accessors methods for the "userName" property: setUserName(String name) and getUserName()
Declaring the "binding" attribute you use "Component Binding" expressions. With this attribute you refer to the entire component instance.
Example:assuming "result" refers to a UIInput component instance: binding="${userBean.result}" Then in your userBean, you would have:
private UIInput result;
public UIInput getResult() {
return result;
}
public void setResult(UIInput result) {
this.result = result);
}
Common errors in Java Server Faces (JSF)
Below are the list of common errors in JSF. Just click on it to read the details on how to deal with that kind of error.
- IllegalArgumentException:argument type mismatch
- javax.faces.FacesException: Can't instantiate class: 'com.example.InputPageBean' ?
- javax.faces.el.PropertyNotFoundException: Error testing property 'name' in bean of type null ?
- JspException; Duplicate component id: '_id0:_id14', first used in tag: ?
- ReferenceSyntaxException: how to use numbers as resource bundle message references?
- javax.servlet.jsp.JspException: Argument Error: One or more parameters are null ?
- ClassNotFoundException on Tomcat startup: ConfigureListener missing ?
Monday, September 15, 2008
How to add a sitemap to your blogger blog?
1.Visit Google Webmaster Tools and sign up to a free account. If you have a Gmail email address, you can sign in with that.
2.Once signed into Webmaster tools, choose to add a website & submit your blog URL. Google will find it & invite you to verify your site.
3.Click on verify, and choose to validate by uploading a Meta tag. (You cannot use the other method with Blogger) Copy & paste this Meta Tag to Notepad or similar.
4.In a new window/tab visit your Blogger Dashboard, and click on ‘Template’, then ‘Edit HTML’.
5.BEFORE doing anything else, choose ‘Download Full Template’ and save it to your hard-drive. If anything goes wrong (It won’t), you can simply upload this saved template to put your blog back the way it was before you started.
6.Look at the HTML in the edit window. Approximately 6 lines down you will see the ‘HEAD’ tag (shown in red below). Copy the Meta Tag (shown in pink) from Notepad and paste it directly next to the ‘HEAD’ tag as shown. Save the changes. View your blog, there should be no visible difference.
7.Switch back to Google Webmaster Tools, click the button for Google to check your verification - this should take a few seconds and then will confirm it is verified, or if not, whether it’s your fault or Google’s. Sometimes Google doesn’t work first time - try again or leave a few hours, it will get done.
8.Now you have to tell Google the location of the Sitemap. First choose ‘General Web Sitemap’ for the type. The location for Blogger blogs is the same as your Atom news feed, and will be in the format of : http://YOURBLOGNAME.blogspot.com/atom.xml
9.Click submit & you’re finished.
Easy right? Google will index your site over the next few days, and this will ensure that your post titles are searchable by Google that much faster than without.
