MATLAB之易经卜卦程序+GUI

  日月为易,刚柔相推。 是故易有太极,是生两仪,两仪生四象,四象生八卦,八卦定吉凶,吉凶生大业。是故法象莫大乎天地,变通莫大乎四时,悬象著明莫大乎日月。

  本文目的一半是对《易经》卜卦知识的总结,另一半是对利用编程解决实际问题能力的锻炼。至于卜卦,玩玩而已,但是对于《易经》,里面有很多知识值得我们学习。

《易经》知识简介

  本来想重新理一下《易经》知识的,但是尝试一下之后发现三言两语解释不清楚,所以有兴趣的朋友可以读一下以前写的一篇文章

  对于八卦(乾qián、坤kūn、震zhèn、巽xùn、坎kǎn、离lí、艮gèn、兑duì),可以用排列组合知识这样理解:,《易经》中阴阳的概念可对应二进制中的零和一;三位二进制可表示07,分别对应这八个单卦;再由这八个单卦**摩荡**(即排列组合,这工作传说是周文王在狱中完成)而成六十四卦,即六个二进制位表示063,对应六十四卦。相传,图灵发明计算机的二进制概念,灵感就是来源于《易经》。这样也就解释了下面介绍的三钱筮法为什要摇六次。

三钱筮法简介

  三枚铜钱,作为钱筮用具。在焚香致敬祝祷命筮之后,将三枚钱币握于手中,左手在上象征“天”,右手在下象征“地”;随意在手中晃动,再抛掷于地,看三枚钱币的正反情况,确定卦爻的属性。

一个背,两个字,称作“单”.画作“ — ”为少阳。

两个背,一个字,称作“拆”,画作“ - - ”为少阴。

三个背,没有字,称作“重”,画作“ O ”为老阳,为阳爻,是变爻,主过去之事。

三个字,没有背,称作“交”,画作“ X ”为老阴,为阴爻,是变爻,主未来之事。

  共摇六次,第一次为初爻,画在卦的最下面,依次上升,第六次为第六爻,画在卦的最上边。如遇有X、O,再画出变卦来(由于能力以及对《易经》的了解有限,未能解决变卦的问题(多爻变动如何选择),即本文只考虑给出原始的本卦)。

卜卦程序设计

卜卦程序:三枚铜钱,共摇六次,依次输入字面朝上的次数。

第一步:先计算每次字面朝上次数所对应的阴阳爻(即二进制的零一表示)

  1. function [yy] = yao(n)
  2. % 分析每爻的变化,输入铜钱摇得的字面数
  3. %输出:yy表示阴阳爻,0为阴,1为阳
  4. if n<0 || n>3
  5. error('The num your input is error,please input again ');
  6. end
  7. switch n
  8. case 0 % 三背为重,老阳,阳爻,是变爻,主过去之事
  9. yy = 1;
  10. case 1 %一字为拆,少阴
  11. yy = 0;
  12. case 2 %两字为单,少阳
  13. yy = 1;
  14. otherwise %三字为交,老阴,阴爻,是变爻,主未来之事
  15. yy = 0;
  16. end
  17. end

第二步:由每三次摇得的阴阳爻,分别得出单卦

  1. function [gua] = gua(n1,n2,n3)
  2. % 由三爻得一卦,输入每爻的阴阳
  3. %输出八卦(后天八卦):乾一、兑二、离三、震四、巽五、坎六、艮七、坤八
  4. %阳爻时n1,阴爻时n0
  5. gua = 1+(~n3) + (~n2)*2 +(~n1)*4;
  6. end

