原文:Silverlight 雷达图和一种特殊泡泡画法

自上次发了雷达图,也没怎么说一下。

这次又做了一种图,继续共享一下,就是以一个点为中心,周围绕着几个点,用一个箭头与中心相连并带有某些信息。圆 和中心都可以响应鼠标事件。

我一向不会讲解所做的东西。所以大部分我直接上源码的。

简单讲解一下:

代码结构分为4部分,

1.

首先是画布,其实就是一个canvas因为现在只有二种图,

一个雷达画布 RadarCanvas(比较特殊),和一个二维坐标画布 CoorCanvas,都派生自ChartCanvas;

2.就是轴

坐标轴CoorAxis 和RadarAxis 都派生自IAxis,其实里面什么也没有。就是一个存一些值,比较这个轴的颜色,它的起始与终结坐标。雷达轴的角度偏移等,。

3.model

存值的类了,暂时有 clm泡泡图的点击事件参数 CLMArrowClickEventArg,DataPoint图坐标点,图点点击事件参数ItemClickEventArg,字段映射ItemMapping

4.图形

现有CLMBubbleSeries,它是一个特殊的泡泡图,我们项目中用到的。这里就不说它有什么用。只讲实现。

RadarSeries,它就是雷达图形

它们都继承自ISeries

核心就是讲Series怎么画的

 

首先看它们的基类:

