<!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>
<title> new document </title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<style type="text/css">

</style>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
//<![cdata[
$(document).ready(function() {

});

// 키 이벤트 on/off
var on = false;

// jquery 로 keypress 이벤트 발생시 실행
$(document).keypress(function(e) {

// 이벤트(e) code가 97 = a 인 경우 이벤트 발생
if( e.keyCode == 97 ) {

// 한번 발생하면 true
if( on ) {
// src를 네이버로
$("#aaa").attr("src", "http://static.naver.net/www/u/2010/0611/nmms_215646753.gif");
} else {
// false 인 경우 네이트로
$("#aaa").attr("src", "http://main.nateimg.co.kr/img/cms/content_pool/2011/07/normal_bi.gif");
}

// true 를 false로 변경
on = !on;
}

// alert(e.keyCode);
});
//]]>
</script>
</head>

<body>

<img src="http://static.naver.net/www/u/2010/0611/nmms_215646753.gif" id="aaa">
<!--
<img src="http://static.naver.net/www/u/2010/0611/nmms_215646753.gif">
<img src="http://main.nateimg.co.kr/img/cms/content_pool/2011/07/normal_bi.gif">
-->
</body>
</html>

Posted by [czar]
,

java 암호화

카테고리 없음 2012. 2. 16. 11:29
java 암호화
 
Posted by [czar]
,
http://www.uploadify.com/documentation/ 


원래 사용법
  1.  $('#file_upload').uploadify({
  2.     'uploader'  : '/uploadify/uploadify.swf',
  3.     'script'    : '/uploadify/uploadify.php',
  4.     'cancelImg' : '/uploadify/cancel.png',
  5.     'folder'    : '/uploads',
  6.     'auto'      : true
  7.   });

아래는 임의로 변경한 방법


function uploadify(id, queueId, callback, folder, fileDesc, fileExt) {
$(id).uploadify({
queueID : queueId,
folder : folder,
auto : true,
multi : true,
fileDesc: fileDesc ? fileDesc : "이미지,문서",
        fileExt: fileExt ? fileExt : "*.jpg;*.jpeg;*.png;*.gif;*.xls;*.xlsx;*.ppt;*.pptx;*.doc;*.docx;*.pdf;*.hwp",
onComplete : function(event, ID, fileObj, response, data) {
var jsonData = toJson(response);
if(typeof callback == 'function') {
callback.call(this, id, jsonData);
}
}
});
}

사용법
uploadify("#uploadify", "fileQueue", uploadifyCallback, "/upload", "이미지,문서", "*.jpg;*.jpeg;*.png;*.gif;");

업로드 할게 여러개면 여러개 지정

 
Posted by [czar]
,
centos 에서 사용자 비밀번호 변경 기간 설정.

[root@localhost ~]# vi /etc/login.defs

PASS_MAX_DAYS   90  ## 패스워드 변경 없이 사용 가능한 최대 기간

PASS_MIN_DAYS   1   ## 패스워드 변경 없이 사용 가능한 최소 기간
PASS_MIN_LEN    8   ## 최소 길이
PASS_WARN_AGE   7   ## 만료되기 전 알림 주기 ( -7 )


 
Posted by [czar]
,
centos 에서 sudoers 설정


관리자로 로그인 후 추가할 아이디가 hahaha 인 경우

$vi /etc/sudoers

## Allow root to run any commands anywhere
root           ALL=(ALL)       ALL
hahaha         ALL=(ALL)       ALL          <= 추가

 


## Same thing without a password <=== 비밀번호 물어보지 않게
#%wheel  ALL=(ALL)       NOPASSWD: ALL 

주석제거


저장후 빠져나옴.


그리고 
wheel 그룹에 hahaha 사용자 추가

$vi /etc/group
중간쯤~~
wheel:x:10:root,hahaha        <== 사용자추가

저장.


hahaha 사용자로 로그인 후 
sudo tail /etc/sudoers 하면

$ sudo tail /etc/sudoers
[sudo] password for devtainer:
# %wheel        ALL=(ALL)       NOPASSWD: ALL

