推理编程_答案集编程的知识表示和推理

推理编程

Read about the difference between declarative and imperative programming and learn from code examples (Answer Set Programming, Python and C).

了解声明式和命令式编程之间的区别,并从代码示例(答案集编程,Python和C)中学习。

介绍 (Introduction)

The amount of computational problems seems to be unlimited in both industry and science. There is a huge demand for new insights from the vast amount of available data. To obtain this knowledge, dedicated people use all kinds of programming languages for designing and implementing algorithms.

在工业和科学领域,计算问题的数量似乎都是无限的。 从大量可用数据中获得对新见解的巨大需求。 为了获得这些知识,敬业的人们使用各种编程语言来设计和实现算法。

However, many of the current real-world problems are complex (combinatorial) search problems with which we try to automate and optimize processes as well as support people in their decisions. This does not involve encoding of algorithms but encoding given knowledge. In other words, given knowledge about all the rules and constraints to be considered to what is counted as a solution. Instead of writing statements describing the control flow of a computation, declarative programming expresses its logic. What do we want to achieve, not statements about how we can achieve it.

但是,当前许多现实世界中的问题都是复杂的(组合)搜索问题,我们试图通过这些问题来自动化和优化流程,并支持人们的决策。 这不涉及算法的编码,而是编码给定的知识 。 换句话说,已知关于所有规则和约束的知识,可以考虑将其视为解决方案。 声明性编程不是编写描述计算控制流程的语句,而是表达其逻辑。 我们想要实现什么 ,而不是关于如何实现的声明。

This is called declarative programming.

这称为声明式编程。

为什么要进行声明式编程? (Why declarative programming?)

Using a promising declarative programming paradigm, namely Answer Set Programming (ASP, sometimes also Answer Set Prolog), offers unexpected advantages over the popular imperative programming approach, for example:

使用有希望的声明式编程范例,即答案集编程(ASP,有时也称为答案集Prolog),与流行的命令式编程方法相比,具有出乎意料的优势,例如:

  • Short solutions (as measured by lines of code)

    简短的解决方案(按代码行衡量)
  • Transparency (including readability)

    透明度(包括可读性)
  • Reliability

    可靠性

and many more. Once you have broken the problem down into its smallest pieces and written down all the necessary knowledge, you will not only solve the computational challenge. A big advantage is that you have digitized the knowledge and can use it for further problems or make it available in other ways.

还有很多。 将问题分解为最小的部分并写下所有必要的知识后,您不仅会解决计算难题。 一个很大的好处是您已经数字化了知识,可以将其用于其他问题或以其他方式使用。

E

Ë

Furthermore, it strengthens the cooperation between ‘business people’ and programmers. The integration of artificial intelligence is supported and acceptance at all levels will increase. This is a fundamental process that can only be achieved in cooperation with all departments of a company.

此外,它加强了“商人”与程序员之间的合作。 支持人工智能的集成,并且在各个级别的接受度都会增加。 这是一个基本过程,只有与公司所有部门合作才能实现。

什么是ASP?如何运作? (What is ASP and how does it work?)

An answer set program consists of given knowledge formulated as facts, rules (head(X) :- body(X).) or constraints. The program is loaded by a solver and returns a “stable model”. This so called answer set consists of all facts that can be derived using the given rules and constraints. A finite amount of stable models are generated as solutions, of which one is finally selected.Note: grounding and solving the problems are not within the scope of this article.

答案集程序包括由事实,规则( head(X) :- body(X). )或约束条件组成的给定知识。 该程序由求解器加载并返回“稳定模型”。 所谓的答案集包括可以使用给定的规则和约束导出的所有事实。 生成有限数量的稳定模型作为解决方案,最后选择其中一个。 注意: 接地和解决问题不在本文讨论范围之内。

Let us consider a famous example from logic about birds and penguins. It is a well known fact that birds can fly. This can be encoded as an answert set rule:

让我们考虑一个关于鸟类和企鹅的逻辑的著名例子。 众所周知,鸟类会飞。 可以将其编码为应答集规则:

canFly(X) :- bird(X).

The rule is read as “If X is a bird, then X can fly”. Now let’s add more knowledge! For example, facts that tell the unconditional truth, just as seagull ‘Malvin’ is a bird, but also penguin ‘Roger’ is one.

