- 博客(23)
- 收藏
- 关注
原创 hibernate报错:save is not valid without active transaction
context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:341) at $Proxy16.save(Unknown Source) 配置文件如下:<?xml version="1.0" encoding="UTF-8"?><beans xmlns=&qu
2012-09-13 22:09:40 159
原创 MyEclipse10中java代码不提示的解决办法
he proposal kinds contained int the 'default' content assist list:中的Java Proposals选中
2012-02-19 10:07:02 164
原创 Jquery滑动幻灯片效果
oogle,发现大家使用的原理都是一样,为什么我的就会出现很卡的效果呢?最后发现别人的图片都是比较小的,而我的很大,IE8执行JS代码的效率远不如firefox5,所以就出现了这种效果。下面是效果图: 其实上面的标签能被选中,应该设置成不能选中,代码如下function setSelected(target, boo){ //设置文字是否可以复制boo=true时可以复制,否则禁止复制 if (typeof target.onselectstart!="undef
2011-08-06 09:30:39 124
原创 js实现div的拖拽
较尴尬,在firefox和ie中效果比较好。但chorme中拖动时被选中的几率还是很大。没能很好的解决<html><head> <title>简单的DIV拖动</title> <script type="text/javascript"> function mydrag(id, id_title, id_content) {
2011-07-31 13:48:21 93
原创 js正则表达式使用(转载)
"^((-//d+)|(0+))$" //非正整数(负整数 + 0) "^-[0-9]*[1-9][0-9]*$" //负整数 "^-?//d+$" //整数 "^//d+(//.//d+)?$" //非负浮点数(正浮点数 + 0) "^(([0-9]+//.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*//.[0-9
2011-07-25 09:43:19 94
原创 POJ 2001 Shortest Prefixes
ty string is not considered a prefix in this problem, but every non-empty string is considered to be a prefix of itself. In everyday language, we tend to abbreviate words by prefixes. For example, "carbohydrate" is commonly abbreviated by &
2011-06-28 21:51:35 78
原创 POJ 1107 W's Cipher题解
om dog collars, to pencils, to fishing bobbers. All these devices have very small memories. Encryption algorithms like Rijndael, the candidate for the Advanced Encryption Standard (AES) are demonstrably secure but they don't fit in such a tiny memo
2011-06-27 21:06:13 125
原创 产生缩略图
缩略图 * 日期:2011-06-05 * */ public static void main(String args[]) { // TODO Auto-generated method stub String path = "F:/Documents and Settings/Administrator/桌面/容祖儿.jpg"; /*创建File对象*/ File file = new F
2011-06-05 11:26:23 106
原创 POJ 1577--Falling Leaves
n skip over the definitions of a binary tree of letters, leaves of a binary tree, and a binary search tree of letters, and go right to The problem.A binary tree of letters may be one of two things:It may be empty.It may have a root node.
2011-05-10 20:35:19 166
原创 NOJ 1848--二叉树
前序遍历和中序遍历时,中序遍历是不定的。例如,前序遍历为ABCD,后序遍历为CBDA,那么中序遍历有CBAD和BCAD两种。现在的问题就是给定前序和后序遍历序列,要求出总共有多少棵不同形态的二叉树满足这样的遍历顺序。Input:整个输入有两行,第一行给出前序遍历的访问顺序,第二行给定后序比那里的访问顺序,二叉树节点用一个大写字母表示,不会有两个节点标上相同的字母。输入数据不包含空格,且保证至少有一棵二叉树满足要求。Output:输出一个整数,表示符合要求的不同形态二叉树的数目。Exa
2011-05-07 17:23:05 126
原创 Ubuntu:永久修改网卡的MAC地址
## 修改 eth0 的 MAC 地址 sudo ifconfig eth0 down sudo ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF sudo ifconfig eth0 up有时也会一开机并不起作用,此时就要关闭网络连接,然后再打开,上述方法的配置文件就生效了。
2011-05-05 20:32:35 548
原创 对链表的综合操作
struct Student *Head;struct Student *creatLink(void);void insert(struct Student *head, int n);void detel(struct Student *head);void printLink(struct Student *head);void menu(){ int choose, n; printf("--------------------------
2011-05-01 21:07:58 82
原创 Jungle Roads
tween villages some years ago. But the jungle overtakes roads relentlessly, so the large road network is too expensive to maintain. The Council of Elders must choose to stop maintaining some roads. The map above on the left shows all the roads in u
2011-05-01 10:24:57 108
原创 JavaSwing实现系统托盘
import java.awt.Image;import java.awt.MenuItem;import java.awt.PopupMenu;import java.awt.SystemTray;import java.awt.Toolkit;import java.awt.TrayIcon;import java.awt.event.Actio...
2011-04-24 17:59:19 269
原创 POJ: 1011 Sticks
POJ: 1011问题描述乔治拿来一组等长的木棒,将它们随机地裁断,使得每一节木棒的长度都不超过 50 个长度单位。然后他又想把这些木棒恢复到裁截前的状态,但忘记了初始时有多少木棒以及木棒的初始长度。请你设计一个程序,帮助乔治计算木棒的可能最小长度。每一节木棒的长度都用大于零的整数表示。输入数据由多个案例组成,每个案例包括两行。第一行是一个不超过 64 的整数,表示裁截...
2011-04-24 10:15:51 155
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人