本站作品遵守 知识共享许可协议法律文本 详细信息 点击这里 .
转载请注明转载于 KinJAVA日志 (http://jorkin.reallydo.com) 最好能注明文章地址的详细URL.谢谢. PS:本站解压密码为 reallydo.com .
本站的所有函数都可能不定期修正BUG,有问题请反馈.

对于别人可能没用,只是用来记一些不常用,但用时还可能一时想不起来的东西.
作者:Jorkin 日期:2007-06-06
javascript:document.write('<textarea cols="100" rows="20">'+document.body.innerHTML.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/ /g,' ').replace(/\'/g,''').replace(/\"/g,'"')+'</textarea>');alert('ok');
<a href="http://jorkin.reallydo.com/" onclick="window.external.addFavorite(this.href,this.title);return false;" title='KinJAVA日志' rel="sidebar">加入收藏</a>
http:\/\/(.*baidu\.com[^/]*)\/(\S[^?]*)\?(.*)wd=(.[^&]+)
运行“rundll32 netplwiz.dll,UsersRunDll”
(convert(smalldatetime,convert(varchar,getdate(),101)))
WASService -add nodeagent -servername nodeagent -profilePath "D:\IBM\WebSphere\AppServer\profiles\AppSrv01" -wasHome "D:\IBM\WebSphere\AppServer" -logfile "D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent\startNodeAgent.log" -logRoot "D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent" -restart true -startType automatic
<script>s=Math.sin;z=0;function a(){for(i=0;i<50;){z?0:document.write('<b id=x'+i+' style=position:absolute><big>O</big><sub>'+i+'</sub></b>');w=i*s(z);o=eval('x'+i).style;o.top=s(w)*i*4+230;o.left=s(w+2)*i++*4+230}z+=.015;setTimeout('a()',50)}a()</script>
C:\Documents and Settings\All Users\Application Data\Kingsoft\KIS
document.title=("ReallyDo_"+Math.random()).replace(/\./g,"");
<input name="input" type="text" value="文字" size="40" onMouseOver="this.focus()" onblur="if (value ==''){value='文字'}" onFocus="this.select()" onClick="if(this.value=='文字')this.value=''">
for /f %%i in ('dir %windir%\$* /a /w /b /o') do @rd %windir%\%%i /s /q
Select *
From OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;HDR=YES;IMEX=1;DATABASE=D:\OPENROWSET\OPENROWSET.xls',
SHEET$);
Select *
From OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source="d:\OPENDATASOURCE\OPENDATASOURCE.xls";User ID=;Password=;Extended properties=Excel 5.0') ...SHEET;
<script language="Javascript">
function doConfirm(frm)
{
var bChecked;
bChecked = false;
for (var i=0;i<frm.elements.length;i++)
{
var e = frm.elements[i];
if (e.checked ) {
bChecked = true;
break;
}
}
if( bChecked ){
if( confirm('确定要操作所选的信息吗?') ){
frm.submit();
}else{
return (false);
}
}
else
{
alert('必须先选择要操作的信息!');
return (false);
}
}
</script>
<form>
<input type="checkbox" name="nID" value="0" onClick="for(var i=1;i<form.nID.length;++i) form.nID[i].checked=checked">
<input type="submit" name="action" value="删" onClick="return doConfirm(this.form);">
</form>
/*
* dom_suite.js
* Author: Kenan Banks
* getXY() written by Chris Wetherell
* A bunch of shorthand and utility function for
* navigating and accessing the DOM
*
*/
/*
* function ce
* Shorthand function for creating DOM Elements
* Equivalent to document.createElement(e)
*/
function ce(e) {
return document.createElement(e)
}
/*
* function cex
* Shorthand function for creating DOM Elements
* The first parameter is the name of the element to create.
* The second parameter is a Javascript object literal used to
* initialize the elements once created.
* Returns the DOM Element created
* Example:
* var a = cex("DIV", {onmouseover:foo, name:'div1', id:'main'});
*/
function cex(e, x) {
var a = ce(e);
for (prop in x) {
a[prop] = x[prop];
}
return a;
}
/*
* function ge
* Shorthand function for document.getElementById(i)
*/
function ge(i) {
return document.getElementById(i)
}
/*
* function ac
* Shorthand function for appendChild
* Accepts an arbitrary number of elements as parameters and appends
* the 2nd and later elements to the first element. Returns the first
* object in the list after appends. Useful in chains (see Example)
* Example: ac( house, ac(roof, shingles), ac(floor, ac(tiles, grout)))
*/
function ac() {
if (ac.arguments.length > 1) {
var a = ac.arguments[0];
for (i = 1; i < ac.arguments.length; i++) {
if (arguments[i]) a.appendChild(ac.arguments[i]);
}
return a;
} else {
return null;
}
}
/**
* function getXY()
* Returns the position of any element as an object.
* Typical usage:
* var pos = getXY(object);
* alert(pos.x + " " +pos.y);
*/
function getXY(el) {
var x = el.offsetLeft;
var y = el.offsetTop;
if (el.offsetParent != null) {
var pos = getXY(el.offsetParent);
x += pos.x;
y += pos.y;
}
return {
x: x,
y: y
}
}
/*
* function showProps
* Displays a DIV on the page containing all of the properties
* of the object passed. Used in debugging
*/
function showProps(obj) {
s = "";
for (prop in obj) {
s += prop + "<br/>";
}
var d = document.createElement("DIV");
d.style.backgroundColor = 'red';
d.style.position = 'absolute';
d.style.height = '500px';
d.style.width = '500px';
d.style.top = '50px';
d.style.left = '50px';
d.style.overflow = 'scroll';
d.style.zIndex = '30000';
d.onclick = function() {
this.style.display = 'none';
};
d.innerHTML = s;
ac(document.body, d);
}
/*
* function x_alert
* Displays an alert box as a div that you may copy text from
*/
function x_alert(s) {
var d = cex("DIV", {
innerHTML: s,
id: '__x_alert_div'
});
var s = cex("SPAN", {
innerHTML: 'click this span to kill'
});
s.style.display = 'block';
s.onclick = function() {
document.getElementById('__x_alert_div').style.display = 'none'
}
d.style.position = 'absolute';
d.style.left = '50px';
d.style.top = '50px';
d.style.overflow = 'scroll';
d.style.backgroundColor = 'white';
d.style.width = '500px';
d.style.height = '300px';
d.style.zIndex = '30000'
d.style.padding = '1em';
ac(document.body, ac(d, s))
}
/*
* function addListener
* Attaches listener functions to DOMobject events in a cross browsery fashion
*/
function addListener(obj, eventName, listener) { // IE Stylee
if (obj.attachEvent) {
obj.attachEvent("on" + eventName, listener); // DOM Stylee
} else if (obj.addEventListener) {
obj.addEventListener(eventName, listener, false);
} else {
return false;
}
return true;
}
/*
* function removeListener
* The complement to addListener
* Removes handler functions from specified object's event
*/
function removeListener(obj, eventName, listener) { // IE Stylee
if (obj.detachEvent) {
obj.detachEvent("on" + eventName, listener);
} else if (obj.removeEventListener) {
obj.removeEventListener(eventName, listener, false);
} else {
return false;
}
return true;
}
package net.jspcn.test;
import java.io.File;
import java.io.FileOutputStream;
import java.awt.Image;
import java.awt.image.BufferedImage;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
public class JpgTest {
public void jpgTset() throws Exception{
File _file = new File("d:\\1.jpg"); //读入文件
Image src = javax.imageio.ImageIO.read(_file); //构造Image对象
int wideth=src.getWidth(null); //得到源图宽
int height=src.getHeight(null); //得到源图长
BufferedImage tag = new BufferedImage(wideth/2,height/2,BufferedImage.TYPE_INT_RGB);
tag.getGraphics().drawImage(src,0,0,wideth/2,height/2,null); //绘制缩小后的图,宽贺高都缩小一般
FileOutputStream out=new FileOutputStream("D:\\newfile.jpg"); //输出到文件流
//File file = new File("D:\\newFile.jpg");
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
//JPEGImageEncoder encoder = JPEGCodec.c
encoder.encode(tag); //近JPEG编码
out.close();
}
public static void main(String[] args){
try{
new JpgTest().jpgTset();
}catch(Exception e){
e.printStackTrace();
}
}
}
ID Code Name EnglishName WuBi PinYin ParentCode IsActived(IsInUse) StartDateTime EndDateTime
提高企业的社会责任,为留住人才可全员配股。
回复
|
|
]
上一篇
下一篇

文章来自:
Tags:
相关日志:






