`
JavaSam
  • 浏览: 935276 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.TreeSet; public class TextFile extends ArrayList<String> { /** * 读取文件 * ...
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.dom4j.Attribute; import org.dom4j.Document; import org.dom4j.DocumentExcepti ...
var buildFragment = function(args, nodes, scripts){ var fragment, cacheable, cacheresults, doc, first = args[0]; /** * 继续使用原来的doc */ if (nodes && nodes[0]) { doc = nodes[0].ownerDocument || nodes[0]; } // ...
/** * 判断是否为object * @param {Object} obj */ isPlainObject: function(obj){ //必须是object /** * 因为IE,我们还必须检查构造器属性,以确保节点对象和窗口对象也不能通过 */ if (!obj || jQuery.type(obj) !== "object" | ...
/** * 创建实例的的方法 * @param {Object} Class * @param {Object} params */ var newObj = function (Class,params){ function _new (){ if(Class._new){ Class._new.call(this,params);//改变this指向 } } _new.prototype = Class; return new _new(); } /** * page对象 */ var page = { /** * 构造函 ...
documentFragment对象:无父窗口的文档对象(或者叫文档碎片) 作用:javascript在操作DOM时都会重新加载整个文档的DOM为了减少DOM操作可以在操作DOM(为其添加或删除属性时)可以将DOM放入documentFragment中,最后一次性操作文档碎片 说白了documentFragment就是缓冲区:buffer var oui=document.getelementbyid("oitem"); for(var i=0;i<10;i++) { var oli=document.createelement("l ...
quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, //匹配HTML标签 rnotwhite = /\S/, trimLeft = /^\s+/, //去除左边的空格 trimRight = /\s+$/, //去除右边的空格 rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,//单tag : 例:$("<img>")即创建img节点相当于documeng.createElem ...
/** * @author wsf * 检测浏览器版本 */ var browser = { "explorer": { "ie": /msie ([\d.]+).*\.net clr (\d\.){1,2}\d+\)$/, "firefox": /firefox\/([\d.]+)/, "chrome": /chrome\/([\d.]+)/, "opera": /opera.([\d.] ...
  var reg = { "html" : /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/ //匹配html代码 }; var allFinded = []; /** * @author wsf * 检测浏览器版本 */ var browser = { "explorer": { "ie": /msie ([\d.]+).*\.net clr (\d\.){1,2}\d+\)$/, "fire ...
(function() { return window.Query = window.$ = function() { var _this = {}, selector = arguments[0]; $.prototype = _this; /** * 判断是对象是数组还是名值对象 * 返回0表示是数组,返回1表示是名值对象 */ function objOrArr(obj) { if (!obj) return; if (typeof obj === "object") { for ( ...
package com.file; import java.io.File; import java.io.IOException; public class ProcessFiles { /** * 策略模式 * @author Administrator *重点 */ public interface Strategy{ void process(File file); } private Strategy strategy; private String ext;//扩展名称 public ProcessFile ...
            //JSONP调用             function JSONP(params){                 try {                     var url = params;                     var oldScript = document.getElementById(params);                     if (oldScript) {                         document.getElementsByTagName("head") ...
待写待写!
File.getCanonicalFile()0推荐JDK中写着: public File getCanonicalFile()                       throws IOException 返回此抽象路径名的规范形式。等同于 new File(this.getCanonicalPath()())。 测试类写于F:\Eclipse\rcp\workspace\crescent项目中, public static void main(String[] args) {    File file = new File("");    try {     F ...
Global site tag (gtag.js) - Google Analytics