Category Archives: 工作

記錄工作時候,有關的東西

MySql status shell script

ref.: http://www.linuxquestions.org/questions/linux-newbie-8/shell-script-to-check-whether-mysql-server-is-running-or-not-721940/ #!/bin/sh if [[ -z `service mysqld status | grep running ` ]] then echo 0 else echo 1 fi

IIS Log auto archive

http://stackoverflow.com/questions/29496/automated-script-to-zip-iis-logs + Task scheduler

Hibernate lazy init collection

Using Hibernate.Initialize may experience an issue, the session is not yet initialize. Ref: http://blog.9mmedia.com/?p=272 Add these before that SessionFactory sf = ((HibernateEntityManagerFactory)entityManagerFactory).getSessionFactory(); Session session = SessionFactoryUtils.getSession(sf, false); SessionImpl source = (SessionImpl) session;   I was using EntityManagerFactory from JPATemplate instead for PersistantCollection check here SessionImplementor sessioni = (SessionImplementor) sessionf.openSession(); Session s = (Session) sessioni; for(Object coleccion:… Read More »

SQL replication articales

Basic + Push and pull http://blog.slalom.com/2011/01/19/sql-server-replication-push-vs-pull-what-is-the-difference/ Multiple publisher replication + center subscriber http://www.sql-server-performance.com/2005/multiple-publishers-replication/ MSDN: Snapshot replication http://technet.microsoft.com/en-us/library/ms151832.aspx  

MySQL utf8 setup reference

Auto generate Alter table SQL: http://serverfault.com/questions/65043/alter-charset-and-collation-in-all-columns-in-all-tables-in-mysql MySQL doc in Alter table SQL http://dev.mysql.com/doc/refman/5.1/en/alter-table.html Step By Step from latin to utf8 conversion (中文) http://www.dk101.com/Discuz/viewthread.php?tid=161541 mysqldump conversion (linux) http://blogs.law.harvard.edu/djcp/2010/01/convert-mysql-database-from-latin1-to-utf8-the-right-way/

Jquery animation custom easing function

Check this link – http://stackoverflow.com/questions/5207301/looking-for-jquery-easing-functions-without-using-a-plugin Jquery UI sample http://jqueryui.com/demos/effect/easing.html Explanation on parameter http://stackoverflow.com/questions/5916058/jquery-easing-function