ArcGIS Engine开发的ArcGIS 版本管理的功能
原文:ArcGIS Engine开发的ArcGIS 版本管理的功能
转自:http://blog.csdn.net/linghe301/article/details/7965901
这是以前的ArcGIS Engine开发成果,主要是Geodatabase方面的,模仿ArcGIS版本的流程
系统环境:
VS2010、ArcGIS Engine10、DevExpress721(第三方控件,比较常用易于下载)
------------------------------------------------------------------
我跟大家分享了存在#百度网盘#上的文件,“DXperienceEval-7.2.1.exe”,点击链接进行查看和下载。 http://t.cn/zWsdZRY (分享自 @百度网盘官方微博)
------------------------------------------------------------------
系统的连接参数都写在代码里面了,如果有问题,跟踪一下代码即可解决
相关功能:
1:打开ArcSDE版本数据
2:切换版本
3:创建新版本
4:查看版本信息
5:协调版本
6:冲突解决
7:提交版本
8:历史归档管理
因为这是很早的东西了,是自己兴趣开发的,会有相关bug,如果有一定基础肯定可以顺利的进行参考!希望能给大家带来帮助!
仅供参考!
下图为系统界面
下图为创建子版本
下图为协调版本
下图为冲突对话框
核心代码冲突对话框
- 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 DevExpress.XtraEditors;
- using ESRI.ArcGIS.Geometry;
- using ESRI.ArcGIS.Geodatabase;
- using ESRI.ArcGIS.esriSystem;
- using ESRI.ArcGIS.Display;
- using LSCommonHelper;
- using LSGISHelper;
- using ESRI.ArcGIS.DataSourcesGDB;
- using ESRI.ArcGIS.Controls;
- using ESRI.ArcGIS.Carto;
- using DevExpress.XtraGrid.Views.Grid;
- namespace LSVersion.Version
- {
- public partial class ConflictsForm : Form
- {
- public ConflictsForm()
- {
- InitializeComponent();
- }
- private IVersion m_peditVersion=null;
- public IVersion EditVersion
- {
- get { return m_peditVersion; }
- set { m_peditVersion = value; }
- }
- private IVersion m_ptargetVersion = null;
- public IVersion TargetVersion
- {
- get { return m_ptargetVersion; }
- set { m_ptargetVersion = value; }
- }
- private void ConflictsForm_Load(object sender, EventArgs e)
- {
- Init();
- }
- private IFeatureWorkspace featureWorkspace = null;
- private IFeatureWorkspace commonAncestorFWorkspace = null;
- private IFeatureWorkspace preReconcileFWorkspace = null;
- private IFeatureWorkspace reconcileFWorkspace = null;
- private AxMapControl m_pMapControl = null;
- public AxMapControl MapControl
- {
- get { return m_pMapControl; }
- set { m_pMapControl = value; }
- }
- IFeature featurePreReconcile = null;
- IFeature featureReconcile = null;
- IFeature featureCommonAncestor = null;
- private void ClickID(string sLayerName, int sOID, TreeNode sSelNode)
- {
- IFeatureClass featureClassPreReconcile =
- preReconcileFWorkspace.OpenFeatureClass(sLayerName);
- IFeatureClass featureClassReconcile =
- reconcileFWorkspace.OpenFeatureClass(sLayerName);
- IFeatureClass featureClassCommonAncestor =
- commonAncestorFWorkspace.OpenFeatureClass(sLayerName);
- this.axMapControl1.ClearLayers();
- this.axMapControl2.ClearLayers();
- this.axMapControl3.ClearLayers();
- this.listView1.Items.Clear();
- int flag = -1;
- if (sSelNode.Parent.Text == "更新-更新冲突")
- {
- flag = 0;
- }
- else if (sSelNode.Parent.Text == "删除-更新冲突")
- {
- flag = 1;
- }
- else if (sSelNode.Parent.Text == "更新-删除冲突")
- {
- flag = 2;
- }
- IFeatureLayer PreReconcileFL = new FeatureLayerClass();
- PreReconcileFL.FeatureClass = featureClassPreReconcile;
- IFeatureLayer ReconcileFL = new FeatureLayerClass();
- ReconcileFL.FeatureClass = featureClassReconcile;
- IFeatureLayer CommonAncestorFL = new FeatureLayerClass();
- CommonAncestorFL.FeatureClass = featureClassCommonAncestor;
- this.axMapControl1.Map.AddLayer(ReconcileFL as ILayer);
- this.axMapControl2.Map.AddLayer(PreReconcileFL as ILayer);
- this.axMapControl3.Map.AddLayer(CommonAncestorFL as ILayer);
- try
- {
- featurePreReconcile =
- featureClassPreReconcile.GetFeature(sOID);
- }
- catch { this.axMapControl2.ClearLayers(); }
- try
- {
- featureReconcile = featureClassReconcile.GetFeature(sOID);
- }
- catch { this.axMapControl1.ClearLayers(); }
- try
- {
- featureCommonAncestor =
- featureClassCommonAncestor.GetFeature(sOID);
- }
- catch { this.axMapControl3.ClearLayers(); }
- IField pField = null;
- if (flag == 0)
- {
- for (int i = 0; i < featureReconcile.Fields.FieldCount; i++)
- {
- pField = featureReconcile.Fields.get_Field(i);
- ListViewItem lv = new ListViewItem();
- lv.SubItems.Add(pField.AliasName);
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureReconcile, pField.AliasName));
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featurePreReconcile, pField.AliasName));
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureReconcile, pField.AliasName));
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureCommonAncestor, pField.AliasName));
- this.listView1.Items.Add(lv);
- }
- }
- else if (flag == 1)
- {
- for (int i = 0; i < featureReconcile.Fields.FieldCount; i++)
- {
- pField = featureReconcile.Fields.get_Field(i);
- ListViewItem lv = new ListViewItem();
- lv.SubItems.Add(pField.AliasName);
- if (i == 0)
- {
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureReconcile, pField.AliasName));
- lv.SubItems.Add("Deleted");
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureReconcile, pField.AliasName));
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureCommonAncestor, pField.AliasName));
- }
- else
- {
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureReconcile, pField.AliasName));
- lv.SubItems.Add("");
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureReconcile, pField.AliasName));
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureCommonAncestor, pField.AliasName));
- }
- this.listView1.Items.Add(lv);
- }
- }
- else if (flag == 2)
- {
- for (int i = 0; i < featurePreReconcile.Fields.FieldCount; i++)
- {
- pField = featurePreReconcile.Fields.get_Field(i);
- ListViewItem lv = new ListViewItem();
- lv.SubItems.Add(pField.AliasName);
- if (i == 0)
- {
- lv.SubItems.Add("Deleted");
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featurePreReconcile, pField.AliasName));
- lv.SubItems.Add("Deleted");
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureCommonAncestor, pField.AliasName));
- }
- else
- {
- lv.SubItems.Add("");
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featurePreReconcile, pField.AliasName));
- lv.SubItems.Add("");
- lv.SubItems.Add(LSGISHelper.FeatureHelper.GetFeatureStringValue(featureCommonAncestor, pField.AliasName));
- }
- this.listView1.Items.Add(lv);
- }
- }
- Flash(this.axMapControl1, featureReconcile);
- Flash(this.axMapControl2, featurePreReconcile);
- Flash(this.axMapControl3, featureCommonAncestor);
- #region//Display
- pageCon = this.m_pMapControl.ActiveView.GraphicsContainer;
- pageCon.DeleteAllElements();
- Display(featureReconcile);
- Display(featurePreReconcile);
- Display(featureCommonAncestor);
- #endregion
- }
- IGraphicsContainer pageCon = null;
- private void Display(IFeature pFea)
- {
- IFillShapeElement pPEle = new PolygonElementClass();
- IFillSymbol pFillSym = new SimpleFillSymbolClass();
- RgbColorClass rgbClr = new RgbColorClass();
- rgbClr.Transparency = 0;
- ILineSymbol pLineSym = new SimpleLineSymbolClass();
- pLineSym.Color = LSGISHelper.ColorHelper.CreateRandomColor();
- pLineSym.Width = 4;
- pFillSym.Color = rgbClr;
- pFillSym.Outline = pLineSym;
- pPEle.Symbol = pFillSym;
- IElement pEle = pPEle as IElement;
- pEle.Geometry = pFea.ShapeCopy;
- this.m_pMapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
- pageCon.AddElement(pEle, 0);
- }
- private void Flash(AxMapControl axMapControl3, IFeature pFea)
- {
- if (pFea != null)
- {
- axMapControl3.Extent = pFea.Shape.Envelope;
- axMapControl3.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
- axMapControl3.FlashShape(pFea.ShapeCopy);
- }
- }
- private void Init()
- {
- this.myTreeView1.Nodes.Clear();
- this.listView1.Items.Clear();
- try
- {
- IWorkspaceEdit workspaceEdit = (IWorkspaceEdit2)m_peditVersion;
- IVersionEdit4 versionEdit4 = (IVersionEdit4)workspaceEdit;
- featureWorkspace = m_peditVersion as IFeatureWorkspace;
- // Get the various versions on which to output information.
- commonAncestorFWorkspace = (IFeatureWorkspace)
- versionEdit4.CommonAncestorVersion;
- preReconcileFWorkspace = (IFeatureWorkspace)
- versionEdit4.PreReconcileVersion;
- reconcileFWorkspace = (IFeatureWorkspace)
- versionEdit4.ReconcileVersion;
- IEnumConflictClass enumConflictClass = versionEdit4.ConflictClasses;
- TreeNode pRootNode = new TreeNode();
- pRootNode.Text = "Conflicts";
- this.myTreeView1.Nodes.Add(pRootNode);
- IConflictClass conflictClass = null;
- while ((conflictClass = enumConflictClass.Next()) != null)
- {
- IDataset dataset = (IDataset)conflictClass;
- // Make sure class is a feature class.
- if (dataset.Type == esriDatasetType.esriDTFeatureClass)
- {
- String datasetName = dataset.Name;
- TreeNode pRoot2Node = new TreeNode();
- pRoot2Node.Text = datasetName;
- this.myTreeView1.Nodes[0].Nodes.Add(pRoot2Node);
- IFeatureClass featureClass = featureWorkspace.OpenFeatureClass
- (datasetName);
- // Console.WriteLine("Conflicts on feature class {0}", datasetName);
- // Get conflict feature classes on the three reconcile versions.
- // Get all UpdateUpdate conflicts.
- ISelectionSet updateUpdates = conflictClass.UpdateUpdates;
- if (updateUpdates.Count > 0)
- {
- TreeNode pUUNode = new TreeNode();
- pUUNode.Text = "更新-更新冲突";
- pRoot2Node.Nodes.Add(pUUNode);
- #region 更新更新
- // Iterate through each OID, outputting information.
- IEnumIDs enumIDs = updateUpdates.IDs;
- int oid = enumIDs.Next();
- while (oid != -1)
- //loop through all conflicting features
- {
- // Console.WriteLine("UpdateUpdate conflicts on feature {0}", oid);
- // Get conflict feature on the three reconcile versions.
- TreeNode pOidNode = new TreeNode();
- pOidNode.Text ="OID:"+ oid.ToString();
- pUUNode.Nodes.Add(pOidNode);
- #region---处理
- // Check to make sure each shape is different than the common ancestor (conflict is on shape field).
- #endregion
- oid = enumIDs.Next();
- }
- #endregion
- }
- ISelectionSet deleteUpdates = conflictClass.DeleteUpdates;
- if (deleteUpdates.Count > 0)
- {
- TreeNode pDUNode = new TreeNode();
- pDUNode.Text = "删除-更新冲突";
- pRoot2Node.Nodes.Add(pDUNode);
- #region 删除更新
- // Iterate through each OID, outputting information.
- IEnumIDs enumIDs = deleteUpdates.IDs;
- int oid = enumIDs.Next();
- while (oid != -1)
- //loop through all conflicting features
- {
- // Console.WriteLine("UpdateUpdate conflicts on feature {0}", oid);
- // Get conflict feature on the three reconcile versions.
- TreeNode pOidNode = new TreeNode();
- pOidNode.Text = "OID:" + oid.ToString();
- pDUNode.Nodes.Add(pOidNode);
- oid = enumIDs.Next();
- }
- #endregion
- }
- ISelectionSet Updatedeletes = conflictClass.UpdateDeletes;
- if (Updatedeletes.Count > 0)
- {
- TreeNode pUDNode = new TreeNode();
- pUDNode.Text = "更新-删除冲突";
- pRoot2Node.Nodes.Add(pUDNode);
- #region 更新删除
- // Iterate through each OID, outputting information.
- IEnumIDs enumIDs = Updatedeletes.IDs;
- int oid = enumIDs.Next();
- while (oid != -1)
- //loop through all conflicting features
- {
- TreeNode pOidNode = new TreeNode();
- pOidNode.Text = "OID:" + oid.ToString();
- pUDNode.Nodes.Add(pOidNode);
- oid = enumIDs.Next();
- }
- #endregion
- }
- }
- }
- this.myTreeView1.ExpandAll();
- }
- catch (System.Runtime.InteropServices.COMException comExc)
- {
- Console.WriteLine("Error Message: {0}, Error Code: {1}", comExc.Message,
- comExc.ErrorCode);
- }
- }
- // Method to determine if shape field is in conflict.
- private bool IsShapeInConflict(IFeature commonAncestorFeature, IFeature
- preReconcileFeature, IFeature reconcileFeature)
- {
- // 1st check: Common Ancestor with PreReconcile.
- // 2nd check: Common Ancestor with Reconcile.
- // 3rd check: Reconcile with PreReconcile (case of same change on both versions)
- if (IsGeometryEqual(commonAncestorFeature.ShapeCopy,
- preReconcileFeature.ShapeCopy) || IsGeometryEqual
- (commonAncestorFeature.ShapeCopy, reconcileFeature.ShapeCopy) ||
- IsGeometryEqual(reconcileFeature.ShapeCopy, preReconcileFeature.ShapeCopy)
- )
- {
- return false;
- }
- else
- {
- return true;
- }
- }
- // Method returning if two shapes are equal to one another.
- private bool IsGeometryEqual(IGeometry shape1, IGeometry shape2)
- {
- if (shape1 == null & shape2 == null)
- {
- return true;
- }
- else if (shape1 == null ^ shape2 == null)
- {
- return false;
- }
- else
- {
- IClone clone1 = (IClone)shape1;
- IClone clone2 = (IClone)shape2;
- return clone1.IsEqual(clone2);
- }
- }
- private void myTreeView1_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- if (this.myTreeView1.Nodes.Count > 0)
- {
- TreeNode sSelNode = this.myTreeView1.SelectedNode;
- if (sSelNode != null)
- {
- string sSel = sSelNode.Text;
- if (LSCommonHelper.OtherHelper.GetLeftName(sSel, ":") == "OID")
- {
- string sLayerName = sSelNode.Parent.Parent.Text;
- int sOID = LSCommonHelper.ConvertHelper.ObjectToInt(
- LSCommonHelper.OtherHelper.GetRightName(sSel, ":"));
- ClickID(sLayerName, sOID, sSelNode);
- }
- }
- }
- }
- private void ConflictsForm_FormClosing(object sender, FormClosingEventArgs e)
- {
- pageCon.DeleteAllElements();
- }
- private void replaceObjectWith(IFeature pfea,
- TreeNode pNode )
- {
- pageCon.DeleteAllElements();
- TreeNode sSelNode = this.myTreeView1.SelectedNode;
- if (sSelNode != null)
- {
- string sSel = sSelNode.Text;
- if (LSCommonHelper.OtherHelper.GetLeftName(sSel, ":") == "OID")
- {
- string sLayerName = sSelNode.Parent.Parent.Text;
- int sOID = LSCommonHelper.ConvertHelper.ObjectToInt(
- LSCommonHelper.OtherHelper.GetRightName(sSel, ":"));
- IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(sLayerName);
- IFeature feature = featureClass.GetFeature(sOID);
- feature.Shape = pfea.ShapeCopy;
- feature.Store();
- m_pMapControl.ActiveView.Refresh();
- }
- }
- }
- private TreeNode sSelNode = null;
- private void myTreeView1_MouseDown(object sender, MouseEventArgs e)
- {
- sSelNode = this.myTreeView1.GetNodeAt(e.X, e.Y);
- if (sSelNode == null) return;
- if (e.Button == MouseButtons.Left)
- {//左键
- }
- else
- {
- System.Drawing.Point aPt = new System.Drawing.Point(e.X, e.Y);
- // TreeNode sSelNode = this.myTreeView1.SelectedNode;
- if (sSelNode != null)
- {
- string sSel = sSelNode.Text;
- if (LSCommonHelper.OtherHelper.GetLeftName(sSel, ":") == "OID")
- {
- this.contextMenuStrip1.Show(this.myTreeView1, aPt);
- }
- }
- }
- }
- private void replaceObjectWithCommonAncestorVersionToolStripMenuItem_Click(object sender, EventArgs e)
- {
- replaceObjectWith(featureCommonAncestor, sSelNode);
- }
- private void replaceObjectWithPreReconcileVersionToolStripMenuItem_Click(object sender, EventArgs e)
- {
- replaceObjectWith(featurePreReconcile, sSelNode);
- }
- private void replaceObjectWithConflictsVersionToolStripMenuItem_Click(object sender, EventArgs e)
- {
- replaceObjectWith(featureReconcile, sSelNode);
- }
- private void mergeGeometryToolStripMenuItem_Click(object sender, EventArgs e)
- {
- MergeGeometry(featureCommonAncestor, featurePreReconcile, featureReconcile, sSelNode);
- }
- private void MergeGeometry(IFeature featureCommonAncestor
- , IFeature featurePreReconcile, IFeature featureReconcile,TreeNode pNode)
- {
- pageCon.DeleteAllElements();
- TreeNode sSelNode = this.myTreeView1.SelectedNode;
- if (sSelNode != null)
- {
- string sSel = sSelNode.Text;
- if (LSCommonHelper.OtherHelper.GetLeftName(sSel, ":") == "OID")
- {
- string sLayerName = sSelNode.Parent.Parent.Text;
- int sOID = LSCommonHelper.ConvertHelper.ObjectToInt(
- LSCommonHelper.OtherHelper.GetRightName(sSel, ":"));
- IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(sLayerName);
- // Check to make sure each shape is different than the common ancestor (conflict is on shape field).
- if (IsShapeInConflict(featureCommonAncestor,
- featurePreReconcile, featureReconcile))
- {
- //Console.WriteLine(
- // " Shape attribute has changed on both versions...");
- // Geometries are in conflict ... merge geometries.
- try
- {
- IConstructMerge constructMerge = new
- GeometryEnvironmentClass();
- IGeometry newGeometry =
- constructMerge.MergeGeometries
- (featureCommonAncestor.ShapeCopy,
- featureReconcile.ShapeCopy,
- featurePreReconcile.ShapeCopy);
- // Setting new geometry as a merge between the two versions.
- IFeature feature = featureClass.GetFeature(sOID);
- feature.Shape = newGeometry;
- feature.Store();
- //updateUpdates.RemoveList(1, ref oid);
- //conflictsRemoved = true;
- }
- catch (System.Runtime.InteropServices.COMException comExc)
- {
- // Check if the error is from overlapping edits.
- if (comExc.ErrorCode == (int)
- fdoError.FDO_E_WORKSPACE_EXTENSION_DATASET_CREATE_FAILED || comExc.ErrorCode == (int)fdoError.FDO_E_WORKSPACE_EXTENSION_DATASET_DELETE_FAILED)
- {
- // Edited areas overlap.
- LSCommonHelper.MessageBoxHelper.ShowMessageBox(
- "Error from overlapping edits on feature {0}"+
- " Can't merge overlapping edits to same feature.");
- }
- else
- {
- // Unexpected COM exception, throw this to the exception handler.
- throw comExc;
- }
- }
- }
- }
- }
- }
- }
- }
相关代码下载地址,下载完毕后,请使用kuaiya解压即可,WINRAR不行
ArcGIS Engine开发的ArcGIS 版本管理的功能的更多相关文章
- ArcGIS Engine开发鹰眼图的功能(代码优化篇)
在上一篇,ArcGIS Engine开发鹰眼图的功能(基础篇) 上一篇的实现效果图如下, 如果仔细观察,会发现一个问题,即在“鹰眼”的区域,只要在红色线框内的注记会被覆盖. 如果红色框包括整张图的话, ...
- ArcGIS Engine开发鹰眼图的功能(基础篇)
鹰眼是用于调节全视域范围内主地图显示范围情况的副地图.它体现了地图整体与详细局部的关系. 用户可以通过鼠标单击或者画框等动作实现鹰眼与主地图的交互情况. 鹰眼功能的原理是通过主地图窗口的地图控件和鹰眼 ...
- ArcGIS Engine开发之地图基本操作(4)
ArcGIS Engine开发中数据库的加载 1.加载个人地理数据库数据 个人地理数据库(Personal Geodatabase)使用Miscrosoft Access文件(*.mdb)进行空间数据 ...
- ArcGIS Engine开发前基础知识(3)
对象模型图 一.对象模型图中的类与接口 ArcGIS Engine 提供大量的对象,这些对象之间存在各种各样的关系,如继承.组合.关联等.对象模型图(Object model diagram,ODM) ...
- ArcGIS Engine开发前基础知识(2)
ArcGIS基本控件简介 ArcGIS Engine控件是一组可视化的开发组件,每个ArcGIS Engine控件都是一个COM组件.这些组件包括MapControl,PageLayoutContro ...
- C#,ArcGIS Engine开发入门教程
C#,ArcGIS Engine开发入门教程 转自:http://blog.csdn.net/yanleigis/article/details/2233674 目录(?)[+] 五实现 一 加载A ...
- ArcGIS Engine开发基础总结(一)
标准Engine功能 地图浏览 地图制作 数据查询 数据分析 及 所有的开发控件 —MapControl, PageLayout, Toolbar, TOC, ArcReader 对所有矢量和栅 ...
- ArcGIS Engine开发前基础知识(4)
ArcGIS不同开发方式的比较 关于GIS应用软件的开发,通常有三种方式:C/S架构.网络GIS和移动GIS.ArcGIS平台提供了对三种开发方式的支持,对于采用从C/S架构的大多数开发者来讲,首先想 ...
- ArcGIS Engine开发前基础知识(1)
ArcGIS二次开发是当前gis领域的一项重要必不可少的技能.下面介绍它的基本功能 一.ArcGIS Engine功能 在使用之前首先安装和部署arcgis sdk,(在这里不在赘述相关知识)可以实现 ...
随机推荐
- Revit二次开发示例:EventsMonitor
在该示例中,插件在Revit启动时弹出事件监控选择界面,供用户设置,也可在添加的Ribbon界面完成设置.当Revit进行相应操作时,弹出窗体会记录事件时间和名称. #region Namespace ...
- 三十分钟掌握STL
这是本小人书.原名是<using stl>,不知道是谁写的.不过我倒觉得很有趣,所以化了两个晚上把它翻译出来.我没有对翻译出来的内容校验过.如果你没法在三十分钟内觉得有所收获,那么赶紧扔了 ...
- TYVJ P1026 犁田机器人 Label:水
背景 USACO OCT 09 2ND 描述 Farmer John為了让自己从无穷无尽的犁田工作中解放出来,於是买了个新机器人帮助他犁田.这个机器人可以完成犁田的任务,可惜有一个小小的缺点:这个犁田 ...
- TYVJ P1046 Blast Label:dp
描述 设有字符串X,我们称在X的头尾及中间插入任意多个空格后构成的新字符串为X的扩展串,如字符串X为“abcbcd”,则字符串“abcb□cd”,“□a□bcbcd□”和“abcb□cd□”都是X的扩 ...
- 动态树之link-cut tree
说好的专题... lct的一些概念看论文 杨哲<QTREE解法的一些研究> 简单易懂. 首先不要把lct想象得很难,其实很水的.lct就是很多splay树维护的树... lct的acces ...
- WebRTC手记之本地音频采集
转载请注明出处:http://www.cnblogs.com/fangkm/p/4374668.html 上一篇博文介绍了本地视频采集,这一篇就介绍下音频采集流程,也是先介绍WebRTC原生的音频采集 ...
- QComboBox 和 QSpinBox 使用方法
Qt中QComboBox 和 QSpinBox 是两个很常用的空间,QComboBox 是下拉菜单,而 QSpinBox 是调参数的神器,所以它们的用法十分必要熟练掌握. 首先来看 QComboBox ...
- salt-ssh使用
salt-ssh 是 0.17.0 新出现的一个功能,一听这名字就知道它是依赖 ssh 来进行远程命令执行的工具,好处就是你不需要在客户端安装 minion,也不需要安装 master(直接安装 sa ...
- [转] - 经典SQL语句大全
经典SQL语句大全 一.基础 1.说明:创建数据库CREATE DATABASE database-name 2.说明:删除数据库drop database dbname3.说明:备份sql serv ...
- smarty模板中literal标签的使用
在使用的时候把js等代码写在模板中就报错,加入literal标签后就正确了 <style> {literal} .tr_color{background-color: #9F88FF} { ...