This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Uploads a file displaying the progress" | |
def upload_progress(source, target) | |
upload(source, target, :via => :sftp) do |event, options, *others| | |
if event.to_s == "put" | |
print ("\r * " + (("#{others[1]}".to_f / "#{others[0].size}".to_f) * 100).round(2).to_s + "%").ljust(10, ' ') | |
elsif event.to_s == "close" | |
print "\r" | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jelies.hibernate.validation; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.TreeMap; | |
import org.apache.log4j.Logger; | |
import org.hibernate.HibernateException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jelies.spring3tomcat7.repository; | |
import org.hibernate.Criteria; | |
import org.hibernate.ScrollableResults; | |
import org.hibernate.StatelessSession; | |
import org.hibernate.Transaction; | |
import org.hibernate.criterion.Order; | |
import org.hibernate.criterion.Restrictions; | |
import org.joda.time.LocalDate; | |
import org.springframework.beans.factory.annotation.Autowired; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jelies.spring3tomcat7.config.quartz; | |
import org.quartz.spi.TriggerFiredBundle; | |
import org.springframework.beans.factory.config.AutowireCapableBeanFactory; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
import org.springframework.scheduling.quartz.SpringBeanJobFactory; | |
/** | |
* This JobFactory autowires automatically the created quartz bean with spring @Autowired dependencies. |