2012년 7월 25일 수요일

2012년 7월 14일 토요일

ORA-00845: MEMORY_TARGET not supported on this system

vi

tmpfs                   /dev/shm                tmpfs   defaults,size=4g        0 0

 

 

 

 

 

 

출처:http://h391106.tistory.com/243

2012년 7월 5일 목요일

vnc 접속시 빈화면 나오는 현상

 

 

결론 부터 말하면 gnome 이나 kde 가 설치 되지 않아서 이다.

centos 를 한글로 설치하면
yum grouplist를 치면 아래 처럼 한글로 나온다.

groupinstall도 역시 한글로 입력해야 제대로 설치가 된다.


yum groupinstall '데스크탑' << gnome 설치


[root@localhost .vnc]# yum grouplistLoaded plugins: fastestmirrorSetting up Group ProcessLoading mirror speeds from cached hostfile * base: data.nicehosting.co.kr * extras: data.nicehosting.co.kr * updates: data.nicehosting.co.krInstalled Groups:   NFS 파일 서버   Perl 지원   X Window 시스템   거대 시스템 성능   과학기술 지원   그래픽기반 관리 도구   기본   네트워크 파일 시스템 클라이언트   네트워킹 도구   데스크탑 플랫폼   디렉터리 클라이언트   디버깅 도구   레거시 X Windows 시스템 호환성   레거시 유닉스 호환성   범용 데스크탑   서버 플랫폼   성능 도구   원격 데스크탑 클라이언트   웹 서블렛 엔진   이메일 서버   자바 플랫폼   추가 개발   콘솔 인터넷 도구   폰트   하드웨어 모니터링 도구Installed Language Groups:   라오어 지원 [lo]   아랍어 지원 [ar]   아르메니아어 지원 [hy]   이누이트어 지원 [iu]   일본어 지원 [ja]   조지아어 지원 [ka]   타지크어 지원 [tg]   한국어 지원 [ko]   히브리어 지원 [he]Available Groups:   CIFS 파일 서버   Eclipse   FCoE 저장소 클라이언트   FTP 서버   Identity Management Server   Infiniband 지원   KDE 데스크탑   MySQL 데이터베이스 서버   MySQL 데이터베이스 클라이언트   PHP 지원   PostgreSQL 데이터베이스 서버   PostgreSQL 데이터베이스 클라이언트   Ruby Support   SNMP 지원   TeX 지원   TurboGears 어플리케이션 프레임워크   iSCSI 저장소 클라이언트   가상화   가상화 도구   가상화 클라이언트   가상화 플랫폼   개발용 도구   고가용성   고가용성 관리   그래픽 생성 도구   기술 저작   내결함성 스토리지   네트워크 인프라스트럭쳐 서버   네트워크 저장소 서버   데스크탑   데스크탑 디버깅과 성능 도구   데스크탑 플랫폼 개발   디렉터리 서버   로드 밸런싱   메시지 클라이언트 지원   메인프레임 억세스   백업 서버   백업 클라이언트   보안 도구   서버 플랫폼 개발   소말리아어 지원   스마트카드 지원   시스템 관리   시스템 관리 도구   시스템 관리 메세지 서버 지원   오피스 스위트/생산성   웹 서버   웹기반 엔터프라이즈 관리   이맥스   인쇄 서버   인쇄 클라이언트   인터넷 브라우저   인터넷 프로그램   입력 방식   저장소 가용성 도구   전화연결 네트워킹 지원   클라이언트 관리 도구   호환성 라이브러리Available Language Groups:   Xhosa 지원 [xh]   갈리시아어 지원 [gl]   게일어 지원 [gd]   고지 소르비아어 지원 [hsb]   구자라티어 지원 [gu]   그리스어 지원 [el]   네델란드어 지원 [nl]   네팔어 지원 [ne]   노르웨이어 지원 [nb]   덴마크어 지원 [da]   독일어 지원 [de]   라트비아어 지원 [lv]   라틴어 지원 [la]   러시아어 지원 [ru]   루마니아어 지원 [ro]   룩셈부르크어 지원 [lb]   르완다어 지원 [rw]   리투아니아어 지원 [lt]   마라티어 지원 [mr]   마오리어 지원 [mi]   마이틸리어 지원 [mai]   마케도니아어 지원 [mk]   말라가시어 지원 [mg]   말라얄람어 지원 [ml]   말레이어 지원 [ms]   맹크스어 지원 [gv]   몰타어 지원 [mt]   몽골어 지원 [mn]   미얀마어(버마어) 지원 [my]   바스크어 지원 [eu]   베트남어 지원 [vi]   벤다어 지원 [ve]   벨로루시어 지원 [be]   벵골어 지원 [bn]   부탄어 지원 [dz]   불가리아어 지원 [bg]   브라질 포르투갈어 지원 [pt_BR]   브르타뉴어 지원 [br]   사르데냐어 지원 [sc]   산스크리트어 지원 [sa]   세르비아어 지원 [sr]   소토어(남) 지원 [st]   소토어(북) 지원 [nso]   스와티어 지원 [ss]   스와힐리어 지원 [sw]   스웨덴어 지원 [sv]   스페인어 지원 [es]   슬로바키아어 지원 [sk]   슬로베이아어 지원 [sl]   신드어 지원 [sd]   신할라어 지원 [si]   아마지그어 지원 [ber]   아삼어 지원 [as]   아이슬란드어 지원 [is]   아일랜드어 지원 [ga]   아제르바이잔어 지원 [az]   아프리칸스어 지원 [af]   알바니아어 지원 [sq]   에스토니아어 지원 [et]   에스페란토어 지원 [eo]   에티오피아어 지원 [am]   영어(영국) 지원 [en_GB]   오리야어 지원 [or]   오크어 지원 [oc]   왈론어 지원 [wa]   우르두어 지원 [ur]   우즈벡어 지원 [uz]   우크라이나어 지원 [uk]   웨일즈어 지원 [cy]   은데벨레어(남) 지원 [nr]   이탈리아어 지원 [it]   인도네시아어 지원 [id]   인테르링구아 지원 [ia]   저지 섹슨어 지원 [nds]   줄루어 지원 [zu]   중국어 지원 [zh]   차티스가리어 지원 [hne]   체코어 지원 [cs]   총가어 지원 [ts]   츠와나어 지원 [tn]   치체와어 지원 [ny]   카슈미르어 지원 [ks]   카슈브어 지원 [csb]   카자흐어 지원 [kk]   카탈로니아어 지원 [ca]   칸나다어 지원 [kn]   콘칸어 지원 [kok]   콥틱어 지원 [cop]   쿠르드어 지원 [ku]   크로아티아어 지원 [hr]   크메르어 지원 [km]   타갈로그어 지원 [tl]   타밀어 지원 [ta]   태국어 지원 [th]   터키어 지원 [tr]   테툼어 지원 [tet]   텔루구어 지원 [te]   투르크멘어 지원 [tk]   티벳어 지원 [bo]   펀잡어 지원 [pa]   페로스어 지원 [fo]   페르시아어 지원 [fa]   포르투갈어 지원 [pt]   폴란드어 지원 [pl]   프랑스어 지원 [fr]   프리울리안어 지원 [fur]   프리지아어 지원 [fy]   피지어 지원 [fj]   핀란드어 지원 [fi]   필리핀어 지원 [fil]   헝가리아어 지원 [hu]   힌두어 지원 [hi]   힐리가이노어 지원 [hil]Done

 

 



 

 

 

