ITWorld2008. 9. 25. 21:39

You can use the Lite version for Windows 2003 using a simple work around. Just stop Windows 2003 from forcing you to use CTRL+ALT+DEL on the machine. You can do this through local policy of the server.

To access group policy enter ‘GpEdit.Msc ‘ from command prompt. In the Group Policy Object Editor navigate to the following:

>Computer Configuration
>>Windows Settings
>>>Security Settings
>>>>Local Policies
>>>>>Security options

Double click on the policy for “Interactive Logon: Do not require CTRL+ALT+DEL” and enable.

You might need a server restart.

Posted by 영혼도둑
Study/Mssql2008. 9. 22. 17:16
use master
SELECT TOP 50
        (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count as [Avg IO],
            SUBSTRING(qt.text,qs.statement_start_offset/2,
            (case when qs.statement_end_offset = -1
            then len(convert(nvarchar(max), qt.text)) * 2
            else qs.statement_end_offset end -qs.statement_start_offset)/2)
        as query_text,
        qt.dbid, dbname=db_name(qt.dbid),
        qt.objectid,
        qs.sql_handle,
        qs.plan_handle
FROM sys.dm_exec_query_stats qs
cross apply sys.dm_exec_sql_text(qs.sql_handle) as qt
ORDER BY
       [Avg IO] DESC
Posted by 영혼도둑
Study/Mssql2008. 9. 22. 16:58


declare @dbid int
select @dbid = db_id()
select objectname=object_name(s.object_id), s.object_id
    , indexname=i.name, i.index_id
    , user_seeks, user_scans, user_lookups, user_updates
from sys.dm_db_index_usage_stats s,
    sys.indexes i
where database_id = @dbid
and objectproperty(s.object_id,'IsUserTable') = 1
and i.object_id = s.object_id
and i.index_id = s.index_id
order by (user_seeks + user_scans + user_lookups + user_updates) asc


declare @dbid int
select @dbid = db_id()
select objectname=object_name(s.object_id), s.object_id
    , indexname=i.name, i.index_id
    , user_seeks, user_scans, user_lookups, user_updates
from sys.dm_db_index_usage_stats s,
    sys.indexes i
where database_id = @dbid 
and objectproperty(s.object_id,'IsUserTable') = 1
and i.object_id = s.object_id
and i.index_id = s.index_id
and object_name(s.object_id)= 'mt_member'
order by (user_seeks + user_scans + user_lookups + user_updates) asc


Posted by 영혼도둑
ITWorld2008. 9. 17. 14:12
http://bloter.net/archives/5853

제로보드 개발자와 TNF 리더의 만남..



Posted by 영혼도둑
Personal2008. 9. 12. 20:26



자꾸 봐도 흐뭇.. :)
 
Posted by 영혼도둑
Study/Mssql2008. 9. 12. 10:56
dbcc useroptions

ALTER DATABASE testdb
    SET READ_COMMITTED_SNAPSHOT ON;

SELECT NAME, SNAPSHOT_ISOLATION_STATE,
SNAPSHOT_ISOLATION_STATE_DESC, IS_READ_COMMITTED_SNAPSHOT_ON
FROM SYS.DATABASES
Posted by 영혼도둑
Study/Php2008. 9. 11. 16:21

이미지 Resize 하기

기존 이미지중 6K 가 넘는 이미지를 Resize해야 하는 이슈가 있어서

이미지를 GDLib 이용해서 리사이징 하기로 함

find . -size +6k -type f -exec cp -r {} /tmp/image/ \;
( 우선 데이타를 한곳으로 몰고)

#!/usr/bin/php -q

// gd에 사용될 임시 변수들
$IsTrueColor = false;
$Extension = null;

// 이미지를 로딩하는 함수입니다.
function GDImageLoad($filename)
{
global $IsTrueColor, $Extension;

if( !file_exists($filename) ) return false;

$image_type = exif_imagetype($filename);

switch( $image_type )
{
case IMAGETYPE_JPEG: // JPEG일경우
$im = imagecreatefromjpeg($filename);
$Extension = "jpg";
break;
case IMAGETYPE_GIF: // GIF일 경우
$im = imagecreatefromgif($filename);
$Extension = "gif";
break;
case IMAGETYPE_PNG: // png일 경우
$im = imagecreatefrompng($filename);
$Extension = "png";
break;
default:
break;
}

$IsTrueColor = @imageistruecolor($im);

return $im;
}

// 이미지 크기를 줄입니다.
function GDImageResize($src_file, $dst_file, $width = NULL, $height = NULL, $type = NULL, $quality = 75)
{
global $IsTrueColor, $Extension;

$im = GDImageLoad($src_file);

if( !$im ) return false;

if( !$width ) $width = imagesx($im);
if( !$height ) $height = imagesy($im);

if( $IsTrueColor && $type != "gif" ) $im2 = imagecreatetruecolor($width, $height);
else $im2 = imagecreate($width, $height);

if( !$type ) $type = $Extension;

imagecopyresampled($im2, $im, 0, 0, 0, 0, $width, $height, imagesx($im), imagesy($im));

if( $type == "gif" )
{
imagegif($im2, $dst_file);
}
else if( $type == "jpg" || $type == "jpeg" )
{
imagejpeg($im2, $dst_file, $quality);
}
else if( $type == "png" )
{
imagepng($im2, $dst_file);
}

imagedestroy($im);
imagedestroy($im2);

return true;
}

