Friday, October 30, 2009

Fix Nvidia card resolution problem in Ubuntu (works in 9.10 too)

Sometimes the nvidia x server fails to recognize all the resolution combinations. This is how you fix it: 

Add Option "ModeValidation" "AllowNon60HzDFPModes, NoVertRefreshCheck, NoEdidMaxPClkCheck, NoHorizSyncCheck"

Under device section in the xorg.conf in /etc/X11/xorg.conf

Source: http://ubuntuforums.org/showthread.php?t=444960

Tuesday, October 20, 2009

JSTL taglib declaration reminder

Watch out for what specific JSTL version you're taglib-ing in your JSP's
If you put <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> and perform a basic <c:forEach> (you know... with attributes "var" for indexing and "items" for specifying the collection to loop) you might get a dumb error like this:

org.apache.jasper.JasperException: /index.jsp(65,0) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1174)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:821)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1736)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:183)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
WTF ? you can't do a <c:forEach> without an "items" ... I've googled around and found out that you must include an updated JSTL version in your taglib i.e. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> for it to work. Reason for this error is version incompatibility between JSP, Servlet and JSTL. Matching versions are listed below.
  • JSP 1.2 , Servlet 2.3 , JSTL 1.0
  • JSP 2.0 , Servlet 2.4 , JSTL 1.1

"Un taran la Bucuresti tot taran cauta" - Marin Preda

Sunday, October 18, 2009

Groovy & Grails for Java

Some cool and easy tutorials of Groovy and Grails written in Eclipse IDE
Groovy tutorial: http://www.vogella.de/articles/Groovy/article.html
Grails tutorial: http://www.vogella.de/articles/Grails/article.html

have fun

Friday, October 9, 2009

Disable Your PC Speaker in Ubuntu

You know that annoying, shrill beep that comes not from your speakers, but rather inside the depths of your computer called a system beep? I hate it, but Ubuntu likes to use it when, for example, I'm searching for text in Firefox and I get to the point where the text doesn't match anything. In Windows, this invokes a fairly annoying noise. In Ubuntu, it's the system beep, which is even worse. Here's how to disable it:

Stop it for now by doing the following:

sudo modprobe -r pcspkr

Stop it forever by blacklisting the module.  Edit /etc/modprobe.d/blacklist and add this line:

blacklist pcspkr


That's it



Thursday, October 8, 2009

Ubuntu screen resolution problem

It happens from time to time that ubuntu doesn't recognize multiple screen resolutions in my Nvidia x server settings so i'm stuck with 1024x768 (excuuuse me for wanting more from my Nvidia 9800 card). This problem suddenly appears and disappears randomly after a certain number of reboots. A solution i found is to use the following command and then reboot (you will have to reconfigure the Nvidia x server again using "sudo nvidia-xconfig"
sudo dpkg-reconfigure xserver-xorg