自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 资源 (8)
  • 收藏
  • 关注

转载 如何用editplus格式化代码

一般用editplus写一些小的测试代码或者来研究学习别人的代码,但经常会遇到这些问题:下载过来的HTML/CSS代码混乱,JS代码被压缩,或者是我们想把我们的代码做一下压缩混淆以供发布时使用。当然,对于代码的格式化和代码压缩等,我们都可以使用专有的工具,或者使用一些在线的工作来做,既然EditPlus可以扩展插件,那我们何不利用这一功能来把这些工具集成到EP中呢?     其实很早我都有

2012-07-27 10:13:39 4568 1

转载 eclipse中将java项目转换为web项目

1、进入项目目录,找到.project文件,打开。 2、找到...代码段。 3、在第2步的代码段中加入如下标签内容并保存: org.eclipse.wst.common.project.facet.core.nature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jem.workbe

2012-07-19 11:18:58 591

转载 dreamweaver在onLoad运行RecordsetFind.htm时出错

sql教程出现错误后又尝试删除重新装了8.02,仍然出现下面的错误:在onLoad运行RecordsetFind.htm时,发生了以下JavaScript错误: 在文件""RecordsetFind"": ReferenceError:findRs is not defined 又再次卸载掉,并删除安装目录下的文件夹,清除注册表相应的项目,重装,问题依旧,郁闷!再次卸载

2012-07-18 17:24:36 833

转载 Tomcat:Caused by: java.lang.OutOfMemoryError: PermGen space

http://www.sql8.net sql吧转自:http://hi.baidu.com/zoomx/blog/item/77d93ca819f0a0b0cb130c8d.html 项目中遇到了系统停止响应的问题,查看日志发现 Tomcat报告Caused by: java.lang.OutOfMemoryError: PermGen space异常,开始以为是程序内存泄漏

2012-07-18 11:18:13 543

转载 请把我埋在新闻联播里

如果生活可以选择,我愿生活在新闻联播里。那里的领导个个都是时代先锋,群众人人都是道德模范。即使偶尔抓到一个贪官,也只是一笔带过,不留一丝遗憾。如果生活可以选择,我愿生活在新闻联播里。那里的农业年年大丰收,工业月月传喜讯。即使遇到百年不遇的自然灾害和金融危机,都是有增无减。如果生活可以选择,我愿生活在新闻联播里。那里的孩子都能上得起学,穷人们都能看得起病,百姓住每月77元的廉租房,工资增长1

2012-07-06 10:26:57 5352

转载 SQL中以count及sum为条件的查询

在开发时,我们经常会遇到以“累计(count)”或是“累加(sum)”为条件的查询。比如user_num表:idusernum1a32a43b54b7

2012-07-05 16:37:28 545

转载 XML特殊符号 .

需要转换的目前就这几个 ' " 被转换成了 & apos; & quot; & lt; & gt;Mark~补充下面是五个在XML文档中预定义好的实体:< 小于号> > 大于号& & 和&apos; ' 单引号" " 双引号实体必须以符号"&"开头,以符号";"结尾。注意:

2012-07-04 15:45:28 484

原创 java 读取xml文件操作类

package com.common.tool.excelxml;/** * 此类用于读取自定义复杂sql或hql * yxy   * http://sql8.net * 2012-7-3 */import java.io.InputStream;import java.util.Iterator;import org.dom4j.Document;impo

2012-07-03 16:40:57 605

转载 java 使用相对路径读取文件

java 使用相对路径读取文件1.java project环境,使用java.io用相对路径读取文件的例子: *目录结构:  DecisionTree            |___src                 |___com.decisiontree.SamplesReader.java            |___resource

2012-07-03 16:38:15 566

转载 sqlserver2000 把数据库改名(包括修改逻辑文件名,以便备份成新的数据库)

