Simple is best

http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email





Posted by 미쉬마르

가상모니터

2009. 2. 19. 11:04 : 카테고리 없음





Posted by 미쉬마르

 public void paramHeader(HttpServletRequest request) {
        Enumeration paramNames = request.getParameterNames();
        while(paramNames.hasMoreElements()) {
            String paramName = (String)paramNames.nextElement();


            System.out.println("Header : " + paramName);
       
            String[] paramValues = request.getParameterValues(paramName);
       
                if (paramValues.length == 1) {
                    String paramValue = paramValues[0];
                    if (paramValue.length() == 0)
                        System.out.println("Value : No Value");
                    else
                        System.out.println(paramValue);
                } else {
                    for(int i=0; i<paramValues.length; i++) {
                        System.out.println("Value : " + paramValues[i]);
                    }
                }
            }
        }

Posted by 미쉬마르
Posted by 미쉬마르

public static void charSet(String str_kr) throws UnsupportedEncodingException{
        String charset[] = {"euc-kr", "ksc5601", "iso-8859-1", "8859_1", "ascii", "UTF-8"};
           
        for(int i=0; i<charset.length ; i++){
            for(int j=0 ; j<charset.length ; j++){
                if(i==j) continue;

      System.out.println(charset[i]+" : "+charset[j]+" :"+new String(str_kr.getBytes(charset[i]),charset[j]));
            }
        }
    }

 

Posted by 미쉬마르

<html>
<head>
<script type="text/javascript" language="javascript">
function getFileSize(filePath)
{
  var len = 0;
  if ( navigator.appName.indexOf("Netscape") != -1)
  {
     try {
        netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
     } catch(e) {
        alert("signed.applets.codebase_principal_support를 설정해주세요!\n"+e);
        return -1;
     }
     try {
        var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
        file.initWithPath ( filePath );
        len = file.fileSize;
     } catch(e) {
        alert("에러 발생:"+e);
     }
  }
  else if (navigator.appName.indexOf('Microsoft') != -1)
  {
     var img = new Image();
     img.dynsrc = filePath;
     len = img.fileSize;
  }
  return len;
}

function checkFile(obj, ob)
{
  var len = getFileSize(obj.value);
  // 아래 빨간색 부분이 파일사이즈 지정해 주는 부분입니다.
  // 상황에 맞게 아래 부분을 수정해서 사용하시면 됩니다.
 
   var lens = len / 1024 / 1024;
  
  eval(ob).value = lens.toFixed(2); // 반올림 2자리

 
 
 
 // if (len > 1024 * 1024)
 // {
 //    alert("파일 크기는 1메가보다 작아야 합니다.");
 // }
}
</script>
</head>
</body>
<form name="test">
<input type="file" name="file" onChange="checkFile(this,file_size);" />
<input type="text" name="file_size" value=""/>
</form>
</body>
</html>

Posted by 미쉬마르

history.back();
window.location.reload();

Posted by 미쉬마르


Posted by 미쉬마르
Posted by 미쉬마르


Posted by 미쉬마르