第三步:由两个单卦组合,得出本卦

  1. function name = duan_gua(in,out)
  2. % 由起卦所得内外卦,输出全卦
  3. %乾一、兑二、离三、震四、巽五、坎六、艮七、坤八
  4. if in<0 || in>8 || out<0 || out >8
  5. disp('The num is error,please check it ');
  6. exit;
  7. end
  8. gua_list = {
  9. '乾为天','天泽履','天火同人','天雷无妄','天风姤','天水讼','天山遁','天地否';
  10. '泽天夬','兑为泽','泽火革','泽雷随','泽风大过','泽水困','泽山咸','泽地萃';
  11. '火天大有','火泽睽','离为火','火雷噬嗑','火风鼎','火水未济','火山旅','火地晋';
  12. '雷天大壮','雷泽归妹','雷火丰','震为雷','雷风恒','雷水解','雷山小过','雷地豫';
  13. '风天小畜','风泽中孚','风火家人','风雷益','巽为风','风水涣','风山渐','风地观';
  14. '水天需','水泽节','水火既济','水雷屯','水风井','坎为水','水山蹇','水地比';
  15. '山天大畜','山泽损','山火贲','山雷颐','山风蛊','山水蒙','艮为山','山地剥';
  16. '地天泰','地泽临','地火明夷','地雷复','地风升','地水师','地山谦','坤为地';
  17. };
  18. name = gua_list(in,out);
  19. end

主程序:输入六次摇得的铜钱字面朝上数,依次调用各子函数,已经与GUI程序整合

  1. %三钱筮法MATLAB实现
  2. %起卦:三枚铜钱,共摇六次,依次输入字面朝上的次数。
  3. function guaci = SuanGua(number)
  4. c1 = yao(number(1));
  5. c2 = yao(number(2));
  6. c3 = yao(number(3));
  7. c4 = yao(number(4));
  8. c5 = yao(number(5));
  9. c6 = yao(number(6));
  10. guaci = duan_gua(gua(c1,c2,c3),gua(c4,c5,c6));

GUI界面设计

  图形界面设计使用操作流:在MATLAB的命令窗口中输入guide命令,打开guidequick start窗口,选择create new gui点ok,生成新的fig文件,然后再在窗口中进行各项操作。

有几点注意事项:

(1)图片的插入代码段:

  1. function Changes_OpeningFcn(hObject, eventdata, handles, varargin)
  2. handles.output = hObject;
  3. logo1 = importdata('taiji.jpg'); %**图片插入,句柄使用**
  4. set(handles.logo1, 'CDATA', logo1);
  5. guidata(hObject, handles);

(2)callback (重要):右击对象,在属性编辑器中修改相关参数(style,tag),再在程序中对应位置修改相关代码段(查看回调函数),保证点击界面时程序执行逻辑顺序正确。

(3)系统的容错性:仔细考察程序所有可能出现的意外情况,并在程序中解决。比如:当在红色输入框中输入的不是1,2或3时,之前未修改时程序会闪退,修改之后会在红色输出框中显示“error”。

有兴趣的朋友如果想试试,可以将上面的三个函数和下面的GUI程序保存为m文件,并且将下图中的八卦logo截图保存为taiji.jpg(调整宽度:258,高度244);将这五个文件保存在一个文件夹中,运行GUI程序即可;在红色输入框中依次输入六个数字(1~3,否则报错),点击‘开始断卦’,即可出现如下效果:

以下代码是在GUI设计窗口操作之后,matlab自动生成的,修改部分代码实现功能。为了保证程序的可读性,并未删除自动生成的大量注释和空行。

  1. function varargout = Changes(varargin)
  2. % CHANGES MATLAB code for Changes.fig
  3. % CHANGES, by itself, creates a new CHANGES or raises the existing
  4. % singleton*.
  5. %
  6. % H = CHANGES returns the handle to a new CHANGES or the handle to
  7. % the existing singleton*.
  8. %
  9. % CHANGES('CALLBACK',hObject,eventData,handles,...) calls the local
  10. % function named CALLBACK in CHANGES.M with the given input arguments.
  11. %
  12. % CHANGES('Property','Value',...) creates a new CHANGES or raises the
  13. % existing singleton*. Starting from the left, property value pairs are
  14. % applied to the GUI before Changes_OpeningFcn gets called. An
  15. % unrecognized property name or invalid value makes property application
  16. % stop. All inputs are passed to Changes_OpeningFcn via varargin.
  17. %
  18. % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
  19. % instance to run (singleton)".
  20. %
  21. % See also: GUIDE, GUIDATA, GUIHANDLES
  22. % Edit the above text to modify the response to help Changes
  23. % Last Modified by GUIDE v2.5 25-Feb-2017 13:48:13
  24. % Begin initialization code - DO NOT EDIT
  25. gui_Singleton = 1;
  26. gui_State = struct('gui_Name', mfilename, ...
  27. 'gui_Singleton', gui_Singleton, ...
  28. 'gui_OpeningFcn', @Changes_OpeningFcn, ...
  29. 'gui_OutputFcn', @Changes_OutputFcn, ...
  30. 'gui_LayoutFcn', [] , ...
  31. 'gui_Callback', []);
  32. if nargin && ischar(varargin{1})
  33. gui_State.gui_Callback = str2func(varargin{1});
  34. end
  35. if nargout
  36. [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
  37. else
  38. gui_mainfcn(gui_State, varargin{:});
  39. end
  40. % End initialization code - DO NOT EDIT
  41. % --- Executes just before Changes is made visible.
  42. function Changes_OpeningFcn(hObject, eventdata, handles, varargin)
  43. % This function has no output args, see OutputFcn.
  44. % hObject handle to figure
  45. % eventdata reserved - to be defined in a future version of MATLAB
  46. % handles structure with handles and user data (see GUIDATA)
  47. % varargin command line arguments to Changes (see VARARGIN)
  48. % Choose default command line output for Changes
  49. handles.output = hObject;
  50. %logo1 = importdata('logo.jpg');
  51. %set(handles.logo, 'CDATA', logo);
  52. logo1 = importdata('taiji.jpg'); %图片插入,使用句柄
  53. set(handles.logo1, 'CDATA', logo1);
  54. % Update handles structure
  55. guidata(hObject, handles);
  56. % UIWAIT makes Changes wait for user response (see UIRESUME)
  57. % uiwait(handles.figure1);
  58. % --- Outputs from this function are returned to the command line.
  59. function varargout = Changes_OutputFcn(hObject, eventdata, handles)
  60. % varargout cell array for returning output args (see VARARGOUT);
  61. % hObject handle to figure
  62. % eventdata reserved - to be defined in a future version of MATLAB
  63. % handles structure with handles and user data (see GUIDATA)
  64. % Get default command line output from handles structure
  65. varargout{1} = handles.output;
  66. % --- Executes when figure1 is resized.
  67. function figure1_SizeChangedFcn(hObject, eventdata, handles)
  68. % hObject handle to figure1 (see GCBO)
  69. % eventdata reserved - to be defined in a future version of MATLAB
  70. % handles structure with handles and user data (see GUIDATA)
  71. function edit1_Callback(hObject, eventdata, handles)
  72. % hObject handle to edit1 (see GCBO)
  73. % eventdata reserved - to be defined in a future version of MATLAB
  74. % handles structure with handles and user data (see GUIDATA)
  75. % Hints: get(hObject,'String') returns contents of edit1 as text
  76. % str2double(get(hObject,'String')) returns contents of edit1 as a double
  77. % --- Executes during object creation, after setting all properties.
  78. function edit1_CreateFcn(hObject, eventdata, handles)
  79. % hObject handle to edit1 (see GCBO)
  80. % eventdata reserved - to be defined in a future version of MATLAB
  81. % handles empty - handles not created until after all CreateFcns called
  82. % Hint: edit controls usually have a white background on Windows.
  83. % See ISPC and COMPUTER.
  84. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  85. set(hObject,'BackgroundColor','white');
  86. end
  87. function edit2_Callback(hObject, eventdata, handles)
  88. % hObject handle to edit2 (see GCBO)
  89. % eventdata reserved - to be defined in a future version of MATLAB
  90. % handles structure with handles and user data (see GUIDATA)
  91. % Hints: get(hObject,'String') returns contents of edit2 as text
  92. % str2double(get(hObject,'String')) returns contents of edit2 as a double
  93. % --- Executes during object creation, after setting all properties.
  94. function edit2_CreateFcn(hObject, eventdata, handles)
  95. % hObject handle to edit2 (see GCBO)
  96. % eventdata reserved - to be defined in a future version of MATLAB
  97. % handles empty - handles not created until after all CreateFcns called
  98. % Hint: edit controls usually have a white background on Windows.
  99. % See ISPC and COMPUTER.
  100. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  101. set(hObject,'BackgroundColor','white');
  102. end
  103. function edit3_Callback(hObject, eventdata, handles)
  104. % hObject handle to edit3 (see GCBO)
  105. % eventdata reserved - to be defined in a future version of MATLAB
  106. % handles structure with handles and user data (see GUIDATA)
  107. % Hints: get(hObject,'String') returns contents of edit3 as text
  108. % str2double(get(hObject,'String')) returns contents of edit3 as a double
  109. % --- Executes during object creation, after setting all properties.
  110. function edit3_CreateFcn(hObject, eventdata, handles)
  111. % hObject handle to edit3 (see GCBO)
  112. % eventdata reserved - to be defined in a future version of MATLAB
  113. % handles empty - handles not created until after all CreateFcns called
  114. % Hint: edit controls usually have a white background on Windows.
  115. % See ISPC and COMPUTER.
  116. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  117. set(hObject,'BackgroundColor','white');
  118. end
  119. function edit4_Callback(hObject, eventdata, handles)
  120. % hObject handle to edit4 (see GCBO)
  121. % eventdata reserved - to be defined in a future version of MATLAB
  122. % handles structure with handles and user data (see GUIDATA)
  123. % Hints: get(hObject,'String') returns contents of edit4 as text
  124. % str2double(get(hObject,'String')) returns contents of edit4 as a double
  125. % --- Executes during object creation, after setting all properties.
  126. function edit4_CreateFcn(hObject, eventdata, handles)
  127. % hObject handle to edit4 (see GCBO)
  128. % eventdata reserved - to be defined in a future version of MATLAB
  129. % handles empty - handles not created until after all CreateFcns called
  130. % Hint: edit controls usually have a white background on Windows.
  131. % See ISPC and COMPUTER.
  132. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  133. set(hObject,'BackgroundColor','white');
  134. end
  135. function edit5_Callback(hObject, eventdata, handles)
  136. % hObject handle to edit5 (see GCBO)
  137. % eventdata reserved - to be defined in a future version of MATLAB
  138. % handles structure with handles and user data (see GUIDATA)
  139. % Hints: get(hObject,'String') returns contents of edit5 as text
  140. % str2double(get(hObject,'String')) returns contents of edit5 as a double
  141. % --- Executes during object creation, after setting all properties.
  142. function edit5_CreateFcn(hObject, eventdata, handles)
  143. % hObject handle to edit5 (see GCBO)
  144. % eventdata reserved - to be defined in a future version of MATLAB
  145. % handles empty - handles not created until after all CreateFcns called
  146. % Hint: edit controls usually have a white background on Windows.
  147. % See ISPC and COMPUTER.
  148. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  149. set(hObject,'BackgroundColor','white');
  150. end
  151. function edit6_Callback(hObject, eventdata, handles)
  152. % hObject handle to edit6 (see GCBO)
  153. % eventdata reserved - to be defined in a future version of MATLAB
  154. % handles structure with handles and user data (see GUIDATA)
  155. % Hints: get(hObject,'String') returns contents of edit6 as text
  156. % str2double(get(hObject,'String')) returns contents of edit6 as a double
  157. % --- Executes during object creation, after setting all properties.
  158. function edit6_CreateFcn(hObject, eventdata, handles)
  159. % hObject handle to edit6 (see GCBO)
  160. % eventdata reserved - to be defined in a future version of MATLAB
  161. % handles empty - handles not created until after all CreateFcns called
  162. % Hint: edit controls usually have a white background on Windows.
  163. % See ISPC and COMPUTER.
  164. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  165. set(hObject,'BackgroundColor','white');
  166. end
  167. function edit7_Callback(hObject, eventdata, handles)
  168. % hObject handle to edit7 (see GCBO)
  169. % eventdata reserved - to be defined in a future version of MATLAB
  170. % handles structure with handles and user data (see GUIDATA)
  171. % Hints: get(hObject,'String') returns contents of edit7 as text
  172. % str2double(get(hObject,'String')) returns contents of edit7 as a double
  173. % --- Executes during object creation, after setting all properties.
  174. function edit7_CreateFcn(hObject, eventdata, handles)
  175. % hObject handle to edit7 (see GCBO)
  176. % eventdata reserved - to be defined in a future version of MATLAB
  177. % handles empty - handles not created until after all CreateFcns called
  178. % Hint: edit controls usually have a white background on Windows.
  179. % See ISPC and COMPUTER.
  180. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  181. set(hObject,'BackgroundColor','white');
  182. end
  183. % --- Executes on button press in pushbutton1.
  184. function pushbutton1_Callback(hObject, eventdata, handles)
  185. % hObject handle to pushbutton1 (see GCBO)
  186. % eventdata reserved - to be defined in a future version of MATLAB
  187. % handles structure with handles and user data (see GUIDATA)
  188. n1 = get(handles.edit1,'string'); %**开始断卦对应的回调函数**
  189. n1 = str2num(n1);
  190. n2 = get(handles.edit2,'string'); %输入
  191. n2 = str2num(n2);
  192. n3 = get(handles.edit3,'string');
  193. n3 = str2num(n3);
  194. n4 = get(handles.edit4,'string');
  195. n4 = str2num(n4);
  196. n5 = get(handles.edit5,'string');
  197. n5 = str2num(n5);
  198. n6 = get(handles.edit6,'string');
  199. n6 = str2num(n6);
  200. number = [n1,n2,n3,n4,n5,n6];
  201. if length(number)~=6
  202. set(handles.edit7,'string','error');
  203. else
  204. guaci = SuanGua(number); %算卦程序处理
  205. set(handles.edit7,'string',guaci); %输出
  206. end
  207. % --- Executes on button press in pushbutton2.
  208. function pushbutton2_Callback(hObject, eventdata, handles)
  209. % hObject handle to pushbutton2 (see GCBO)
  210. % eventdata reserved - to be defined in a future version of MATLAB
  211. % handles structure with handles and user data (see GUIDATA)
  212. close(Changes);
  213. % --- If Enable == 'on', executes on mouse press in 5 pixel border.
  214. % --- Otherwise, executes on mouse press in 5 pixel border or over text5.
  215. function text5_ButtonDownFcn(hObject, eventdata, handles)
  216. % hObject handle to text5 (see GCBO)
  217. % eventdata reserved - to be defined in a future version of MATLAB
  218. % handles structure with handles and user data (see GUIDATA)
  219. % --- Executes on button press in logo.
  220. function logo_Callback(hObject, eventdata, handles)
  221. % hObject handle to logo (see GCBO)
  222. % eventdata reserved - to be defined in a future version of MATLAB
  223. % handles structure with handles and user data (see GUIDATA)
  224. % --- Executes on button press in logo1.
  225. function logo1_Callback(hObject, eventdata, handles)
  226. % hObject handle to logo1 (see GCBO)
  227. % eventdata reserved - to be defined in a future version of MATLAB
  228. % handles structure with handles and user data (see GUIDATA)
  229. function edit11_Callback(hObject, eventdata, handles)
  230. % hObject handle to edit11 (see GCBO)
  231. % eventdata reserved - to be defined in a future version of MATLAB
  232. % handles structure with handles and user data (see GUIDATA)
  233. % Hints: get(hObject,'String') returns contents of edit11 as text
  234. % str2double(get(hObject,'String')) returns contents of edit11 as a double
  235. % --- Executes during object creation, after setting all properties.
  236. function edit11_CreateFcn(hObject, eventdata, handles)
  237. % hObject handle to edit11 (see GCBO)
  238. % eventdata reserved - to be defined in a future version of MATLAB
  239. % handles empty - handles not created until after all CreateFcns called
  240. % Hint: edit controls usually have a white background on Windows.
  241. % See ISPC and COMPUTER.
  242. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
  243. set(hObject,'BackgroundColor','white');
  244. end

MATLAB之易经卜卦程序+GUI的更多相关文章

  1. 嵌入式系统WinCE下应用程序GUI界面开发【转】

    嵌入式系统WinCE下应用程序GUI界面开发 ByToradex 秦海 本文旨在介绍嵌入式系统在Wince下进行GUI应用程序开发可以选择的不同GUI开发框架(Framework),目前最常用的几种方 ...

  2. python实现串口通讯小程序(GUI界面)

    python实现串口通讯小程序(GUI界面) 使用python实现串口通讯需要使用python的pyserial库来实现,这个库在安装python的时候没有自动进行安装,需要自己进行安装. 1.安装p ...

  3. Matlab优化存储器读写来改善程序性能

    最近用Matlab写程序的时候终于遇到了程序执行效率的问题,于是在Google上面搜索了一篇提高代码性能的文章,简单的概括一下. 文章是通过优化寄存器读写来提高执行速度的,主要体现在三个方面: 在做循 ...

  4. linux tomcat部署含有matlab画图打包的java web程序

    首先说下问题:matlab可以把相关算法代码打包成jar文件共java调用,本例使用的jar文件的作用是画图并保存,然后部署在linux的tomcat中进行发布.这里出现了一个问题,具体如下:linu ...

  5. C控制台程序 GUI程序

    控制台程序对应的工程类型为"Win32控制台程序(Win32 Console Application)",GUI 程序对应的工程类型为"Win32程序(Win32 App ...

  6. 痞子衡嵌入式:极易上手的可视化wxPython GUI构建工具(wxFormBuilder)

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是wxPython GUI构建工具wxFormBuilder. 一.手工代码布局GUI界面的烦恼 如果你曾经设计过上位机软件GUI界面,初 ...

  7. JAVA个人小程序GUI篇-收银(标签、按钮、复选框、下拉标、文本域、表格······)

    如果用eclipse需先装载windowsbuild //导入包 import java.awt.BorderLayout; import java.awt.EventQueue; import ja ...

  8. MATLAB中文论坛帖子整理(GUI)

    MATLAB中文论坛帖子整理(GUI) 目   录  1.GUI新手之——教你读懂GUI的M文件... 10 2.GUI程序中改变current directory引起的问题... 15 3.GUI中 ...

  9. matlab GUI封装exe文件

    学习matlab过程中,有时有些程序处理数据时老是看着代码,也会觉得疲倦,那么要试一试matlab的GUI吗?我就是这么使用matlab的GUI制作一个小程序,并且使用matlab封装成了exe文件. ...

随机推荐

  1. MQTT协议实现Eclipse Paho学习总结二

    一.概述 前一篇博客(MQTT协议实现Eclipse Paho学习总结一) 写了一些MQTT协议相关的一些概述和其实现Eclipse Paho的报文类别,同时对心跳包进行了分析.这篇文章,在不涉及MQ ...

  2. 怀旧系列(3)----Pascal

    Pascal语言是高中时代2000年左右为了参加计算机竞赛学习的一门语言(Turbo Pascal7.0).据说这么语言的结构化非常好,非常适合青少年形成一定的编程思想.但是现在的角度想想都是扯淡,现 ...

  3. 4.XXE (XML External Entity Injection)

    XXE (XML External Entity Injection) 0x01 什么是XXE XML外部实体注入 若是PHP,libxml_disable_entity_loader设置为TRUE可 ...

  4. 删除docker私有仓库中的镜像

    1.搭建私有仓库 (1)拉取私有仓库镜像 docker pull registry(2)启动私有仓库容器 docker run ‐di ‐‐name=registry ‐p 5000:5000 reg ...

  5. Django 之 JsonResponse 对象

    JsonResponse 是 HttpResponse 的子类,与父类的区别在于: JsonResponse 默认 Content-Type 类型为 application/json HttpResp ...

  6. 【eclipse-js验证】

    第一步:去除eclipse的JS验证:将windows->preference->Java Script->Validator->Errors/Warnings->Ena ...

  7. Dapper.Common基于Dapper的开源LINQ超轻量扩展

    Dapper.Common Dapper.Common是基于Dapper的LINQ实现,支持.net core,遵循Linq语法规则.链式调用.配置简单.上手快,支持Mysql,Sqlserver(目 ...

  8. SpringBoot第五篇:整合Mybatis

    作者:追梦1819 原文:https://www.cnblogs.com/yanfei1819/p/10869315.html 版权声明:本文为博主原创文章,转载请附上博文链接! 引言   ORM框架 ...

  9. 管理时间TED语录

    When people find out I write about time management, They assume two things. One is that I'm always o ...

  10. 浅谈JavaScript--闭包

    闭包的概念 由于在Javascript语言中,只有函数内部的子函数才能读取局部变量,因此可以把闭包简单理解成"定义在一个函数内部的函数". 变量的作用域 要理解闭包,首先必须理解J ...