把Old数据库改为New数据库打开“企业管理器”找到 Old数据库--》右键--》所有任务--》分离数据库然后到C:\Program Files\Microsoft SQL Server\MSSQL\Data下找到Old_Data.mdf和Old_log.ldf把Old_Data换成你想要的名字例如New.mdf、New.ldf然后到企业管理器,找到 数据库 --》右键--

2012-07-02 23:38:20 1706

jQueryAPI,ajax十分好用

jQuery 核心函数 jQuery(expr, [context]) jQuery(html, [ownerDoc]) jQuery(html, props) jQuery(elements) jQuery() jQuery(callback) jQuery 对象访问 each(callback) size() length selector context get() get(index) index(subject) 数据缓存 data([name] , [value]) data(obj) removeData(name) $.data([el], [key], [val]) 队列控制 queue(name ,[cb|queue]) dequeue(name) clearQueue([queueName]) 插件机制 jQuery.fn.extend(object) jQuery.extend(object) 多库共存 jQuery.noConflict([ex]) 属性 属性 attr(name) attr(properties) attr(key, value) attr(key, fn) removeAttr(name) CSS 类 addClass(class | fn) removeClass([class | fn]) toggleClass(class|fn [, sw]) HTML代码/文本/值 html( [val | fn] ) text( [val | fn] )

2012-05-14

delphi动态虚拟覆盖重载重定义的区别

DELPHI中方法的类型及其覆盖、重载 1、静态方法是方法的缺省类型,对它就像对通常的过程和函数那样调用,编译器知道这些方法的地址,所以调用一个静态方法时它能把运行信息静态地链接进可执行文件,所以,静态方法速度最快,但它们却不能被覆盖来支持多态性。 2、虚拟方法和静态方法的调用方式相同。由于虚拟方法能被覆盖,在代码中调用一个指定的虚拟方法时编译器并不知道它的地址,因此,编译器通过建立虚拟方法表(VMT)来查找在运行时的函数地址。所有的虚拟方法在运行时通过VMT来高度,一个对象的VMT表中除了自己定义的虚拟方法外,还有它的祚的所有的虚拟方法,因此虚拟方法比动态方法用的内存要多,但它执行得比较快。 3、动态方法跟虚拟方法基本相似,只是它们的高度系统不同。编译器为每一个动态方法指定一个独一无二的数字,用这个数字和动态方法的地址构造一个动态方法表(DMT)。不像VMT表,在DMT表中仅有它声明的动态方法,并且这个方法需要祖先的DMT表来访问它蓁的动态方法。正因为这样动态方法比虚拟方法用的内存要少,但执行起来罗慢,因为有可能要到祚对象的DMT中查找动态法。 4、OP通过覆盖使一方法在不同的派生类间表现出不同的行为。OP中能被覆盖的方法是在声明时被标识为virtual或dynamic的方法。为了覆盖一个方法,在派生类的声明中用override代替virtual或dynamic。用了override后,编译器就会用新的方法替换VMT中原先的方法,而原先的方法也还存在,而如果用override再次声明一个静态方法,则是真正的覆盖,是用新的方法完全替换在祖先类中的同明方法。 5、方法重载的意义:比如说,你要写一个求两数商的函数(当然只是个比喻),你希望这个函数可以处理所有的数值类型,但PASCAL的运算对类型实行严格检查,你不得不用不同的程序来运算不同类型的数值,这样你就必须为每一种类型写一个同样功能的函数,并使用不同的函数名,坏处我想你是知道的。而重载却可以解决这个问题,同样的函数名,编译器可以用不同的形参类型决定调用哪个函数。Top dynamic和virtual的不同之处 delphi动态虚拟覆盖重载重定义的区别 (www.ip8000.com www.sql8.net)

2010-11-24

delphi动态虚拟覆盖重载重定义的区别

