原创 Hibernate-easyui後臺的增刪改查

注意:前臺我使用的是easyUI,我會單獨的寫一個博客主要描述easyUI,然後跟我的後臺的信息是一起的,配套的 1.首先是寫實體類,把你需要的字段都寫上,也可以使用註解就不用再數據庫中建表了,項目啓動的時候表就會主動的建起來 2.其次是

原创 Hibernate前臺頁面的數據回顯

解釋說明:我做的這個項目就是數據回顯,回顯的是數據庫中字典表的值 1.首先就是在controller的文件中獲得到每個回顯的數據 /** * 從字典表中查詢教師的學位 * @return */ @RequestMa

原创 Hibernate-easyUI中前臺頁面的增刪改查

注意:在jsp文件中的文本框中可以不用寫value的值,在js文件中跟後臺連接的路徑,寫哪個方法用他時在調用那個路徑 1.首先就是寫一個jsp文件,跟HTML差不多,基本上是一樣的 2.寫一個js文件,在jsp文件中引用js文件 3.寫一

原创 java 驗證18位身份證號是否合法

 把身份證號當做一個參數,然後再判斷。 /** * 驗證18位身份編碼是否合法 * * @param idCard * 身份編碼 * @return 是否合法 */ /** 中國公民身份

原创 java中利用stream求list集合中某個字段的和

描述:一個list中有多個實體類對象,求age的和  List<Student> list = new ArrayList<>(); Student1: name:張三;age:18 Student2: name:張三;age:20

原创 在oracle數據庫中查詢時間並轉爲24小時制--------------String轉Date類型或者Date轉String類型

1.在Oracle數據庫中查詢時間的時候,首先就是把日期從date類型的轉化爲String類型的。 2.將date類型的轉成String類型的,直接調用傳入date類型的參數,返回String類型的字符串 public static S

原创 java在jsp頁面上判斷一個字段是否爲空並且設置整行的樣式

解釋說明:1.判斷表格中的的某一個字段爲空                   2.如果爲空的話,整行的樣式設置爲紅色 這是表格中的一個字段 <th data-options="field:'YXDH', title:'院校代號', w

原创 java 在jsp頁面上使用三元表達式判斷字段是否爲空並拼接字符串

 說明:院校代號名稱這個字段是實體類中沒有的一個字段,這是自定義的一個字段,這個字段是由院校名稱和院校備註拼接成的。field:YXDHMC中的YXDHMC是自定義的。formatter:function(value,row),row是一

原创 codewars解題筆記---Opposite number

Instructions: Very simple, given a number, find its opposite. Examples: 1: -1 14: -14 -34: 34 Sample Tests:  import o

原创 codewars解題筆記---A Strange Trip to the Market

Instructions: You're on your way to the market when you hear beautiful music coming from a nearby street performer. The

原创 codewars解題筆記---The Feast of Many Beasts

Instructions: All of the animals are having a feast! Each animal is bringing one dish. There is just one rule: the dish

原创 codewars解題筆記---L1: Set Alarm

Instructions: Write a function named setAlarm which receives two parameters. The first parameter, employed, is true whe

原创 codewars解題筆記---Grasshopper - Summation

Instructions: Summation: Write a program that finds the summation of every number from 1 to num. The number will always

原创 codewars解題筆記---Function 1 - hello world

Description: Make a simple function called greet that returns the most-famous "hello world!". Test Driven Development (

原创 codewars解題筆記---DNA to RNA Conversion

  原題: Deoxyribonucleic acid, DNA is the primary information storage molecule in biological systems. It is composed of f