/// <summary>
/// 图表线或图接口
/// </summary>
public abstract class ISeries : Common.IBaseControl
{
public ISeries(ChartCanvas canvas)
{
Canvas = canvas; Points = new System.Collections.ObjectModel.ObservableCollection<Model.DataPoint>(); ItemMappings = new System.Collections.ObjectModel.ObservableCollection<Model.ItemMapping>();
} /// <summary>
/// 动画执行时间
/// </summary>
protected const int AnimateDurtion = ; /// <summary>
/// 项单击事件
/// </summary>
public EventHandler<Model.ItemClickEventArg> ItemClick; /// <summary>
/// 画布
/// </summary>
public ChartCanvas Canvas { get; set; } /// <summary>
/// 当前颜色
/// </summary>
public Brush Stroke
{
get;
set;
} /// <summary>
/// 填充色
/// </summary>
public Brush Fill
{
get;
set;
} /// <summary>
/// 图例名
/// </summary>
public string LegendLabel
{
get;
set;
} /// <summary>
/// 当前线的label格式
/// /// #Y=当前值,#YName=当前Y轴名称,#C{列名}=表示绑定当前数据对象的指定列值
/// </summary>
public string ItemTooltipFormat { get; set; } /// <summary>
/// 当前绑定的对象
/// </summary>
public object DataContext { get; set; } /// <summary>
/// 当前索引
/// </summary>
public int Index { get; set; } /// <summary>
/// 图点
/// </summary>
public System.Collections.ObjectModel.ObservableCollection<Model.DataPoint> Points { get; set; } /// <summary>
/// 当前图型属性映射
/// </summary>
public System.Collections.ObjectModel.ObservableCollection<Model.ItemMapping> ItemMappings
{
get;
internal set;
} /// <summary>
/// 获取对象的属性的值
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public object GetValue(string name)
{
var mapping = GetMapping(name);
if (mapping != null) name = mapping.MemberName; var obj = Common.Helper.GetPropertyName(DataContext, name);
return obj;
} /// <summary>
/// 获取对象的值
/// </summary>
/// <param name="name">属性名</param>
/// <returns></returns>
public double GetNumberValue(string name)
{
double value = ;
var obj = GetValue(name);
if (obj != null)
{
if (Silverlight.Common.Data.TypeHelper.IsNumber(obj.GetType()))
{
if (!double.TryParse(obj.ToString(), out value))
{
value = Index + ;
}
}
else
{
value = Index + ;
}
}
return value;
} /// <summary>
/// 获取指定的字段映射
/// </summary>
/// <param name="dm"></param>
/// <returns></returns>
public Model.ItemMapping GetMapping(Model.ItemMapping.EnumDataMember dm)
{
foreach (var m in ItemMappings)
{
if (m.DataMember == dm) return m;
}
return null;
} /// <summary>
/// 获取指定的字段映射
/// </summary>
/// <param name="dm"></param>
/// <returns></returns>
public Model.ItemMapping GetMapping(string name)
{
foreach (var m in ItemMappings)
{
if (name.Equals(m.OldName, StringComparison.OrdinalIgnoreCase) ||
name.Equals(m.MemberName, StringComparison.OrdinalIgnoreCase) ||
name.Equals(m.DisplayName, StringComparison.OrdinalIgnoreCase))
return m;
}
return null;
} /// <summary>
/// 获取指定的字段映射
/// </summary>
/// <param name="dm"></param>
/// <returns></returns>
public System.Collections.Generic.IEnumerable<Model.ItemMapping> GetMappings(Model.ItemMapping.EnumDataMember dm)
{
var ms = (from m in ItemMappings
where m.DataMember == dm
select m).ToArray<Model.ItemMapping>();
return ms;
} /// <summary>
/// 当前动画
/// </summary>
protected Storyboard storyboard; /// <summary>
/// 展现
/// </summary>
public virtual void Draw()
{
var ps = CreatePath();
foreach (var p in ps)
{
Canvas.AddChild(p);
}
if (storyboard != null && Canvas.IsAnimate)
{
storyboard.Begin();
}
} System.Collections.Generic.List<Shape> shaps=new System.Collections.Generic.List<Shape>();
/// <summary>
/// 当前线条
/// </summary>
public System.Collections.Generic.List<Shape> Shaps
{
get { return shaps; }
protected set { shaps = value; }
} /// <summary>
/// 生成图形
/// </summary>
/// <returns></returns>
public virtual System.Collections.Generic.IEnumerable<Shape> CreatePath()
{
return Shaps;
} /// <summary>
/// 生成图例
/// </summary>
/// <returns></returns>
internal virtual StackPanel CreateLegend()
{
if (!string.IsNullOrWhiteSpace(LegendLabel))
{
var panel = new StackPanel();
panel.Orientation = Orientation.Horizontal;
var colorarea = new Rectangle();
colorarea.Width = ;
colorarea.Height = ;
colorarea.Fill = this.Fill;
colorarea.Stroke = this.Stroke;
panel.Margin = new Thickness();
panel.Children.Add(colorarea); var text = new TextBlock();
text.Margin = new Thickness(); var dic=new System.Collections.Generic.Dictionary<string,string>();
foreach (var m in ItemMappings)
{
if (!dic.ContainsKey("YName") && !string.IsNullOrWhiteSpace(m.DisplayName))
{
dic.Add("YName", m.DisplayName??m.MemberName);
}
} text.Text = Common.Helper.DserLabelName(LegendLabel,dic ,
(string name) =>
{
return GetValue(name);
});
text.Foreground = new SolidColorBrush(Colors.Black);
panel.Children.Add(text); return panel;
}
return null;
} /// <summary>
/// 添加点的小圆圈,方便鼠标点中。并加提示
/// </summary>
/// <param name="center"></param>
/// <param name="rotate"></param>
protected Ellipse AddPoint(Point center, double rotate,object tooltip,Model.DataPoint p)
{
var circle = Common.Helper.CreateEllipse(center, rotate);
circle.Stroke = this.Stroke;
circle.Fill = this.Fill;
ToolTipService.SetToolTip(circle, tooltip); if (this.ItemClick != null) {
circle.Cursor = Cursors.Hand;
circle.MouseLeftButtonUp += (sender, e) => {
var arg = new Model.ItemClickEventArg() {
Data=this.DataContext,
Item=p
};
ItemClick(circle,arg);
};
} Canvas.AddChild(circle); System.Windows.Controls.Canvas.SetZIndex(circle, Common.BaseParams.TooltipZIndex); return circle;
} /// <summary>
/// 生成提示信息
/// #Y=当前值,#YName=当前Y轴名称,#C{列名}=表示绑定当前数据对象的指定列值
/// </summary>
/// <returns></returns>
protected string CreateTooltip(string yName)
{
if (!string.IsNullOrWhiteSpace(this.ItemTooltipFormat))
{
var yvalue = GetValue(yName);
var tmp = Common.Helper.DserLabelName(this.ItemTooltipFormat,
new System.Collections.Generic.Dictionary<string, string>() { { "YName", yName }, { "Y", yvalue==null?"":yvalue.ToString() } },
(string name) =>
{
return GetValue(name);
});
return tmp;
}
return this.ItemTooltipFormat;
} public void Show()
{
throw new NotImplementedException();
} public void Hide()
{
throw new NotImplementedException();
}
}

嗯。没有很多东西,都是一些基础操作,和几个接口。

下面就可以看泡泡图CLMBubbleSeries:

其构造函数:

 public CLMBubbleSeries(CoorCanvas canvas)
: base(canvas) {
this.Stroke = new SolidColorBrush(Color.FromArgb(, , , ));
this.Fill = new SolidColorBrush(Color.FromArgb(, , , ));
}

初始化它的颜色。

最重要的是二个函数

/// <summary>
/// 生成当前图形
/// </summary>
/// <returns></returns>
public override System.Collections.Generic.IEnumerable<Shape> CreatePath()
{
if (storyboard != null) storyboard.Stop();
if (Canvas.IsAnimate) this.storyboard = new Storyboard(); this.Shaps.Clear();
if (DataContext == null) return base.CreatePath();
var data = DataContext as System.Collections.ICollection; var circlesize = data.Count > ? circleSize / data.Count * : circleSize;
var center=new Point() { X = this.Canvas.Width / , Y = centerSize * 2.3 };
var left = Canvas.Margin.Left + circlesize * ;
if (left <= circlesize / ) left = circlesize + ;
var bottom = (center.Y + circlesize + centerSize);
var maxbottom = Canvas.Height - Canvas.Margin.Bottom - circlesize - ;
//距离中心距离
var radiacenter = Math.Min(center.X - left, maxbottom);
var circleIndex = -; //小圆个数
var circlecount = data.Count;
var rotatestep = 3.78 / circlecount;//每个小圆的角度
var mapping = GetMapping(Model.ItemMapping.EnumDataMember.Y); if (mapping == null) throw new Exception("至少需要指定一个Y轴字段映射");
//与中心点关联设置
var links = GetMappings(Model.ItemMapping.EnumDataMember.CLMLink); var tocentername="";
//画泡泡
foreach (var m in data)
{
if (m != null)
{
var item = new Model.DataPoint(); item.PotinShape= new Path();
var v = Common.Helper.GetPropertyName(m, mapping.MemberName); ;
item.PointType = Model.DataPoint.EnumPointType.ChartPoint;
item.StringValue = v==null?"":v.ToString();
System.Windows.Controls.Canvas.SetZIndex(item.PotinShape, Common.BaseParams.ShapZIndex); var el = new EllipseGeometry();
item.PotinShape.Data = el; //画中心位置
if (circleIndex == -)
{
item.Position = el.Center = center;
el.RadiusX = el.RadiusY = centerSize;
item.Width = item.Height = centerSize * ;
tocentername = item.StringValue;
item.StringValue =(CenterName??mapping.MemberName) + "\n" + item.StringValue; var label = item.CreateLabel();
//加入标签
Canvas.AddChild(label); if (ItemClick != null)
{
label.Cursor = Cursors.Hand;
var centerdata = m;
label.MouseLeftButtonUp += (sender, e) =>
{
var arg = new Model.ItemClickEventArg()
{
Data = centerdata,
Item = item
};
ItemClick(sender, arg);
};
} var tootip = CreateTooltip(m);
ToolTipService.SetToolTip(label,tootip);
}
//画边上的小圆
else
{
//初始化小圆点
InitPoint(el, item, rotatestep, circleIndex, radiacenter, center, maxbottom, circlesize, tocentername,circlecount,links,m);
} if(Canvas.IsFillShape)item.PotinShape.Fill = this.Fill;
item.PotinShape.Stroke = this.Stroke;
item.PotinShape.StrokeThickness = Canvas.LineWidth;
this.Shaps.Add(item.PotinShape); circleIndex++;
}
} return base.CreatePath();
}

画一个中心圆 ,和用InitPoint来画周围的小圆。