规则读为“如果 X 是鸟,那么 X 会飞” 。 现在,让我们添加更多知识! 例如,事实证明了无条件的事实,就像海鸥“ Malvin”是一只鸟,而企鹅“ Roger”是一只鸟一样。

canFly(X) :- bird(X).
bird(malvin).
bird(roger).== MODEL OUTPUT ==
Anwer: 1
bird(malvin) bird(roger) canFly(malvin) canFly(roger)
SATISFIABLE

As a result, the answer set tells us the known facts that Malvin and Roger are birds but also concluded that they are able to fly. The biology enthusiasts among us know, that penguins are unable to fly thus the model is wrong!

结果,答案集告诉我们已知的事实,即马尔文和罗杰是鸟类,但也得出结论,他们能够飞翔。 我们当中的生物学爱好者知道,企鹅无法飞行,因此模型是错误的!

Image for post
Seagull ‘Malvin’ — slightly showing off because he can fly. (Photo by Phil Botha on Unsplash)
海鸥“ Malvin”-因为他会飞而稍微炫耀。 ( Phil Botha在Unsplash上拍摄 )

In order to get acceptable results we need to add more knowledge in form of facts and integrity constraints to the program. Here, the model needs to know that Roger is not only a bird but also a penguin and that there is no bird that is a penguin which is able to fly.

为了获得可接受的结果,我们需要以事实和完整性约束的形式向程序添加更多知识。 在这里,模型需要知道罗杰不仅是鸟,而且还是企鹅,并且没有鸟是能够飞翔的企鹅。

canFly(X) :- bird(X).
bird(malvin).
bird(roger).
seagull(malvin).
penguin(roger).
:- canFly(X), penguin(X).== MODEL OUTPUT ==
UNSATISFIABLE

This does not bring the expected result and shows how important it is to think thoroughly and very carefully about the problem as well as the solution. The model tells, like stated by the programmer, that a bird can fly but there is no advise for birds that belong to the penguin family. To avoid this, we could add that only birds that are not penguins are able to fly.

这并没有带来预期的结果,并且表明了对问题以及解决方案进行透彻和仔细思考的重要性。 如程序员所述,该模型告诉鸟类可以飞,但是没有建议属于企鹅家族的鸟类。 为了避免这种情况,我们可以补充说,只有不是企鹅的鸟才可以飞。

canFly(X) :- bird(X), not penguin(X).
bird(malvin).
bird(roger).
seagull(malvin).
penguin(roger).
:- canFly(X), penguin(X).== MODEL OUTPUT ==
Answer: 1
bird(malvin) bird(roger) seagull(malvin) penguin(roger) canFly(malvin)
SATISFIABLE

Adding this knwoledge in Line [1], the stable model consists of the expected outcome.

在行[1]中添加此知识,稳定模型包括预期结果。

命令式与声明式编程 (Imperative versus declarative programming)

..解决数独 (.. for solving Sudoku)

Let’s look at another example to highlight the advantages of ASP mentioned above. Sudoku is a well known puzzle game and popular for explaining search problems. Given an initial 9x9 grid of cells containig numbers between 1 and 9 or blanks, all blanks must be filled with numbers. You win Sudoko if you find all values such that every row, column, and 3x3 subsquare contains the numbers 1–9, each with a single occurrence.

让我们看另一个示例,以突出上述ASP的优点。 数独是著名的益智游戏,因解释搜索问题而广受欢迎。 给定一个最初的9x9单元格网格,其中包含1到9之间的数字或空格,所有空格必须用数字填充。 如果您找到所有值,使每一行,每一列和3x3子正方形包含数字1–9,并且每个数字都出现一次,那么您将赢得Sudoko。

Image for post
Exemplary Sudoku game (adopted from Potassco.org).
示例数独游戏(从Potassco.org采纳)。

Python(命令式) (Python (imperative))

The following Code snippet will show how to solve the Sudoku in Python.

以下代码片段将显示如何在Python中解决Sudoku。

Solve Sudoku in Python.
用Python解决数独问题。

C(必须) (C (imperative))

Solving the Sudoku game in C looks very similar to Python. There is no significant difference in the approach.

用C解决Sudoku游戏看起来与Python非常相似。 该方法没有显着差异。

Solve Sudoku in C.
解决C中的数独问题。

Both, Python and C, show written statements describing the control flow of a computation, thus, the ‘how to solve it’ and how the state has to be changed for the upcoming step.

