概念

一维条码即指条码条和空的排列规则,常用的一维码的码制包括:EAN码、39码、交叉25码、UPC码、128码、93码,ISBN码,及Codabar(库德巴码)等。

条形码起源于 20 世纪 40 年代,应用于 70 年代,普及于 80 年代。条码技术是在计算机应用和实践中产生并发展起来的广泛应用于商业、邮政、图书管理、仓储、工业生产过程控制、交通等领域的一种自动识别技术,具有输入速度快、准确度高、成本低、可靠性强等优点,在当今的自动识别技术中占有重要的地位。

不同的码制有它们各自的应用领域:
EAN 码:是国际通用的符号体系,是一种长度固定、无含意的条码,所表达的

 

信息全部为数字,主要应用于商品标识。

39码和128码:为目前国内企业内部自定义码制,可以根据需要确定条码的长度和信息,它编码的信息可以是数字,也可以包含字母,主要应用于工业生产线领域、图书管理等。Code 39 码,是目前 用途广泛的一种条形码,可表示数字、英文字母以及“−”、“.”、“/”、“+”、“%”、“$”、 “”(空格)和“*”共 44 个符号,其中“*”仅作为起始符和终止符。既能用数字,也能用 字母及有关符号表示信息。
93码:是一种类似于39码的条码,它的密度较高,能够替代39码。
25码:主要应用于包装、运输以及国际航空系统的机票顺序编号等。
Codabar码:应用于血库、图书馆、包裹等的跟踪管理。
ISBN:用于图书管理。
 
 
识别原理:
由于不同颜色的物体,其反射的可见光的波长不同,白色物体能反射各种波长的可见光,黑色物体则吸收各种波长的可见光,所以当条码扫描器光源发出的光经光阑及凸透镜1后,照射到黑白相间的条码上时,反射光经凸透镜2聚焦后,照射到光电转换器上,于是光电转换器接收到与白条和黑条相应的强弱不同的反射光信号,并转换成相应的电信号输出到放大整形电路.白条、黑条的宽度不同,相应的电信号持续时间长短也不同.但是,由光电转换器输出的与条码的条和空相应的电信号一般仅10mV左右,不能直接使用,因而先要将光电转换器输出的电信号送放大器放大.放大后的电信号仍然是一个模拟电信号,为了避免由条码中的疵点和污点导致错误信号,在放大电路后需加一整形电路,把模拟信号转换成数字电信号,以便计算机系统能准确判读.
整形电路的脉冲数字信号经译码器译成数字、字符信息.它通过识别起始、终止字符来判别出条码符号的码制及扫描方向;通过测量脉冲数字电信号0、1的数目来判别出条和空的数目.通过测量0、1信号持续的时间来判别条和空的宽度.这样便得到了被辩读的条码符号的条和空的数目及相应的宽度和所用码制,根据码制所对应的编码规则,便可将条形符号换成相应的数字、字符信息,通过接口电路送给计算机系统进行数据处理与管理,便完成了一维条码辨读的全过程。
 

源码与实现

code39的实现