DELPHI中方法的类型及其覆盖、重载 1、静态方法是方法的缺省类型,对它就像对通常的过程和函数那样调用,编译器知道这些方法的地址,所以调用一个静态方法时它能把运行信息静态地链接进可执行文件,所以,静态方法速度最快,但它们却不能被覆盖来支持多态性。 2、虚拟方法和静态方法的调用方式相同。由于虚拟方法能被覆盖,在代码中调用一个指定的虚拟方法时编译器并不知道它的地址,因此,编译器通过建立虚拟方法表(VMT)来查找在运行时的函数地址。所有的虚拟方法在运行时通过VMT来高度,一个对象的VMT表中除了自己定义的虚拟方法外,还有它的祚的所有的虚拟方法,因此虚拟方法比动态方法用的内存要多,但它执行得比较快。 3、动态方法跟虚拟方法基本相似,只是它们的高度系统不同。编译器为每一个动态方法指定一个独一无二的数字,用这个数字和动态方法的地址构造一个动态方法表(DMT)。不像VMT表,在DMT表中仅有它声明的动态方法,并且这个方法需要祖先的DMT表来访问它蓁的动态方法。正因为这样动态方法比虚拟方法用的内存要少,但执行起来罗慢,因为有可能要到祚对象的DMT中查找动态法。 4、OP通过覆盖使一方法在不同的派生类间表现出不同的行为。OP中能被覆盖的方法是在声明时被标识为virtual或dynamic的方法。为了覆盖一个方法,在派生类的声明中用override代替virtual或dynamic。用了override后,编译器就会用新的方法替换VMT中原先的方法,而原先的方法也还存在,而如果用override再次声明一个静态方法,则是真正的覆盖,是用新的方法完全替换在祖先类中的同明方法。 5、方法重载的意义:比如说,你要写一个求两数商的函数(当然只是个比喻),你希望这个函数可以处理所有的数值类型,但PASCAL的运算对类型实行严格检查,你不得不用不同的程序来运算不同类型的数值,这样你就必须为每一种类型写一个同样功能的函数,并使用不同的函数名,坏处我想你是知道的。而重载却可以解决这个问题,同样的函数名,编译器可以用不同的形参类型决定调用哪个函数。Top www.ip8000.com sql8.net

2010-11-24

高清缩略图代码,可删除原图不会出现在XXX.jpg正在使用中,水印代正在研究中