Python和C都显示了描述计算控制流的书面语句,从而描述了“ 如何求解”以及在接下来的步骤中必须如何更改状态。

ASP(说明性) (ASP (declarative))

Last but no least, let’s have a look at the ASP code snippet — after initalization, we are able to solve the Sudoku with less than 10 lines of code!

最后但并非最不重要的一点,让我们看一下ASP代码段–初始化后,我们可以用少于10行的代码来解决Sudoku!

% Initialize the game (given numbers)
sudoku(1, 1, 5).
sudoku(1, 2, 3).
sudoku(1, 5, 7).
sudoku(2, 1, 6).
sudoku(2, 4, 1).
sudoku(2, 5, 9).
sudoku(2, 6, 5).
sudoku(3, 2, 9).
sudoku(3, 3, 8).
sudoku(3, 8, 6).
sudoku(4, 1, 8).
sudoku(4, 5, 6).
sudoku(4, 9, 3).
sudoku(5, 1, 4).
sudoku(5, 4, 8).
sudoku(5, 6, 3).
sudoku(5, 9, 1).
sudoku(6, 1, 7).
sudoku(6, 5, 2).
sudoku(6, 9, 6).
sudoku(7, 2, 6).
sudoku(7, 7, 2).
sudoku(7, 8, 8).
sudoku(8, 4, 4).
sudoku(8, 5, 1).
sudoku(8, 6, 9).
sudoku(8, 9, 5).
sudoku(9, 5, 8).
sudoku(9, 8, 7).
sudoku(9, 9, 9).
% define the grid
n(1..9).
x(1..9).
y(1..9).% each field contains exactly one number from 1 to 9
{sudoku(X,Y,N): n(N)} = 1 :- x(X) ,y(Y).% helper
subgrid(X,Y,A,B) :- x(X), x(A), y(Y), y(B),(X-1)/3 == (A-1)/3, (Y-1)/3 == (B-1)/3.% constraints
:- sudoku(X,Y,N), sudoku(A,Y,N), X!=A.
:- sudoku(X,Y,N), sudoku(X,B,N), Y!=B.
:- sudoku(X,Y,V), sudoku(A,B,V), subgrid(X,Y,A,B), X != A, Y != B.#show sudoku/3.== MODEL OUTPUT ==
Answer: 1
('sudoku', (2, 1, 6)), ('sudoku', (1, 2, 3)), ('sudoku', (9, 4, 2)), ('sudoku', (7, 2, 6)), ('sudoku', (7, 3, 1)), ('sudoku', (1, 9, 2)), ('sudoku', (5, 1, 4)), ('sudoku', (7, 4, 5)), ('sudoku', (4, 3, 9)), ('sudoku', (9, 1, 3)), ('sudoku', (4, 5, 6)), ('sudoku', (5, 6, 3)), ('sudoku', (2, 4, 1)), ('sudoku', (8, 1, 2)), ('sudoku', (8, 8, 3)), ('sudoku', (7, 9, 4)), ('sudoku', (8, 7, 6)), ('sudoku', (5, 4, 8)), ('sudoku', (7, 6, 7)), ('sudoku', (8, 6, 9)), ('sudoku', (6, 5, 2)), ('sudoku', (9, 7, 1)), ('sudoku', (3, 4, 3)), ('sudoku', (4, 7, 4)), ('sudoku', (3, 3, 8)), ('sudoku', (4, 8, 2)), ('sudoku', (1, 7, 9)), ('sudoku', (9, 9, 9)), ('sudoku', (9, 8, 7)), ('sudoku', (5, 9, 1)), ('sudoku', (4, 4, 7)), ('sudoku', (6, 9, 6)), ('sudoku', (7, 7, 2)), ('sudoku', (2, 7, 3)), ('sudoku', (5, 5, 5)), ('sudoku', (1, 5, 7)), ('sudoku', (1, 1, 5)), ('sudoku', (6, 3, 3)), ('sudoku', (2, 6, 5)), ('sudoku', (2, 9, 8)), ('sudoku', (8, 3, 7)), ('sudoku', (3, 6, 2)), ('sudoku', (3, 8, 6)), ('sudoku', (2, 8, 4)), ('sudoku', (1, 3, 4)), ('sudoku', (8, 2, 8)), ('sudoku', (3, 7, 5)), ('sudoku', (9, 5, 8)), ('sudoku', (4, 9, 3)), ('sudoku', (6, 4, 9)), ('sudoku', (7, 5, 3)), ('sudoku', (2, 5, 9)), ('sudoku', (8, 5, 1)), ('sudoku', (5, 3, 6)), ('sudoku', (4, 6, 1)), ('sudoku', (3, 9, 7)), ('sudoku', (1, 4, 6)), ('sudoku', (9, 2, 4)), ('sudoku', (5, 8, 9)), ('sudoku', (1, 8, 1)), ('sudoku', (6, 6, 4)), ('sudoku', (5, 7, 7)), ('sudoku', (7, 1, 9)), ('sudoku', (3, 5, 4)), ('sudoku', (6, 8, 5)), ('sudoku', (5, 2, 2)), ('sudoku', (2, 3, 2)), ('sudoku', (8, 9, 5)), ('sudoku', (9, 6, 6)), ('sudoku', (9, 3, 5)), ('sudoku', (6, 2, 1)), ('sudoku', (3, 1, 1)), ('sudoku', (4, 2, 5)), ('sudoku', (6, 1, 7)), ('sudoku', (4, 1, 8)), ('sudoku', (8, 4, 4)), ('sudoku', (2, 2, 7)), ('sudoku', (3, 2, 9)), ('sudoku', (1, 6, 8)), ('sudoku', (6, 7, 8)), ('sudoku', (7, 8, 8))}
SATISFIABLE

