어떻게 보면 별 의미가 없는 내용일수도 있지만

서브 도메인 변경 불가라..


머 네이버는 아이디 = 블로그 주소 개념이라

변경불가능한 정책이었지만 티스토리는 그게 아니었는데


왜 그런식으로 티스토리 만의 장점을 하나씩 버리는걸까?

서비스 종료를 위한 초석?!


[링크 : http://notice.tistory.com/2383]

Posted by 구차니
일단 UI 상으로 바로 할순 없고
쿼리문을 통해서 보고 나서

그걸 이용해서 view로 생하는 시나리오 인듯?




[링크 : http://stackoverflow.com/questions/2279240/how-can-i-edit-a-view-using-phpmyadmin-3-2-4]

[링크 : http://stackoverflow.com/questions/40306725/create-view-in-phpmyadmin]

Posted by 구차니
Programming/php2017. 4. 7. 10:02

index.php에 어떠한 내용도 들어가지 않는 신기한 마법?


[링크 : http://webskills.kr/archives/495]

[링크 : http://webskills.kr/archives/515] <<

[링크 : http://webskills.kr/archives/532]


+

2017.04.10

자세히 들여다 보니...

.htaccess의

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

요 한줄이 핵심(?)적으로 얘를 통해 인자를 받아서 처리하도록 해야 정상 작동을 한다.

'Programming > php' 카테고리의 다른 글

php 상수 선언 - define  (0) 2017.04.15
php 세션주의사항(?)  (0) 2017.04.13
php mysql 자동증가값 받기  (0) 2017.03.14
php zend guard ?  (2) 2017.03.14
php -> exe (윈도우)  (0) 2017.03.14
Posted by 구차니

테스트 필요


[링크 : https://www.joinc.co.kr/w/man/4200/ReadFile]

[링크 : http://stackoverflow.com/questions/4063051/possible-to-have-a-timeout-on-readfile]

[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/bb540534(v=vs.85).aspx]



+

2017.04.12

timeout은 overlapped io를 설정해야만 활성화 되는건가?

[링크 : http://wwwi.tistory.com/215]

[링크 : http://goodjian.tistory.com/entry/시리얼-통신COM-포트에-읽기-쓰기-할때-타임아웃을-설정하자]

[링크 : http://jurang5.tistory.com/entry/시리얼-통신]

[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa363437(v=vs.85).aspx]


+

음.. overlap 설정안해줘도 COMMTIMEOUTS 에서 적절한 값(?)을 해주니 문제없네..

115200bps에서 

commto.ReadIntervalTimeout = 50;

commto.ReadTotalTimeoutConstant = 50;

commto.ReadTotalTimeoutMultiplier = 10;

commto.WriteTotalTimeoutConstant = 50;

commto.WriteTotalTimeoutMultiplier = 10; 

로 설정해 주니 적당히 되는 듯

[링크  : http://blog.daum.net/pg365/51]




+

2017.04.19

115200bps 에서 이렇게 설정해도 문제가 없네.. 응답이 빨라서 가능한건가?

commto.ReadIntervalTimeout = 5;

commto.ReadTotalTimeoutConstant = 5;

commto.ReadTotalTimeoutMultiplier = 10;

commto.WriteTotalTimeoutConstant = 50;

commto.WriteTotalTimeoutMultiplier = 10; 


Posted by 구차니
개소리 왈왈2017. 4. 6. 09:21

네이트온에 알람이 떠서 생각이 났는데

망할 스팸놈이 알림에 또 띄우다니..


비도 오는데 울적하네..


2008/11/25 - [개소리 왈왈] - 이제는 볼 수 없는 사람


'개소리 왈왈' 카테고리의 다른 글

조현아 vs 탑  (0) 2017.06.09
19대 대선 유권자 수  (0) 2017.05.09
대전 현충원 안장자 검색  (0) 2017.01.07
경기가 안좋긴 하나보네  (0) 2016.12.10
이상하다 꿈을 꾼건가..  (0) 2016.05.14
Posted by 구차니
Programming/C Win32 MFC2017. 4. 5. 15:38

GetLBText() 로 해당 인덱스의 문자열을 받아올 수 있다.


[링크 : http://six605.tistory.com/250]


Gets a string from the list box of a combo box.

int GetLBText( 

   int nIndex, 

   LPTSTR lpszText  

) const;

 

void GetLBText( 

   int nIndex, 

   CString& rString  

) const; 

[링크 : https://msdn.microsoft.com/en-us/library/zcy9kze7(v=vs.110).aspx]

Posted by 구차니

귀찮아서 대충 구현했는데..

char 배열을 써야지 CString::GetBuffer(n) 으로 버퍼를 받아오니 이상해지네..


설정은 좀더 찾아 봐야겠지만, 자동으로timeout 걸리면서 최대 20자 까지 읽도록 설정이 된 것 같다.


{

CString port;

port = _T("\\\\.\\") + port;

HANDLE m_hCommPort = ::CreateFile(port, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0/*FILE_FLAG_OVERLAPPED*/, 0);


DCB dcb = {0};

dcb.DCBlength = sizeof(DCB);


if (!::GetCommState (m_hCommPort,&dcb))

{

TRACE ("CSerialCommHelper : Failed to Get Comm State Reason: %d",

  GetLastError());

return E_FAIL;

}

dcb.BaudRate    = 115200

dcb.ByteSize    = 8;

dcb.Parity      = 0;

dcb.StopBits    = ONESTOPBIT;

if (!::SetCommState (m_hCommPort,&dcb))

{

ASSERT(0);

TRACE ( "CSerialCommHelper : Failed to Set Comm State Reason: %d",

GetLastError());

return E_FAIL;

}


CString hex_query="ffeeddccbbaa00";

DWORD iolen;

int iRet = WriteFile (m_hCommPort, hex_query, hex_query.GetLength(),&iolen ,NULL);


char temp[20];

int abRet = ReadFile(m_hCommPort, &temp ,20, &iolen, NULL) ;

temp[iolen] = '0x00';


CloseHandle(m_hCommPort);

return 0;



[링크 : http://blog.daum.net/chowood/8039404]

    [링크 : http://forum.falinux.com/zbxe/index.php?document_srl=572257]

    [링크 : http://forum.falinux.com/zbxe/index.php?document_srl=572404]

    [링크 : http://forum.falinux.com/zbxe/index.php?document_srl=572588]

    [링크 : http://forum.falinux.com/zbxe/index.php?document_srl=572862]

[링크 : https://www.codeproject.com/Articles/2682/Serial-Communication-in-Windows]

Posted by 구차니

1200 미만으로는 생소하고...

56000이냐 57600이냐는 좀 헷갈리네..

아무튼 가끔 쓸데 있으니 일단 링크!


Standard baud rates supported by most serial ports:
 
  • 110
  • 300
  •  
  • 600
  • 1200
  •  
  • 2400
  • 4800
  •  
  • 9600
  • 14400
  •  
  • 19200
  • 28800
  •  
  • 38400
  • 56000
  •  
  • 57600
  • 115200


  • Standard baud rates supported by some serial ports:
     
  • 128000
  • 153600
  •  
  • 230400
  • 256000
  •  
  • 460800
  • 921600


  • [링크 : http://digital.ni.com/public.nsf/allkb/D37754FFA24F7C3F86256706005B9BE7]

    Posted by 구차니
    Programming/C Win32 MFC2017. 4. 5. 14:28

    MFC 에서 쓸려면

    Group을 설정해야 하는데

    여러개를 묶을때 처음 녀석을 Group True로 설정

    그리고 나머지는 False로 하고

    가장 처음 Group True로 된 녀석에게 변수를 추가해주는데

    대개는 DDX 사용하도록 권장하는 듯

    [링크 : http://armcc.tistory.com/67]


    수작업(!)으로 하려면

    라디오 버튼은 CButton을 사용하기 때문에

    GetCheckedRadioButton(first, last); 메소드를 이용해서 체크된 녀석의 ID를 받아오거나

    [링크 : http://toring92.tistory.com/137]


    여러개의 그룹을 수작업으로

    ((CButton*)GetDlgItem(IDC_RADIO1))->GetCheck() 이런식으로 일일이 체크해야 할 듯 하다.

    [링크 : http://stackoverflow.com/questions/1165619/mfc-radio-buttons-ddx-radio-and-ddx-control-behavior]

    Posted by 구차니

    c#이나 .net framework을 쓰면 간편한데

    win32로는 영 복잡할수 밖에 없는 듯?


    그런데 QueryDosDevice()를 쓰면 0ms 라는데

    1. CreateFile("COM" + 1->255) as suggested by Wael Dalloul
      ✔ Found com0com ports, took 234ms.

    2. QueryDosDevice()
      ✔ Found com0com ports, took 0ms.

    3. GetDefaultCommConfig("COM" + 1->255)
      ✔ Found com0com ports, took 235ms.

    4. "SetupAPI1" using calls to SETUPAPI.DLL
      ✔ Found com0com ports, also reported "friendly names", took 15ms.

    5. "SetupAPI2" using calls to SETUPAPI.DLL
      ✘ Did not find com0com ports, reported "friendly names", took 32ms.

    6. EnumPorts()
      ✘ Reported some non-COM ports, did not find com0com ports, took 15ms.

    7. Using WMI calls
      ✔ Found com0com ports, also reported "friendly names", took 47ms.

    8. COM Database using calls to MSPORTS.DLL
      ✔/✘ Reported some non-COM ports, found com0com ports, took 16ms.

    9. Iterate over registry key HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM
      ✔ Found com0com ports, took 0ms. This is apparently what SysInternals PortMon uses.

    [링크 : http://stackoverflow.com/.../how-do-i-get-a-list-of-available-serial-ports-in-win32]


    m_MyPort 변수만 다른걸로 바꿔써주면 잘 작동 하는 듯

    단, unicode 기반에서는 (LPSTR)대신 (LPWSTR)로 해주어야 에러가 나지 않는다.

    void SelectComPort() //added function to find the present serial 
    {
    
        TCHAR lpTargetPath[5000]; // buffer to store the path of the COMPORTS
        DWORD test;
        bool gotPort=0; // in case the port is not found
    
        for(int i=0; i<255; i++) // checking ports from COM0 to COM255
        {
            CString str;
            str.Format(_T("%d"),i);
            CString ComName=CString("COM") + CString(str); // converting to COM0, COM1, COM2
    
            test = QueryDosDevice(ComName, (LPSTR)lpTargetPath, 5000);
    
                // Test the return value and error if any
            if(test!=0) //QueryDosDevice returns zero if it didn't find an object
            {
                m_MyPort.AddString((CString)ComName); // add to the ComboBox
                gotPort=1; // found port
            }
    
            if(::GetLastError()==ERROR_INSUFFICIENT_BUFFER)
            {
                lpTargetPath[10000]; // in case the buffer got filled, increase size of the buffer.
                continue;
            }
    
        }
    
        if(!gotPort) // if not port
        m_MyPort.AddString((CString)"No Active Ports Found"); // to display error message incase no ports found
    
    }


    [링크 : http://stackoverflow.com/.../what-is-proper-way-to-detect-all-available-serial-ports-on-windows]

    Posted by 구차니