Sunday, July 14, 2013

IIS ASP ERROR detail

1. IIS 설정 변경
IIS 관리자 ->  ASP 아이콘 더블클릭 -> 브라우져에 오류전송 : True
                                                                   서버쪽 디버깅 사용 : False
                                                                   클라이언트 디버깅 사용 : True

IIS 관리자 -> 오류페이지 더블클릭 -> 500 에러 오른쪽 마우스 클릭 -> 기능설정 편집
                                                                                                ->자세한 오류 라디오 버튼 체크

2. WebBrowser 설정
도구 --> 인터넷 옵션 --> 고급
HTTP 오류 메세지 표시 체크 해제

짜잔 완성

Monday, July 8, 2013

splice in javascript

<!DOCTYPE html>
<html>
<body>
<p id="demo">Click the button to add elements to the array.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.splice(2,0,"Lemon","Kiwi");
var x=document.getElementById("demo");
x.innerHTML=fruits;
}
</script>
</body>
</html>

any way splice meaning is remove 0(count) from 2 line and add Lemon, Kiwi in array

about:blank in webpage

I wanted to look for how i can show in blank page in website.

that is what i fount about:blank

this will show you nothing but white blank page

Thursday, July 4, 2013

autoCommit off in mssql 2008

if you you use this tool Microsoft SQL Server Management Studio

follow this step

1. tool -> option -> query execute -> sql server -> ANSI -> SET Implicity_transactions check

important thing is open new Query Tap

Tuesday, July 2, 2013

sqlcmd in SQL SERVER

check if server pipe is available

if not check and restart

and

cmd

>sqlcmd -S DAVID-PC\SQLEXPRESS

Monday, July 1, 2013

APK download internal storage and install

1. First Download
            URL url = new URL(params[0]);
            URLConnection connection = url.openConnection();
            connection.setConnectTimeout(5000);
            connection.setReadTimeout(5000);
            connection.connect();
            // this will be useful so that you can show a typical 0-100% progress bar
            int fileLength = connection.getContentLength();
     
            File mkDir = mActivity.getDir("assets", Activity.MODE_WORLD_READABLE | Activity.MODE_WORLD_WRITEABLE);
            String path = mkDir.getAbsolutePath();
            Log.d("need", "ApkDownload Location : " + path);
           
         checkMemory(fileLength);  

            // download the file
            input = new BufferedInputStream(url.openStream());
            output = mActivity.openFileOutput(APK_FILE_NAME,
              Activity.MODE_WORLD_READABLE | Activity.MODE_WORLD_WRITEABLE);
//            output = new FileOutputStream(mActivity.getFilesDir().getAbsoluteFile() + File.separator + APK_FILE_NAME);
//            output = new FileOutputStream(SDCardRoot + File.separator + APK_FILE_NAME);
            Log.d("need", "ApkDownload Location : " + path);

            byte data[] = new byte[1024];
            long total = 0;
            int count;
            while ((count = input.read(data)) != -1) {
                total += count;
                // publishing the progress....
                progressPercent =(int) (total * 100 / fileLength);
                publishProgress();
                output.write(data, 0, count);
            }

            output.flush();
            output.close();
            input.close();


2. Second Install
File fileLocation = new File(mActivity.getFilesDir(), ApkFileDownloadTask.APK_FILE_NAME);
         
Log.d("need", "apkFile isFile" + fileLocation.isFile());
Log.d("need", "apkFile getName" + fileLocation.getName());
Log.d("need", "apkFile getAbsolutePath" + fileLocation.getAbsolutePath());
Log.d("need", "apkFile getAbsolutePath" + fileLocation.length());
         
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(fileLocation), "application/vnd.android.package-archive");

startActivity(intent);