Note: using for example a Python wrapper for ASP, the result can look as handy as in the code examples above.

注意 :例如,使用ASP的Python包装器,结果看起来就像上面的代码示例一样方便。

Compared to Python and C, this is all about the ‘what’ and not about the ‘how’ — a fundamental difference between the two approaches.

与Python和C相比,这全都涉及“什么”而不是“如何”,这是这两种方法之间的根本区别。

At the very beginning, we define that the Sudoku board is 9x9 cells (or fields) and we use the numbers from 1 to 9 as the values to fill in. Following the basic rule that only one number between 1 and 9 may be filled in each field, we define a little helper. It states which fields refer to the same sub-grid. Finally, we only need the constraints to tell the solver what is possible and what is not. The first line checks, whether the choosen number is unique in the row whereas the second constraint checks the rule for columns. The third constraint completes the rules of the game, according to which a number must also be unique in the subgrid.

在一开始,我们定义Sudoku板是9x9单元(或字段),并使用1到9之间的数字作为填充值。遵循基本规则,即只能填充1到9之间的一个数字每个领域,我们定义一个小帮手。 它指出哪些字段引用相同的子网格 。 最后,我们只需要约束就可以告诉求解器什么是可能的,什么不是。 第一行检查选择的数字在行中是否唯一,而第二行约束检查列的规则。 第三个约束完善了游戏规则,根据该规则,子网格中的数字也必须唯一。

That was it. I admit the syntax takes getting used to. But once you’re familiar with it, you can create incredibly readable programs that solve highly complex problems for us.

就是这样 我承认语法需要习惯。 但是一旦您熟悉了它,就可以创建可读性极强的程序,为我们解决高度复杂的问题。

摘要 (Summary)

ASP is a very promising tool for knowledge preservation and declarative problem solving in the area of Knowledge Representation and Reasoning.

ASP是用于知识表示和推理领域的知识保存和声明式问题解决的非常有前途的工具。

Short solutions — Apart from the initial effort to map the Sudoku game, ASP provides by far the shortest way (measured in lines of code) to the solution.Transparency — There is no need to create rules which are unclear to the user and which concern the status of the programme. Only the basic conditions and the three rules of the game must be coded in order to end up at the correct result.Reliability — All rules of the game are fixed and the solver cannot create a black box with solution steps that are not traceable afterwards. This may not be important in the example given, but it is a major issue in many industrial applications.

简短的解决方案 -除了最初尝试绘制Sudoku游戏的映射外,ASP还提供了迄今为止解决方案的最短方法(以代码行衡量)。 透明度 -无需创建用户不清楚且与程序状态有关的规则。 为了最终得到正确的结果,只有游戏的基本条件和三个规则必须被编码。 可靠性 -游戏的所有规则都是固定的,求解器无法创建一个黑匣子,其解决方案步骤不可追溯。 在给出的示例中,这可能并不重要,但在许多工业应用中这是一个主要问题。