GDImageResize('1631.jpg', '1631.jpg', '104', '104');
?>

위 소스를 이용 resizing 함... 냐하핫

Posted by 영혼도둑
ITWorld2008. 9. 11. 16:21

맘스다이어리 매일 글쓰기


와이프가 메일 맘스다이어리들어가서 일기를 쓰는걸 보았다..

100일을 연이어 쓰면 오프라인 일기장을 만들어 준다는...

한번은 일기를 못 써서 속상해 하길래...

내가 할줄 아는 방법으로 고민해 봤다.. ^^



#!/usr/local/bin/php
require("/usr/local/apache/wwwhome/mutant/include/dbconn.inc");
set_time_limit(0);

$timestamp=time();
$date=date("Y-m-d",$timestamp);
$year=date("Y",$timestamp);
$month=date("m",$timestamp);
$day=date("d",$timestamp);


$target="http://www.ucool.in/community/sayingBBS/daily_saying_list.asp";
$cmd="lynx -source $target | grep 'textarea' | sed -e 's///g' -e 's/|/ /g'| sed -e 's/^M/ \\n/g' -e 's/ //
$text=system($cmd);

$t="";
$fd = fopen ("/usr/local/apache/wwwhome/mutant/moms/a.txt", "r");
while (!feof ($fd)) {
$buffer = fgets($fd, 4096);
$t=$t.$buffer;
}
fclose ($fd);
$t="\n 오늘의 명언".$t."\n\n From 민정이 서방탱, 지우아빠 ^^\n\n";

$t=urlencode($t);

$wget="/usr/bin/curl -c /usr/local/apache/wwwhome/mutant/moms/cookies http://www.momsdiary.co.kr/member/login.php?id=UserID\&password=Password";
system($wget);

$wget2="/usr/bin/curl -b /usr/local/apache/wwwhome/mutant/moms/cookies http://data1.momsdiary.co.kr/mydiary/diary/diary_act.php?mlog_id=UserID\&reg_date=$date\&vtype=0\&mode=write\&diary_year=$year\&diary_month=$month\&diary_day=$day\&weather=01\&emoticon=01\&letter=default\&diary_kind=0\&category=01\&title=$date\&comment=$t";
system($wget2);



%>

와이프가 무지 좋아한다는... ^^

벌써 200일이 지나서 2권 완성..ㅋㅋ

Posted by 영혼도둑
Study/Python2008. 9. 11. 16:20

파이썬으로 로그 삭제하기

#! /usr/local/bin/python

import os
from datetime import *

tempPath = '/Log'
tempList = os.listdir(tempPath)

tempDate = datetime.today()
#tempTargetDate = tempDate - timedelta( days=14 )
tempTargetDate = tempDate - timedelta( weeks=5 )



##### START #####

print '\n'

###
for tempFolder in tempList :

tempList2 = os.listdir(tempPath + '/' + tempFolder)

print '\n##### ' + tempFolder + '\n'

for tempFile in tempList2 :
tempFileDate = datetime.fromtimestamp( os.path.getmtime( tempPath + '/' + tempFolder + '/' + tempFile ) )

if tempFileDate < tempTargetDate:

###
### WARNING WARNING WARNING WARNING WARNING
### WARNING WARNING WARNING WARNING WARNING
### WARNING WARNING WARNING WARNING WARNING
###
### os.remove(tempPath + '/' + tempFolder + '/' + tempFile)
###
### WARNING WARNING WARNING WARNING WARNING
### WARNING WARNING WARNING WARNING WARNING
### WARNING WARNING WARNING WARNING WARNING
###

print tempPath + '/' + tempFolder + '/' + tempFile + ' ----- is deleted.'

else:
print tempPath + '/' + tempFolder + '/' + tempFile

###

print '\n'
print 'today is\t\t', tempDate
print '\nand THE TARGET DATE is\t', tempTargetDate

###

print '\nhello, world. = )\n'

##### END OF POEM #####
Posted by 영혼도둑
ITWorld2008. 9. 11. 16:20

네이버의 파이어폭스 AddOn


네이버가 파이어폭스 3.0버전의 네이버 최적화 버전을 만든 다는 얘기는

파이어폭스 3.0이 배포되면서부터 나왔다.. ( 우리는 이런거 언제 해보남.. )

네이버 뿐만 아니라 다음에서도 만든다고 하던데....

그런데 어제
배포된 기사KLDP 올라온 글들을 보니..

약간의 오해(?)가 있었던듯 하다..

결국 배포된 것은 FF용 익스텐션이었다..

그것도 테마와 바로가기(?) 기능 정도..

모질라재단과의 협의 과정에 문제가 있어서 배포도 늦어진듯하고....

이번 경우는 언론에서 먼저 오바 했을수도 있지만...

암튼 네이버는 고생하고 욕좀 먹는 분위기...

나도 설치해보고.. 눈이 아파서 삭제..ㅡㅡ;

설치해보고 싶은신 분들은...

http://t.lab.naver.com/firefox/

요기에서 받아보셔용
Posted by 영혼도둑