原创 NumPy之array

ndarray是一個包含了相同元素類型和大小的多維數組。創建數組:1、使用系統方法empty(shape[, dtype, order])     # 根據給定的參數創建一個ndarray數組,值用隨機數填充例:>>> np.empty([

原创 ModuleNotFoundError: No module named '_tkinter'

>>> import matplotlib.pyplot as plt  File "/usr/local/lib/python3.6/tkinter/__init__.py", line 36, in <module>    import

原创 設計模式之代理模式

首先來了解一下什麼是代理模式?所謂代理模式就是對象通過代理來控制對真實對象的訪問.舉個生活中的例子,我們日常購物不會直接去聯繫廠家購買,而是通過網上商城,線下超市等形式間接的購買.那麼這些商城或者說超市就是就是我們的代理.我們的代理會去聯繫

原创 A query was run and no Result Maps were found for the Mapped Statement

Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statem

原创 設計模式之代理模式

首先來了解一下什麼是代理模式?所謂代理模式就是對象通過代理來控制對真實對象的訪問.舉個生活中的例子,我們日常購物不會直接去聯繫廠家購買,而是通過網上商城,線下超市等形式間接的購買.那麼這些商城或者說超市就是就是我們的代理.我們的代理會去聯繫

原创 eclipse下如何忽略不用提交的svn文件

window-->preferences-->team-->Ignored Resource-->Add Pattern-->

原创 mysql根據日,周,月分組統計

根據日統計:select  year(create_datetime),month(create_datetime),day(create_datetime),count(*) from redpacket group by year(cr

原创 Annotation Type JsonFormat

最近在調試接口時發現:接口傳遞過來的jSON數據格式中時間格式是字符串的形式:{"name":"滿300送50", "merchantId":"1", "needMoney":"100", "money":"50", "useMon

原创 java實現post請求(PostMethod)

項目要求:實現post請求,且請求格式是json格式。maven依賴包<dependency>     <groupId>org.apache.httpcomponents</groupId>     <artifactId>httpcli

原创 MyBatis之Mapper詳解及常用技巧

select先看一個簡單的案例:<select id="selectPerson" parameterType="int" resultType="hashmap">   SELECT * FROM PERSON WHERE ID = #{

原创 The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'ex

前景概述:表user_info中created_time 設計爲:created_time timestamp not null default current_timestamp;java插入數據時沒有填寫createdTime字段就拋出

原创 MyBatis之分頁

mybatis中如何使用limit實現分頁功能.mapper.xml<select id="selectBylimit" resultType="com.shadow.foretaste.entity.UserInfo">         

原创 MyBatis 之Result Maps最精華部分

案例:https://github.com/sun2shadow/simpleMybatisresultMap 元素是 MyBatis 中最重要最強大的元素。先看一個簡單的映射:<select id="selectUsers" result

原创 A query was run and no Result Maps were found for the Mapped Statement

Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statem

原创 JAVA的動態代理機制

前文講解了代理的基本概念和靜態代理機制:       設計模式之代理模式                現在來談談JAVA的動態代理機制在java的動態代理機制中有一個重要的接口invocationhandler和一個重要的類Prox