To mention only a few real-world examples, decision support for space shuttles at NASA, train scheduling in Switzerland — one of the world’s densest train network— , or team building at the largest transshipment terminal on the Mediterranean coast are evidence of its potential.

仅举几个实际的例子,对美国宇航局航天飞机的决策支持,瑞士的火车时刻表(世界上最密集的火车网络之一)或在地中海沿岸最大的转运码头的团队建设都证明了其潜力。

底线 (Bottom Line)

The acceptance of artificial intelligence in industry is still very low. In addition, many companies are simply overwhelmed by the existing flood of data.

人工智能在工业中的接受程度仍然很低。 此外,许多公司对现有的大量数据不知所措。

Bring the knowledge of operational subject matter experts together with the strengths of Artificial Intelligence.

将操作主题专家的知识与人工智能的优势结合在一起。

ASP offers an unique opportunity to digitalize and protect existing knowledge. Due to the good readability and the required understanding of the process as well as the problem to be solved, IT and business move closer together and thus achieve better and more sustainable success.

ASP为数字化和保护现有知识提供了独特的机会。 由于良好的可读性和对流程以及所要解决问题的理解要求,IT和业务部门之间的距离越来越近,从而获得了更好,更可持续的成功。

你喜欢这个故事吗? (Did you like the story?)

I appreciate likes and retweets of this article – there will be more about this topic soon! You can also find an executive summary here.

我喜欢本文的喜欢和转发-很快将有更多关于此主题的信息! 您也可以在此处找到执行摘要。

翻译自: https://towardsdatascience.com/knowledge-representation-and-reasoning-with-answer-set-programming-376e3113a421

推理编程

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/387863.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python安装包

由于Google、YouTube等大型公司的推广,Python编程语言越来越受欢迎,很多编程爱好者,也将Python做为了首先的编程语言。 今天我们就来讲一下,学习的第一步,安装Python IDLE编辑器,也它的调试和使用。 第一步…

104 权限 sudo 解压缩

主要内容:https://www.cnblogs.com/pyyu/articles/9355477.html 1 查看系统版本信息: #查看系统版本信息 cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) #查看内核版本号 uname -r 3.10.0-693.el7.x86_64 #查看系统多少位 uname -m x86_64 #查看内核所有信息…

Cloud Native 介绍

为什么80%的码农都做不了架构师?>>> 背景 Cloud Native表面看起来比较容易理解,但是细思好像又有些模糊不清:Cloud Native和Cloud关系是啥?它用来解决什么问题?它是一个新技术还是一个新的方法&#xff1f…

餐厅数据分析报告_如何使用数据科学选择理想的餐厅设计场所

餐厅数据分析报告空间数据科学 (Spatial Data Science) Designing any product requires a lot of analysis and research. It is also true for designing any building. Before we begin to design any building, we collect information about the location where we are de…

PCB genesis 大孔扩孔(不用G84命令)实现方法

PCB钻孔时,当钻刀>6.3mm时,超出钻孔范围,钻孔工序是没有这么大的钻刀,当这种情况,工程CAM会都采用G84命令用小孔扩孔的方式制作, 在这里介绍一种如果不用G84命令,用程序实现将大孔生成小孔钻孔达到扩孔的目的。 一.我们先了解一下G84命令扩孔 孔尺寸大小 孔密度 连一篇文章有…

图像识别中的深度学习

来源:《中国计算机学会通讯》第8期《专题》 作者:王晓刚 深度学习发展历史 深度学习是近十年来人工智能领域取得的重要突破。它在语音识别、自然语言处理、计算机视觉、图像与视频分析、多媒体等诸多领域的应用取得了巨大成功。现有的深度学习模型属于神…

多个css样式合并到一个“目录”css文件中

执行访问jsp后发现没有效果 同样的代码,在html中效果对比如下: 具体原因:不清楚,暂时记着~~~在jsp中不支持import这种css样式的引用 转载于:https://www.cnblogs.com/mangwusuozhi/p/10050108.html

方差,协方差 、统计学的基本概念

一、统计学的基本概念 统计学里最基本的概念就是样本的均值、方差、标准差。首先,我们给定一个含有n个样本的集合,下面给出这些概念的公式描述: 均值: 标准差: 方差: 均值描述的是样本集合的中间点&#xf…