/// <summary>
/// 生成条码 Bitmap,自定义条码高度,自定义文字对齐样式
/// </summary>
/// <param name="sourceCode"></param>
/// <param name="barCodeHeight"></param>
/// <param name="sf"></param>
/// <returns></returns>
public Bitmap GetCode39(string sourceCode, int barCodeHeight, StringFormat sf)
{
BarCodeText = sourceCode.ToUpper();
int leftMargin = ;
int topMargin = ;
int thickLength = ;
int narrowLength = ;
int intSourceLength = sourceCode.Length;
string strEncode = "" ; //添加起始码“ *”.
var font = new System.Drawing.Font( "Segoe UI", );
string AlphaBet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*" ;
string[] Code39 =
{
/* 0 */ "" ,
/* 1 */ "" ,
/* 2 */ "" ,
/* 3 */ "" ,
/* 4 */ "" ,
/* 5 */ "" ,
/* 6 */ "" ,
/* 7 */ "" ,
/* 8 */ "" ,
/* 9 */ "" ,
/* A */ "" ,
/* B */ "" ,
/* C */ "" ,
/* D */ "" ,
/* E */ "" ,
/* F */ "" ,
/* G */ "" ,
/* H */ "" ,
/* I */ "" ,
/* J */ "" ,
/* K */ "" ,
/* L */ "" ,
/* M */ "" ,
/* N */ "" ,
/* O */ "" ,
/* P */ "" ,
/* Q */ "" ,
/* R */ "" ,
/* S */ "" ,
/* T */ "" ,
/* U */ "" ,
/* V */ "" ,
/* W */ "" ,
/* X */ "" ,
/* Y */ "" ,
/* Z */ "" ,
/* - */ "" ,
/* . */ "" ,
/*' '*/ "" ,
/* $ */ "" ,
/* / */ "" ,
/* + */ "" ,
/* % */ "" ,
/* * */ ""
};
sourceCode = sourceCode.ToUpper();
Bitmap objBitmap = new Bitmap(((thickLength * + narrowLength * ) * (intSourceLength + )) +
(leftMargin * ), barCodeHeight + (topMargin * ));
Graphics objGraphics = Graphics.FromImage(objBitmap);
objGraphics.FillRectangle( Brushes.White, , , objBitmap.Width, objBitmap.Height);
for (int i = ; i < intSourceLength; i++)
{
//非法字符校验
if (AlphaBet.IndexOf(sourceCode[i]) == - || sourceCode[i] == '*' )
{
objGraphics.DrawString( "Invalid Bar Code", SystemFonts.DefaultFont, Brushes .Red, leftMargin, topMargin);
return objBitmap;
}
//编码
strEncode = string.Format("{0}0{1}" , strEncode,
Code39[AlphaBet.IndexOf(sourceCode[i])]);
}
strEncode = string.Format("{0}0010010100" , strEncode); //添加结束码“*”
int intEncodeLength = strEncode.Length;
int intBarWidth;
for (int i = ; i < intEncodeLength; i++) //绘制 Code39 barcode
{
intBarWidth = strEncode[i] == '' ? thickLength : narrowLength;
objGraphics.FillRectangle(i % == ? Brushes.Black : Brushes .White, leftMargin, topMargin, intBarWidth, barCodeHeight);
leftMargin += intBarWidth;
}
//绘制明码
Font barCodeTextFont = new Font( "黑体" , 10F);
RectangleF rect = new RectangleF(, barCodeHeight - , objBitmap.Width - , );
objGraphics.FillRectangle( Brushes.White, rect);
//文本对齐
objGraphics.DrawString(BarCodeText, barCodeTextFont, Brushes.Black, rect, sf);
return objBitmap;
}

