How to fetch total record count using Hibernate Criteria




Criteria criteria = getSession().createCriteria(getReferenceClass());

criteria.setProjection(Projections.projectionList().add(Projections.countDistinct("id"))

Twitter had enough...

Changing mysql password

I was getting below error when I run jUnit tests:


WARN 2010-02-15 13:39:25.602 org.hibernate.util.JDBCExceptionReporter.logExceptions() 
        SQL Error: 0, SQLState: null 
ERROR 2010-02-15 13:39:25.627 org.hibernate.util.JDBCExceptionReporter.logExceptions() 
        Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) 
WARN 2010-02-15 13:39:25.629 org.hibernate.cfg.SettingsFactory.buildSettings() 
        Could not obtain connection metadata 
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

Solution:

I needed to change mysql server password using command line:

mysqladmin -u root -p'oldpassword' password newpass

"Google Buzz", social networking

Google, which has faltered in its attempts to break into the booming social networking business, is making another bid to counter the growing influence of Silicon Valley rival Facebook and San Francisco upstart Twitter with new products that make it easier to share with friends on its Internet e-mail service Gmail.

The Internet giant held a press conference at its Mountain View, Calif., headquarters Tuesday to show off "Buzz," which incorporates social media tools such as photo and video sharing and status updates in Gmail. Google Buzz, which launches Tuesday, will also be accessible on mobile phones. And Google will eventually also debut a version of Buzz for businesses.

Google co-founder Sergey Brin, vice president of product management Bradley Horowitz, vice president of engineering Vic Gundotra, and product manager Todd Jackson were on hand to show it off. The tagline for Google Buzz is "a Google approach to sharing."

Buzz is perhaps Google's boldest effort yet to get social. The new service has five features, Jackson said. You will automatically follow the people you e-mail and chat with on a regular basis. You will be able to share content from around the Web, including YouTube videos, Flickr photos, site links and others. You will be able to share your thoughts in a public way and in a private way. You will get social updates in your inbox. And Google will help you find only the stuff that matters by recommending popular content. The mobile version of Buzz can figure out where you are and show you nearby buzz posts.

"Google has long said their goal is to organize the world's information. With the introduction of Buzz, you can see the company recognizes how social has become a 'Google scale' problem that needs improved discovery and real relevancy," said technology blogger Louis Gray. "People are sharing their content in a wide variety of social sites online, and Buzz is the first product from Google that looks to harness this data in one place and provide a platform for discussion."

Last month, Google introduced a new feature that displays search results related to their friends and other members of their social networks. Google has been trying for years to gain a foothold in social networking as its smaller, more nimble competitors steal some of its thunder. Orkut, its social networking service, gained a mass following in Brazil and nowhere else. Attempts to buy its way into the arena also failed, when Google acquiring -- then ultimately scrapped -- the services offered by Twitter competitor Jaiku and Foursquare forebearer Dodgeball.

Analysts remain skeptical that this effort will catapult Google into the social stratosphere. Meanwhile, Facebook has exploded in popularity. It has become such a central part of many people's lives that it's replacing e-mail. That's exactly what Facebook founder Mark Zuckerberg is looking to do: turn his site into the starting point and focal point of the Internet experience. Facebook's strategy of connecting the world's people, versus Google's strategy of organizing the world's information, seems to be resonating. So now Google says it's going to organize the world's social information.

The Silicon Valley showdown is heating up. Google is still the Web's No. 1 most-visited site, with 173 million U.S. visitors in December, according to ComScore Media Metrix. But Facebook is gaining. Facebook was the fourth-most visited site in December, with 111.8 million visitors.

-- Jessica Guynn

read more: 

http://latimesblogs.latimes.com/technology/2010/02/google-facebook-social-networking.html

iPad Revolution?

Those who know me know that I have been a strong convert to the world of Mac. Over the past two years, I have had a personal Mac overhaul for all of my tech needs (except my phone, which I recently purchased the DROID and have enjoyed it thoroughly). So, when it came time for the fabled Apple tablet, I was extremely excited about the next piece of Mac-ness that I was going to be enjoying. But I was a little disappointed in the iPad initially. Where was the wow? Where was the pizazz? I was troubled.

But since that fabled day, I have picked up the pieces of my shattered dreams and started to reevaluate all of the potential that exists with the iPad. I initially fell into the trap of looking at this new piece of technology from the definitions of "nerd-dom". What I failed to see was this product from the point of view of the person who uses their computer to check email, browse the internet, look at photos, and that is it.

Here is an article and an essay that I thought were very interesting in seeing what could be the iPad revolution:

http://www.macworld.com/article/146040/2010/02/ipad.html
http://northtemple.com/2010/02/01/on-ipads-grandmas-and-gam

Let me know what you think!

Chicago Android Google conference and eco hackathon

Saturday Feb. 6, 2010,
hurry up we are closing the registrations!

http://chigtug6.eventbrite.com/