_head.php 파일 상단에 이거 넣어야 php 에러안납니다,,,IE60.0은 상관 없지만
http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=일본&select_arrange=headnum&desc=asc&no=6411
시간 동기화 프로그램입니다.
한국표준과학연구원 표준시 서버와 동기화합니다. [time.kriss.re.kr]http://krissol.kriss.re.kr/time/UTCk3.html
1. cmd>net time /setsntp:time.nuri.net
2. cmd> net stop "windows time" or net stop w32time
3. cmd> net start "windows time" or net start w32time
[CODE type="java"]
/** 쓰레드 연습 **/
class Data{
[tab]
[tab]private String data;
[tab]private boolean is_saved = false;
[tab]
[tab]public synchronized void setData(String arg){
[tab][tab]
[tab][tab] try{
[tab][tab][tab]
[tab][tab][tab]
[tab][tab][tab] if(is_saved){
[tab][tab][tab][tab] wait();
[tab][tab][tab] }
[tab][tab] }
[tab][tab] catch (Exception e) {
[tab][tab][tab] System.out.println("SET error");
[tab][tab] }
[tab][tab]
[tab][tab] data = arg;
[tab][tab] is_saved = true;
[tab][tab] notify();
[tab][tab]
[tab]}
[tab]public synchronized String getData(){
[tab][tab]
[tab][tab] try{
[tab][tab][tab] if(!is_saved)
[tab][tab][tab][tab] wait();
[tab][tab][tab]
[tab][tab] }
[tab][tab] catch (Exception e) {
[tab][tab][tab] System.out.println("GET error");
[tab][tab] }
[tab][tab]
[tab][tab] String r = data;
[tab][tab] data = "";
[tab][tab] is_saved =false;
[tab][tab] notify();
[tab][tab] return r;
[tab]}
[tab]
[tab]
[tab]public boolean is_saved(){
[tab][tab] return is_saved;[tab][tab]
[tab]}
[tab]
}
class Producer extends Thread{
[tab]Data s;
[tab]Producer(String msg, Data ss){
[tab][tab] s=ss;
[tab][tab] System.out.println(msg);[tab][tab]
[tab]}
[tab]public void run(){
[tab][tab] int i=0;
[tab][tab] while(i<10){
[tab][tab][tab] try{
[tab][tab][tab] sleep((long)(Math.random()*1000));
[tab][tab][tab] }
[tab][tab][tab] catch (Exception e) {
[tab][tab][tab][tab] // TODO: handle exception
[tab][tab][tab] }
[tab][tab][tab]
[tab][tab][tab] System.out.println( "producer is running : " +i);
[tab][tab][tab] s.setData("DATA ("+i+"): " + produce());
[tab][tab][tab][tab] i++;
[tab][tab]
[tab][tab] }//end while
[tab]}//end run
[tab]
[tab]private String produce(){
[tab][tab] int r ;
[tab][tab] r =(int)( Math.random()*10);
[tab][tab] return "" + r;
[tab]}
[tab]
}
class Consumer extends Thread{
[tab]Data s;[tab]
[tab]
[tab]Consumer(String msg,Data ss){
[tab][tab] s = ss;
[tab]
[tab][tab] System.out.println(msg);
[tab]}
[tab]
[tab]public void run(){
[tab][tab] int i=0;
[tab][tab] String data="";
[tab][tab] while(i<10){
[tab][tab][tab] try{
[tab][tab][tab][tab] sleep((long)(Math.random()*1000));
[tab][tab][tab][tab] }
[tab][tab][tab][tab] catch (Exception e) {
[tab][tab][tab][tab][tab] // TODO: handle exception
[tab][tab][tab][tab] }
[tab][tab][tab][tab]
[tab][tab][tab] System.out.println( "consumer is running : " + i);
[tab][tab][tab] data =s.getData();
[tab][tab][tab] System.out.println(">> " + data);
[tab][tab][tab] i++;
[tab][tab][tab]
[tab][tab] }//end while
[tab]}//end run[tab]
}
class Ttest{
[tab]public static void main(String args[])
[tab]{
[tab][tab] Data data = new Data();
[tab][tab] Producer t1 = new Producer("P thread is ready", data);
[tab][tab] Consumer c1 = new Consumer("C thread is ready", data);
[tab][tab]
[tab][tab]
[tab][tab] t1.start();
[tab][tab] c1.start();
[tab][tab]
[tab][tab]
[tab][tab]
[tab][tab][tab][tab]
[tab]}[tab][tab]
}
/**
class Data{
[tab]
[tab]private String data;
[tab]private boolean is_saved = false;
[tab]
[tab]public void setData(String arg){
[tab][tab] data = arg;
[tab][tab] is_saved = true;
[tab]}
[tab]public String getData(){
[tab][tab] String r = data;
[tab][tab] data = "";
[tab][tab] is_saved =false;
[tab][tab] return r;
[tab]}
[tab]
[tab]
[tab]public boolean is_saved(){
[tab][tab] return is_saved;[tab][tab]
[tab]}
[tab]
}
class Producer extends Thread{
[tab]Data s;
[tab]Producer(String msg, Data ss){
[tab][tab] s=ss;
[tab][tab] System.out.println(msg);[tab][tab]
[tab]}
[tab]public void run(){
[tab][tab] int i=0;
[tab][tab] try{
[tab][tab][tab] while(i<10){
[tab][tab][tab][tab]
[tab][tab][tab][tab] System.out.println( "producer is running : " +i);
[tab][tab][tab][tab] if(s.is_saved()){
[tab][tab][tab][tab][tab] yield();
[tab][tab][tab][tab] }
[tab][tab][tab][tab] else{
[tab][tab][tab][tab][tab] s.setData("DATA ("+i+"): " + produce());
[tab][tab][tab][tab][tab] i++;
[tab][tab][tab][tab] }
[tab][tab][tab][tab]
[tab][tab][tab] }//end while
[tab][tab] }
[tab][tab] catch (Exception e) {
[tab][tab][tab] System.out.println(e);
[tab][tab][tab] // TODO: handle exception
[tab][tab] }
[tab]}//end run
[tab]
[tab]private String produce(){
[tab][tab] int r ;
[tab][tab] r =(int)( Math.random()*10);
[tab][tab] return "" + r;
[tab]}
[tab]
}
class Consumer extends Thread{
[tab]Data s;[tab]
[tab]
[tab]Consumer(String msg,Data ss){
[tab][tab] s = ss;
[tab]
[tab][tab] System.out.println(msg);
[tab]}
[tab]
[tab]public void run(){
[tab][tab] int i=0;
[tab][tab] String data="";
[tab][tab] try{
[tab][tab][tab] while(i<10){
[tab][tab][tab][tab] System.out.println( "consumer is running : " + i);
[tab][tab][tab][tab] if(s.is_saved()){
[tab][tab][tab][tab][tab][tab] data =s.getData();
[tab][tab][tab][tab][tab][tab] System.out.println(">> " + data);
[tab][tab][tab][tab][tab][tab] //notifyAll();
[tab][tab][tab][tab][tab][tab] i++;
[tab][tab][tab][tab] }
[tab][tab][tab][tab] else{
[tab][tab][tab][tab][tab] yield();
[tab][tab][tab][tab][tab] yield();
[tab][tab][tab][tab][tab]
[tab][tab][tab][tab][tab] //this.wait();
[tab][tab][tab][tab][tab] //this.suspend();
[tab][tab][tab][tab] }
[tab][tab][tab][tab]
[tab][tab][tab] }//end while
[tab][tab] }
[tab][tab] catch (Exception e) {
[tab][tab][tab] System.out.println(e);
[tab][tab][tab] // TODO: handle exception
[tab][tab] }
[tab]}//end run[tab]
}
class Ttest{
[tab]public static void main(String args[])
[tab]{
[tab][tab] Data data = new Data();
[tab][tab] Producer t1 = new Producer("P thread is ready", data);
[tab][tab] Consumer c1 = new Consumer("C thread is ready", data);
[tab][tab]
[tab][tab]
[tab][tab] t1.start();
[tab][tab] c1.start();
[tab][tab]
[tab][tab]
[tab][tab]
[tab][tab][tab][tab]
[tab]}[tab][tab]
}
**/
[/HTML][/CODE]
로컬 프로젝트는 비워둬도 되고,
리모트디렉토리에
절대경로를 적어준다
/home/kfmes/public_html/dboard/
혹시 안되면,
passive 모드 체크!