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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>info.superalsrk.maven</groupId> | |
<artifactId>simple</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>simple</name> |
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
# Grab captcha from douban login page | |
import urllib | |
import urllib2 | |
import requests | |
import re | |
url = 'http://www.douban.com/accounts/login' | |
local = '/home/wilbeibi/Dropbox/Papers/Materials/Pool/douban/do' | |
i = 0 | |
name = "" |
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"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:cache="http://www.springframework.org/schema/cache" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd | |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd"> |
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
List<Orders> res = hibernateTemplate.executeFind(new HibernateCallback<List<Orders>>() { | |
public List<Orders> doInHibernate(Session session) throws HibernateException, SQLException { | |
return session.createQuery(sql.toString()).setInteger(0, status) | |
.setFirstResult(pageNum) | |
.setMaxResults(pageSize) | |
.list(); | |
} | |
}); |
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
@Before | |
public void setUp() throws Exception { | |
ApplicationContext ctx = new FileSystemXmlApplicationContext("classpath:/spring/applicationContext.xml"); | |
ordersDAO = (OrdersDAO) ctx.getBean("ordersDAO"); | |
userDAO = (UserDAO) ctx.getBean("userDAO"); | |
houseDAO = (HouseDAO) ctx.getBean("houseDAO"); | |
sessionFactory = (SessionFactory) ctx.getBean("sessionFactory"); | |
session = SessionFactoryUtils.getSession(sessionFactory, true); | |
session.setFlushMode(FlushMode.MANUAL); |
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
var Player = { | |
playList: [{ title: "天空之城", singer: "久石让", URL: ["http://upload20.music.qzone.soso.com/30479511.mp3","http://landodesign.net/sky.mp3"]}, | |
{title: "金鱼的眼泪", singer: "纪佳松", URL: ["http://wma.9ku.com/2011/3/26/1.mp3"]}],//播放列表数据 | |
currentSong: {},//当前播放歌曲 | |
audio: document.getElementById("audio"),//绑定页面相应的Dom,下面几个都是 | |
list: document.getElementById("playlist"), | |
search: document.getElementById("btn"), | |
keyword: document.getElementById("search"), | |
state: document.getElementById("state"), | |
init: function () {//初始化函数 |
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 java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ConcurrentMap; | |
import java.util.logging.Logger; |
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 OauthTest; | |
import java.util.Properties; | |
import twitter4j.Twitter; | |
import twitter4j.TwitterException; | |
import twitter4j.TwitterFactory; | |
import twitter4j.auth.RequestToken; | |
public class TwitterTest { |
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.farmol.model.core.service; | |
import static org.junit.Assert.fail; | |
import javax.annotation.Resource; | |
/** | |
* notice that you have to include Logger of log4j package ,not other package | |
*/ | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; |
OlderNewer