- 博客(10)
- 收藏
- 关注
原创 ssh junit 初步简单调试
@Test public void testSave(){ ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml"); UserService us = (UserService) ac.getBean("userService"); User u = new User()
2016-07-01 22:09:43
315
原创 java web ssh三大框架整合简单入门
贫道放假第二天了,是时候写一个简单的入门了,ssh三大框架啊的简单整合。 做一个简单的用户登录。创建好一个web工程后,添加为Spring工程添加hibernate工程是会将hibernate.cfg.xml集成到applicationContext中既然是用户登录首先需要一个实体类。 LocalSessionFactoryBean 不能使用注解 --
2016-07-01 14:12:26
8294
1
转载 假期小算法--堆排序(啊哈算法)
#include const int SIZE_ARRAY = 101; int heap[SIZE_ARRAY] = {0}; // 堆中元素 int n;//堆中元素个数 //交换函数 void heapSwap(int x,int y){ int temp; temp = heap[x]; heap[x] = heap[y]; heap[y] = te
2016-02-08 19:48:16
392
原创 c++引用类型小问题
#include using namespace std; int main(void){ int q = 5; //指针p指向变量q的地址 int* p = &q; //简单理解为指针p起了别名;ref为q的地址 int*& ref = p; cout<<" &q = "<<&q<<endl; cout<<" p = "<<p<<end
2016-02-07 16:01:02
266
原创 c++引用类型小问题
#include using namespace std; int main(void){ //count 为普通变量 int count = 1; //refCount 为count的引用 int& refCount = count; refCount++; //结果都为2 cout << "count is "<< count <
2016-02-07 15:56:55
244
转载 假期简单算法--折半查找
/* 折半查找:目标队列关键字有序,必须是顺序存储结构 */ #include const int NOT_FOUND = -1; int binSearch(int Array[],int start,int end,int key){ int left,right; int mid; left = start; right = end; wh
2016-02-07 15:47:33
341
原创 java小的误区
package ceshi; public class Ceshi { public static void main(String[] arg0){ /** * s1 在常量池中 * s2创建是搜索常量池中内容 * s3 new 出来的对象分配在堆内存中 * answer: * true * false */ String s1
2016-02-06 18:02:29
261
转载 假期简单算法--快排
/** 简单算法--快排 递归实现,非稳定排序,当全部逆序,时间复杂度为O(n^2) */ #include const int SIZE = 10; using namespace std; void Qsort(int data[],int low,int high){ if(low >= high ){ return; } int
2016-02-06 16:41:30
294
原创 BaseDao
package com.dao; import java.lang.reflect.Field; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; im
2016-01-14 15:05:52
417
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人