2015년 9월 2일 수요일

execute permission with linux

chmod +x the_file_name

dns info

인터넷 서비스 업체 SK 브로드밴드     올레 KT          LG 유플러스
기본 DNS 서버       219.250.36.130 168.126.63.1   164.124.107.9
보조 DNS 서버       210.220.163.82 168.126.63.2         203.248.242.2

2015년 9월 1일 화요일

video rendering with c++

buffer is PIX_FMT_BGR24 data
m_flipview is dc for rendering

uchar buf[sizeof(BITMAPINFO) + 256 * 4];
BITMAPINFO* bmi = (BITMAPINFO*)buf;
BITMAPINFOHEADER* bmih = &(bmi->bmiHeader);
memset(bmih, 0, sizeof(*bmih));
bmih->biSize = sizeof(BITMAPINFOHEADER);
bmih->biWidth = m_pCodec[DevID]->m_nWidth;
bmih->biHeight = -m_pCodec[DevID]->m_nHeight;
bmih->biPlanes = 1;
bmih->biBitCount = 24;
bmih->biCompression = BI_RGB;

HDC hdc = m_pDlg->m_flipview.GetDC()->m_hDC;
::SetStretchBltMode(hdc, COLORONCOLOR);
::StretchDIBits(hdc, 0, 0, 640, 360,
0, 0, m_pCodec[DevID]->m_nWidth, m_pCodec[DevID]->m_nHeight,
buffer, bmi,
DIB_RGB_COLORS, SRCCOPY);

snmp with centos

yum install net-snmp net-snmp-utils

vi /etc/snmp/snmpd.conf

# Map 'idv90we3rnov90wer' community to the 'ConfigUser'
# Map '209ijvfwer0df92jd' community to the 'AllUser'
#       sec.name        source          community
com2sec ConfigUser      default         idv90we3rnov90wer
com2sec AllUser         default         209ijvfwer0df92jd

# Map 'ConfigUser' to 'ConfigGroup' for SNMP Version 2c
# Map 'AllUser' to 'AllGroup' for SNMP Version 2c
#                       sec.model       sec.name
group   ConfigGroup     v2c             ConfigUser
group   AllGroup        v2c             AllUser

# Define 'SystemView', which includes everything under .1.3.6.1.2.1.1 (or .1.3.6.1.2.1.25.1)
# Define 'AllView', which includes everything under .1
#                       incl/excl       subtree
view    SystemView      included        .1.3.6.1.2.1.1
view    SystemView      included        .1.3.6.1.2.1.25.1.1
view    AllView         included        .1

# Give 'ConfigGroup' read access to objects in the view 'SystemView'
# Give 'AllGroup' read access to objects in the view 'AllView'
#                       context model   level   prefix  read            write   notify
access  ConfigGroup     ""      any     noauth  exact   SystemView      none    none
access  AllGroup        ""      any     noauth  exact   AllView         none    none

/etc/init.d/snmpd restart

splash activity with adnroid

SplashActivity.java

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class SplashActivity extends Activity {

// Splash screen timer
   private static int SPLASH_TIME_OUT = 3000;

   @Override
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_splash);

      new Handler().postDelayed(new Runnable() {

         @Override
         public void run() {
            // This method will be executed once the timer is over
            // Start your app main activity
            Intent i = new Intent(SplashActivity.this, MainActivity.class);
            startActivity(i);
           
            finish();
         }
      }, SPLASH_TIME_OUT);
   }
}

AndroidManifest.xml

        <!-- Splash screen -->
        <activity            
            android:name=".SplashActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Black.NoTitleBar" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
               
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAINACTIVITY" />
                <category android:name="android.intent.category.MAIN" />
            </intent-filter>
        </activity>  


git for eclipse

help > install new software

1. http://download.eclipse.org/egit/updates
2. "Eclipse Git Team Provider" select

2015년 8월 23일 일요일

원격 데스크톱 연결 허용

1. 방화벽 3389 허용 ( 제어판 > Windows 방화벽 > 고급 설정 > 인바운드 규칙 > 원격 데스크톱(Tcp-In)
2. 해당 계정에 암호가 없는 경우 설정
3. 이 컴퓨터에 대한 원격 지원 연결 허용, 모든 버전의 원격 데스크톱을 실행 중인 컴퓨터에서 연결허용 ( 컴퓨터 > 설정 > 원격설정 )
4. 윈도우 실행 시 암호 물어보기 ( 시작 > 실행 > netplwiz )
5. 리부팅