/// <summary>
/// 初始化项
/// </summary>
/// <param name="el"></param>
/// <param name="item"></param>
/// <param name="rotatestep"></param>
/// <param name="circleIndex"></param>
/// <param name="radiacenter"></param>
/// <param name="center"></param>
/// <param name="maxbottom"></param>
/// <param name="circlesize"></param>
/// <param name="tocentername"></param>
private void InitPoint(EllipseGeometry el,Model.DataPoint item,
double rotatestep, int circleIndex, double radiacenter, Point center,
double maxbottom, double circlesize, string tocentername, int circlecount,
System.Collections.Generic.IEnumerable<Model.ItemMapping> links,object data)
{
var position = new Point();
var rotate = rotatestep * circleIndex + 2.95;
var rsin = Math.Sin(rotate);
var rcos = Math.Cos(rotate);
//二圆偏移量
var ystep = rsin * radiacenter;
var xstep = rcos * radiacenter; position.X = center.X + xstep;
position.Y = center.Y - ystep; if (position.Y >= maxbottom) position.Y = maxbottom; item.Position = position;
el.RadiusX = el.RadiusY = circlesize;
item.Width = item.Height = circlesize * ; var arrow = new Controls.CLMArrow(Canvas);
arrow.Fill = this.Fill;
arrow.Stroke = this.Stroke;
arrow.Rotate = rotate;
arrow.ToName = tocentername;
arrow.FromName = item.StringValue;
arrow.RotateSin = rsin;
arrow.RotateCos = rcos; var startystep = (circlesize) * arrow.RotateSin;
var startxstep = (circlesize) * arrow.RotateCos;
arrow.StartPoint = new Point(item.Position.X - startxstep, item.Position.Y + startystep);
var endystep = centerSize * arrow.RotateSin;
var endxstep = centerSize * arrow.RotateCos;
arrow.EndPoint = new Point(center.X + endxstep, center.Y - endystep); if (links != null)
{
var count = links.Count<Model.ItemMapping>();
if (count > )
{
var lnk = links.ElementAt<Model.ItemMapping>();
var tmp = Common.Helper.GetPropertyName(data, lnk.MemberName);
if (!string.IsNullOrWhiteSpace(lnk.MarkName)) arrow.FromMarkName = lnk.MarkName;
arrow.FromValue = tmp == null ? "" : tmp.ToString();
}
if (count > )
{
var lnk = links.ElementAt<Model.ItemMapping>();
var tmp = Common.Helper.GetPropertyName(data, lnk.MemberName);
if (!string.IsNullOrWhiteSpace(lnk.MarkName)) arrow.ToMarkName = lnk.MarkName;
arrow.ToValue = tmp == null ? "" : tmp.ToString();
}
} //设置箭头提示事件
if (ArrowTooltipClick != null) arrow.SetClickEvent(ArrowTooltipClick); arrow.Draw();
item.TargetControl = arrow; var label = item.CreateLabel();
Canvas.AddChild(label); if (ItemClick != null)
{
label.Cursor = Cursors.Hand;
label.MouseLeftButtonUp += (sender, e) =>
{
var arg = new Model.ItemClickEventArg()
{
Data = data,
Item = item
};
ItemClick(sender, arg);
};
} if (Canvas.IsAnimate)
{
label.Visibility = Visibility.Collapsed;
var anima = new PointAnimation();
anima.To = position;
anima.Duration = TimeSpan.FromMilliseconds(AnimateDurtion); Storyboard.SetTarget(anima, el);
el.Center = center;
Storyboard.SetTargetProperty(anima, new PropertyPath("Center")); var sizeanimax = new DoubleAnimation();
sizeanimax.From = ;
sizeanimax.To = circlesize;
Storyboard.SetTarget(sizeanimax, el);
Storyboard.SetTargetProperty(sizeanimax, new PropertyPath("RadiusX")); var sizeanimay = new DoubleAnimation();
sizeanimay.From = ;
sizeanimay.To = circlesize;
Storyboard.SetTarget(sizeanimay, el);
Storyboard.SetTargetProperty(sizeanimay, new PropertyPath("RadiusY")); anima.Completed += new EventHandler((sender, e) =>
{
label.Visibility = Visibility.Visible;
InitMouseEvent(label, arrow);
if (circleIndex == circlecount / - ) {
arrow.Show();
currentShowedArrow = arrow;
}
});
this.storyboard.Children.Add(anima);
this.storyboard.Children.Add(sizeanimax);
this.storyboard.Children.Add(sizeanimay);
}
else
{
el.Center = position;
//加入标签
//var label = item.CreateLabel();
//Canvas.AddChild(label);
InitMouseEvent(label, arrow);
if (circleIndex == circlecount / - ) {
arrow.Show();
currentShowedArrow = arrow;
}
}
}

最后是画坐标图代码:

       /// <summary>
