‘IT技术’ 分类的存档

关于JAVA如何正确的处理静态文件,数据流的断点续传,查阅许多资料后,还是在tomcat中找到了灵感,具体请参考org.apache.catalina.servlets.DefaultServlet 简单说明下,关于tomcat处理资源请求的主要包括: 1 处理流程在 protected void serveResource(HttpServletRequest request,HttpServletResponse response,boolean content) 中 2 使用缓存进行处理 CacheEntry cacheEntry = resources.lookupCache(path); 3 解析Range的正确方式请参考 // Parse range specifier 765 ranges = parseRange(request, response, cacheEntry.attributes); 766 767 // ETag header 768 response.setHeader(“ETag”, cacheEntry.attributes.getETag()); 769 770 // Last-Modified header 771 response.setHeader(“Last-Modified”, 772 cacheEntry.attributes.getLastModifiedHttp()); 773 774 // Get content length 775 contentLength = [...]

2011年12月16日10:40 | 没有评论
分类: IT技术
标签:

提取自yoyoplayer的MP3解析器可以读取MP3文件的信息,并利用百度获取MP3文件的歌词地址 java -jar mp3.jar -n “d:/KwDownload/song/刘德华-母亲.mp3″ 输出: 使用方法: MP3Info mp3 = new MP3Info(“测试读取MP3″,”d:/KwDownload/song/刘德华-母亲.mp3″,-1,true); mp3.reRead(); mp3.isValid():true ====================================== 歌手mp3.getArtist() 刘德华 歌名mp3.getTitle() 母亲 专辑mp3.getAlbum() 格式化名称mp3.getFormattedDisplayName() 刘德华 – 母亲 格式化名称mp3.getFormattedName()刘德华 – 母亲 格式化参数mp3.getFormat()mp3 44kHz 192kbps 声道mp3.getChannelInfo()立体声 备注mp3.getComment() 类型mp3.getType()mp3 年份mp3.getYear() 采样率mp3.getSampled()44kHz 时长mp3.getFormattedLength()03:42 时长long型mp3.getLength()222 ====================================== ===============搜索歌词文件=========== %C1%F5%B5%C2%BB%AA+%C4%B8%C7%D7 size:1 歌曲:母亲 歌手:刘德华 下载地址:http://www.51lrcgc.com/asp/lrc.asp?id=20090917g9W6fF try http://download.csdn.net/source/3571532

2011年9月3日12:19 | 1 条评论
分类: IT技术
标签: ,

?View Code JAVAprivate final String QUERY_TABLE_SPACE_SQL = "select nvl(b.tablespace_name,nvl(a.tablespace_name,’UNKNOWN’)) name," + " Mbytes_alloc-nvl(Mbytes_free,0) , nvl(Mbytes_free,0) , nvl(Maxfree_ext,0) , " + " ((Mbytes_alloc-nvl(Mbytes_free,0))/Mbytes_alloc)*100 pct_used from (select sum(bytes)/1024/1024 Mbytes_free ," + "MAX(BYTES)/1024/1024 Maxfree_ext ,tablespace_name from dba_free_space group by tablespace_name) a ," + " (select sum(bytes)/1024/1024 Mbytes_alloc , tablespace_name from dba_data_files group by tablespace_name) b" + " where [...]

2011年8月11日10:09 | 没有评论
分类: IT技术
标签:

JsTree Demo Version: jstree pre 1.0 stable Old versions: http://code.google.com/p/jstree/downloads/list Add a demo for jstree in demo/index.html Integrate the usage of metadata, click the node event ,attrs,toggle nodes and ajax json in jstree Changed apple theme and classic theme background fixed for in ie6. 1. ?View Code HTML<script type="text/javascript" src="./_lib/jquery.js"></script> <script type="text/javascript" src="./jquery.jstree.js"></script> 2. ?View [...]

2011年8月10日13:06 | 没有评论
分类: IT技术
标签: ,

Question: Metro for SOAP web services, In the response, the namespace prefixes are ns2, ns3, ns4, and so on. I’d like to be able to instruct the web services stack to use custom names instead. To solve this, please do as follow: 1 In the response/request bean package,named a package-info.java 2 set the annotation like [...]

2011年4月25日14:10 | 没有评论
分类: IT技术
标签:
Page 1 of 812345...Last »