## Allows members of the users group to mount and unmount the
## cdrom as root
# %users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom

## Allows members of the users group to shutdown this system
# %users  localhost=/sbin/shutdown -h now
hahaha       ALL=(ALL)       ALL

이렇게 나오면 정상

sudo: /etc/sudoers is mode 0640, should be 0440 
sudo: no valid sudoers sources found, quitting
 
 
이렇게 나오면 퍼미션 에러
chmod u-w /etc/sudoers
퍼미션을 440으로 변경해준다.  
Posted by [czar]
,
input { -webkit-appearance: none; } 


 
-webkit-border-radius:0px;
이 속성으로 잘됨. 
Posted by [czar]
,
참고 사이트
http://anyons.net/dev/?p=45



/usr/lib/python2.4/site-packages/Trac-xxxx.egg/trac/htdocs/css/wiki.css

#edit #text { fontnormal 13px '맑은 고딕''돋움체';clearbothmargin-left-1pxmargin-right-1pxpadding0width100% }


/usr/lib/python2.4/site-packages/Trac-xxxx.egg/trac/htdocs/css/trac.css

위 파일에서
font-family 및 font 속성에서 폰트 이름 변경
 

font: normal 13px '맑은 고딕','돋움체';
Posted by [czar]
,


<Location /trac>

SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracUriRoot /trac
PythonOption TracEnvParentDir "/var/trac"
PythonOption TracLocale "ko_KR.utf8"
</Location>




[i18n] 
date_format
= %Y-%m-%
datetime_format
= %Y-%m-%d %H:%M:%
time_format = %H:%M:%S 
Posted by [czar]
,
centos yum 설치

mkdir temp && cd temp 
vim yumdownload


#!/bin/bash
for file in \
elfutils-0.137-3.el5.x86_64.rpm \
elfutils-libs-0.137-3.el5.x86_64.rpm \
elfutils-libelf-0.137-3.el5.x86_64.rpm \
expat-1.95.8-8.3.el5_5.3.x86_64.rpm \
gmp-4.1.4-10.el5.x86_64.rpm \
libxml2-2.6.26-2.1.2.8.el5_5.1.x86_64.rpm \
libxml2-python-2.6.26-2.1.2.8.el5_5.1.x86_64.rpm \
m2crypto-0.16-6.el5.8.x86_64.rpm \
python-libs-2.4.3-43.el5.x86_64.rpm \
python-2.4.3-43.el5.x86_64.rpm \
python-elementtree-1.2.6-5.x86_64.rpm \
python-iniparse-0.2.3-4.el5.noarch.rpm \
python-sqlite-1.1.7-1.2.1.x86_64.rpm \
python-urlgrabber-3.1.0-6.el5.noarch.rpm \
readline-5.1-3.el5.x86_64.rpm \
rpm-4.4.2.3-22.el5.x86_64.rpm \
rpm-libs-4.4.2.3-22.el5.x86_64.rpm \
rpm-python-4.4.2.3-22.el5.x86_64.rpm \
sqlite-3.3.6-5.x86_64.rpm \
yum-3.2.22-33.el5.centos.noarch.rpm \
yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm \
yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
do wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/$file;
done  


chmod a+x yumdownload 
./yumdownload




rpm -Uvh python-elementtree-1.2.6-5.x86_64.rpm
rpm -Uvh python-iniparse-0.2.3-4.el5.noarch.rpm
rpm -Uvh python-sqlite-1.1.7-1.2.1.x86_64.rpm
rpm -Uvh rpm-python-4.4.2.3-22.el5.x86_64.rpm
rpm -Uvh m2crypto-0.16-6.el5.8.x86_64.rpm
rpm -Uvh python-urlgrabber-3.1.0-6.el5.noarch.rpm
rpm -Uvh yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
rpm -Uvh --nodeps yum-fastestmirror*
rpm -Uvh yum-3.2.22-33.el5.centos.noarch.rpm


 
  
Posted by [czar]
,
LG패션 등산화 색상 이런이런..


 
Posted by [czar]
,