11.5.1 使用 join 子句的内连接

如果你打算把一个巨大的序列连接到一个极小的序列上,应尽可能把小序列作为右边序列

     class Program
{
static void Main(string[] args)
{
var query = from defect in SampleData.AllDefects
join subscription in SampleData.AllSubscriptions
on defect.Project equals subscription.Project
select new { defect.Summary, subscription.EmailAddress }; foreach (var item in query)
{
Console.WriteLine("{0} {1}", item.Summary, item.EmailAddress);
} Console.ReadKey();
}
}

我们通常需要对序列进行过滤,而在连接前进行过滤比在连接后过滤效率要高得多。
在这个阶段,假如只有左边的序列需要进行过滤,查询表达式相对简单一些。例如,如果我们只想显示已经关闭的缺陷,我们可以使用下面的查询表达式

     class Program
{
static void Main(string[] args)
{
var query = from defect in SampleData.AllDefects
where defect.Status == Status.Closed
join subscription in SampleData.AllSubscriptions
on defect.Project equals subscription.Project
select new { defect.Summary, subscription.EmailAddress }; var query2 = from subscription in SampleData.AllSubscriptions
join defect in (from defect in SampleData.AllDefects
where defect.Status == Status.Closed
select defect)
on subscription.Project equals defect.Project
select new { defect.Summary, subscription.EmailAddress }; foreach (var item in query)
{
Console.WriteLine("{0} {1}", item.Summary, item.EmailAddress);
} Console.ReadKey();
}
}

11.5.2 使用 join...into 子句进行分组连接

     class Program
{
static void Main(string[] args)
{
var query = from defect in SampleData.AllDefects
join subscription in SampleData.AllSubscriptions
on defect.Project equals subscription.Project
into groupSubscriptions
select new { Defect = defect, Subscription = groupSubscriptions }; foreach (var entry in query)
{
Console.WriteLine(entry.Defect.Summary);
foreach (var subscription in entry.Subscription)
{
Console.WriteLine(" {0} ", subscription.EmailAddress);
}
} Console.ReadKey();
}
}
     class Program
{
static void Main(string[] args)
{
var dates = new DateTimeRange(SampleData.Start, SampleData.End); var query = from date in dates
join defect in SampleData.AllDefects
on date equals defect.Created.Date
into joined
select new { Date = date, Count = joined.Count() }; var query2 = dates.GroupJoin(SampleData.AllDefects,
date => date,
defect => defect.Created.Date,
(date, joined) => new { Date = date, Count = joined.Count() }); foreach (var item in query)
{
Console.WriteLine("{0:d} {1}", item.Date, item.Count);
} Console.ReadKey();
}
}

11.5.3 使用多个 from 子句进行交叉连接和合并序列

     class Program
{
static void Main(string[] args)
{
var query = from left in Enumerable.Range(, )
from right in Enumerable.Range(, left)
select new { Left = left, Right = right }; var query2 = Enumerable.Range(, )
.SelectMany(left => Enumerable.Range(, left),
(left, right) => new { Left = left, Right = right }); foreach (var item in query)
{
Console.WriteLine("Left= {0} Right= {1} ", item.Left, item.Right);
} Console.ReadKey();
}
}