我在网上用了很多的相关代码或者缩略图水印类,但是都有一个问题就是删除不了原图 public static void myGetThumbnailImage(string SourceFile, string strSavePathFile, int ThumbWidth, int ThumbHeight, string BgColor) { System.Drawing.Image oImg = System.Drawing.Image.FromFile(SourceFile); //小图 int intwidth, intheight; if (oImg.Width > oImg.Height) { if (oImg.Width > ThumbWidth) { intwidth = ThumbWidth; intheight = (oImg.Height * ThumbWidth) / oImg.Width; } else { intwidth = oImg.Width; intheight = oImg.Height; } } else { if (oImg.Height > ThumbHeight) { intwidth = (oImg.Width * ThumbHeight) / oImg.Height; intheight = ThumbHeight; } else { intwidth = oImg.Width; intheight = oImg.Height; } } //构造一个指定宽高的Bitmap Bitmap bitmay = new Bitmap(intwidth, intheight); Graphics g = Graphics.FromImage(bitmay); Color myColor; if (BgColor == null) myColor = Color.FromName("white"); else myColor = Color.FromName(BgColor); //用指定的颜色填充Bitmap g.Clear(myColor); g.InterpolationMode = InterpolationMode.HighQualityBicubic; //开始画图 g.DrawImage(oImg, new Rectangle(0, 0, intwidth, intheight), new Rectangle(0, 0, oImg.Width, oImg.Height), GraphicsUnit.Pixel); bitmay.Save(strSavePathFile, System.Drawing.Imaging.ImageFormat.Jpeg); g.Dispose(); bitmay.Dispose(); oImg.Dispose(); //删除源图 try { File.Delete(SourceFile); } catch { } }

2009-09-29

软件开发文档|需求说明|设计说明|国简标准-软件

软件开发文档|需求说明|设计说明|国简标准-软件

2009-03-12

经典cookie购物车源码[GridView实现]

特别说明请注意: 根许多网友反应, using Maticsoft.Functions; 这些代码看不懂 其实Functions 这个dll是我定义常用的函数类,如果需要跟我联系索取http://sql8.net 下面有我的群号, 其中 ArtsShop.Model.Arts_Product _p = new ArtsShop.Model.Arts_Product(); ArtsShop.BLL.Arts_Product p = new ArtsShop.BLL.Arts_Product(); _p = p.GetModel(id); 这是我的商品信息的类,三层结构,这个在用时你们只能换成你们自己的,这些代码完全可以删除, 比如 MyDr[1] = _p.Title; 用来读取商品名的,你们可以改MyDr[1] = dr["productname"].ToString();就行了, AddToCart.aspx页面代码 无标题页 <asp:TextBox ID="TextBox1" runat="server" Text='' Width="44px"> <asp:Label ID="Label1" runat="server" Text=''> 保存 取消 编辑 继续购物 清空购物车 下订单 AddToCart.aspx.cs页面代码 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 Maticsoft.Functions;public partial class AddToCart : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { int ProID; HttpCookie cookie; bool Tempbl = false; string Tempstr; if (!Page.IsPostBack) { if (!object.Equals(Request.QueryString["id"], null)) { ProID = int.Parse(Request.QueryString["id"]); //创购物车cookie yxy .//sql8.net if (object.Equals(Request.Cookies["ztbscart"], null)) cookie = new HttpCookie("ztbscart"); else cookie = Request.Cookies["ztbscart"]; //判断是否已存在于购物车内 yxy // sql8.net for (int i = 0; i < cookie.Values.Keys.Count; i++) { if (!object.Equals(cookie.Values.Keys[i], null)) { Tempstr = cookie.Values.AllKeys[i].ToString(); if (Tempstr.Trim() != "") { if (ProID == int.Parse(cookie.Values.AllKeys[i])) { Tempbl = true; break; } } } } //不未购买过则加入购物车 yxy //sql8.net if (!Tempbl) cookie.Values.Add(ProID.ToString(), "1"); else { } TimeSpan ts = new TimeSpan(0, 0, 10, 0); cookie.Expires = DateTime.Now + ts; Response.AppendCookie(cookie); } BindGrid(); } } //绑定数据 yxy //sql8.net private void BindGrid() { DataTable MyDt; DataRow MyDr; string str = ""; MyDt = new DataTable(); MyDt.Columns.Add(new DataColumn("id", str.GetType())); MyDt.Columns.Add(new DataColumn("Title", str.GetType())); MyDt.Columns.Add(new DataColumn("Num", str.GetType())); MyDt.Columns.Add(new DataColumn("Price", str.GetType())); MyDt.Columns.Add(new DataColumn("Discount", str.GetType())); MyDt.Columns.Add(new DataColumn("Vipprice", str.GetType())); MyDt.Columns.Add(new DataColumn("Totle", str.GetType())); if (!object.Equals(Request.Cookies["ztbscart"], null)) { HttpCookie cookie = Request.Cookies["ztbscart"]; double Totle; //Response.Write("|" + Request.Cookies["ztbscart"].Values.Keys[1].ToString() + "|"); //Response.End(); for (int i = 0; i < cookie.Values.Keys.Count; i++) { int id; MyDr = MyDt.NewRow(); if (cookie.Values.AllKeys[i] != "" && cookie.Values[i] != "") { id = int.Parse(cookie.Values.AllKeys[i].ToString()); ArtsShop.Model.Arts_Product _p = new ArtsShop.Model.Arts_Product(); ArtsShop.BLL.Arts_Product p = new ArtsShop.BLL.Arts_Product(); _p = p.GetModel(id); MyDr[0] = id; MyDr[1] = _p.Title; MyDr[2] = cookie.Values[i]; MyDr[3] = _p.Price; MyDr[4] = _p.Discount; MyDr[5] = _p.Vipprice1; Totle = double.Parse(MyDr[2].ToString()) * double.Parse(MyDr[5].ToString()); MyDr[6] = Totle; MyDt.Rows.Add(MyDr); } } GridView1.DataSource = MyDt.DefaultView; GridView1.DataBind(); } } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { //编辑某行数量 yxy //sql8.net GridView1.EditIndex = e.NewEditIndex; BindGrid(); } protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { //取消更新 yxy //sql8.net GridView1.EditIndex = -1; BindGrid(); } protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { //更新数量 yxy //sql8.net string num; TextBox tempbx = new TextBox(); Label templb = new Label(); tempbx = (TextBox)(GridView1.Rows[e.RowIndex].Cells[6]).Controls[1]; num = tempbx.Text.ToString(); HttpCookie cookie = new HttpCookie("ztbscart"); for (int i = 0; i < GridView1.Rows.Count; i++) { string id; string tempnum; id = GridView1.Rows[i].Cells[1].Text.ToString(); if (e.RowIndex == i) tempnum = num; else { templb = (Label)(GridView1.Rows[i].Cells[6]).Controls[1]; tempnum = templb.Text.ToString(); } if (tempnum.Trim() == "") tempnum = "0"; //Response.Write("ID:"+id.ToString() + "Num:"+tempnum+":"+i+"");//测试用途 yxy//sql8.net cookie.Values.Add(id, tempnum); } //Response.End(); TimeSpan ts = new TimeSpan(0, 0, 10, 0); cookie.Expires = DateTime.Now + ts; Response.AppendCookie(cookie); GridView1.EditIndex = -1; Message.GoTo("AddToCart.aspx"); } protected void LinkButton4_Click(object sender, EventArgs e) { //继续购物 yxy //sql8.net Message.WebClose(); } protected void LinkButton3_Click(object sender, EventArgs e) { //清空购物车 yxy //sql8.net CheckBox tempcb = new CheckBox(); HttpCookie cookie = new HttpCookie("ztbscart"); Label templb = new Label(); for (int i = 0; i < GridView1.Rows.Count; i++) { tempcb = (CheckBox)(GridView1.Rows[i].Cells[0]).Controls[1]; if (!tempcb.Checked) { string id; string tempnum; id = GridView1.Rows[i].Cells[1].Text.ToString(); templb = (Label)(GridView1.Rows[i].Cells[6]).Controls[1]; tempnum = templb.Text.ToString(); if (tempnum.Trim() == "") tempnum = "0"; //Response.Write("ID:"+id.ToString() + "Num:"+tempnum+":"+i+"");//测试用途 yxy//sql8.net cookie.Values.Add(id, tempnum); } } TimeSpan ts = new TimeSpan(0, 0, 10, 0); cookie.Expires = DateTime.Now + ts; Response.AppendCookie(cookie); Message.GoTo("AddToCart.aspx"); } protected void CheckAll_CheckedChanged(object sender, EventArgs e) { //全选事件 yxy //sql8.net CheckBox tempcb = new CheckBox(); bool tempbl; tempcb = (CheckBox)(GridView1.HeaderRow.Cells[0]).Controls[1]; tempbl = tempcb.Checked; for (int i = 0; i < GridView1.Rows.Count; i++) { tempcb = (CheckBox)(GridView1.Rows[i].Cells[0]).Controls[1]; tempcb.Checked = tempbl; } } } _________________________________________________________________________ 如转载请注明原出处 www.sql8.net

2008-09-11

图书店源码asp数据sql

书库源码asp数据sql如果有问题请上www.sql8.net交流

2008-09-09

图书店系统.net2003 sql2000

很好用的,购物车不错,如果问题可到www.sql8.net交流

2008-09-09

空空如也

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

TA关注的人

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