unity生成pdf格式,首先需要导入iTextSharp.dll ,下面是我写的一些方法,可以直接用.直接贴代码,

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using iTextSharp.text.pdf;
using iTextSharp.text;
using System.Text.RegularExpressions;
using System.Data.OracleClient;
using System; //需要用到的数据结构
public class PdfUserInformation
{
public string goodsName;
public string youzhanType;
public string cvsLevel;
public string writeTime;
public string creater;
public string creatTime;
};
//数据结构
public class PdfInformation
{
public string mID;
public string mName;
public string mReserve;
// ....
}; public class PDFMakerManager { public static PDFMakerManager PDFInstance;
public static PDFMakerManager createPDFMakerManager()
{
if(PDFInstance==null)
{
PDFInstance = new PDFMakerManager ();
} return PDFInstance;
} //获取物品的子物体名字 通过子物体的名字获取物体 返回物体的链表
public List<PdfInformation> getObjChildsName(Transform mParentObj)
{ if(mParentObj!=null)
{
List<string> mChildObjs = new List<string>();
List<PdfInformation> mInfoList = new List<PdfInformation>();
foreach (Transform mChildTransform in mParentObj)
{
mChildObjs.Add(mChildTransform.gameObject.name);
Debug.Log(mChildTransform.gameObject.name);
}
//获取 数据库 信息
getPdfDatasFromDB();
//通过子物体的名字 获取物体信息
for (int i = 0; i < mChildObjs.Count; i++)
{
mInfoList.Add(mDirectoryData[mChildObjs[i]]);
}
return mInfoList;
}
return null;
}
//每行五个 还有问题,由于需求以及时间关系,没时间去管了 谁看到了可以帮忙解决下,.thanks
List<PdfInformation> mGoodsInfoList = new List<PdfInformation>();
public List<List<PdfInformation>> getAllGoods(List<PdfInformation> mList)
{
List<List<PdfInformation>> mGoodsAll = new List<List<PdfInformation>>();
List<List<PdfInformation>> mGoods = new List<List<PdfInformation>>(); for (int i = 1; i <= mList.Count;i++ )
{
mGoodsInfoList.Add(mList[i-1]); if(i%5==0)
{ mGoodsAll.Add(mGoodsInfoList);
Debug.Log("xx"+mGoodsInfoList.Count);
mGoodsInfoList.Clear(); for (int j = 0; j < mGoodsAll.Count; j++)
{
Debug.Log("InfoList [[[" + j + "]]]is:" + mGoodsAll[j].Count);
} }else if(i%5!=0&&i==mList.Count)
{
mGoodsAll.Add(mGoodsInfoList);
mGoodsInfoList.Clear();
}
}
Debug.Log("InfoList [[[is:" + mGoodsAll.Count);
//for (int j = 0; j < mGoodsAll.Count;j++ )
//{
// Debug.Log("InfoList [[[" + j + "]]]is:" + mGoodsAll[j].Count);
//} return mGoodsAll;
}
//从数据库 获取 PDF 信息
Dictionary<string, PdfInformation> mDirectoryData = new Dictionary<string, PdfInformation>();
public List<PdfInformation> getPdfDatasFromDB()
{
List<PdfInformation> mInfoList = new List<PdfInformation>(); Oracle mDB = new Oracle ();
try
{
string mSearch = "select * from mdb";
mInfoList = mDB.Select(mSearch);
mDirectoryData = mDB.getPdfDictionary();
}catch(Exception e)
{
mDB.Close();
Debug.Log("sql error");
}
return mInfoList;
} // / pdf 行
public PdfPTable CreateRankGoodsInforMationTable(List<List<PdfInformation>> mList)
{
PdfPTable mTable=new PdfPTable(1); mTable.SetTotalWidth(new float[]{300}); mTable.HorizontalAlignment = PdfPTable.LINECANVAS; if(mList.Count>0)
{
for(int i=0;i<mList.Count;i++)
{
Debug.Log("xx"+i+"xxxxxx:"+mList[i].Count);
// mTable.AddCell(CreateCell(CreateRowGoodsInforMationTable2(mList[i]),-1,0));
} } mTable.LockedWidth = true;
return mTable;
}
//
//pdf 列
PdfPTable CreateRowGoodsInforMationTable2(System.Collections.Generic.List<PdfInformation> mList)
{
PdfPTable mTable =new PdfPTable (mList.Count);
System.Collections.Generic.List<float> Width = new System.Collections.Generic.List<float> ();
if(mList.Count>0)
{
for(int i=0;i<mList.Count;i++)
{
Width.Add(80f);
}
}
float []mWidth = Width.ToArray();
mTable.HorizontalAlignment = PdfPTable.BACKGROUNDCANVAS; if (mWidth[0] != -1)
{
mTable.SetTotalWidth(mWidth);
}
mTable.LockedWidth = true;
for(int i=0;i<mList.Count;i++)
{ mTable.AddCell(CreateGoodsInformationCell(mList[i]));
}
mList.Clear();
return mTable;
} //pdf 图 暂时没用
byte[] GoodsImgPrint(Camera SmallCamera,GameObject TakeHuoJia)
{
int swidth = (int)(SmallCamera.WorldToScreenPoint(TakeHuoJia.transform.position + TakeHuoJia.renderer.bounds.size).x - SmallCamera.WorldToScreenPoint(TakeHuoJia.transform.position - TakeHuoJia.renderer.bounds.size).x); RenderTexture rt = new RenderTexture(Screen.width, resHeight, 72);
SmallCamera.pixelRect = new Rect(0, 0, Screen.width, Screen.height);
SmallCamera.targetTexture = rt;
Texture2D screenShot = new Texture2D(swidth + 100, resHeight, TextureFormat.ARGB32, false);
SmallCamera.Render();
RenderTexture.active = rt; screenShot.ReadPixels(new Rect(SmallCamera.WorldToScreenPoint(TakeHuoJia.transform.position - TakeHuoJia.renderer.bounds.size).x, 0, swidth + 100, resHeight), 0, 0);
screenShot.Apply();
SmallCamera.targetTexture = null;
RenderTexture.active = null; //
UnityEngine.Object.Destroy(rt);
byte[] bytes = screenShot.EncodeToPNG(); return bytes;
}
//打印物品详细信息 图 (左边字 右边图 分开的 ,写法一:pdf字和摄像头图)
public void PrintGoodsInformations2(string filePath, Camera mCam, GameObject mObj, PdfUserInformation mInfo)
{
Document document = new Document(new Rectangle(PageSize.A4.Height, PageSize.A4.Width));
PdfWriter.GetInstance(document, new FileStream(filePath, FileMode.Create));
document.Open(); PdfPTable tableAll = tableAll = CreateTable(2, PdfPTable.BACKGROUNDCANVAS, new float[] { document.PageSize.Width / 2 - 50, document.PageSize.Width / 2 - 50 }, true);
//
PdfPTable tableLeft = PrintGoodsInformations_Left(mInfo); Image tableRight = MakeCameraImg(mCam, 512, 512);//Image.GetInstance( GoodsImgPrint(mCam,mObj)); tableAll.AddCell(CreateCell(tableLeft, -1, 0));
tableAll.AddCell(CreateCell(tableRight, -1, 0));
document.Add(tableAll);
document.Close();
ShowTips.showTips(" 打印完成!文件保存在:" + filePath);
}
//打印物品详细信息 图 (左边字 右边图 分开的 ,写法2:摄像头全图,包括字和图)
public void PrintGoodsInformations(string filePath, Camera mCam,GameObject mObj,PdfUserInformation mInfo)
{
Document document = new Document(new Rectangle(PageSize.A4.Height, PageSize.A4.Width));
PdfWriter.GetInstance(document, new FileStream(filePath, FileMode.Create));
document.Open(); PdfPTable tableAll = CreateTable(1, PdfPTable.BACKGROUNDCANVAS, new float[] {document.PageSize.Width -100 }, true);
//
PdfPTable tableLeft = PrintGoodsInformations_Left(mInfo); Image tableRight = MakeCameraImg(mCam,680,512);//Image.GetInstance( GoodsImgPrint(mCam,mObj)); // tableAll.AddCell(CreateCell(tableLeft, -1, 0));
tableAll.AddCell(CreateCell(tableRight, -1, 0));
document.Add(tableAll);
document.Close();
ShowTips.showTips(" 打印完成!文件保存在:" + filePath);
} //打印物品详细信息 左边字 右边字
public void PrintGoodsInformations(string filePath,PdfUserInformation mInfo)
{
Document document = new Document(new Rectangle(PageSize.A4.Height,PageSize.A4.Width));
PdfWriter.GetInstance(document,new FileStream(filePath,FileMode.Create));
document.Open(); PdfPTable tableAll = CreateTable(2, PdfPTable.BACKGROUNDCANVAS, new float[] { document.PageSize.Width / 2 - 50, document.PageSize.Width / 2 - 50 }, true);
//
PdfPTable tableLeft = PrintGoodsInformations_Left(mInfo); //测试数据 ....
PdfInformation mInfo1 = new PdfInformation();
mInfo1.mName = "aaaa";
PdfInformation mInfo2 = new PdfInformation();
mInfo2.mName = "bbbbb"; List<PdfInformation> mInfoList = new List<PdfInformation>();
mInfoList.Add(mInfo1);
mInfoList.Add(mInfo2); PdfInformation mInfo3 = new PdfInformation();
mInfo3.mName = "ccccc";
PdfInformation mInfo4 = new PdfInformation();
mInfo4.mName = "ddddd"; List<PdfInformation> mInfoList2 = new List<PdfInformation>();
mInfoList2.Add(mInfo3);
mInfoList2.Add(mInfo4); List<List<PdfInformation>> mLLInfo = new List<List<PdfInformation>>();
mLLInfo.Add(mInfoList);
mLLInfo.Add(mInfoList2); //....... //测试数据 数据库数据
// List<List<PdfInformation>> mDBTestList = new List<List<PdfInformation>>();
//mDBTestList = getAllGoods(getPdfDatasFromDB()); //Debug.Log("DBList is:"+mDBTestList.Count);
//...... PdfPTable tableRight = CreateRankGoodsInforMationTable(mDBTestList);
tableRight.HorizontalAlignment = PdfPTable.BACKGROUNDCANVAS;
tableAll.AddCell(CreateCell(tableLeft, -1, 0));
tableAll.AddCell(CreateCell(tableRight,-1,0));
document.Add(tableAll);
document.Close();
ShowTips.showTips(" 打印完成!文件保存在:" + filePath); }
//详细信息的左半部分
PdfPTable PrintGoodsInformations_Left(PdfUserInformation mInfo)
{
PdfPTable tableHeaderR = CreateTable(1, PdfPTable.BACKGROUNDCANVAS, new float[] { -1 }, false);
PdfPTable tableHeaderminiR = CreateTable(2, PdfPTable.BACKGROUNDCANVAS, new float[] { 1, 3 }, false); Image mark = Image.GetInstance(Application.dataPath + "/Icon.png");
mark.ScaleAbsolute(250, 250);
mark.Alignment = Image.LEFT_BORDER;
tableHeaderminiR.AddCell(CreateCell(mark, 2, 0));//<<<<<<<<< //tableHeaderminiR.AddCell(CreateCell("商品", -1, 0, CreateFont(32, iTextSharp.text.Font.NORMAL)));//<<<<<<<<
tableHeaderminiR.AddCell(CreateCell("标题", -1, 0, CreateFont(32, iTextSharp.text.Font.NORMAL)));//<<<<<<<<
tableHeaderminiR.AddCell(CreateCell("xxx", -1, 0, CreateFont(22, iTextSharp.text.Font.NORMAL)));//<<<<<<<< PdfPTable tableDataR = CreateTable(1, PdfPTable.BACKGROUNDCANVAS, new float[] { 350 }, true);
tableDataR.AddCell(CreateCell("\n", -1, 0, CreateFont(12, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell("名称:\n", -1, -1, CreateFont(22, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell(mInfo.goodsName, -1, -1, CreateFont(20, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell("类型:\n", -1, -1, CreateFont(22, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell(mInfo.youzhanType, -1, -1, CreateFont(20, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell("级别:\n", -1, -1, CreateFont(22, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell(mInfo.cvsLevel, -1, -1, CreateFont(20, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell("时间:\n", -1, -1, CreateFont(22, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell(mInfo.writeTime, -1, -1, CreateFont(20, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell("创建者:", -1, -1, CreateFont(22, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell(mInfo.creater, -1, -1, CreateFont(20, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell("创建时间:\n", -1, -1, CreateFont(22, iTextSharp.text.Font.NORMAL)));
tableDataR.AddCell(CreateCell(mInfo.creatTime, -1, -1, CreateFont(20, iTextSharp.text.Font.NORMAL)));
tableHeaderR.AddCell(CreateCell(tableHeaderminiR, -1, 0));//<<<<<<<<
tableHeaderR.AddCell(CreateCell(tableDataR, -1, 0)); return tableHeaderR;
} //把摄像头视野 制作成png图片
private Rect CutRect = new Rect(0, 0, 1, 1);
private int resWidth = 710;
private int resHeight = 512;
private Image MakeCameraImg(Camera mCam,int width,int height)
{
Image mImage;
RenderTexture rt = new RenderTexture(width, height, 2);
mCam.pixelRect = new Rect(0, 0, Screen.width, Screen.height);
mCam.targetTexture = rt;
Texture2D screenShot = new Texture2D((int)(width * CutRect.width), (int)(height * CutRect.height),
TextureFormat.RGB24, false);
mCam.Render();
RenderTexture.active = rt;
screenShot.ReadPixels(new Rect(width * CutRect.x, width * CutRect.y, width * CutRect.width, height * CutRect.height), 0, 0);
mCam.targetTexture = null;
RenderTexture.active = null;
UnityEngine.Object.Destroy(rt);
byte[] bytes = screenShot.EncodeToPNG();
//string filename = Application.dataPath + "/Print/3D"
// + System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".png";
//System.IO.File.WriteAllBytes(filename, bytes); mImage = Image.GetInstance(bytes);
return mImage; }
//打印图片 (摄像头视野看到的/生成的图片) 成PDF
public void PrintImgPdf(string filePath, Camera mCam)
{
Document document = new Document(new Rectangle(PageSize.A4.Height, PageSize.A4.Width));
PdfWriter.GetInstance(
document,
new FileStream(filePath, FileMode.Create)
); document.Open();
Image imge;
imge = MakeCameraImg(mCam,700,512);
PdfPTable tableAll = CreateTable(1, PdfPTable.BACKGROUNDCANVAS, new float[] { document.PageSize.Width -50}, true);
PdfPTable tableHeaderR = CreateTable(1, PdfPTable.BACKGROUNDCANVAS, new float[] { -1 }, false);
PdfPTable tableHeaderminiR = CreateTable(1, PdfPTable.BACKGROUNDCANVAS, new float[] { 1 }, false);
//
Image mark = imge;
mark.ScaleAbsolute(mark.Width, mark.Height);
mark.Alignment = Image.LEFT_BORDER;
tableHeaderminiR.AddCell(CreateCell(mark, 2, 0));//<<<<<<<<< tableHeaderR.AddCell(CreateCell(tableHeaderminiR, -1, 0));//<<<<<<<<
tableAll.AddCell(CreateCell(tableHeaderR, -1, 0));//<<<<<<<< document.Add(tableAll);
document.Close();
ShowTips.showTips(" 打印完成!文件保存在:" + filePath); }
public PdfPTable CreateTable(int numCol, int HorizontalAlignmentStyle, float[] Width, bool isLockedWidth)
{
PdfPTable tableAll = new PdfPTable(numCol);
tableAll.HorizontalAlignment = HorizontalAlignmentStyle;
if (Width[0] != -1)
{
tableAll.SetTotalWidth(Width);
}
tableAll.LockedWidth = isLockedWidth;
return tableAll;
} public PdfPCell CreateCell(PdfPTable table, int rowspan, int borderStyle)
{
PdfPCell cell = new PdfPCell(table);
if (borderStyle != -1 && borderStyle >= 0)
{
cell.Border = borderStyle;
}
if (rowspan != -1)
{
cell.Rowspan = rowspan;
} cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_LEFT | PdfPCell.ALIGN_CENTER;
return cell;
} public PdfPCell CreateCell(Image image, int rowspan, int borderStyle)
{
PdfPCell cell = new PdfPCell(image);
if (borderStyle != -1 && borderStyle >= 0)
{
cell.Border = borderStyle;
}
if (rowspan != -1)
{
cell.Rowspan = rowspan;
}
cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_BASELINE;
return cell;
} public PdfPCell CreateCell(string text, int rowspan, int borderStyle, iTextSharp.text.Font cellFont)
{
PdfPCell cell = new PdfPCell(new Phrase(text, cellFont));
if (borderStyle != -1 && borderStyle>=0)
{
cell.Border = borderStyle;
}
if (rowspan != -1)
{
cell.Rowspan = rowspan;
} cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
return cell;
}
/// <summary> 只在详细信息的时候用
PdfPCell CreateGoodsInformationCell(PdfInformation mInfo)
{ string text = mInfo.mName +"\n";
iTextSharp.text.Font font =CreateFont(20, iTextSharp.text.Font.NORMAL);
PdfPCell cell = new PdfPCell(new Phrase(text,font));
cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_LEFT; return cell; }
/// </param>/ public void CellAddTable(PdfPCell cell,PdfPTable table)
{
cell.AddElement(table);
}
public iTextSharp.text.Font CreateFont(float fontSize, int fontStyle)
{
BaseFont bfChinese = BaseFont.CreateFont( Application.dataPath + "/font/MSYH.TTF",
BaseFont.IDENTITY_H,
BaseFont.NOT_EMBEDDED ); return new iTextSharp.text.Font(bfChinese, fontSize, fontStyle);
} }

下面是调用:

using UnityEngine;
using System.Collections; public class PrintPdf : MonoBehaviour { //需要将这几个摄像头绑定对应的
PDFMakerManager mPdfManager;
public Camera m3DCamera;
public Camera mHightCam;
public GameObject mObj;
public Camera mInfoCamera;
string mPdfPath; public GameObject[] Texts = new GameObject[6];
public string[] Textstext;
PdfUserInformation mPDFUserInfo;
// Use this for initialization
void Start () { Textstext = new string[6];
mPdfManager = new PDFMakerManager();
mPDFUserInfo = new PdfUserInformation(); } // Update is called once per frame
void Update () { } void OnGUI()
{ if (GUI.Button(new Rect(100, 100, 100, 40), "PdfInfoPrint"))
{ PrintInfoPdf();
}
if (GUI.Button(new Rect(300, 100, 100, 40), "PdfInfoImgPrint"))
{ PrintInfoImgPdf();
}
if (GUI.Button(new Rect(400, 100, 100, 40), "PdfHightPrint"))
{
PrintHightImgPdf();
}
} // 还需要把摄像头绑定对
// 把写字的物体绑定对
// 在 调用函数 需要 找对 位置
public void getText()
{
for (int i = 0; i < Texts.Length; i++)
{
Textstext[i] = Texts[i].GetComponent<UILabel>().text;
}
mPDFUserInfo.goodsName = Textstext[0];
mPDFUserInfo.youzhanType = Textstext[1];
mPDFUserInfo.cvsLevel = Textstext[2];
mPDFUserInfo.writeTime = Textstext[3];
mPDFUserInfo.creater = Textstext[4];
mPDFUserInfo.creatTime = Textstext[5]; }
//打印 左边字 右边表格
public void PrintInfoPdf()
{
getText();
mPdfManager.PrintGoodsInformations(mPdfPath,mPDFUserInfo);
}
//打印 信息 图片
public void PrintInfoImgPdf()
{ getText();
mPdfPath = Application.dataPath + "/Print/InfoImg"
+ System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".pdf"; mPdfManager.PrintGoodsInformations(mPdfPath, mInfoCamera, mObj, mPDFUserInfo); } //打印 图
public void PrintHightImgPdf()
{
mPdfPath = Application.dataPath + "/Print/Top"
+ System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".pdf";
mPdfManager.PrintImgPdf(mPdfPath, mHightCam); }
}

注:如需转载,请注明出处,

unity3d导出pdf的更多相关文章

  1. .Net导出pdf文件,C#实现pdf导出

    最近碰见个需求需要实现导出pdf文件,上网查了下代码资料总结了以下代码.可以成功的实现导出pdf文件. 在编码前需要在网上下载个itextsharp.dll,此程序集是必备的.楼主下载的是5.0版本, ...

  2. GJM :Unity3d导出eclipse工程,导入Android Studio

    unity3d导出eclipse工程,导入Android Studio 标签: unity3Dandroid studio 2016-08-11 10:42 398人阅读 评论(1) 收藏 举报 分类 ...

  3. JS导出PDF插件(支持中文、图片使用路径)

    在WEB上想做一个导出PDF的功能,发现jsPDF比较多人推荐,遗憾的是不支持中文,最后找到pdfmake,很好地解决了此问题.它的效果可以先到http://pdfmake.org/playgroun ...

  4. ITextSharp导出PDF表格和图片(C#)

    文章主要介绍使用ITextSharp导出PDF表格和图片的简单操作说明,以下为ITextSharp.dll下载链接 分享链接:http://pan.baidu.com/s/1nuc6glj 密码:3g ...

  5. JAVA导出pdf实例

    一.直接导出成PDF   Java代码 1. import java.io.FileNotFoundException; 2. import java.io.FileOutputStream; 3.  ...

  6. 利用ITextSharp导出PDF文件

    最近项目中需要到处PDF文件,最后上网搜索了一下,发现ITextSharp比较好用,所以做了一个例子: public string ExportPDF() { //ITextSharp Usage / ...

  7. iText导出pdf、word、图片

    一.前言 在企业的信息系统中,报表处理一直占比较重要的作用,本文将介绍一种生成PDF报表的Java组件--iText.通过在服务器端使用Jsp或JavaBean生成PDF报表,客户端采用超级连接显示或 ...

  8. Itext导出PDF,word,图片案例

    iText导出pdf.word.图片 一.前言 在企业的信息系统中,报表处理一直占比较重要的作用,本文将介绍一种生成PDF报表的Java组件--iText.通过在服务器端使用Jsp或JavaBean生 ...

  9. Ireport 报表导出 Poi + ireport 导出pdf, word ,excel ,htm

    Ireport 报表导出 Poi + ireport 导出pdf, doc ,excel ,html 格式 下面是报表导出工具类reportExportUtils 需要导出以上格式的报表 只需要调用本 ...

随机推荐

  1. 搜索和搜索形式(SEARCHING and its forms)

    什么是搜索? 在计算机科学中,搜索就是在一个事物的集合中找到具有特定特征的一项的过程.这些集合中的元素可能是排好序的数据库中的记录,简单数组中的数据,文件中的文本,树中的节点,几何图形中的点和边或者是 ...

  2. HTML标签的offset、client、 scroll和currentStyle属性

    本文来自:http://www.cnblogs.com/quanhai/archive/2010/04/19/1715231.html offsetHeight = borderTopWidth + ...

  3. 算法设计手冊(第2版)读书笔记, Springer - The Algorithm Design Manual, 2ed Steven S.Skiena 2008

    The Algorithm Design Manual, 2ed 跳转至: 导航. 搜索 Springer - The Algorithm Design Manual, 2ed Steven S.Sk ...

  4. ACdreamOJ 1154 Lowbit Sum (数字dp)

    ACdreamOJ 1154 Lowbit Sum (数位dp) ACM 题目地址:pid=1154" target="_blank" style="color ...

  5. Ubuntu14.04搭建安装svnserver

    前两天,公司准备搭建一个svnserver,供大家使用.于是.就先装了一个Ubuntu系统,然后搭建了svnserver的环境.以下把svn搭建的详细过程描写叙述下: 1.安装svn sudo apt ...

  6. visual studio 2010 C语言声明异常

    如下这段程序,是C_Primer_plus_第五版内的一个复习题答案(感觉声明i的值有问题),在GCC上面可以运行,但是移植到VS2010就一堆错误, #include<stdio.h> ...

  7. 关于VS 2010 RDLC 报表的详细使用说明

    各位技术屌丝们好, 之前我用了很长一段时间通过不断的研究揣摩,终于把RDLC报表给搞透了,今天跟大家做个总结,希望能够帮助到大家. 需求分析 我想把datagridview 中的数据打印出来. 首先 ...

  8. UIPickerView(选择控制器) 自学之初体验

    UIPickerView 是一个选择器控件, 它可以生成单列的选择器,也可生成多列的选择器,而且开发者完全可以自定义选择项的外观,因此用法非常灵活.UIPickerView 直接继承了 UIView  ...

  9. 小项目--反eclass

    前言—— 最近会把前一段时间闲的无聊写的一些很小的项目写一些博客,用来练练手. 引子—— 最近班里有个很讨厌的软件,,,,教育局规定每个学校要上传多媒体使用记录,所以学校就给班里每台电脑上装了一个比较 ...

  10. mysql+php+pdo批量添加大数据

    1.使用insert into插入 ini_set('max_execution_time','0');//限制超时时间,因为第一种时间较长,索性设为0不限制 $pdo = new PDO(" ...