2015년 11월 30일 월요일

performence check with oracle

SELECT * FROM V$SQLAREA

window moving with dual monitor

ALT + TAB
ALT + SPACE => M
Allow Key

2015년 11월 27일 금요일

application pools setting with iis8

reference : https://www.iis.net/configreference/system.applicationhost/applicationpools/add

managedRuntimeVersion

v1.1 Specifies that the application pool use the CLR version 1.1.
v2.0 Specifies that the application pool use the CLR version 2.0, which can be .NET Framework version 2.0, 3.0, or 3.5.
v4.0 Specifies that the application pool use the CLR version 4.0, which can be .NET Framework version 4.0 or 4.5.


2015년 11월 25일 수요일

not build with android.mk

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE    := ffmpeg
LOCAL_SRC_FILES := libffmpeg.so
include $(PREBUILT_SHARED_LIBRARY)

2015년 11월 24일 화요일

use echo print with android.mk

$(warning [warning] this the warning msg)

$(info [info] $(LOCAL_PATH))

2015년 11월 19일 목요일

unicode file write

Big-endian : 0xFEFF ( unicode )
Little-endian : 0xFFFE

if (pGSFile == NULL) {
pGSFile = _wfopen(L"ch_gsensor.dat", L"wb");
WORD mark = 0xFEFF;
fwrite(&mark, sizeof(WORD), 1, pGSFile);
}

2015년 11월 18일 수요일

manifest setting with visual studio 2012

c#
project > new item add > app.manifest
edit app.manifest
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!-- UAC 매니페스트 옵션
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>

c++
project > properties > linker > manifest file
UAC Execution Level => "requireAdministrator (/level='requireAdministrator')"

2015년 11월 12일 목요일

iis6 to iis8 migration

C:\Program Files\IIS\Microsoft Web Deploy V3

http://www.iis.net/learn/publish/using-web-deploy/packaging-and-restoring-a-web-site

2015년 11월 11일 수요일

cygwin & eclipse

## for c / c++
cygwin (32bit)
server : http://ftp.daum.net
cygwin install ( devel full ) : D:\cygwin

envirenment add
CYGWIN_HOM = D:\cygwin
Path = ";%CYGWIN_HOME%\bin;%CYGWIN_HOME%\usr\include;"

eclipse
eclipse c/c++ plugin install ( https://eclipse.org/cdt/downloads.php )
Name : CDT
Location : http://download.eclipse.org/tools/cdt/releases/8.8.1


## for android
ndk
install ( D:\android\android-ndk-r10e )

bash file edit
D:\cygwin\home\Administrator\.bashrc
export ANDROID_NDK_ROOT=/cygdrive/d/android/android-ndk-r10e

2015년 11월 10일 화요일

checkbox select all with asp.net

javascript
<script type="text/javascript">
    var TotalChkBx = 0;
    var Counter = 0;

    function gridOnLoad(rowCnt) {
        TotalChkBx = rowCnt;
        Counter = 0;
    }

    function HeaderClick(CheckBox) {
        var TargetBaseControl = document.getElementById('<%= this.egvWPPrint.ClientID %>');
        var TargetChildControl = "chkBxSelect";

        try {
            var Inputs = TargetBaseControl.getElementsByTagName("input");

            for (var n = 0; n < Inputs.length; ++n)
                if (Inputs[n].type == 'checkbox' && Inputs[n].id.indexOf(TargetChildControl, 0) >= 0)
                    Inputs[n].checked = CheckBox.checked;

            Counter = CheckBox.checked ? TotalChkBx : 0;
        }
        catch (err) {
            Counter = 0;
        }
    }
   
    function ChildClick(CheckBox, HCheckBox) {
        try {
            var HeaderCheckBox = document.getElementById(HCheckBox);

            if (CheckBox.checked && Counter < TotalChkBx)
                Counter++;
            else if (Counter > 0)
                Counter--;

            if (Counter < TotalChkBx)
                HeaderCheckBox.checked = false;
            else if (Counter == TotalChkBx)
                HeaderCheckBox.checked = true;
        }
        catch (err) {
        }
    }  
</script>


c#
    // bind after
    ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "GridLoad", "gridOnLoad(" + ds.Tables[0].Rows.Count.ToString() + ");", true);
   
    protected void egvWPPrint_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            CheckBox chkBxSelect = (CheckBox)e.Row.Cells[1].FindControl("chkBxSelect");
            CheckBox chkBxHeader = (CheckBox)this.egvWPPrint.HeaderRow.FindControl("chkBxHeader");
            chkBxSelect.Attributes["onclick"] = string.Format
                                                   (
                                                      "javascript:ChildClick(this,'{0}');",
                                                      chkBxHeader.ClientID
                                                   );        
        }
    }

aspx
                    <asp:TemplateField HeaderText="선택">
                        <ItemTemplate><asp:CheckBox ID="chkBxSelect" runat="server" /></ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                        <HeaderTemplate>
                            <asp:CheckBox ID="chkBxHeader" onclick="javascript:HeaderClick(this);" runat="server" />
                        </HeaderTemplate>
                    </asp:TemplateField>

2015년 11월 9일 월요일

a4 size to pixel

(21cm / 2.54) * 72 = 595
(29.7cm / 2.54) * 72 = 842

2015년 11월 5일 목요일

asp.net control refresh by c#

asp.net
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
    </ContentTemplate>
</asp:UpdatePanel>

c#
Button1.text = "123";

excel connection string info

Microsoft Access Database Engine 2010 Redistributable

https://www.connectionstrings.com/ace-oledb-12-0/

2015년 11월 3일 화요일

mssql dbcc repair

step
Exec sp_resetstatus 'DBNAME'

Alter Database DBNAME SET EMERGENCY

DBCC checkdb ('DBNAME')

Alter Databases DBNAME Set Single_User with
Rollback Immediate

DBCC CheckDB('DBNAME', Repair_Allow_Data_Loss)

Alter Database DBNAME Set Multi_User

MSSQL Restart

** reference 
running status with mssql 2005 above
select session_id, start_time, status,
command, percent_complete,
estimated_completion_time
from sys.dm_exec_requests
where session_id=53

single user error
SELECT request_session_id
FROM sys.dm_tran_locks
WHERE resource_database_id = DB_ID('DBNAME')

KILL 51

oracle function ( number increment )

CREATE OR REPLACE FUNCTION TS.F_Seq RETURN VARCHAR2 IS
tmpSEQ NUMBER;
rtnSEQ VARCHAR2(12);

BEGIN
   tmpSEQ := 0;
   rtnSEQ := '';

    SELECT NVL(TO_NUMBER(SUBSTR(MAX(SEQNO),12)),0) INTO tmpSEQ FROM TB__MASTER
    WHERE SEQNO LIKE TO_CHAR(SYSDATE,'YYYYMMDD') || '%';

    SELECT TO_CHAR(SYSDATE, 'YYYYMMDD') || '-' || LPAD(TO_CHAR(tmpSEQ+1),3,'0') INTO rtnSEQ FROM DUAL;

   RETURN rtnSEQ;

   EXCEPTION
     WHEN NO_DATA_FOUND THEN
          RETURN TO_CHAR(SYSDATE, 'YYYYMMDD') || '-001';

     WHEN OTHERS THEN
       -- Consider logging the error and then re-raise
       RAISE;
END F_Seq;
/

2015년 11월 2일 월요일

hiberfil.sys with windows

powercfg -h off
powercfg -h on

*** commands commence before first target. Stop

*** 첫번째 타겟보다 앞에서 명령어가 시작되었습니다.  멈춤.

==> space check of line end