if you ever want to see the actual SQL that any hibernate call makes you can add the following line to your log4j file
log4j.logger.org.hibernate.SQL=DEBUG, console
This notebook is a collection of code snippets and technical "how to" instructions.
Search This Blog
Naming a for loop in java
by: Phil
for(int i = 0; i<10; i++)
{
loopName: for(Organization org: organizations)
{
if(org.getId() .equals( new Long("5")))
break loopName;
}
//do other stuff
}
http://www.informit.com/library/content.aspx?b=STY_Java2_24hours&seqNum=96
{
loopName: for(Organization org: organizations)
{
if(org.getId() .equals( new Long("5")))
break loopName;
}
//do other stuff
}
http://www.informit.com/library/content.aspx?b=STY_Java2_24hours&seqNum=96
MYSQL: Restoring DB from .sql backup
by: Zainab Aziz
To restore a mysql database from Unix shell
mysql -u my_user_name -p db_name < my_sql_file.sql
mysql -u my_user_name -p db_name < my_sql_file.sql
IE CSS
by: Brandon Wong
internet explorer can only handle 32 css files, with each file < 288 kb.
http://acidmartin.wordpress.com/2008/11/25/the-32-external-css-files-limitation-of-internet-explorer-and-more/
http://joshua.perina.com/africa/gambia/fajara/post/2008/1/25/internet-explorer-css-file-size-limit
http://acidmartin.wordpress.com/2008/11/25/the-32-external-css-files-limitation-of-internet-explorer-and-more/
http://joshua.perina.com/africa/gambia/fajara/post/2008/1/25/internet-explorer-css-file-size-limit
NoSuchBeanDefinitionException
by: Zainab Aziz
It is common to get similar error:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'photoUserTag' is defined
The solution is:
Verify that bean name matches with the bean definition.
Location by IP address
by: Uki D. Lucas
http://www.find-ip-address.org/
Location by Zip code
by: Uki D. Lucas
http://www.phpfever.com/soap-zip-code-web-service.html
How to show or hide hidden files in macOS Finder?
by: Zainab AzizYou can show hidden files by pressing together SHIF + COMMAND + "."
- Open Terminal
- Execute
- defaults write com.apple.finder AppleShowAllFiles TRUE
- killall Finder
To hide hidden files in your Mac that start with ".fileName":
- Open Terminal
- Execute:
- defaults write com.apple.finder AppleShowAllFiles FALSE
- killall Finder
RSS Syntax
by: Brandon Wong
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title> <!---Channel Title---> </title>
<link> <!---Channel's Link---> </link>
<description> <!---Brief Description---> </description>
<item>
<title> <!---Item Title 1---> </title>
<link> <!---Item Link 1---> </link>
<description> <!---Brief Description 1---> </description>
</item>
<item>
<title> <!---Item Title 2---> </title>
<link> <!---Item Link 2---> </link>
<description> <!---Brief Description 2---> </description>
</item>
</channel>
</rss>
<rss version="2.0">
<channel>
<title> <!---Channel Title---> </title>
<link> <!---Channel's Link---> </link>
<description> <!---Brief Description---> </description>
<item>
<title> <!---Item Title 1---> </title>
<link> <!---Item Link 1---> </link>
<description> <!---Brief Description 1---> </description>
</item>
<item>
<title> <!---Item Title 2---> </title>
<link> <!---Item Link 2---> </link>
<description> <!---Brief Description 2---> </description>
</item>
</channel>
</rss>
SQL: joint statment on 3 different tables
by: Zainab Azizselect distinct u.email from user u join season_roster sr on u.id=sr.user_id join team t on t.id=sr.team_id where t.league_id in (3, 13) and u.email like '%@%' and u.email not like '%test.com';
Subscribe to:
Posts (Atom)