,新建C#控制台应用程序(Excel创建图表)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; //解决方案中 添加引用 Execl(COM组件) using MSExcel = Microsoft.Office.Interop.Excel;
using System.IO;
using System.Reflection; namespace ExeclCharts
{
class Program
{
static void Main(string[] args)
{
object path; //文件路径变量
MSExcel.Workbook excelDoc; //Excel文档变量
MSExcel.Application excelApp; //Excel应用程序变量 MSExcel.Workbook excelDoc; //Excel文档变量
path = @"C:\ExcelData\MyExcel.xlsx"; //路径
excelApp = new MSExcel.Application(); //初始化
//vs2010不能用ApplicationClass(),而用Application();
//如果已存在,则删除
if (File.Exists((string)path))
{
File.Delete((string)path);
}
//由于使用的是COM库,因此有许多变量需要用Nothing代替 Object Nothing = Missing.Value;
Object Nothing = Missing.Value;
excelDoc = excelApp.Workbooks.Add(Nothing);
//使用第一个工作表作为插入数据的工作表
MSExcel.Worksheet ws = (MSExcel.Worksheet)excelDoc.Sheets[]; //声明一个MSExcel.Range 类型的变量r
MSExcel.Range r;
//获得A1处的表格,并赋值
r = ws.get_Range("A1", "A1");
r.Value2 = "";
//获得A2处的表格,并赋值
r = ws.get_Range("A2", "A2");
r.Value2 = "5.7";
//获得A3处的表格,并赋值
r = ws.get_Range("A3", "A3");
r.Value2 = "4.8";
//获得A4处的表格,并赋值
r = ws.get_Range("A4", "A4");
r.Value2 = "9.2"; //获得A1处的表格,并赋值
r = ws.get_Range("B1", "B1");
r.Value2 = "";
//获得A2处的表格,并赋值
r = ws.get_Range("B2", "B2");
r.Value2 = "5.7";
//获得A3处的表格,并赋值
r = ws.get_Range("B3", "B3");
r.Value2 = "4.8";
//获得A4处的表格,并赋值
r = ws.get_Range("B4", "B4");
r.Value2 = "9.2"; //获得A1处的表格,并赋值
r = ws.get_Range("C1", "C1");
r.Value2 = "";
//获得A2处的表格,并赋值
r = ws.get_Range("C2", "C2");
r.Value2 = "5.7";
//获得A3处的表格,并赋值
r = ws.get_Range("C3", "C3");
r.Value2 = "4.8";
//获得A4处的表格,并赋值
r = ws.get_Range("C4", "C4");
r.Value2 = "9.2"; excelDoc.Charts.Add(Nothing, Nothing, Nothing, Nothing);
excelDoc.ActiveChart.ChartType = MSExcel.XlChartType.xlBubble;//xlBubble 指散点图 三维气泡图(xlBubble3DEffect)
excelDoc.ActiveChart.SetSourceData(ws.get_Range("A1", "C4"), MSExcel.XlRowCol.xlColumns);
excelDoc.ActiveChart.Location(MSExcel.XlChartLocation.xlLocationAsObject, "sheet1");
excelDoc.ActiveChart.HasTitle = true;
excelDoc.ActiveChart.ChartTitle.Text = "创建 - 散点图表";
excelDoc.ActiveChart.HasDataTable = false;
//WdSaveFormat为Excel文档的保存格式
object format = MSExcel.XlFileFormat.xlWorkbookDefault;
//将excelDoc文档对象的内容保存为XLSX文档
excelDoc.SaveAs(path, format, Nothing, Nothing, Nothing, Nothing, MSExcel.XlSaveAsAccessMode.xlExclusive, Nothing, Nothing, Nothing, Nothing, Nothing);
//关闭excelDoc文档对象
excelDoc.Close(Nothing, Nothing, Nothing); //关闭excelApp组件对象
excelApp.Quit();
Console.WriteLine(path + " 创建完毕!");
}
}
} ,新建空网站,添加一个页面,在页面中添加一个Button,添加事件(保存本地,word获取) using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Windows.Forms;//解决方案中 添加引用 System.Windows.Forms(.NET组件)
using System.Threading; using Microsoft.Office.Interop.Excel;
using MSExcel = Microsoft.Office.Interop.Excel;
using System.IO;
using System.Reflection; using Microsoft.Office.Interop.Word;
using MSWord = Microsoft.Office.Interop.Word; namespace WebCharts
{
public partial class Index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ } public void CopyExcel()
{
string exclePath = @"C:\ExcelData\MyExcel.xlsx";
int StartRow = ; //读的起始行
Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application();//引用Excel对象
Microsoft.Office.Interop.Excel.Workbook workbook = excel.Workbooks.Add(exclePath);
excel.UserControl = true;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
excel.Visible = false;
for (int i = ; i < workbook.Worksheets.Count; i++)//循环取所有的Sheet.
{
Microsoft.Office.Interop.Excel.Worksheet sheet = workbook.Worksheets.get_Item(i + ) as Microsoft.Office.Interop.Excel.Worksheet;//从1开始.
for (int row = StartRow; row <= sheet.UsedRange.Rows.Count; row++)
{
//取单元格值;
for (int col = ; col <= sheet.UsedRange.Columns.Count; col++)
{
Microsoft.Office.Interop.Excel.Range range = sheet.Cells[row, col] as Microsoft.Office.Interop.Excel.Range;
sb.Append("," + col.ToString() + ":" + range.Text);
}
sb.Append(System.Environment.NewLine);
//取存图片;
if (sheet.Shapes.Count > row - StartRow)
{
Microsoft.Office.Interop.Excel.Shape s = sheet.Shapes.Item(row - StartRow + ) as Microsoft.Office.Interop.Excel.Shape; Clipboard.Clear();//Clipboard类是引用 .NET组件中System.Windows.Forms的
s.CopyPicture(Appearance.Button, Microsoft.Office.Interop.Excel.XlCopyPictureFormat.xlBitmap); //COPY到内存。
IDataObject iData = Clipboard.GetDataObject(); if (iData != null && iData.GetDataPresent(DataFormats.Bitmap))
{
System.Drawing.Image img = Clipboard.GetImage(); //从内存读取图片
if (img != null)
{
//保存图片位置
img.Save(@"C:\\ExcelData\\另存为.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); //保存到本地
}
}
else
{
}
}
}
}
workbook.Close(false, null, null);
excel.Quit();
} protected void btnExcel_Click1(object sender, EventArgs e)
{
Thread cbThread = new Thread(new ThreadStart(CopyExcel));
cbThread.TrySetApartmentState(ApartmentState.STA); //指定单线程,否则无法从剪贴板中读取数据
cbThread.Start(); /*
* 创建Word获取上面的图片
*/
object path; //文件路径变量
string strContent; //文本内容变量
MSWord.Application wordApp; //Word应用程序变量
MSWord.Document wordDoc; //Word文档变量 path = @"C:\\ExcelData\\MyWord.docx"; //路径 wordApp = new MSWord.Application(); //初始化 //如果文件已存在,则删除
if (File.Exists((string)path))
{
File.Delete((string)path);
} //由于使用的是COM库,因此有许多变量需要用Missing.Value代替
Object Nothing = Missing.Value;
wordDoc = wordApp.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing); //设置文档的行间距
wordApp.Selection.ParagraphFormat.LineSpacing = 15f; //移动焦点并换行
object count = ;
object WdLine = WdUnits.wdLine;//换一行
wordApp.Selection.MoveDown(ref WdLine, ref count, ref Nothing);//移动焦点
wordApp.Selection.TypeParagraph();//插入段落 //文档中创建表格
Microsoft.Office.Interop.Word.Table newTable = wordDoc.Tables.Add(wordApp.Selection.Range, , , ref Nothing, ref Nothing);
//设置表格样式
//newTable.Borders.OutsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleThickThinMedGap;//表格外框线
newTable.Borders.InsideLineStyle = WdLineStyle.wdLineStyleSingle;//表格内架线
//设置表格内框颜色
newTable.Borders.InsideColor = WdColor.wdColorWhite;// White:白色
//设置表格的背景颜色
newTable.Shading.BackgroundPatternColor = Microsoft.Office.Interop.Word.WdColor.wdColorGray50; newTable.Columns[].Width = 100f;
newTable.Columns[].Width = 220f;
newTable.Columns[].Width = 105f; //填充表格内容(第一行)
newTable.Cell(, ).Range.Text = "快速工况数据分析报告";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为24
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格
wordApp.Selection.Cells.VerticalAlignment = WdCellVerticalAlignment.wdCellAlignVerticalCenter;//垂直居中
wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;//水平居中 //填充表格内容(第二行)
newTable.Cell(, ).Range.Text = "基本信息:\n 1, \n 2,\r 3,";
newTable.Cell(, ).Range.Font.Color = WdColor.wdColorDarkBlue;//设置单元格内字体颜色
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格
wordApp.Selection.Cells.VerticalAlignment = WdCellVerticalAlignment.wdCellAlignVerticalCenter; //填充表格内容(第3行)
newTable.Cell(, ).Range.Text = "名称:";
newTable.Cell(, ).Range.Text = "BrandName";//?
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格 //填充表格内容(第4行)
newTable.Cell(, ).Range.Text = "文档创建时间:";
newTable.Cell(, ).Range.Text = DateTime.Now.ToString("yyyy年M月d日h时s分m秒fff毫秒");//
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格 //填充表格内容(第5行)
newTable.Cell(, ).Range.Text = "一、转速-扭矩百分比的duty-Cycle图;(Map)";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第6行)
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格
newTable.Cell(, ).Select();//选中一行
//插入图片
string A6FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A6LinkToFile = false;
object A6SaveWithDocument = true;
object A6Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A6FileName, ref A6LinkToFile, ref A6SaveWithDocument, ref A6Anchor); //填充表格内容(第7行)
newTable.Cell(, ).Range.Text = "二、转速-扭矩百分比的气泡图";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第8行)
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格
newTable.Cell(, ).Select();//选中一行
//插入图片
string A8FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A8LinkToFile = false;
object A8SaveWithDocument = true;
object A8Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A8FileName, ref A8LinkToFile, ref A8SaveWithDocument, ref A8Anchor); //填充表格内容(第9行)
newTable.Cell(, ).Range.Text = "三、车速-转速的散点图";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第10行)
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格
newTable.Cell(, ).Select();//选中一行
//插入图片
string A10FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A10LinkToFile = false;
object A10SaveWithDocument = true;
object A10Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A10FileName, ref A10LinkToFile, ref A10SaveWithDocument, ref A10Anchor); //填充表格内容(第11行)
newTable.Cell(, ).Range.Text = "四、车速柱状图";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第12行)
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格
newTable.Cell(, ).Select();//选中一行
//插入图片
string A12FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A12LinkToFile = false;
object A12SaveWithDocument = true;
object A12Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A12FileName, ref A12LinkToFile, ref A12SaveWithDocument, ref A12Anchor);
//将图片设置为四周环绕型
Microsoft.Office.Interop.Word.Shape c = wordDoc.Application.ActiveDocument.InlineShapes[].ConvertToShape();
c.WrapFormat.Type = WdWrapType.wdWrapSquare; //填充表格内容(第13行)
newTable.Cell(, ).Range.Text = "五、转速柱状图";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第14行)
newTable.Cell(, ).Merge(newTable.Cell(, ));
newTable.Cell(, ).Select();//选中一行
//插入图片
string A14FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A14LinkToFile = false;
object A14SaveWithDocument = true;
object A14Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A14FileName, ref A14LinkToFile, ref A14SaveWithDocument, ref A14Anchor);
//将图片设置为四周环绕型
Microsoft.Office.Interop.Word.Shape c1 = wordDoc.Application.ActiveDocument.InlineShapes[].ConvertToShape();
c1.WrapFormat.Type = WdWrapType.wdWrapSquare; //填充表格内容(第15行)
newTable.Cell(, ).Range.Text = "六、档位使用柱状图;(通过车辆信息设定来计算档位)";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第16行)
newTable.Cell(, ).Merge(newTable.Cell(, ));
newTable.Cell(, ).Select();//选中一行
//插入图片
string A16FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A16LinkToFile = false;
object A16SaveWithDocument = true;
object A16Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A16FileName, ref A16LinkToFile, ref A16SaveWithDocument, ref A16Anchor);
//将图片设置为四周环绕型
Microsoft.Office.Interop.Word.Shape c2 = wordDoc.Application.ActiveDocument.InlineShapes[].ConvertToShape();
c2.WrapFormat.Type = WdWrapType.wdWrapSquare; //填充表格内容(第17行)
newTable.Cell(, ).Range.Text = "七、油门";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第18行)
newTable.Cell(, ).Merge(newTable.Cell(, ));
newTable.Cell(, ).Select();//选中一行
//插入图片
string A18FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A18LinkToFile = false;
object A18SaveWithDocument = true;
object A18Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A18FileName, ref A18LinkToFile, ref A18SaveWithDocument, ref A18Anchor); //填充表格内容(第19行)
newTable.Cell(, ).Range.Text = "八、转速-油耗 气泡图";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第20行)
newTable.Cell(, ).Merge(newTable.Cell(, ));
newTable.Cell(, ).Select();//选中一行
//插入图片
string A20FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A20LinkToFile = false;
object A20SaveWithDocument = true;
object A20Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A20FileName, ref A20LinkToFile, ref A20SaveWithDocument, ref A20Anchor); //填充表格内容(第21行)
newTable.Cell(, ).Range.Text = "九、转速-油耗、转速扭矩混合气泡图";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第22行)
newTable.Cell(, ).Merge(newTable.Cell(, ));
newTable.Cell(, ).Select();//选中一行
//插入图片
string A22FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A22LinkToFile = false;
object A22SaveWithDocument = true;
object A22Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A22FileName, ref A22LinkToFile, ref A22SaveWithDocument, ref A22Anchor); //填充表格内容(第23行)
newTable.Cell(, ).Range.Text = "十、海拔高度时域曲线,在图上增加两个轴绘制出车速、转速的曲线";
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为14
newTable.Cell(, ).Range.Bold = ;//设置单元格中字体为粗体
newTable.Cell(, ).Merge(newTable.Cell(, ));
//填充表格内容(第24行)
newTable.Cell(, ).Merge(newTable.Cell(, ));
newTable.Cell(, ).Select();//选中一行
//插入图片
string A24FileName = @"C:\\ExcelData\\另存为.jpg"; //图片所在路径
object A24LinkToFile = false;
object A24SaveWithDocument = true;
object A24Anchor = wordDoc.Application.Selection.Range;
wordDoc.Application.ActiveDocument.InlineShapes.AddPicture(A24FileName, ref A24LinkToFile, ref A24SaveWithDocument, ref A24Anchor); //填充表格内容(第25行)
newTable.Cell(, ).Range.Text = "文档创建时间:" + DateTime.Now.ToString("yyyy年M月d日h时s分m秒fff毫秒");
newTable.Cell(, ).Range.Font.Size = ;//设置单元格中字体大小为24
newTable.Cell(, ).Merge(newTable.Cell(, ));//合并单元格
//填充表格内容(第16行)
//newTable.Cell(16, 1).Merge(newTable.Cell(16, 3));
//newTable.Cell(16, 1).Select();//选中一行 //WdSaveFormat为Word 2007文档的保存格式
object format = MSWord.WdSaveFormat.wdFormatDocumentDefault;
//将wordDoc文档对象的内容保存为DOCX文档
wordDoc.SaveAs(ref path, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing);
//关闭wordDoc文档对象
wordDoc.Close(ref Nothing, ref Nothing, ref Nothing);
//关闭wordApp组件对象
wordApp.Quit(ref Nothing, ref Nothing, ref Nothing);
Console.WriteLine(path + " 创建完毕!");
}
}
}

