- 浏览: 9846 次
- 性别:
- 来自: 杭州
最新评论
文章列表
/**
* 将string转化为byte[] <功能详细描述>
*
* @param strhex
* @return [参数说明]
*
* @return byte[] [返回类型说明]
* @exception throws [违例类型] [违例说明]
* @see [类、类#方法、类#成员]
*/
public static byte[] sTByte(String src)
{
if (src == null)
{
...
package com.Dao;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class EncryptUtil
{
/**
* AES加密算法
*
* @param sSrc
* @param sKey
* @return
* @throws Exception [参数说明]
*
* @return String [加密后字符串]
* @exception throws [违例类型] ...
public static void main(String[] args)
throws Exception
{
// 需要添加水印的图片的路径
InputStream is = new FileInputStream("WebRoot/images/ab.jpg");
// 通过JPEG图象流创建JPEG数据流解码器
JPEGImageDecoder jpegDecoder = JPEGCodec.createJPEGDecoder(is);
// 解码当前JPEG数据 ...
package com.Dao;
import java.io.*;
import com.sun.image.codec.jpeg.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import javax.swing.*;
public class Test
{
/**
* 设置密文在图片上
*
* @param g
* @param onOff
* @param buffHeight
* @param strEnc
* @see ...
/**
* 星星打分组件
*
* @author Yunsd
* @date 2010-7-5
*/
var Stars = Class.create();
Stars.prototype = {
initialize: function(star,options) {
this.SetOptions(options); //默认属性
var flag = 999; //定义全局指针
var isIE = (document.all) ? true : false; //IE?
var starlist = document.getElementById(star) ...
<body>
<div class="shop-rating">
<span class="title">物流公司的服务:</span>
<ul class="rating-level" id="stars1">
<li><a class="one-star" star:value="100" href="#">100</a></li>
& ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb ...
<html>
<head>
<title>倒计时</title>
</head>
<BODY>
<SCRIPT language=JavaScript>
function setcountdown(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday
}
setcountdown(2011,11,1)
var occasion="世界末日来临了···"
var message_on_occasion="噢,世界末日到了! ...
<html>
<head>
<title>JavaScript特效|自动滚屏</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
font-size: 9pt;
}
td {
font-size: 9pt;
line-height: 165%;
}
-->
</style ...
一 些很实用且必用的小脚本代码:
脚本1:进入主页以后自动播放声音
<embed src="pnm://10.13.31.90/~kayvin/mihunji.rm" hidden=true autostart=true loop=true>
脚本2:进入主页后自动最大话,省的去在自己单击了
<script>
self.moveTo(0,0)
se ...
insert方法
public void insert(Object o){
Session session = HibernateSessionFactory.currentSession();
Transaction t = session.beginTransaction();
session.save(o);
t.commit();
HibernateSessionFactory.clossSession();
}
delete方法
public void delete(Object o,Serializable id){
Session ...