Demo2

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Printing;
using System.Threading; namespace BarCodeTest
{
public partial class Form1 : Form
{
string inputString = "";
code128 barcode = new code128();
Thread thre; public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
//label14.Location = new Point((panel1.Width - label14.Width) / 2, 92); /*
label6.Font = new Font("宋体", 12);
label8.Font = new Font("宋体", 12);
label9.Font = new Font("宋体", 12);
label11.Font = new Font("宋体", 12);
label12.Font = new Font("宋体", 12);
label13.Font = new Font("宋体", 12);
label14.Font = new Font("宋体", 12);
label10.Font = new Font("宋体", 26, FontStyle.Bold);
*/ PaintEventArgs pe = new PaintEventArgs(panel1.CreateGraphics(), panel1.ClientRectangle);
DrawLine(pe);
} public void DrawLine(PaintEventArgs e)
{
/*
//画边框
Rectangle rc = e.ClipRectangle;
rc.Width = rc.Width - 1;
rc.Height = rc.Height - 1;
e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Red)), rc);
*/ barcode.width = Convert.ToSingle(Mwidth.Text);
Graphics gh = e.Graphics;
if (dataToEncode.Text != "")
{
inputString = barcode.getCodeB(dataToEncode.Text);
//drawCodePic(); //把之前显示的用白色覆盖掉
//gh.DrawRectangle(new Pen(Color.Black), new Rectangle(new Point(0, 0), new Size(413, 40)));
gh.FillRectangle(new SolidBrush(Color.White), new Rectangle(new Point(, ), new Size(, ))); Brush br = new SolidBrush(Color.Black);
Pen p = new Pen(br, barcode.width);
Brush br1 = new SolidBrush(Color.White);
Pen p1 = new Pen(br1, barcode.width);
inputString = inputString.Trim();
float x = ;//这里是距离left //这里想把条码置中,已经画好了,怎么移动位置呢?
//先计算条码的width
float w = ;
for (int i = ; i < inputString.Length; i++)
{
for (int j = ; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % == )
{
w = w + barcode.width;
}
else
{
w = w + barcode.width;
}
}
}
x = (panel1.Width - (int)w) / ; for (int i = ; i < inputString.Length; i++)
{
for (int j = ; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % == )
{
//这里的2是距离top,30是条码高
gh.DrawLine(p, x, , x, );
x = x + barcode.width;
}
else
{
gh.DrawLine(p1, x, , x, );
x = x + barcode.width;
}
}
}
} if (textBox1.Text != "")
{
inputString = barcode.getCodeB(textBox1.Text);
//drawCodePic2(); //把之前显示的用白色覆盖掉
//gh.DrawRectangle(new Pen(Color.Black), new Rectangle(new Point(0, 0), new Size(413, 40)));
gh.FillRectangle(new SolidBrush(Color.White), new Rectangle(new Point(, ), new Size(, ))); e.Graphics.DrawString("P/N :" + "", new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , );
e.Graphics.DrawString("单位:" + "EA", new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , );
e.Graphics.DrawString("库位:" + "CMA110GV", new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , );
e.Graphics.DrawString("", new Font(new FontFamily("宋体"), , FontStyle.Bold), System.Drawing.Brushes.Black, , );
e.Graphics.DrawString("数量:" + textBox1.Text, new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , );
e.Graphics.DrawString("保质期:" + "" + "月", new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , ); //画边框
gh.DrawRectangle(new Pen(new SolidBrush(Color.Black)), , , , ); e.Graphics.DrawString("CML", new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , );
e.Graphics.DrawString("简单检查合格", new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , );
e.Graphics.DrawString("IQC01", new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , ); e.Graphics.DrawString(dataToEncode.Text, new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, (panel1.Width - dataToEncode.Text.Length * ) / , );
e.Graphics.DrawString("描述:" + "LAMINATIONJIS C2552-50A800", new Font(new FontFamily("宋体"), ), System.Drawing.Brushes.Black, , ); Brush br = new SolidBrush(Color.Black);
Pen p = new Pen(br, barcode.width);
Brush br1 = new SolidBrush(Color.White);
Pen p1 = new Pen(br1, barcode.width);
inputString = inputString.Trim();
float x = ;//这里是距离left for (int i = ; i < inputString.Length; i++)
{
for (int j = ; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % == )
{
//这里的2是距离top,30是条码高
gh.DrawLine(p, x, , x, );
x = x + barcode.width;
}
else
{
gh.DrawLine(p1, x, , x, );
x = x + barcode.width;
}
}
}
gh.Dispose();
}
} //预览
private void button3_Click(object sender, EventArgs e)
{
//保存为图片
Bitmap bmp = new Bitmap(panel1.Width, panel1.Height);
panel1.DrawToBitmap(bmp, new Rectangle(, , bmp.Width, bmp.Height));
bmp.Save(AppDomain.CurrentDomain.BaseDirectory + "1.png", System.Drawing.Imaging.ImageFormat.Jpeg); //预览
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.WindowState = FormWindowState.Maximized;
this.printPreviewDialog1.ShowDialog();
} private void button1_Click(object sender, EventArgs e)
{
PaintEventArgs pe = new PaintEventArgs(panel1.CreateGraphics(), panel1.ClientRectangle);
DrawLine(pe);
} private void panel1_Paint(object sender, PaintEventArgs e)
{
DrawLine(e); /*
//其他什么地方都不写,就写这里也可以
//画边框
Rectangle rc = e.ClipRectangle;
rc.Width = rc.Width - 1;
rc.Height = rc.Height - 1;
e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.Red)), rc); label11.Text = "数量:" + textBox1.Text;
barcode.width = Convert.ToSingle(Mwidth.Text);
Graphics gh = e.Graphics;
if (dataToEncode.Text != "")
{
inputString = barcode.getCodeB(dataToEncode.Text);
//drawCodePic(); //把之前显示的用白色覆盖掉
//gh.DrawRectangle(new Pen(Color.Black), new Rectangle(new Point(0, 0), new Size(413, 40)));
gh.FillRectangle(new SolidBrush(Color.White), new Rectangle(new Point(1, 70), new Size(411, 38))); Brush br = new SolidBrush(Color.Black);
Pen p = new Pen(br, barcode.width);
Brush br1 = new SolidBrush(Color.White);
Pen p1 = new Pen(br1, barcode.width);
inputString = inputString.Trim();
float x = 10;//这里是距离left //这里想把条码置中,已经画好了,怎么移动位置呢?
//先计算条码的width
float w = 0;
for (int i = 0; i < inputString.Length; i++)
{
for (int j = 0; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % 2 == 0)
{
w = w + barcode.width;
}
else
{
w = w + barcode.width;
}
}
}
x = (panel1.Width - (int)w) / 2; for (int i = 0; i < inputString.Length; i++)
{
for (int j = 0; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % 2 == 0)
{
//这里的2是距离top,30是条码高
gh.DrawLine(p, x, 70, x, 90);
x = x + barcode.width;
}
else
{
gh.DrawLine(p1, x, 70, x, 90);
x = x + barcode.width;
}
}
}
} if (textBox1.Text != "")
{
inputString = barcode.getCodeB(textBox1.Text);
//drawCodePic2(); //把之前显示的用白色覆盖掉
//gh.DrawRectangle(new Pen(Color.Black), new Rectangle(new Point(0, 0), new Size(413, 40)));
gh.FillRectangle(new SolidBrush(Color.White), new Rectangle(new Point(1, 26), new Size(411, 38))); Brush br = new SolidBrush(Color.Black);
Pen p = new Pen(br, barcode.width);
Brush br1 = new SolidBrush(Color.White);
Pen p1 = new Pen(br1, barcode.width);
inputString = inputString.Trim();
float x = 214;//这里是距离left for (int i = 0; i < inputString.Length; i++)
{
for (int j = 0; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % 2 == 0)
{
//这里的2是距离top,30是条码高
gh.DrawLine(p, x, 26, x, 46);
x = x + barcode.width;
}
else
{
gh.DrawLine(p1, x, 26, x, 46);
x = x + barcode.width;
}
}
}
gh.Dispose();
}
*/
} public void drawCodePic2()
{
//把之前显示的用白色覆盖掉
Graphics gh = panel1.CreateGraphics();//这种写法条码预览或打印都出不来,NND
//gh.DrawRectangle(new Pen(Color.Black), new Rectangle(new Point(0, 0), new Size(413, 40)));
gh.FillRectangle(new SolidBrush(Color.White), new Rectangle(new Point(, ), new Size(, ))); Brush br = new SolidBrush(Color.Black);
Pen p = new Pen(br, barcode.width);
Brush br1 = new SolidBrush(Color.White);
Pen p1 = new Pen(br1, barcode.width);
Graphics graphics = panel1.CreateGraphics();//这种写法条码预览或打印都出不来,NND
inputString = inputString.Trim();
float x = ;//这里是距离left
for (int i = ; i < inputString.Length; i++)
{
for (int j = ; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % == )
{
//这里的2是距离top,30是条码高
graphics.DrawLine(p, x, , x, );
x = x + barcode.width;
}
else
{
graphics.DrawLine(p1, x, , x, );
x = x + barcode.width;
}
}
}
graphics.Dispose();
} public void drawCodePic()
{
//把之前显示的用白色覆盖掉
Graphics gh = panel1.CreateGraphics();//这种写法条码预览或打印都出不来,NND
//gh.DrawRectangle(new Pen(Color.Black), new Rectangle(new Point(0, 0), new Size(413, 40)));
gh.FillRectangle(new SolidBrush(Color.White), new Rectangle(new Point(, ), new Size(, ))); Brush br = new SolidBrush(Color.Black);
Pen p = new Pen(br, barcode.width);
Brush br1 = new SolidBrush(Color.White);
Pen p1 = new Pen(br1, barcode.width);
Graphics graphics = panel1.CreateGraphics();
inputString = inputString.Trim();
float x = ;//这里是距离left //这里想把条码置中,已经画好了,怎么移动位置呢?
//先计算条码的width
float w = ;
for (int i = ; i < inputString.Length; i++)
{
for (int j = ; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % == )
{
w = w + barcode.width;
}
else
{
w = w + barcode.width;
}
}
}
x = (panel1.Width - (int)w) / ; for (int i = ; i < inputString.Length; i++)
{
for (int j = ; j < Convert.ToInt32(inputString[i].ToString()); j++)
{
if (i % == )
{
//这里的2是距离top,30是条码高
graphics.DrawLine(p, x, , x, );
x = x + barcode.width;
}
else
{
graphics.DrawLine(p1, x, , x, );
x = x + barcode.width;
}
}
}
graphics.Dispose();
} private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
//打印内容 为panel1
Bitmap _NewBitmap = new Bitmap(panel1.Width, panel1.Height);
panel1.DrawToBitmap(_NewBitmap, new Rectangle(, , _NewBitmap.Width, _NewBitmap.Height));
e.Graphics.DrawImage(_NewBitmap, , , _NewBitmap.Width, _NewBitmap.Height);
} private void button2_Click(object sender, EventArgs e)
{
Control.CheckForIllegalCrossThreadCalls = false; //打印次数
printDocument1.PrinterSettings.Copies = ;// Convert.ToInt16(txt_print.Text.Trim()); this.printDocument1.Print();
/*
//换成多线程方式
if (thre == null)
{
thre = new Thread(this.printDocument1.Print);
thre.Start();
}
if (thre.ThreadState == ThreadState.Stopped)
{
thre.Abort();
GC.Collect();
thre = new Thread(this.printDocument1.Print);
thre.Start();
}
*/
} private void button4_Click(object sender, EventArgs e)
{
this.pageSetupDialog1.ShowDialog();
}
}
}