SampleData代码,如下

     public class SampleData
{
static List<Defect> defects;
static List<User> users;
static List<Project> projects;
static List<NotificationSubscription> subscriptions; public static readonly DateTime Start = May();
public static readonly DateTime End = May(); public static IEnumerable<Defect> AllDefects
{
get { return defects; }
} public static IEnumerable<User> AllUsers
{
get { return users; }
} public static IEnumerable<Project> AllProjects
{
get { return projects; }
} public static IEnumerable<NotificationSubscription> AllSubscriptions
{
get { return subscriptions; }
} public static class Projects
{
public static readonly Project SkeetyMediaPlayer = new Project { Name = "Skeety Media Player" };
public static readonly Project SkeetyTalk = new Project { Name = "Skeety Talk" };
public static readonly Project SkeetyOffice = new Project { Name = "Skeety Office" };
} public static class Users
{
public static readonly User TesterTim = new User("Tim Trotter", UserType.Tester);
public static readonly User TesterTara = new User("Tara Tutu", UserType.Tester);
public static readonly User DeveloperDeborah = new User("Deborah Denton", UserType.Developer);
public static readonly User DeveloperDarren = new User("Darren Dahlia", UserType.Developer);
public static readonly User ManagerMary = new User("Mary Malcop", UserType.Manager);
public static readonly User CustomerColin = new User("Colin Carton", UserType.Customer);
} static SampleData()
{
projects = new List<Project>
{
Projects.SkeetyMediaPlayer,
Projects.SkeetyTalk,
Projects.SkeetyOffice
}; users = new List<User>
{
Users.TesterTim,
Users.TesterTara,
Users.DeveloperDeborah,
Users.DeveloperDarren,
Users.ManagerMary,
Users.CustomerColin
}; subscriptions = new List<NotificationSubscription>
{
new NotificationSubscription { Project=Projects.SkeetyMediaPlayer, EmailAddress="media-bugs@skeetysoft.com" },
new NotificationSubscription { Project=Projects.SkeetyTalk, EmailAddress="talk-bugs@skeetysoft.com" },
new NotificationSubscription { Project=Projects.SkeetyOffice, EmailAddress="office-bugs@skeetysoft.com" },
new NotificationSubscription { Project=Projects.SkeetyMediaPlayer, EmailAddress="theboss@skeetysoft.com"}
}; defects = new List<Defect>
{
new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "MP3 files crash system",
Severity = Severity.Showstopper,
AssignedTo = Users.DeveloperDarren,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.DeveloperDeborah,
Summary = "Text is too big",
Severity = Severity.Trivial,
AssignedTo = null,
Status = Status.Closed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.CustomerColin,
Summary = "Sky is wrong shade of blue",
Severity = Severity.Minor,
AssignedTo = Users.TesterTara,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.DeveloperDarren,
Summary = "Can't play files more than 200 bytes long",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDarren,
Status = Status.Reopened,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "Installation is slow",
Severity = Severity.Trivial,
AssignedTo = Users.TesterTim,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.ManagerMary,
Summary = "DivX is choppy on Pentium 100",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDarren,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.DeveloperDeborah,
Summary = "Client acts as virus",
Severity = Severity.Showstopper,
AssignedTo = null,
Status = Status.Closed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.DeveloperDarren,
Summary = "Subtitles only work in Welsh",
Severity = Severity.Major,
AssignedTo = Users.TesterTim,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.CustomerColin,
Summary = "Voice recognition is confused by background noise",
Severity = Severity.Minor,
AssignedTo = null,
Status = Status.Closed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "User interface should be more caramelly",
Severity = Severity.Trivial,
AssignedTo = Users.DeveloperDarren,
Status = Status.Created,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.ManagerMary,
Summary = "Burning a CD makes the printer catch fire",
Severity = Severity.Showstopper,
AssignedTo = null,
Status = Status.Closed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.TesterTara,
Summary = "Peer to peer pairing passes parameters poorly",
Severity = Severity.Minor,
AssignedTo = Users.DeveloperDarren,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.DeveloperDarren,
Summary = "Delay when sending message",
Severity = Severity.Minor,
AssignedTo = Users.TesterTara,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.ManagerMary,
Summary = "Volume control needs to go to 11",
Severity = Severity.Minor,
AssignedTo = Users.DeveloperDarren,
Status = Status.Created,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.CustomerColin,
Summary = "Splash screen fades too quickly",
Severity = Severity.Minor,
AssignedTo = Users.TesterTara,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.DeveloperDeborah,
Summary = "Text box doesn't keep up with fast typing",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.DeveloperDarren,
Summary = "Password displayed in plain text",
Severity = Severity.Showstopper,
AssignedTo = null,
Status = Status.Closed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "Play button points the wrong way",
Severity = Severity.Major,
AssignedTo = Users.TesterTim,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.CustomerColin,
Summary = "Wizard needed for CD burning",
Severity = Severity.Minor,
AssignedTo = Users.CustomerColin,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.ManagerMary,
Summary = "Subtitles don't display during fast forward",
Severity = Severity.Trivial,
AssignedTo = Users.DeveloperDarren,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.DeveloperDarren,
Summary = "Memory leak when watching Memento",
Severity = Severity.Trivial,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Created,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.DeveloperDeborah,
Summary = "Profile screen shows login count of -1",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "Server crashes under heavy load (3 users)",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTara,
Summary = "Unable to connect to any media server",
Severity = Severity.Showstopper,
AssignedTo = Users.DeveloperDarren,
Status = Status.Reopened,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.DeveloperDeborah,
Summary = "UI turns black and white when playing old films",
Severity = Severity.Minor,
AssignedTo = Users.TesterTara,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.ManagerMary,
Summary = "Password reset changes passwords for all users",
Severity = Severity.Showstopper,
AssignedTo = null,
Status = Status.Closed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "Modern music sounds rubbish",
Severity = Severity.Trivial,
AssignedTo = Users.DeveloperDarren,
Status = Status.Created,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "Webcam makes me look bald",
Severity = Severity.Showstopper,
AssignedTo = Users.TesterTim,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.CustomerColin,
Summary = "Sound is distorted when speakers are underwater",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDarren,
Status = Status.Created,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.DeveloperDarren,
Summary = "Japanese characters don't display properly",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTara,
Summary = "Video takes 100% of CPU",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "DVD Easter eggs unavailable",
Severity = Severity.Trivial,
AssignedTo = Users.DeveloperDarren,
Status = Status.Created,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.ManagerMary,
Summary = "Transparency is high for menus to be readable",
Severity = Severity.Minor,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.CustomerColin,
Summary = "About box is missing version number",
Severity = Severity.Minor,
AssignedTo = Users.CustomerColin,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "Logs record confidential conversations",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDarren,
Status = Status.Reopened,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.DeveloperDeborah,
Summary = "Profanity filter is too aggressive",
Severity = Severity.Minor,
AssignedTo = Users.TesterTara,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTara,
Summary = "Full screen mode fails on dual monitors",
Severity = Severity.Minor,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Created,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.CustomerColin,
Summary = "Visualization hypnotises pets",
Severity = Severity.Minor,
AssignedTo = Users.DeveloperDeborah,
Status = Status.Accepted,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyTalk,
Created = May(),
CreatedBy = Users.ManagerMary,
Summary = "Resizing while typing loses input",
Severity = Severity.Trivial,
AssignedTo = Users.DeveloperDarren,
Status = Status.Created,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTim,
Summary = "Network is saturated when playing WAV file",
Severity = Severity.Minor,
AssignedTo = Users.TesterTim,
Status = Status.Fixed,
LastModified = May()
}, new Defect
{
Project = Projects.SkeetyMediaPlayer,
Created = May(),
CreatedBy = Users.TesterTara,
Summary = "Media library tells user to keep the noise down",
Severity = Severity.Major,
AssignedTo = Users.DeveloperDarren,
Status = Status.Created,
LastModified = May()
}
};
} public static DateTime May(int day)
{
return new DateTime(, , day);
} }
public enum UserType : byte
{
Customer,
Developer,
Tester,
Manager,
}
public class Defect
{
public Project Project { get; set; }
/// <summary>
/// Which user is this defect currently assigned to? Should not be null until the status is Closed.
/// </summary>
public User AssignedTo { get; set; }
public string Summary { get; set; }
public Severity Severity { get; set; }
public Status Status { get; set; }
public DateTime Created { get; set; }
public DateTime LastModified { get; set; }
public User CreatedBy { get; set; }
public int ID { get; private set; } public Defect()
{
ID = StaticCounter.Next();
} public override string ToString()
{
return string.Format("{0,2}: {1}\r\n ({2:d}-{3:d}, {4}/{5}, {6} -> {7})",
ID, Summary, Created, LastModified, Severity, Status, CreatedBy.Name,
AssignedTo == null ? "n/a" : AssignedTo.Name);
}
}
public class NotificationSubscription
{
/// <summary>
/// Project for which this subscriber is notified
/// </summary>
public Project Project { get; set; } /// <summary>
/// The address to send the notification to
/// </summary>
public string EmailAddress { get; set; }
}
public class Project
{
public string Name { get; set; } public override string ToString()
{
return string.Format("Project: {0}", Name);
}
}
public enum Severity : byte
{
Trivial,
Minor,
Major,
Showstopper,
}
public static class StaticCounter
{
static int next = ;
public static int Next()
{
return next++;
}
}
public enum Status : byte
{
/// <summary>
/// Defect has been opened, but not verified as reproducible or an issue.
/// </summary>
Created,
/// <summary>
/// Defect has been verified as an issue requiring work.
/// </summary>
Accepted,
/// <summary>
/// Defect has been fixed in code, but not verified other than through developer testing.
/// </summary>
Fixed,
/// <summary>
/// Defect was fixed, but has now been reopened due to failing verification.
/// </summary>
Reopened,
/// <summary>
/// Defect has been fixed and tested; the fix is satisfactory.
/// </summary>
Closed,
}
public class User
{
public string Name { get; set; }
public UserType UserType { get; set; } public User(string name, UserType userType)
{
Name = name;
UserType = userType;
} public override string ToString()
{
return string.Format("User: {0} ({1})", Name, UserType);
}
}
static class Extensions
{
public static Dummy<T> Where<T>(this Dummy<T> dummy,
Func<T, bool> predicate)
{
Console.WriteLine("Where called");
return dummy;
}
}
class Dummy<T>
{
public Dummy<U> Select<U>(Func<T, U> selector)
{
Console.WriteLine("Select called");
return new Dummy<U>();
}
}
public class DateTimeRange : IEnumerable<DateTime>
{
private readonly DateTime start;
private readonly DateTime end; public DateTimeRange(DateTime start, DateTime end)
{
this.start = start;
this.end = end;
} public IEnumerator<DateTime> GetEnumerator()
{
for (DateTime current = start; current <= end; current = current.AddDays())
{
yield return current;
}
} IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}

