自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (4)
  • 收藏
  • 关注

原创 rabbitmq记录收发的消息体日志信息

1.安装rabbitmq_tracing 插件,进入mq安装目录的sbin目录,执行./rabbitmq-plugins enable rabbitmq_tracing2.使用MQ的web监控工具,     (图片引用自,http://www.cnblogs.com/gossip/p/4517345.html)

2015-07-07 10:38:01 19028 1

转载 sql放在查询分析器全选执行,报system.outofmemoryexception

今天拿来一份百万级数据,导入到本地sql server 时候报system.outofmemoryexception查了一下 ,用如下方式解决,sql cmd 导入sqlcmd -S -d -U -P -i file.sql sqlcmd -S -d -u -p -i C:\Users\Administrator\Desktop\a\110.sql

2012-12-06 09:14:51 1879

转载 json-lib date对象转json ,加入自定义日期格式处理

import net.sf.json.JSONObject;import net.sf.json.JsonConfig;import net.sf.json.processors.JsonValueProcessor;public class DateJsonValueProcessor implements JsonValueProcessor { public static fina

2012-09-20 14:52:24 2270

转载 mysql只导出建表语句

为了编写项目的一些文档,希望导出一个数据库中的所有表的建表语句,而不包含数据。可以使用语句mysqldump --no-data -u username -p* database_name > filename.sql实现。           更多复杂的导出可以查看mysqldump的帮助。

2012-08-02 10:01:51 5384

原创 $.getJSON 跨域 回调函数不执行

String callback = request.getParameter("jsoncallback"); String lineID = request.getParameter("lineID"); String select = " select USER_ID,USER_NAME,PHONE_NO from LINE_INFO,DISTRICT_IN

2012-07-19 12:43:31 1427

原创 input file 浏览器兼容问题

主要思想就是用一层遮罩input file 的位置,实现样式的统一。 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">无标题文档

2012-06-18 10:55:48 6787 1

转载 html与body的一些研究与理解

文章是转载的,原文地址一、写在前面的最近一直构思着写篇关于html标签的文章,虽说之前处理过html标签,也解决过不少棘手的问题,但是对其理解还不是很透彻,很多原理都是自己推测的。在网上查阅相关资料想整合一下相关的信息,发现深入探讨html,与body的文章很少,只有在蓝色理想看到一篇“一叶千鸟”的这篇“正确认识html与body”有点价值,其余都没有什么相关的好文章。而这里,我要

2012-02-29 11:06:11 858

原创 java 实现鼠标连点

public static void main(String[] args) throws AWTException {  try {   int i=0;   while(i    Robot robot = new Robot();    robot.delay(100);    robot.mousePress(InputEvent.BUTTON1_MASK);

2012-02-23 08:33:31 8015

转载 Spring MVC 拦截器

Controller层的拦截器继承于HandlerInterceptorAdapterHandlerInterceptorAdapter.javaCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 public a

2012-02-02 14:20:55 547

转载 JS获取本周、本季度、本月、上月的开端日期、停止日期

Js代码   /** * 获取本周、本季度、本月、上月的开端日期、停止日期 */ var now = new Date(); //当前日期 var nowDayOfWeek = now.getDay(); //今天本周的第几天 var nowDay = now.getDate(); //当前日 var nowMonth = now.getMonth(); //当前月

2012-01-30 16:22:54 5462

转载 JS判断某年某月有多少天

以前写网页的时候,经常碰到选择日期的问题,其实就是判断某年某月有多少天。一般的做法是先判断是几月份,然后决定有多少天(一般用switch),如果是2月的话,还得判断选择的年份是不是闰年,再决定是28天还是29天。这样是一个很规矩的做法,而且也很符合逻辑。       但是,如果是为了达到目的的话,是不用这么麻烦的。JS里 面的new Date("xxxx/xx/xx")这个日期的构造方法有一个

2012-01-24 23:11:59 1270

转载 this在js里面的含义

JavaScript中this关键字使用在 面向对象编程语言中,对于this关键字我们是非常熟悉的。比如C++、C#和Java等都提供了这个关键字,虽然在开始学习的时候觉得比较难,但只要理 解了,用起来是非常方便和意义确定的。JavaScript也提供了这个this关键字,不过用起来就比经典OO语言中要"混乱"的多了。下面就来看看,在JavaScript中各种this的使用方法有什么混乱之

2012-01-13 20:29:07 2131

转载 spring如何使用多个xml配置文件

1, 在web.xml中定义 contextConfigLocation参数.spring会使用这个参数加载.所有逗号分割的xml.如果没有这个参数,spring默认加载web-inf/applicationContext.xml文件.contextConfigLocationclasspath*:conf/spring/applicationContext_cor

2012-01-13 10:58:15 560

转载 encodeURIComponent的使用

encodeURIComponent的使用在说明encodeURIComponent前先介绍下escape,encodeURI,encodeURIComponent 这三个,主要是从其他地方转过来的(http://blog.csdn.net/fengzi_shen/archive/2009/04/01/4041488.aspx)。js对文字进行编码涉及3个函数:es

2012-01-13 10:07:10 638

转载 java.lang.OutOfMemoryError: Java heap space 解决方法

java.lang.OutOfMemoryError: Java heap space 解决方法 这个问题的根源是jvm虚拟机的默认Heap大小是64M,可以通过设置其最大和最小值来实现.设置的方法主要是几个.1.可以在windows 更改系统环境变量加上JAVA_OPTS=-Xms64m -Xmx512m2,如果用的tomcat,在windows下,可以在C:\tomca

2012-01-12 16:39:03 326

WILLOW-活动模型.doc

WILLOW-活动模型.doc

2021-03-28

仿照apple网站做的html,效果很不错!

仿照apple网站做的html,效果很不错!

2011-12-05

Repeater分页显示

Repeater分页显示 简单的说,先从控件工具箱中拖入两个label(currten page当前页,count page总页),四个linkbuttion(首/下页/上页/尾页)。 无非就是+1 -1 的问题, ------------------------ using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; public partial class gonggao : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.labPage.Text = "1"; this.contrlRepeater(); } } //获取指字符个数的字符 public string cuts(string aa,int bb) { if (aa.Length <= bb) { return aa; } else { return aa.Substring(0, bb); } } //Repeater分页控制显示方法 public void contrlRepeater() { pb pb1 = new pb(); DataSet ss = new DataSet(); ss = pb1.returnDs("select top 200 [标题],[时间] from news"); PagedDataSource pds = new PagedDataSource(); pds.DataSource = ss.Tables["temptable"].DefaultView; pds.AllowPaging = true; pds.PageSize = 2; pds.CurrentPageIndex = Convert.ToInt32(this.labPage.Text) - 1; Repeater1.DataSource = pds; LabCountPage.Text = pds.PageCount.ToString(); labPage.Text = (pds.CurrentPageIndex + 1).ToString(); this.lbtnpritPage.Enabled = true; this.lbtnFirstPage.Enabled = true; this.lbtnNextPage.Enabled = true; this.lbtnDownPage.Enabled = true; if(pds.CurrentPageIndex<1) { this.lbtnpritPage.Enabled = false; this.lbtnFirstPage.Enabled = false; } if (pds.CurrentPageIndex == pds.PageCount-1) { this.lbtnNextPage.Enabled = false; this.lbtnDownPage.Enabled = false; } Repeater1.DataBind(); } protected void lbtnpritPage_Click(object sender, EventArgs e) { this.labPage.Text = Convert.ToString(Convert.ToInt32(labPage.Text) - 1); this.contrlRepeater(); } protected void lbtnFirstPage_Click(object sender, EventArgs e) { this.labPage.Text = "1"; this.contrlRepeater(); } protected void lbtnDownPage_Click(object sender, EventArgs e) { this.labPage.Text =this.LabCountPage.Text; this.contrlRepeater(); } protected void lbtnNextPage_Click(object sender, EventArgs e) { this.labPage.Text = Convert.ToString(Convert.ToInt32(labPage.Text) + 1); this.contrlRepeater(); } } -----------------

2010-11-30

uploadfile上传图片

.cs 界面代码 using System; using System.Data; using System.Data.SqlClient; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; public partial class _Default : System.Web.UI.Page { string name="b";//根据需要给上传的图片命名 int minsize=1;//上传文件的最低大小,单位kb int maxsize=1000;//上传文件的最大大小,单位kb protected void Page_Load(object sender, EventArgs e) { } protected void upload_Click(object sender, EventArgs e) { string fileName, fileExtension, FullName; if (UpImage.PostedFile != null) { if (UpImage.PostedFile.ContentLength != 0 && UpImage.PostedFile.ContentLength <= (1024 * maxsize) && UpImage.PostedFile.ContentLength >= (1024 * minsize)) { fileName = System.IO.Path.GetFileName(UpImage.PostedFile.FileName); fileExtension = System.IO.Path.GetExtension(fileName); if (IsExtension(fileExtension)) { try { FullName = name; CreateDir("upLoadImg"); FullName = DateTime.Now.ToString("yyyyMM") + "/" + FullName; UpImage.PostedFile.SaveAs(System.Web.HttpContext.Current.Request.MapPath(@"UpFiles/upLoadImg/") + FullName); } catch (Exception ex) { Response.Write("<script language=javascript>alert('" + ex.Message + "');</script>"); } } else { Response.Write("<script language=javascript>alert('上传的文件格式不对,请上传指定的文件格式!');</script>"); } } else { Response.Write("<script language=javascript>alert('没有上传文件,或者文件太大!请重新上传!');</script>"); } } }

2010-11-30

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除