DEMO3 相关类库

请参考类库ZXing.Net, 该类库也能实现二维码的生成,使用起来较为方便,而且开源。

jQuery二维条形码插件 My QR Code

jQuery条形码插件 Barcode

jQuery条形码插件 jQuery Barcode

jQuery生成二维条形码 jquery.qrcode.js

Java条形码解决方案 Barbecue

Java二维条形码开发包 QR Code Library

条形码生成和识别库 Aspose.BarCode

.NET条形码开发包 NetBarcodeWriter

C语言二维条形码解析库 libqrencode

条形码扫描软件 Zebra barcode reader

参考文章

 
 
 
 
 

C# 一维码生成的更多相关文章

  1. 一维码生成 c# winform GUI

    最近看到同事小红在做一维码,感觉挺好玩,于是就在网上找了一个例子来玩玩. 下面的代码均为网上的代码,做了一些整理,但是忘记了出处,原作者看到可以提醒我,谢谢. 首先,一维码的相关知识可以先百度一下:h ...

  2. 使用Zxing 一维码

    最近看到满大街的二维码扫码有惊喜,对二维码也有过一些了解,想看看到底是什么原理,在网上找了一些资料,自己弄了一个实例,采用的是MVC,贴出来分享一下 一维码生成 Controller public A ...

  3. Android生成一维码

    BitmapUtil.java里面添加个方法 /** * 用于将给定的内容生成成一维码 注:目前生成内容为中文的话将直接报错,要修改底层jar包的内容 * * @param content 将要生成一 ...

  4. C# 使用ZXing.NET生成一维码、二维码

    以上图片是本示例中的实际运行效果,在生活中我们的一维码(也就是条形码).二维码 使用已经非常广泛,那么如何使用c#.net来进行生成一维码(条形码).二维码呢? 使用ZXing来生成是非常方便的选择, ...

  5. zxing解析生成一维码二维码

    @web界面实现扫一扫 二维码工具类 package util; import java.awt.BasicStroke; import java.awt.Graphics; import java. ...

  6. android二维码生成

    前生: 一维码:条形码  数字 缺点:不好看,占面积, 好了,请看效果图: 在准备之前我们要导一个包:core-3.2.1.jar 下载请访问: http://download.csdn.net/do ...

  7. zxing 一维码部分深入分析与实际应用,识别卡片数量,Android数卡器

    打算修改zxing 源码应用到其它方面,所以最近花了点时间阅读其源码,无意中找到这篇博客,条码扫描二维码扫描——ZXing android 简化源码分析 对过程的分析还是可以参考的.原作者给出的一个基 ...

  8. java利用zxing编码解码一维码与二维码

    最近琢磨了一下二维码.一维码的编码.解码方法,感觉google的zxing用起来还是比较方便. 本人原创,欢迎转载,转载请标注原文地址:http://wallimn.iteye.com/blog/20 ...

  9. 【PYTHON】二维码生成

    二维码是什么? 二维码从一维码扩展而来,增加另一维具有可读性的条码,用黑白矩形图形表示二进制数据,被设备扫描后获取其中包含的信息,二维码的长度.宽度均记载着数据,二维码具有定位点和容错机制,即便没有辨 ...

随机推荐

  1. MpVue开发之组件引入的问题

    再一次开发订餐系统中,遇到订餐页面引入头部商品列表,底部组件时,报错,模块编译失败,未进入缓存区. 我以为是新添加的模块没有重新启动导致的,然后重新与运行npm run dev后还是失败, 最后经过反 ...

  2. 【剑指offer】左旋转字符串,C+实现

    原创博文,转载请注明出处! 本题牛客网地址 本题代码的github地址 本系列文章的索引地址 # 题目 # 思路 先局部翻转,后整体翻转.举例:abcdefg先局部翻转为bagfedc,后整体翻转为c ...

  3. BZOJ3680 吊打XXX 【模拟退火】

    Description gty又虐了一场比赛,被虐的蒟蒻们决定吊打gty.gty见大势不好机智的分出了n个分身,但还是被人多势众的蒟蒻抓住了.蒟蒻们将n个gty吊在n根绳子上,每根绳子穿过天台的一个洞 ...

  4. 加密shell

    shc -v -r -T -f script-name >/dev/null 2>&1

  5. WPF/UWP 的 Grid 布局竟然有 Bug,还不止一个!了解 Grid 中那些未定义的布局规则

    只要你用 XAML 写代码,我敢打赌你一定用各种方式使(nuè)用(dài)过 Grid.不知你有没有在此过程中看到过 Grid 那些匪夷所思的布局结果呢? 本文将带你来看看 Grid 布局中的 Bu ...

  6. 语义耦合(Semantic Coupling)

    跟小伙伴一起重构一段 UI,试图将用户界面和业务代码分离的时候,小伙伴试图在业务代码中直接调用 UI.我们当然都知道这会产生耦合,于是小伙伴试图定义一些属性.变量或接口来解决这个耦合.虽然在代码的静态 ...

  7. maven的pom.xml文件配置说明

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  8. 错误:Authentication with old password no longer supported, use 4.1 style passwords.

    今天重新装了系统,mysql connector 使用了官网的最新版本(6.8.3). 启动项目出现标题中的错误.原因大家谷歌. 解决方法,使用低版本的 connector. 我使用的是 6.5.6 ...

  9. MySQL-Proxy 读写分离、同步延时问题解决方案

    MySQL-Proxy 读写分离.同步延时问题解决方案 使用MySQL将读写请求转接到主从Server. 一 安装MySQL Proxy MySQL Proxy的二进制版非常方便,下载解压缩后即用. ...

  10. 使用gopherjs 进行web 应用开发

    1. 安装 go get -u github.com/gopherjs/gopherjs 2. 基本代码使用 备注: 这个只是一个简单的demo,进行pi 运算,结果还真是快 a. code gola ...