11.5 【Linq 】连接的更多相关文章

  1. [转]Linux服务器上11种网络连接状态 和 TCP三次握手/四次挥手详解

    一.Linux服务器上11种网络连接状态: 图:TCP的状态机 通常情况下:一个正常的TCP连接,都会有三个阶段:1.TCP三次握手;2.数据传送;3.TCP四次挥手. 注:以下说明最好能结合”图:T ...

  2. Linq连接查询之左连接、右连接、内连接、全连接、交叉连接、Union合并、Concat连接、Intersect相交、Except与非查询

    内连接查询 内连接与SqL中inner join一样,即找出两个序列的交集 Model1Container model = new Model1Container(); //内连接 var query ...

  3. C#高级编程9 第11章 Linq

    Linq 1.Linq概述 列表和实体 准备数据: public class Championship { public int Year { get; set; } public string Fi ...

  4. linq连接sqlite数据库(linq to sqlite) .net3.5

    http://www.cnblogs.com/xianyin05/archive/2012/12/23/2829905.html using Models; using System; using S ...

  5. C#高级编程(第9版) 第11章 LINQ 笔记

    概述语言集成查询(Language Integrated Query, LINQ)在C#编程语言中集成了查询语法,可以用相同的语法访问不同的数据源.LINQ提供了不同数据源的抽象层,所以可以使用相同的 ...

  6. 11、Linq的使用

    一.种类 1.Linq to Objects,实现了IEnumerable<T>集合对象的集成查询 2.Linq to sql,针对关系数据库MSSQL的解释查询 3.Linq to En ...

  7. boost::asio 连接管理11 如何关闭连接

    在实际产品运行中,对连接管理有了更新的认识,这里分享一下. shared_ptr管理连接对象的生命周期 shared_ptr的引用计数器决定了连接对象的生命周期.这里我说的连接对象就是在我的前文:ht ...

  8. 如何在Ubuntu 11.10上连接L2TP VPN

    要在家继续项目的开发,但架设的GitLab只能校内访问,更悲催的是学校架设的SSL VPN不支持Linux,好在想起学校以前架设的L2TP VPN,应该可以支持Linux,于是便一通谷歌百度,然而发现 ...

  9. 11.hibernate的连接查询

    1.创建如下javaweb项目结构 2.在项目的src下创建hibernate.cfg.xml主配置文件 <?xml version="1.0" encoding=" ...

  10. LINQ之路11:LINQ Operators之过滤(Filtering)

    在本系列博客前面的篇章中,已经对LINQ的作用.C# 3.0为LINQ提供的新特性,还有几种典型的LINQ技术:LINQ to Objects.LINQ to SQL.Entity Framework ...

随机推荐

  1. volley基本使用方法

    用volley訪问server数据,不用自己额外开线程.以下样例为訪问JSONObject类型的数据,详细使用方法看代码: 首先得有volley的jar包,假设自己没有.去github上下载,然后自己 ...

  2. Python帮助函数调试函数 用于获取对象的属性及属性值

    Python帮助函数调试函数 用于获取对象的属性及属性值 刚接触Python,上篇 <Python入门>第一个Python Web程序--简单的Web服务器 中调试非常不方便,不知道对象详 ...

  3. HTML如何让IMG自动适应DIV容器大小

    版权声明:本文为博主原创文章,未经博主允许不得转载.作者:沙师弟专栏 https://blog.csdn.net/u014597198/article/details/80403946HTML如何让I ...

  4. Ubuntu17.10 下配置caffe 仅CPU i386可以直接apt install caffe-cpu,但是怎么运行mnist代码我懵逼了

    Ubuntu16.04下配置caffe(仅CPU)  参考:http://blog.csdn.net/zt_1995/article/details/56283249   第二次配置caffe环境,依 ...

  5. hdu 2222(AC自动机模版题)

    Keywords Search Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others ...

  6. A Reusable Aspect for Memory Profiling

    例子: malPro.acc文件: #include <stdlib.h> size_t totalMemoryAllocated; int totalAllocationFuncCall ...

  7. kafka参数在线修改

    当kafka集群单个节点出现磁盘满了,需要清理历史topic数据:方法如下 1): 停掉kafka进程,将kafka的server.properties中的log.retention.hours=1/ ...

  8. 一段时间加载的js函数

    <html><head><meta charset="utf8"><script type="text/javascript&q ...

  9. Docker 探索安装WordPress+Mysql8.0

    拉取MYSQL,注意默认是8.0版本,连接加密方式有变化 docker pull mysql 运行MYSQL docker run --name wordpress-mysql -p 3306:330 ...

  10. 遍历WPF DataGrid单元格

    using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; ...