原创 java開發之連接數據庫JDBC

目錄   一、JDBC概述 二、JDBC 開發 1、導入驅動jar包 2、註冊數據庫驅動程序 3、獲取數據庫和SQL的連接對象 4、執行 insert 語句獲取結果集 5、執行 select 語句獲取結果集 一、JDBC概述 JDBC(

原创 SpringMVC中的RestFul風格理解

概念:RESTful架構:是一種設計的風格,並不是標準,只是提供了一組設計原則和約束條件,也是目前比較流行的一種互聯網軟件架構。它結構清晰、符合標準、易於理解、擴展方便,所以正得到越來越多網站的採用。 1.他會對url進行規範:     

原创 Maven 三種archetype(原型)

新建Maven project項目時,需要選擇archetype。 那麼,什麼是archetype? archetype就是模板原型的意思,原型將幫助作者爲用戶創建Maven項目模板,併爲用戶提供了手段,產生的這些項目模板參數化的版本。

原创 War包和Jar包的區別

做Java開發,jar包和war包接觸的挺多的,有必要對它們做一個深入的瞭解,總結整理如下:       Jar文件(擴展名爲. Jar,Java Application Archive)包含Java類的普通庫、資源(resources)

原创 IDEA快速實現接口、查找接口的實現、getSet方法快速生成等等常用快捷鍵

IDEA查找接口的實現類: ctrl + alt +B (這快捷鍵。不想說啥。相當於eclipse:ctrl +T) IDEA快速實現接口: Alt + Shift + P (這個很常用了吧,基本上一實現接口就得用) Get/Set方法快

原创 《深入淺出MyBatis技術原理與實戰》

第一章 mybatis 簡介 JDBC 是一種橋接模式。 hibernate vs mybatis hibernate 提供的是一種全表映射的模式,寫 HQL 語言,hbm.xml 文件制定映射規則,有多少個實體類,對應有多少個表(不算那

原创 Set Mismatch

題目描述The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in

原创 Self Numbers

題目描述In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive

原创 Count Primes

題目描述Count the number of prime numbers less than a non-negative number, n.輸入一個整數n(n<=1000000)輸出小於等於n的素數的數量樣例輸入10樣例輸出4 提示

原创 Word Pattern

題目描述Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that

原创 Sum of Consecutive Prime Numbers

題目描述Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such represen

原创 Humidex

題目描述Adapted from Wikipedia, the free encyclopedia The humidex is a measurement used by Canadian meteorologists to refl