Python 主成分分析PCA

Python 主成分分析PCA 主成分分析&#xff08;PCA&#xff09;是一种基于变量协方差矩阵对数据进行压缩降维、去噪的有效方法&#xff0c;PCA的思想是将n维特征映射到k维上&#xff08;k<n&#xff09;&#xff0c;这k维特征称为主元&#xff0c;是旧特征的线性组合&#xf…

小程序 国际化_在国际化您的应用程序时忘记的一件事

小程序 国际化The hidden bugs waiting to be found by your international users您的国际用户正在等待发现的隐藏错误 While internationalizing our applications, we focus on the things we can see: text, tool-tips, error messages, and the like. But, hidden in our …

PCA主成分分析Python实现

作者&#xff1a;拾毅者 出处&#xff1a;http://blog.csdn.net/Dream_angel_Z/article/details/50760130 Github源码&#xff1a;https://github.com/csuldw/MachineLearning/tree/master/PCA PCA&#xff08;principle component analysis&#xff09; &#xff0c;主成分分…

robo 3t连接_使用robo 3t studio 3t连接到地图集

robo 3t连接Robo 3T (formerly Robomongo) is a graphical application to connect to MongoDB. The newest version now includes support for TLS/SSL and SNI which is required to connect to Atlas M0 free tier clusters.Robo 3T(以前称为Robomongo )是用于连接MongoDB的…

软件需求规格说明书通用模版_通用需求挑战和机遇

软件需求规格说明书通用模版When developing applications there will be requirements that are needed on more than one application. Examples of such common requirements are non-functional, cookie consent and design patterns. How can we work with these types of…

python版PCA(主成分分析)

python版PCA&#xff08;主成分分析&#xff09; 在用统计分析方法研究这个多变量的课题时&#xff0c;变量个数太多就会增加课题的复杂性。人们自然希望变量个数较少而得到的信息较多。在很多情形&#xff0c;变量之间是有一定的相关关系的&#xff0c;当两个变量之间有一定…

干货|Spring Cloud Bus 消息总线介绍

2019独角兽企业重金招聘Python工程师标准>>> 继上一篇 干货&#xff5c;Spring Cloud Stream 体系及原理介绍 之后&#xff0c;本期我们来了解下 Spring Cloud 体系中的另外一个组件 Spring Cloud Bus (建议先熟悉 Spring Cloud Stream&#xff0c;不然无法理解 Spr…

主成份分析(PCA)详解

主成分分析法&#xff08;Principal Component Analysis&#xff09;大多在数据维度比较高的时候&#xff0c;用来减少数据维度&#xff0c;因而加快模型训练速度。另外也有些用途&#xff0c;比如图片压缩&#xff08;主要是用SVD&#xff0c;也可以用PCA来做&#xff09;、因…

如何安装pylab:python如何导入matplotlib模块

pylab是python下挺不错的一个画图模块&#xff0c;使用也非常简单&#xff0c;记得Mit的计算机科学及编程导论有节课也是用到了这个工具&#xff0c;但这个工具安装不象用起来那么方便&#xff0c;小编就图文全程直播下吧 工具/原料 python2.7.10win10 32位方法/步骤 1缺省状态…

BP神经网络python简单实现

BP神经网络的原理在网上有很详细的说明&#xff0c;这里就不打算细说&#xff0c;这篇文章主要简单的方式设计及实现BP神经网络&#xff0c;并简单测试下在恒等计算&#xff08;编码&#xff09;作测试。 BP神经网络模型图如下 BP神经网络基本思想 BP神经网络学习过程由信息的…

golang的reflection(转)(一)

2019独角兽企业重金招聘Python工程师标准>>> 反射reflection 可以大大提高程序的灵活性&#xff0c;使得interface{}有更大的发挥余地反射可以使用TypeOf和ValueOf函数从接口中获取目标对象信息反射会将匿名字段作为独立字段&#xff08;匿名字段的本质&#xff09;…

datatables.js 简单使用--多选框和服务器端分页

说明&#xff1a;datatables是一款jQuery表格插件。感觉EasyUI的datagrid更易用 内容&#xff1a;多选框和服务器端分页 缘由&#xff1a;写这篇博客的原因是datatables的文档写的不怎么样&#xff0c;找东西很麻烦 环境&#xff1a;asp.net mvc , vs2015sqlserver2012 显示效…