转发原文:http://www.2cto.com/kf/201312/261570.html

C#操作office进行Excel图表创建,保存本地,word获取的更多相关文章

  1. C# 创建EXCEL图表并保存为图片

    数据表格能够清晰的呈现数据信息,但是我们对于一些繁杂多变的数据想要很直观的看到数据变化走势或者数据的占比时,数据图表会更具代表性,并且在呈现数据信息上也更形象,也能获取更多纯数字信息所不能直接展现的信 ...

  2. Microsoft.Office.Interop.Excel操作Excel文件时出现的问题及解决方案

    问题描述: Microsoft.Office.Interop.Excel.Worksheet 打不开文件 Microsoft Office Excel 不能访问文件"a.xls". ...

  3. Excel操作 Microsoft.Office.Interop.Excel.dll的使用

    ----转载: http://www.cnblogs.com/lanjun/archive/2012/06/17/2552920.html 先说说题外话,前段时间近一个月,我一直在做单据导入功能,其中 ...

  4. C# 创建含多层分类标签的Excel图表

    相较于数据,图表更能直观的体现数据的变化趋势.在数据表格中,同一数据值,可能同时代表不同的数据分类,表现在图表中则是一个数据体现在多个数据分类标签下.通常生成的图表一般默认只有一种分类标签,下面的方法 ...

  5. C# 使用自带Microsoft.Office.Interop.Excel简单操作Excel文件

    项目添加应用 Microsoft.Office.Interop.Excel.dll 文件 引用命名空间: using Excel = Microsoft.Office.Interop.Excel; 简 ...

  6. PHPExcel 是用来操作Office Excel 文档的一个PHP类库

    PHPExcel 是用来操作Office Excel 文档的一个PHP类库,它基于微软的OpenXML标准和PHP语言.可以使用它来读取.写入不同格式的电子表格,如 Excel (BIFF) .xls ...

  7. c#操作excel方式三:使用Microsoft.Office.Interop.Excel.dll读取Excel文件

    1.引用Microsoft.Office.Interop.Excel.dll 2.引用命名空间.使用别名 using System.Reflection; using Excel = Microsof ...

  8. 基于C#语言利用Microsoft.office.introp.excel操作Excel总结

    终于解决了质量评估测试软件在任意装有excel(2010以下版本)的电脑上正常使用的问题!!!!!!!!!! 可到http://www.microsoft.com/en-sa/download/con ...

  9. Microsoft.Office.Interop.Excel Find 操作

    public void SearchLoactions(string filepath, int start, int end ,string expectvalue) { if (end >= ...

随机推荐

  1. redis 数据库维护之 key 大小获取

    获得 redis key 大小 redis 用过一段时间后,发现一个KEY每天需更新值,但总是更新不全,故此为了定位问题,整理此脚本,辅助监控一下 写了两个脚本 注意:需要提前从 https://gi ...

  2. 深入理解C# 静态类与非静态类、静态成员的区别

    静态类 静态类与非静态类的重要区别在于静态类不能实例化,也就是说,不能使用 new 关键字创建静态类类型的变量.在声明一个类时使用static关键字,具有两个方面的意义:首先,它防止程序员写代码来实例 ...

  3. 8086CPU各寄存器的用途

    8086 有14个16位寄存器,这14个寄存器按其用途可分为(1)通用寄存器.(2)指令指针.(3)标志寄存器和(4)段寄存器等4类. 1.通用寄存器有8个, 又可以分成2组,一组是数据寄存器(4个) ...

  4. 分布式数据存储 - MySQL主从复制高可用方案

    前面几篇文章说道MySQL数据库的高可用方案主从复制.主从复制的延迟产生原因.延迟检测及延迟解决方案(并未从根本上解决),这种主从复制方案保证数据的冗余的同时可以做读写分离来分担系统压力但是并非是高可 ...

  5. POJ 1961 2406 (KMP,最小循环节,循环周期)

    关于KMP的最短循环节.循环周期,请戳: http://www.cnblogs.com/chenxiwenruo/p/3546457.html (KMP模板,最小循环节) POJ 2406  Powe ...

  6. Mime Types

    Mime Types 1.http://www.freeformatter.com/mime-types-list.html 2.http://www.webmaster-toolkit.com/mi ...

  7. 关于Try/Catch 代码块

    应当放在Try/Catch 代码块中的常见任务包括连接到一个数据库或与其交互.处理文件.调用Web 服务. 老实说,我这人很少有打破沙锅问到底的精神.不过昨晚听一技术人员跟他的项目经理说要在程序中使用 ...

  8. 传说中的WCF(4):发送和接收SOAP头

    如果你实在不明白Header是个啥玩意儿,你就想一想你发送电子邮件时,是不是有个叫“附件”的东东?对啊,那么SOAP头是不是可以理解为一种附加信息?就是附加到消息正文的内容. 消息正文又是啥?WCF除 ...

  9. 关于linux下rar文件的解压缩操作

    在linux系统下.本身没有对rar文件操作的命令,如果需要对rar格式的文件操作,我们需要安装第三方的软件rar以及unrar. 1.linux下rar管理软件下载的官方地址为:http://www ...

  10. uploadify IO Error/http error 413

    阿里云的服务器 linux 服务器,php 环境,上传附件问题,记录分享一下: 开始测试的时候,都是图片,小附件,没什么问题 系统上线后,发现大的附件上传 有问题,报错 IO Error 开始检查程序 ...