Welcome![Sign In][Sign Up]
Location:
Search - tag

Search list

[JSP/JavaDbTagInstall.zip

Description: Appenture JSP Database Custom Tag Library 是一个强大的JAVA服务器页码库,它的特性对设计者和程序员都适用。它允许非程序员在很容易的在一个数据库里的数据里工作而不需要编程技能。它也允许程序员开发和改编数据库而不需要改变数据显示编码。
Platform: | Size: 59734 | Author: | Hits:

[ADO-ODBCDbTagInstall.zip

Description: Appenture JSP Database Custom Tag Library 是一个强大的JAVA服务器页码库,它的特性对设计者和程序员都适用。它允许非程序员在很容易的在一个数据库里的数据里工作而不需要编程技能。它也允许程序员开发和改编数据库而不需要改变数据显示编码。
Platform: | Size: 59734 | Author: | Hits:

[Internet-Network用Java编写HTML文件分析程序

Description:

Java编写HTML文件分析程序

 一、概述

    

    Web服务器的核心是对Html文件中的各标记(Tag)作出正确的分析,一种编程语言的解释程序也是对源文件中的保留字进行分析再做解释的。实际应用中,我们也经常会碰到需要对某一特定类型文件进行要害字分析的情况,比如,需要将某个HTML文件下载并同时下载与之相关的.gif.class等文件,此时就要求对HTML文件中的标记进行分离,找出所需的文件名及目录。在Java出现以前,类似工作需要对文件中的每个字符进行分析,从中找出所需部分,不仅编程量大,且易出错。笔者在近期的项目中利用Java的输入流类StreamTokenizer进行HTML文件的分析,效果较好。在此,我们要实现从已知的Web页面下载HTML文件,对其进行分析后,下载该页面中包含的HTML文件(假如在Frame中)、图像文件和ClassJava Applet)文件。

    

    二、StreamTokenizer

    

    StreamTokenizer即令牌化输入流的作用是将一个输入流中变成令牌流。令牌流中的令牌实体有三类:单词(即多字符令牌)、单字符令牌和空白(包括JavaC/C++中的说明语句)。

    

    StreamTokenizer类的构造器为: StreamTokenizer(InputStream in)

    

    该类有一些公有实例变量:ttypesvalnval ,分别表示令牌类型、当前字符串值和当前数字值。当我们需要取得令牌(即HTML中的标记)之间的字符时,应访问变量sval。而读向下一个令牌的方法是调用nextToken()。方法nextToken()的返回值是int型,共有四种可能的返回:

    

    StreamTokenizer.TT_NUMBER: 表示读到的令牌是数字,数字的值是double型,可以从实例变量nval中读取。

    

    StreamTokenizer.TT_Word: 表示读到的令牌是非数字的单词(其他字符也在其中),单词可以从实例变量sval中读取。

    

    StreamTokenizer.TT_EOL: 表示读到的令牌是行结束符。

    

    假如已读到流的尽头,则nextToken()返回TT_EOF

    

    开始调用nextToken()之前,要设置输入流的语法表,以便使分析器辨识不同的字符。WhitespaceChars(int low, int hi)方法定义没有意义的字符的范围。WordChars(int low, int hi)方法定义构造单词的字符范围。

    

    三、程序实现

    

    1HtmlTokenizer类的实现

    

    对某个令牌流进行分析之前,首先应对该令牌流的语法表进行设置,在本例中,即是让程序分出哪个单词是HTML的标记。下面给出针对我们需要的HTML标记的令牌流类定义,它是StreamTokenizer的子类:

    

    

    import java.io.*;

    import java.lang.String;

    class HtmlTokenizer extends

    StreamTokenizer {

    //定义各标记,这里的标记仅是本例中必须的,

    可根据需要自行扩充

     static int HTML_TEXT=-1;

     static int HTML_UNKNOWN=-2;

     static int HTML_EOF=-3;

     static int HTML_IMAGE=-4;

     static int HTML_FRAME=-5;

     static int HTML_BACKGROUND=-6;

     static int HTML_APPLET=-7;

    

    boolean outsideTag=true; //判定是否在标记之中

    

     //构造器,定义该令牌流的语法表。

     public HtmlTokenizer(BufferedReader r) {

    super(r);

    this.resetSyntax(); //重置语法表

    this.wordChars(0,255); //令牌范围为全部字符

    this.ordinaryChar('< '); //HTML标记两边的分割符

    this.ordinaryChar('>');

     } //end of constrUCtor

    

     public int nextHtml(){

    int token; //令牌

    try{

    switch(token=this.nextToken()){

    case StreamTokenizer.TT_EOF:

    //假如已读到流的尽头,则返回TT_EOF

    return HTML_EOF;

    case '< ': //进入标记字段

    outsideTag=false;

    return nextHtml();

    case '>': //出标记字段

    outsideTag=true;

    return nextHtml();

    case StreamTokenizer.TT_WORD:

    //若当前令牌为单词,判定是哪个标记

    if (allWhite(sval))

     return nextHtml(); //过滤其中空格

    else if(sval.toUpperCase().indexOf("FRAME")

    !=-1 && !outsideTag) //标记FRAME

     return HTML_FRAME;

    else if(sval.toUpperCase().indexOf("IMG")

    !=-1 && !outsideTag) //标记IMG

     return HTML_IMAGE;

    else if(sval.toUpperCase().indexOf("BACKGROUND")

    !=-1 && !outsideTag) //标记BACKGROUND

     return HTML_BACKGROUND;

    else if(sval.toUpperCase().indexOf("APPLET")

    !=-1 && !outsideTag) //标记APPLET

     return HTML_APPLET;

    default:

    System.out.println ("Unknown tag: "+token);

    return HTML_UNKNOWN;

     } //end of case

    }catch(IOException e){

    System.out.println("Error:"+e.getMessage());}

    return HTML_UNKNOWN;

     } //end of nextHtml

    

    protected boolean allWhite(String s){//过滤所有空格

    //实现略

     }// end of allWhite

    

    } //end of class

    

    以上方法在近期项目中测试通过,操作系统为Windows NT4,编程工具使用Inprise Jbuilder3


Platform: | Size: 1066 | Author: tiberxu | Hits:

[Internet-Networkwinhttp

Description: 一个从网页tag里面分析url和url标题的类 -a tag inside from the website url analysis of the title and url category
Platform: | Size: 54276 | Author: 所困大 | Hits:

[WinSock-NDISTNT2book12

Description: TNT2简单留言本 v1.2 功能: 1.动态留言回复系统 2.删除、编辑、回复管理方便,并可查看留言者IP 3.后台可自由设置系统名称及页面meta标签-TNT2 simple message of the v1.2 features : 1. Dynamic voice response system 2. To delete, edit, reply to facilitate the management, who can view messages IP 3. Background system will be free to name and page meta tag
Platform: | Size: 187495 | Author: 李好 | Hits:

[Windows Developbindows1.3评估版

Description: Bindows是一个用来创建功能强大的瘦客户端应用程序的框架。Bindows应用程序运行于现代的Web浏览器中。在其中,它们使用DHTML来呈现丰富的可以包含很多不同窗体小部件(widget)的图形用户界面(GUI)。Bindows应用程序可以使用很多方法与服务器端进行交互。其中大多数方法是基于XML的。它同样支持XML-RPC和基于SOAP的Web Services。程序设计语言是JavaScript。 所有windows控件的模拟。按钮,标签,列表,文本框,对话框,颜色,样式,等等,一个典型桌面应用应该有的控件、样式都具备 新版本1.30beta,增加了千呼万唤的Theme支持。Erik&Emil不愧为世界水平的JavaScript高手,原本仅用做浏览器脚本支持的这个小东西如今被发挥得淋漓尽致,几乎到了浏览器JavaScript所能表现的最高境界-Bindows is a framework for B/S application. it works with morden exploer, use DHTML show GUI composed by lots of different widgets, and support many way to communicate with server base on XML,support XML-RPC and web services(SOAP).Bindows developed use JavaScript, implement all widgets in windows( button,tag,list-box, editbox,dialog) with same color and style etc. which enough to build a classic desktop application. New 1.30beta version, add Theme support. Erik&Emil is famous JavaSrcipt developer,they let the JavaScript on the top of the world.
Platform: | Size: 1219997 | Author: shen | Hits:

[Other resourceef_src_0[1].90

Description: 这是一个轻便的j2ee的web应用框架,是一个在多个项目中运用的实际框架,采用struts,hebinate,xml等技术,有丰富的tag,role,navigation,session,dictionary等功能.-This is a light creates a web application framework, a number of projects in the practical application of the framework, using struts, hebinate, xml technology with rich tag, role, navigation, session, the dictionary functions.
Platform: | Size: 1056189 | Author: 刘一 | Hits:

[JSP/Javaajaxtags-1.0.1

Description: The AJAX JSP Tag Library is a set of JSP tags that simplify the use of Asynchronous JavaScript and XML (AJAX) technology in JavaServer Pages.
Platform: | Size: 20990 | Author: zrx | Hits:

[Other resourceID3算法源程序(C语言)

Description: ID3算法源程序。使用的方法是编写一个*.dat文件保存样本数据,还有一个*.tag文件保存属性列名,且最后一个属性是标号属性。运行是输入id3 文件名。输出格式是一个二叉判定树。-ID3 algorithm source. The method used was to prepare a document preservation *. dat sample data, a document preservation *. tag attributes listed, and the final one is the attribute label attributes. Running importation id3 file. Output format is a binary decision tree.
Platform: | Size: 4852 | Author: 小丁 | Hits:

[Other resource诺蛙Blog(nBlog)

Description: nBlog是一个基于Access的Blog程序,可支持多人共同维护! 全生成静态页面,大量降低服务器损耗。支持tag技术,支持索引分页。 本次v1.1a更新列表: 1、新增Tag技术 2、tag列表与每个tag下属的blog列表全部生成静态页面 3、tag页面md5命名 4、新增“上一篇”“下一篇”快速查看 5、核心框架升级到NSB3.00.RC1.NBLOG 6、支持缓存的自动重载 7、更为强健的模板技术 8、代码全部重新组织优化 9、回帖可关闭UBB 10、回帖验证码 11、摘要自动标签过滤 12、索引页支持全静态分页 13、优化生成速度 14、已经支持自动保存图片到本地 15、向下兼容模板 16、编辑器升级到fckeditor2.0最终版-nBlog is a blog-based Access procedures that can support joint efforts to safeguard people! The entire generation of static pages, a large number of servers to reduce wear and tear. Tag technology support, support tabbed indexes. The v1.1a update the list : 1, two new technologies Tag, tag list with each tag under the blog list all three generating static pages, tag pages md5 named four additional "a", "under a" fast-View 5, the upgrade to the core framework NSB3 .00. RC1.NBLOG six support cache of automatic Heavy 7, more robust template 8, code optimization total of nine organizations, the closure of UBB replies can be 10, 11 yards replies validation, automatic labeling Abstract filter 12, and the index page supports static page 13 , optimizing production rate of 14, s
Platform: | Size: 722727 | Author: cp | Hits:

[CommunicationzyzCC

Description: xsl ,关于一个XML标准tag的用法,了解soap用法-xsl on a standard XML tag to use, understand soap usage
Platform: | Size: 1914 | Author: 张延宗 | Hits:

[Multimedia programmp3info_src

Description: t provides a simple method of accessing an MP3 s ID3 tag (artist, title, album...) as well as several details concerning the MP3 data itself--the length of the song, the MPEG encoding type, bit rate, sample rate, channel mode, etc.
Platform: | Size: 5895 | Author: 如雙 | Hits:

[Software EngineeringImpedance-Matching-for-RFID-Tag-Antennas

Description: Passive UHF RFID tag consists of a microchip attached to an antenna. Proper impedance match between the antenna and the chip is crucial in RFID tag design. It directly influences RFID tag performance characteristics such as the read range. It is known that an RFID microchip is a nonlinear load whose complex impedance varies with the frequency and the input power
Platform: | Size: 137216 | Author: taha | Hits:

[matlabRFID-anti-collision-multi-tag

Description: 针对无线射频识别(radio frequency identification,RFID)系统的多标签碰撞问题,在分析RFID标签编码规则的基础上,提出根据标签编码规则进行标签分组和标签预淘汰的方法,在读写器识别的初始阶段根据特定的规则淘汰部分标签,从而减少系统工量,提高系统工作效率.实例证明:在不增加标签结构复杂度的基础上,充分利用已有的有效信息能够有效减少阅读器的查询次数和系统的总通信量.-For radio frequency identification (radio frequency identification, RFID) system is a multi-tag collision problem, based on the analysis of the RFID tag encoding rules based on the proposed label grouping and labeling pre-elimination method according to the label encoding rules identified in the initial reader phase-out of the label according to specific rules, thus reducing the amount of system engineering, to improve system efficiency examples demonstrate: the label without increasing the complexity of the structure on the basis of full and effective use of existing information can be effective in reducing the number of queries and reader total traffic of the system.
Platform: | Size: 296960 | Author: lixianhe | Hits:

[mpeg mp3ID3-Tag-v1

Description: Music Mp3 Edit and Read Tag -ID3 Tag v1
Platform: | Size: 1300480 | Author: oniacziv | Hits:

[GDI-Bitmapimage-tag

Description: MATLAB图像标记,可以对图像中的你感兴趣的区域进行提取和标记,为后续分析提供帮助,程序可运行-MATLAB image tag, the image of the region of interest you can be extracted and tag, provide help for subsequent analysis, program can be run
Platform: | Size: 1024 | Author: sunbaohua | Hits:

[Linux-Unixcache-flush-by-tag

Description: MN10300 CPU core caching routines, using direct tag flushing.
Platform: | Size: 2048 | Author: mbyouzi | Hits:

[Software Engineering433-MHz-RFID-TAG-DESIGN

Description: 433 MHz RFID标签天线的设计,RFID电子标签的很好的设计资料-433 MHz RFID tag antenna design, the RFID electronic tag of good design data
Platform: | Size: 172032 | Author: bonwenli | Hits:

[SCM2.4G---TAG--TECH-SPEC

Description: 2.4G TAG 详细的技术规范,给需要参考的同学。-2.4G TAG detailed technical specifications, refer to the needs of the students.
Platform: | Size: 12288 | Author: SUNBOY | Hits:

[Software EngineeringMIFARE DESFire as Type 4 Tag

Description: AN11004 MIFARE DESFire as Type 4 Tag Rev. 2.4 — 22 May 2013 Application note
Platform: | Size: 371955 | Author: george123@mt2015.com | Hits:
« 1 2 3 4 5 67 8 9 10 11 ... 50 »

CodeBus www.codebus.net