2012년 7월 3일 화요일

asp vs php 비교

 

 













































































































































































ASP (VBScript)



PHP (v4.3+)


General syntax
ASP Comments, inline
'my dog has fleas
PHP Comments, inline
//my dog has fleas
ASP Comments, block

not available?
PHP Comments, block
/*
The quick brown fox
jumped over the lazy dogs.
*/
ASP, Escaping quotes
"""var text1=""<img src=\""blank.gif\"">"";"

PHP, Escaping quotes
\" or use ' like javascript'var text1="<img src=\"blank.gif\">";';

ASP Command termination
None, but : can be used to separate commands
on the same line.
PHP Command termination
Each command must end with ; but
multiple commands per line are allowed.
ASP Screen output
response.write "hello"
PHP Screen output
echo "hello";
ASP Newline characters
vbCrLfresponse.write "hello" & vbCrLf

PHP Newline characters
"\n" (must be inside "", not '')echo "hello \n";

ASP Variable Names
Not case sensitive,
so fName is the same as FNAME
PHP Variable Names
Case sensitive AND must begin with $
so $fName is NOT the same as $FNAME
String Functions
ASP String concatenation
&fname=name1 & " " & name2
emsg=emsg & "error!"

PHP String concatenation
. and .=$fname=$name1." ".$name2;
$emsg.="error!";

ASP, Change case
LCase(), UCase()lowerName=LCase(chatName)
upperName=UCase(chatName)

PHP, Change case
strtolower(), strtoupper()$lowerName=strtolower($chatName);
$upperName=strtoupper($chatName);

ASP String length
Len()n=Len(chatName)

PHP String length
strlen()$n=strlen($chatName);

ASP, Trim whitespace
Trim()temp=Trim(xpage)

PHP, Trim whitespace
trim() and also ltrim(), rtrim()$temp=trim($xpage);

ASP String sections

Left(), Right(), Mid()Left("abcdef",3)      result = "abc"Right("abcdef",2)     result = "ef"Mid("abcdef",3)       result = "cdef"Mid("abcdef",2,4)     result = "bcde"

PHP String sections

substr()substr("abcdef",0,3);     result = "abc"substr("abcdef",-2);      result = "ef"substr("abcdef",2);       result = "cdef"substr("abcdef",1,4);     result = "bcde"

ASP String search forward, reverse

Instr(), InstrRev()x=Instr("abcdef","de")        x=4x=InstrRev("alabama","a")     x=7

PHP String search forward, reverse

strpos(), strrpos()$x=strpos("abcdef","de");      x=3$x=strrpos("alabama","a");     x=6

ASP String replace
Replace(string exp,search,replace)temp=Replace(temp,"orange","apple")
temp=Replace(temp,"'","\'")
temp=Replace(temp,"""","\""")

PHP String replace
str_replace(search,replace,string exp)$temp=str_replace("orange","apple",$temp); $temp=str_replace("'","\\'",$temp);
$temp=str_replace("\"","\\\"",$temp);

ASP, split a string into an array

Split()temp="cows,horses,chickens"farm=Split(temp,",",-1,1)x=farm(0)

PHP, split a string into an array

explode()$temp="cows,horses,chickens";$farm=explode(",",$temp);$x=$farm[0];

ASP, convert ASCII to String
x=Chr(65) x="A"
PHP, convert ASCII to String
$x=chr(65); x="A"
ASP, convert String to ASCII
x=Asc("A") x=65
PHP, convert String to ASCII
$x=ord("A") x=65
Control Structures
ASP, if statements

if x=100 then  x=x+5elseif x<200 then  x=x+2else  x=x+1end if

PHP, if statements

if ($x==100) {  $x=$x+5;}else if ($x<200) {  $x=$x+2;}else {  $x++;}

ASP, for loops

for x=0 to 100 step 2  if x>p then exit fornext

PHP, for loops

for ($x=0; $x<=100; $x+=2) {  if ($x>$p) {break;}}

ASP, while loops

do while x<100  x=x+1  if x>p then exit doloop

PHP, while loops

while ($x<100) {  $x++;  if ($x>$p) {break;}}

ASP, branching

select case chartName  case "TopSales"    theTitle="Best Sellers"    theClass="S"  case "TopSingles"    theTitle="Singles Chart"    theClass="S"  case "TopAlbums"    theTitle="Album Chart"    theClass="A"  case else    theTitle="Not Found"end select

PHP, branching

switch ($chartName) {  case "TopSales":    $theTitle="Best Sellers"; $theClass="S";    break;  case "TopSingles":    $theTitle="Singles Chart"; $theClass="S";    break;  case "TopAlbums":    $theTitle="Album Chart"; $theClass="A";    break;  default:    $theTitle="Not Found";}

ASP functions

Function myFunction(x)  myFunction = x*16  'Return valueEnd Function

PHP functions

function myFunction($x) {  return $x*16;  //Return value}

HTTP Environment
ASP, Server variables

Request.ServerVariables("SERVER_NAME")Request.ServerVariables("SCRIPT_NAME")Request.ServerVariables("HTTP_USER_AGENT")Request.ServerVariables("REMOTE_ADDR")Request.ServerVariables("HTTP_REFERER")

PHP, Server variables

$_SERVER["HTTP_HOST"];$_SERVER["PHP_SELF"];$_SERVER["HTTP_USER_AGENT"];$_SERVER["REMOTE_ADDR"];@$_SERVER["HTTP_REFERER"];     @ = ignore errors

ASP Page redirects
Response.redirect("wrong_link.htm")
PHP Page redirects
header("Location: wrong_link.htm");
ASP, GET and POST variables
Request.QueryString("chat")
Request.Form("username")
PHP, GET and POST variables
@$_GET["chat"];       @ = ignore errors
@$_POST["username"];
ASP, prevent page caching
Response.CacheControl="no-cache"
Response.AddHeader "pragma","no-cache"
PHP, prevent page caching
header("Cache-Control: no-store, no-cache");
header("Pragma: no-cache");
ASP, Limit script execution time, in seconds
Server.ScriptTimeout(240)
PHP, Limit script execution time, in seconds
set_time_limit(240);
ASP, Timing script execution

s_t=timer ...ASP script to be timed...duration=timer-s_tresponse.write duration &" seconds"

PHP, Timing script execution

$s_t=microtime();...PHP script to be timed...$duration=microtime_diff($s_t,microtime());$duration=sprintf("%0.3f",$duration);echo $duration." seconds";//required functionfunction microtime_diff($a,$b) {  list($a_dec,$a_sec)=explode(" ",$a);  list($b_dec,$b_sec)=explode(" ",$b);  return $b_sec-$a_sec+$b_dec-$a_dec;}

File System Functions
ASP, create a file system object (second line is wrapped)
'Required for all file system functions
fileObj=Server.CreateObject
("Scripting.FileSystemObject")
PHP, create a file system object
Not necessary in PHP
ASP, check if a file exists
pFile="data.txt"
fileObj.FileExists(Server.MapPath(pFile))
PHP, check if a file exists
$pFile="data.txt";
file_exists($pFile);
ASP, Read a text file

pFile="data.txt"xPage=fileObj.GetFile(Server.MapPath(pFile))xSize=xPage.Size  'Get size of file in bytesxPage=fileObj.OpenTextFile(Server.MapPath(pFile))temp=xPage.Read(xSize)  'Read filelinkPage.Close

PHP, Read a text file

$pFile="data.txt";$temp=file_get_contents($pFile);  //Read file

Time and Date Functions
ASP, Server Time or Date
Now, Date, Time
PHP, Server Time or Date
date()
ASP, Date format (default)
Now = 7/2/2012 4:21:51 AM
Date = 7/2/2012
Time = 4:21:51 AM
Various ASP functions extract date parts:

Month(Date) = 7
MonthName(Month(Date)) = July
Day(Date) = 2
WeekdayName(Weekday(Date)) = Monday
WeekdayName(Weekday(Date),False) = Mon

PHP, Date format
There is no default format in PHP.
The date() function is formatted using codes:
date("n/j/Y g:i:s A") = 7/2/2012 4:21:51 AM

date("n") = 7
date("F") = July
date("j") = 2
date("l") = Monday
date("D") = Mon

Numeric Functions
ASP, convert decimal to integer
Int()n=Int(x)

PHP, convert decimal to integer
floor()$n=floor($x);

ASP, determine if a value is numeric
IsNumeric()if IsNumeric(n) then ...

PHP, determine if a value is numeric
is_numeric()if (is_numeric($num)) {...}

ASP, modulus function
x mod y
PHP, modulus function
$x % $y

 

http://www.design215.com/toolbox/asp.php