`
文章列表
1.在函数代码中,使用特殊对象arguments,开发者无需明确指出参数名,就能访问它们。 1.1方法定义 function testArguments() { var obj = arguments; alert(obj[1]); } 1.2方法调用 testArguments('zhang', 'quan');调用方法alert出的是“quan”,obj[1]会使用第二个参数。如果越界,即obj[2]或其它的类似越界方式,由于没有传递相应的参数,则返回undefined。 2.还可以用 arguments 对象检测函数的参数个数,引用属性 arguments.length 即可。 2.1方法 ...
$('.fancybox').fancybox({ helpers: { //缩略图 thumbs : {             width: 50,             height: 50         },         //overlay为null时,页面锁死 overlay:{             showEarly : false         },         //控制按钮,前一个,后一个,缩放,关闭         buttons : {},         //控制标 ...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html>   <head>     <title>wid.html</title>     <link rel="stylesheet"  href="./plugin/Travel_tab/css/webwidget_scroller_tab.css" type="text/css" />     <script type='text/ ...
第一步: package DB; import java.util.HashMap; import java.util.Map; /** * 数据库字段数据类型与数字之间的对应关系 * @author lxzqz * */ public class Types { protected final static Map<Integer, String> MAP = new HashMap<Integer, String>(); public static final int ARRAY = 2003; public static final int BIGI ...

Object Clone

    博客分类:
  • JAVA
package test; public class ClassTest implements Cloneable{ public String name; public int age; public ClassTest(String name,int age) { this.setName(name); this.setAge(age); } public String getName() { return name; } public void setName(String name) { this.name = name; } public int ge ...
$(function(){ //颜色选择器 $('#gradeColor').ColorPicker({ onSubmit : function(hsb, hex, rgb, el) { $(el).val(hex); $('#colorShow').attr('style', 'background-color: #' + hex); $(el).ColorPickerHide(); }, onBeforeShow : function() { $(this).ColorPickerSetColor(this.value); } ...
package test; import java.util.HashMap; import java.util.Hashtable; import java.util.IdentityHashMap; import java.util.Map; public class MapTest { public static void main(String[] args) { //在 IdentityHashMap中,当且仅当(k1==k2)时,才认为两个键k1和k2相等 //此类设计仅用于其中需要引用相等性语义的罕见情况 Map<String, String> map ...
package com.excel.test; import java.util.StringTokenizer; public class StringTok { public static void main(String[] args) { /** * 第一个字符串为要拆分对象,第二个字符串为拆分方式,支持正则 */ StringTokenizer st = new StringTokenizer("zhang;quan;zhong", "[;|;]"); /** * 以下这两个使用方式一致 * while(st ...

JSONObject操作

    博客分类:
  • JAVA
package com.json; import java.util.HashMap; import java.util.Map; import net.sf.json.JSONObject; public class JSONTest { public static void main(String[] args) { JSONObject json = new JSONObject(); //key元素唯一,重复写会覆盖 json.element("zhang", "zhang"); json.element("zha ...
package com.excel.test; import java.io.File; import jxl.Sheet; import jxl.Workbook; import jxl.format.Alignment; import jxl.format.Colour; import jxl.format.Pattern; import jxl.format.VerticalAlignment; import jxl.write.Label; import jxl.write.WritableCellFormat; import jxl.write.WritableImage; imp ...
var cate = {"cate":[{"id":"1","name":"景点景区","parent":"1"},{"id":"2","name":"星级饭店","parent":"2"},{"id":"3","name":"旅行社","parent ...
public String getScenicCoord(String pk) {     log.debug("根据景区唯一标示获取景区坐标!");     String sql = "select wkt from JQGEO where id = '" + pk + "'";     String result = "";     try {     Connection conn = getSession().connection();     PreparedStatement ps = c ...
<%@page import="java.net.URLEncoder"%> <%@page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="application/msword;charset=UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() ...

json串操作

    博客分类:
  • js
var json = {"mapLayerInfo":{"COUNTY":"东城区","CONTACTPERSON":"郑欣淼","NAME":"故宫博物院","ADDRESS":"北京市东城区景山前街4号","POSTCODE":"100009","LEVEL":"5A","ID":1,"TELEPHONE& ...
使用ftp4这个jar包来连接FTP时,有时会报it.sauronsoftware.ftp4j.FTPListParseException这个异常,究其原因:    The FTP protocol doesn't offer a wide supported method to get complete informations about the contents of the working directory. The LIST command usually gives all you need to know, but unfortunately every server can u ...
Global site tag (gtag.js) - Google Analytics