一些小知識點小結

2021-08-15 18:33:35 字數 816 閱讀 5049

一:mysql計算日期:

timestampdiff(day,t3.payment_due_date,now());

datediff(t.created_date,t.start_time)=1

二:字段轉換

case t.marriage when '1' then '未婚' when '2' then '已婚' when '3' then '離異' when '4' then '喪偶' end as 'marriage'

三:mybatis在插入資料時,返回id

usegeneratedkeys="true" keyproperty="keyid"

四:定時任務

1.spring的xml檔案配置

class="org.springframework.scheduling.quartz.crontrigge***ctorybean">

使用的包: spring-context-support-4.0.5.release.jar

2.使用註解

@scheduled(cron = "0 0 9 * * ?")

使用的包:spring-context-4.3.2.release.jar

涉及知識點:corn表示式

五:mysql格式化日期

date_format(t1.created_date,'%y-%m-%d%h:%i:%s')

六:mybatis模糊查詢

一些小知識點(3)

請尊重原創,謝謝!如何讓webview頁面不能下拉,不要露出下拉後面的背景和滑到底之後上滑後面的背景?self.webview.scrollview.bounces no vi檔案儲存退出命令 先按esc鍵 然後輸入 wq 編輯時刪除當前游標所在位置的字元用x,readonly option is ...

一些小知識點2

1.stat函式講解 表頭檔案 include include 定義函式 int stat const char file name,struct stat buf 函式說明 通過檔名filename獲取檔案資訊,並儲存在buf所指的結構體stat中 返回值 執行成功則返回0,失敗返回 1,錯誤 存...

一些小的知識點

malloc calloc 等記憶體分配函式所獲得的記憶體塊都來自乙個稱為堆 heap 的儲存池。記憶體洩漏 memory leak 是指程式中己動態分配的堆記憶體由於某種原因程式未釋放或無法釋放,造成系統記憶體的浪費,導致程式執行速度減慢甚至系統崩潰等嚴重後果。記憶體洩漏缺陷具有隱蔽性 積累性的特...