JAVA¶ÁÈ¡PPTÎļþ
import java.io.InputStream;
import org.apache.lucene.document.Document;
import org.apache.poi.hslf.HSLFSlideShow;
import org.apache.poi.hslf.model.TextRun;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.usermodel.SlideShow;
public Document getDocument(Index index, String url, String title, InputStream is)
throws DocCenterException {
StringBuffer content = new StringBuffer("");
try{
SlideShow ss = new SlideShow(new HSLFSlideShow(is));//is ΪÎļþµÄInputStream£¬½¨Á¢SlideShow
Slide[] slides = ss.getSlides();//»ñµÃÿһÕÅ»ÃµÆÆ¬
for(int i=0;i<slides.length;i++){
TextRun[] t = slides[i].getTextRuns();//ΪÁËÈ¡µÃ»ÃµÆÆ¬µÄÎÄ×ÖÄÚÈÝ£¬½¨Á¢TextRun
for(int j=0;j<t.length;j++){
content.append(t[j].getText());//ÕâÀï»á½«ÎÄ×ÖÄÚÈݼӵ½contentÖÐÈ¥
}
content.append(slides[i].getTitle());
}
index.AddIndex(url, title, content.toString());
}catch(Exception ex){
System.out.println(ex.toString());
}
return null;
}
Ïà¹ØÎĵµ£º
4¡¢ TimerºÍTimerTaskµÄʹÓÃ
TimerÊÇÒ»ÖÖ¶¨Ê±Æ÷¹¤¾ß£¬ÓÃÀ´ÔÚÒ»¸öºǫ́Ï̼߳ƻ®Ö´ÐÐÖ¸¶¨ÈÎÎñ£¬ÕâЩÈÎÎñ¿ÉÒÔ±»Ö´ÐÐÒ»´Î£¬Ò²¿ÉÒÔ±»¶¨ÆÚÖ´ÐС£Ã¿¸ö Timer ¶ÔÏó¶ÔÓ¦Ò»¸öºǫ́Ị̈߳¬Ë³ÐòµØÖ´ÐÐËùÓмÆÊ±Æ÷ÈÎÎñ¡£Èç¹ûÍê³Éij¸ö¼ÆÊ±Æ÷ÈÎÎñµÄʱ¼äÌ«³¤£¬ÄÇôËü»á“¶ÀÕ¼”¼ÆÊ±Æ÷µÄÈ ......
¹Ø¼üÓï¾ä£º
conn.setAutoCommit(false);
if(!ok) conn.rollBack();
// after all done
conn.commit();
conn.setAutoCommit(true);
ǧÍò±ðÍü¼ÇÒª¼Óconn.commit()·ñÔò²»»áÖ´ÐÐÊÂÎñµÄ¡£
ÁíÍ⣬M ......
<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:Verdana;
panose ......
È«ÆÁ¶Àռģʽ
¾³£Ê¹ÓÃDirectX APIµÄ³ÌÐòÔ±¿ÉÄܶÔÈ«ÆÁ¶ÀռģʽÒѾºÜÊìϤÁË ¡£ËüÔÊÐí³ÌÐòԱͨ¹ýÐü¹Ò²Ù×÷ϵͳÀ´Ö±½ÓÔÚÆÁÄ»ÉϽøÐлæÖÆ¡£ÔÚ´«Í³µÄJava GUI ³ÌÐòÖУ¬ AWT ͨ¹ýʼþ·ÖÅÉÏ̺߳ÍÔÚÊʵ±µÄʱºòµ÷ÓÃ×é¼þµÄpaint()·½·¨À´´«ËÍÀ´×Ô²Ù×÷ϵͳµÄpaintʼþ¡£ÔÚÈ«ÆÁ¶ÀռģʽӦÓÃÖÐÄã¿ÉÒÔͨ¹ý³ÌÐò½øÐлæÖÆ¡£ ÁíÍâ ......
public int ExecProcAdd()
{
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedu ......