当前位置: 首页 > news >正文

网站建设教育板块安全优化大师下载

网站建设教育板块,安全优化大师下载,jsp网站地图生成器,网站开发市场价zryou 的 条码生成代码(Code39码)『Code 39条形码介绍』 code39条码能表示字母、数字和其它一些符号共43个字符#xff1a;A -Z, 0-9, -.$/ %, space等#xff0c;其主要特点如下#xff1a;  ◆条码的长度是可变化的   ◆通常用“*”号作为起始、终止符   ◆校验码不…zryou 的 条码生成代码(Code39码)『Code 39条形码介绍』  code39条码能表示字母、数字和其它一些符号共43个字符A -Z, 0-9, -.$/ %, space等其主要特点如下  ◆条码的长度是可变化的   ◆通常用“*”号作为起始、终止符   ◆校验码不用   ◆代码密度介于3 - 9.4个字符/每英寸          ◆空白区是窄条的10倍  ◆用于工业、图书、以及票证自动化管理上 三九码是Intermec公司于1975年推出的一种条码它可表示数字、英文字母以及“-”、“.”、“/”、“ ”、“%”、“$”、“ ”空格和“*”共44个符号其中“*”仅作为启始符和终止符。三九码且有编码规则简单、误码率低、所能表示字符个数多等特点因此在各个领域有着极为广泛的应用。我国也制定了相应的国家标准GB12908-91。三九码仅有两种单元宽度——分别为宽单元和窄单元。宽单元这宽度为窄单元的1到3倍一般多选用2倍、2.5倍或3倍。三九码的每一个条码字符由九个单元组成其中有三个宽单元其余是窄单元因此称为三九码。我国有的图书馆使用的39码使用了特殊的校验字符条码软件都可打印适用于图书馆的39码。 代码原创: LovlyPuppy 实现该功能分两个类,第一个类 DrawImageBord.cs using System.Drawing;using System.Drawing.Imaging;public   abstract   class   DrawImageBord  ...{      protected   virtual   string   BordRuleName       ...{          get   ...{   return   string.Empty;   }       }      protected   virtual   System.Collections.Hashtable   Roles       ...{          get   ...{   return   new   System.Collections.Hashtable();   }       }      string   drawString;      int   width      800;   //画布的宽度(可计算)      int   height      36;//1CM      int   unitWidth      1;   //      int   currentLocation      0;      public   DrawImageBord(string   s)      ...{          drawString      s;      }      public   virtual   void   Draw(System.IO.Stream   target)      ...{          Bitmap   bm      new   Bitmap(width,   height);          Graphics   g      Graphics.FromImage(bm);          g.SmoothingMode      System.Drawing.Drawing2D.SmoothingMode.Default;          g.TextRenderingHint      System.Drawing.Text.TextRenderingHint.AntiAlias;          //画布和边的设定            g.Clear(Color.White);          g.DrawRectangle(Pens.White,   0,   0,   width,   height);          for(int   i      0;   i      drawString.Length;   i)                ...{                    this.DrawString(drawString[i].ToString(),   g);                }         bm.Save(target,   ImageFormat.Jpeg);      }     protected   virtual   void   DrawString(string   s,   Graphics   g)     ...{           System.Collections.Hashtable   hash      this.Roles;           object   o      hash[s];           if   (o      null)   return;           char[]   chars      o.ToString().ToCharArray();           if   (chars.Length      9)   return;               SolidBrush   blackBrush      new   SolidBrush(Color.Black);               SolidBrush   witeBrush      new   SolidBrush(Color.White);            for(int   i      0;   i      5;   i)               ...{                  //画第一个   0   黑条                   if   (chars[i]      0)                   ...{                          Rectangle   re1      new   Rectangle(currentLocation,   0,   unitWidth,   height);                          g.FillRectangle(blackBrush,   re1);                          currentLocation      unitWidth;                   }                   else                   ...{                          Rectangle   re1      new   Rectangle(currentLocation,   0,   3   *   unitWidth,   height);                          g.FillRectangle(blackBrush,   re1);                          currentLocation      3   *   unitWidth;                   }                  //画第6个     5   白条                   if   ((i      5)      9)                   ...{                        if   (chars[i5]   0)                        ...{                              Rectangle   re1      new   Rectangle(currentLocation,   0,   unitWidth,   height);                              g.FillRectangle(witeBrush,   re1);                              currentLocation      unitWidth;                        }                        else                        ...{                                Rectangle   re1      new   Rectangle(currentLocation,   0,   3   *   unitWidth,   height);                                g.FillRectangle(witeBrush,   re1);                                currentLocation      3   *   unitWidth;                        }                   }                }                  Rectangle   re2      new   Rectangle(currentLocation,   0,   unitWidth,   height);                  g.FillRectangle(witeBrush,   re2);                 currentLocation      unitWidth;     } } 第二个类CODE39DrawImageBord.cs 继承DrawImageBord.cs using System;using System.Data;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; /**//**//** summary/// CODE39DrawImageBord 的摘要说明/// /summarypublic class CODE39DrawImageBord : DrawImageBord......{    private System.Collections.Hashtable hash new System.Collections.Hashtable();    protected override string BordRuleName    ......{        get ......{ return CODE39; }    }    public CODE39DrawImageBord(string s)        : base(s)    ......{     }     protected override System.Collections.Hashtable Roles    ......{        get        ......{            if (hash.Count 0) return hash;            hash.Add(0, 001100100);            hash.Add(1, 100010100);            hash.Add(2, 010010100);            hash.Add(3, 110000100);            hash.Add(4, 001010100);            hash.Add(5, 101000100);            hash.Add(6, 011000100);            hash.Add(7, 000110100);             hash.Add(8, 100100100);            hash.Add(9, 010100100);            hash.Add(A, 100010010);            hash.Add(B, 010010010);            hash.Add(C, 110000010);            hash.Add(D, 001010010);            hash.Add(E, 101000010);             hash.Add(F, 011000010);            hash.Add(G, 000110010);            hash.Add(H, 100100010);            hash.Add(I, 010100010);            hash.Add(J, 001100010);            hash.Add(K, 100010001);            hash.Add(L, 010010001);             hash.Add(M, 110000001);            hash.Add(N, 001010001);            hash.Add(O, 101000001);            hash.Add(P, 011000001);            hash.Add(Q, 000110001);            hash.Add(R, 100100001);            hash.Add(S, 010100001);             hash.Add(T, 001100001);            hash.Add(U, 100011000);            hash.Add(V, 010011000);            hash.Add(W, 110001000);            hash.Add(X, 001011000);            hash.Add(Y, 101001000);            hash.Add(Z, 011001000);             hash.Add(-, 000111000);            hash.Add(%, 100101000);            hash.Add($, 010101000);            hash.Add(*, 001101000);             return hash;        }    } } 调用的方法:   protected void Page_Load(object sender, EventArgs e)    ...{        CODE39DrawImageBord dr new CODE39DrawImageBord(*3949178*);        dr.Draw(Response.OutputStream);     }--显示结果: --显示结果: 补充说明: 生成的这个条码,并没有用扫描枪去识别,以后我会用Symbol DS6608数字扫描器 来识别它的准确性. 转载于:https://www.cnblogs.com/host-2008/archive/2011/04/09/2010186.html
http://www.pierceye.com/news/811704/

相关文章:

  • 网站建设需要租用什么北京网站设计制作过程
  • 设计高端网站建设电子商务平台的建设步骤
  • 对外网站ipv6建设方案模板网站提交地址
  • 网站优化包括哪些内容哪一个网站做专栏作家好点
  • 网站外包 博客网络广告的优势有哪些
  • 福建网站建设网wordpress批量替换标签
  • 网站建设 海外房产商标注册证查询
  • 门户网站建设要求易申建设网站
  • 现在创业什么行业最好seo全网营销公司
  • 网站 域名 授权服务器 分布式网站模板英文
  • wordpress 二维码插件搜索引擎优化的方法
  • 国外申请域名的网站CC wordpress 攻击
  • 能发外链的网站中国机械加工网加热炉节能
  • 个人网站推广 公司网站地址栏小图标
  • 网站 如何 备案营销型网站建设便宜
  • 从网上怎么做网站营销做算命类网站违法吗?
  • 口碑好的网站开发公司哪家最专业网站优化关键词是怎么做的
  • 一级a做爰片免费网站天天看专业网站建设公司推荐
  • 套模版做的网站好优化吗win10系统优化软件
  • 红酒营销 网站建设网站建设多少钱一年
  • 公众号注册入口官网seo排名的影响因素有哪些
  • 化妆品网站素材wordpress广告插件中文
  • 设计iphone手机网站网站开发怎么才能接到私活
  • 做网站美工排版提升学历英语翻译
  • 旅游网站建设服务对象微信第三方做网站需要费用吗
  • 能下载的网站soap公司网站
  • 肇庆网站推广排名花都网页设计
  • 网站后台素材wordpress适用linux
  • 开发一个app大概需要多少钱seo按照搜索引擎的什么对网站
  • 比较好的网站建设公司电话珠海开发网站公司