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
$('html, body').animate({ | |
scrollTop: $('#groupSpan'+id).offset().top | |
}, -100); |
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
//Add click event | |
$('#firstTimeHandoutLink').live('click', function() { | |
openHandout(); | |
}); |
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
HTTPServletResponse.SC_OK | |
.findById(params.goalInfoId, [sort: "date", order: "desc"]) |
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
WHERE DATE BETWEEN '09/16/2010 05:00:00' and '09/21/2010 09:00:00' | |
Convert SQL Server timestamp into date | |
CONVERT(char(10), Dateadd(second, (createStamp/1000), '01/01/1970'), 101) as Created |
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
calendar cal = new GregorianCalendar(TimeZone.getTimeZone("EST5EDT")); | |
String birthDate = (String)report.get("birthDateDay") + " " + (String)report.get("birthDateMonth") + " " + (String)report.get("birthDateYear"); | |
SimpleDateFormat sdf = new SimpleDateFormat("dd MM yyyy"); | |
ageVal = new Date().getTime() - sdf.parse(birthDate).getTime(); | |
ageVal /= 31536000000l; // covert milliseconds to years | |
Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("EST5EDT")); | |
SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy"); | |
sdf.setCalendar(cal); | |
cal.setTime(date); |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Module> | |
<ModulePrefs title="RTS Labs on Twitter" /> | |
<Content type="html"> | |
<![CDATA[ | |
<a class="twitter-timeline" href="https://twitter.com/rtslabs" data-widget-id="433285134742085632">Tweets de @rtslabs</a> | |
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> | |
]]> | |
</Content> | |
</Module> |
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
spring: | |
profiles: dev | |
datasource: | |
driverClassName: oracle.jdbc.OracleDriver | |
dataSourceClassName: oracle.jdbc.pool.OracleDataSource | |
url: jdbc:oracle:thin:@localhost:1521:orcl | |
username: rest_test | |
password: rest_test | |
jpa: |
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
public class Application { | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); | |
} | |
@RequestMapping("/") | |
@ResponseBody | |
String home() { |
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
import com.google.common.cache.CacheBuilder; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.cache.CacheManager; | |
import org.springframework.cache.annotation.CachingConfigurer; | |
import org.springframework.cache.annotation.EnableCaching; | |
import org.springframework.cache.guava.GuavaCache; | |
import org.springframework.cache.interceptor.CacheErrorHandler; | |
import org.springframework.cache.interceptor.CacheResolver; | |
import org.springframework.cache.interceptor.KeyGenerator; |
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
public interface Nonchalantly<T> { | |
static <T> T invoke(Nonchalantly<T> f) { | |
try { | |
return f.run(); | |
} catch (Throwable e) { | |
throw new RuntimeException( e ); | |
} | |
} | |
T run() throws Throwable; |
OlderNewer