/// 画坐标图
/// </summary>
private void DrawCoor()
{
if (!IsDrawBaseLine) return; coorGeometry.Figures.Clear(); var xaxis = new Axis.CoorAxis();
xaxis.AxisShap = coorPath;
xaxis.AType = Axis.AxisType.XValue; var yaxis = new Axis.CoorAxis();
yaxis.AType = Axis.AxisType.YValue;
yaxis.AxisShap = coorPath; this.Axises.Add(xaxis);
this.Axises.Add(yaxis); var coorfigure = new PathFigure();
coorGeometry.Figures.Add(coorfigure); //画上箭头
yaxis.StartPoint = coorfigure.StartPoint = new Point(Margin.Left, Margin.Top - arrowMargin);
var tlp = new Point() { X = Margin.Left - arrowMargin, Y = Margin.Top + arrowMargin };
coorfigure.Segments.Add(new LineSegment() { Point = tlp });
coorfigure.Segments.Add(new LineSegment() { Point = tlp });
coorfigure.Segments.Add(new LineSegment() { Point = coorfigure.StartPoint });
var trp = new Point() { X = Margin.Left + arrowMargin, Y = Margin.Top + arrowMargin };
coorfigure.Segments.Add(new LineSegment() { Point = trp });
coorfigure.Segments.Add(new LineSegment() { Point = trp });
coorfigure.Segments.Add(new LineSegment() { Point = coorfigure.StartPoint }); //左侧Y轴
yaxis.EndPoint = xaxis.StartPoint = new Point() { X = Margin.Left, Y = this.Height - Margin.Bottom };
coorfigure.Segments.Add(new LineSegment() { Point = xaxis.StartPoint });
//x轴
xaxis.EndPoint = new Point() { X = this.Width - Margin.Right + arrowMargin, Y = xaxis.StartPoint.Y };
coorfigure.Segments.Add(new LineSegment() { Point = xaxis.EndPoint }); //画右箭头
var brtp = new Point() { X = this.Width - Margin.Right - arrowMargin, Y = xaxis.EndPoint.Y - arrowMargin };
var brbp = new Point() { X = brtp.X, Y = xaxis.EndPoint.Y + arrowMargin };
coorfigure.Segments.Add(new LineSegment() { Point = brtp });
coorfigure.Segments.Add(new LineSegment() { Point = brtp });
coorfigure.Segments.Add(new LineSegment() { Point = xaxis.EndPoint });
coorfigure.Segments.Add(new LineSegment() { Point = brbp });
coorfigure.Segments.Add(new LineSegment() { Point = brbp }); AddChild(coorPath); DrawLine();//画虚线
} /// <summary>
/// 画虚线
/// </summary>
private void DrawLine()
{
var w = this.Width - Margin.Left - Margin.Right;
var h = this.Height - Margin.Top - Margin.Bottom; var vstep = h / HorizontalCount; for (var i = ; i <= HorizontalCount; i++)
{
var l = new Line();
l.StrokeLineJoin = PenLineJoin.Round;
l.StrokeDashArray.Add();
l.Stroke = DashColor;
l.StrokeThickness = ;
l.X1 = Margin.Left;
l.Y1 = this.Height - Margin.Bottom - (vstep * i);
l.X2 = this.Width - Margin.Right;
l.Y2 = l.Y1;
AddChild(l);
} var xstep = w / VerticalCount;
for (var i = ; i <= VerticalCount; i++)
{
var l = new Line();
l.Stroke = DashColor;
l.StrokeDashArray.Add();
l.StrokeThickness = ;
l.X1 = Margin.Left + xstep * i;
l.Y1 = Margin.Top;
l.X2 = l.X1;
l.Y2 = this.Height - Margin.Bottom;
AddChild(l);
}

啊。我是正的不太会讲解。直接上源码算了

源码地址:源码

Silverlight 雷达图和一种特殊泡泡画法的更多相关文章

  1. JavaScript数据可视化编程学习(二)Flotr2,雷达图

    一.雷达图 使用雷达图显示多维数据. 如果你有多维的数据要展示,那么雷达图就是一种非常有效的可视化方法. 由于雷达图不常用,比较陌生,所以向用户解释的时候有一些难度.注意使用雷达图会增加用户认知负担. ...

  2. 第三方Charts绘制图表四种形式:饼状图,雷达图,柱状图,直线图

    对于第三方框架Charts(Swift版本,在OC项目中需要添加桥接头文件),首先要解决在项目中集成的问题,集成步骤: 一.下载Charts框架 下载地址:https://github.com/dan ...

  3. [2014.01.27]wfRadar 雷达图组件 2.5

    全新开发的雷达图组件--wfRadar,使用简单,功能强大,图像处理效果极佳. 组件支持多种图片格式,包括bmp,jpg,gif,wmf,emf,ico,png,pcx,tif,tga,pcx,dcx ...

  4. 利用d3.js绘制雷达图

    利用d3,js将数据可视化,能够做到数据与代码的分离.方便以后改动数据. 这次利用d3.js绘制了一个五维的雷达图.即将多个对象的五种属性在一张图上对照. 数据写入data.csv.数据类型写入typ ...

  5. echarts雷达图点击事件

    最近看见别人问的问题,点击雷达图的拐点,获取点击数据的问题,直接上代码. echarts配置问题:https://www.douban.com/note/509404582/ <!doctype ...

  6. Echarts数据可视化series-radar雷达图,开发全解+完美注释

    全栈工程师开发手册 (作者:栾鹏) Echarts数据可视化开发代码注释全解 Echarts数据可视化开发参数配置全解 6大公共组件详解(点击进入): title详解. tooltip详解.toolb ...

  7. echarts雷达图点击事件 包含(2.x,3.85,4.02)测试

    最近看见别人问的问题,点击雷达图的拐点,获取点击数据的问题,直接上代码. echarts 2x 的点击事件 echarts配置问题:https://www.douban.com/note/509404 ...

  8. HTML5 Canvas制作雷达图实战

    雷达图又叫蜘蛛网图,是一种对各项数据查看很明显的表现图,在很多游戏中,对游戏中的每个角色的分析图一般也用这种图. 下面,用HTML5的Cavas来实现雷达图. 效果 一.创建Canvas var mW ...

  9. <Android 应用 之路> MPAndroidChart~BubbleChart(气泡图) and RadarChart(雷达图)

    简介 MPAndroidChart是PhilJay大神给Android开发者带来的福利.MPAndroidChart是一个功能强大并且使用灵活的图表开源库,支持Android和iOS两种,这里我们暂时 ...

随机推荐

  1. android采用videoView播放视频(包装)

    //android播放视频.用法:于androidManifest.xml添加activity, // <activity android:name=".PlayVideo" ...

  2. JAVA学习(二):JDK介绍及其结构、用途

    JDK介绍及其结构.用途 1.JDK的介绍 JDK是Java Development Kit 的缩写.是Sun Microsystems针对Java开发员的产品.它由一个处于操作系统层之上的执行环境还 ...

  3. PreparedStatement批量处理的一个Framework(原创)

    场景:批量进行DML操作,但涉及的表不同,不能使用executeBatch() 需求:(1)如果DML中有一个错误时,要全部回滚:(2)如果全部正确,要全部执行: 解决方案: package jdbc ...

  4. 搞个这样的APP要多久? (转)

    这是一个“如有雷同,纯属巧合”的故事,外加一些废话,大家请勿对号入座.开始了…… 我有些尴尬地拿着水杯,正对面坐着来访的王总,他是在别处打拼的人,这几年据说收获颇丰,见移动互联网如火如荼,自然也想着要 ...

  5. Swift 编程语言学习0.1——Swift简单介绍

    有的时候,认为看英文文档有些费时,看中文文档怕翻译不准,有些地方确实不须要抠字眼.当有些地方假设翻译不精准会产生歧义,所以用这样对比的方式.顺便学习一下Swift. Swift is a new pr ...

  6. OpenCV2学习笔记(十四):基于OpenCV卡通图片处理

    得知OpenCV有一段时间.除了研究的各种算法的内容.除了从备用,据导游书籍和资料,尝试结合链接的图像处理算法和日常生活,第一桌面上(随着摄像头)完成了一系列的视频流处理功能.开发平台Qt5.3.2+ ...

  7. 恢复Ubuntu引导菜单

    介绍 当使用双系统,我们经常重Windows! 有没有一种方法:刚刚重装Windows而不重装Ubuntu呢? 在使用Win XP/Ubuntu双系统时.这个问题非常好解决!可是在使用Win7(包括V ...

  8. strchr,wcschr 及strrchr, wcsrchr,_tcschr,_tcsrchr函数

           strchr,wcschr 及strrchr, wcsrchr,_tcschr,_tcsrchr函数 (1) char *strchr( const char *string, int ...

  9. 中介模式和学习日记Effective C++

    中介模式(Mediator):利用中介对象来封装一组对象交互.中保使对象并不需要显式地相互引用,使得松耦合,的交互. (1).中介者模式非常easy在系统中应用,也非常easy在系统中误用.当系统出现 ...

  10. Docker contanier comunication with route

    2台宿主机,hslave1 192.168.1.153, hslave2 192.168.1.154 修改网段 docker0默认网段是172.17.0.0/16,修改154机器的docker0的网段 ...