'Programming'에 해당되는 글 1789건

  1. 2014.08.13 dangling if-else
  2. 2014.07.14 JSP + CKeditor / CKfinder
  3. 2014.07.07 node.js
  4. 2014.07.07 부트스트랩 - 웹개발 프레임워크
  5. 2014.07.07 php5 class / object oriented programming 4
  6. 2014.07.07 jsp / php 기본 문법 비교
  7. 2014.07.04 openCV Mat Class
  8. 2014.07.04 openCV2 관련 꿍시렁 꿍시렁
  9. 2014.07.03 웹소켓 (websocket)
  10. 2014.07.03 opencv2 highgui
Programming/언어론2014. 8. 13. 17:16
문득.. 내가 쓰는 문법이 댕글링 if-else를 생성하는거 같아서 찾아보니..
딱히 문제는 없도록 C언어에서 문법적으로 처리한다고 해서 한숨을 쉬는중..

일단 자바와 C C++은 인접한 if에 else가 붙는다고 한다.
Java, C and C++ have chosen to resolve the Dangling-Else ambiguity uses the following rule: 
An else keyword always associates with the nearest preceeding if keyword that does NOT cause a syntax error

[링크 : http://www.mathcs.emory.edu/~cheung/Courses/561/Syllabus/2-C/dangling-else.html]  

[링크 : http://en.wikipedia.org/wiki/Dangling_else]

'Programming > 언어론' 카테고리의 다른 글

일급 함수 first-class function  (0) 2025.01.31
double의 정확도 자릿수  (0) 2011.03.25
함수 포인터 (function pointer)  (0) 2010.09.16
type system  (0) 2010.09.15
calling convention(콜링 컨벤션)  (0) 2010.04.17
Posted by 구차니
Programming/jsp2014. 7. 14. 17:09
CKEditor는 웹 에디터로는 거의 세계 1위라고 보면 되는데..
자바 스크립트라서 php가 아니어도 돌아간다고 한다. 오홍..
통합 예제가 있으니 war 파일 받아서 실험해봐야겠다.

jsp로 블로그 만들어 볼까나..

음.. asp와 jsp용이 있지만. 2012년 이후로 업뎃이 안되고 있다.



[링크 : http://nimba.tistory.com/entry/jsp-웹에디터-CKEditor와-CKFinder-함께-사용하기]
[링크 : http://ckeditor.com/blog/CKEditor-for-Java-3.6.2-Released ]

[링크 : http://sourceforge.net/projects/jckconnector/ ]
[링크 : http://cksource.com/ ]
Posted by 구차니
Programming/web 관련2014. 7. 7. 23:15
node.js는 구글의 V8 자바스크립트 엔진을 기반으로 하는 플랫폼이다.
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications.

[링크 : http://nodejs.org/

내장 API중 하나인 HTTP를 이용하여 접속시 Hello World를 보여주는 예제라는데...
var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');

[링크 : http://nodejs.org/about/


요즘 임베디드에서 node.js로 GPIO 제어하는게 많이 보이는데
음.. 가볍게 테스트용도로 쓰기에는 좋으나 제품으로 쓰기에는 조금 사양이 높은 임베디드에서나 가능하려나?
V8 엔진은 Garbage collection  기반의 메모리 관리를 하기 때문에, GC시 CPU 사용률이 Spike를 치면서 순간적으로 서버를 멈추게할 수 있다는 문제점

[링크 : http://bcho.tistory.com/876

[링크 : http://www.slideshare.net/jeongsangbaek/nodejs-15279050]
[링크 : http://www.nodebeginner.org/index-kr.html]

'Programming > web 관련' 카테고리의 다른 글

HTML META cache  (0) 2014.10.20
aptana / eclipse  (0) 2014.08.25
부트스트랩 - 웹개발 프레임워크  (0) 2014.07.07
jsp / php 기본 문법 비교  (0) 2014.07.07
post 방식과 get 방식의 차이점(cache)  (0) 2014.05.15
Posted by 구차니
Programming/web 관련2014. 7. 7. 22:46

'Programming > web 관련' 카테고리의 다른 글

aptana / eclipse  (0) 2014.08.25
node.js  (0) 2014.07.07
jsp / php 기본 문법 비교  (0) 2014.07.07
post 방식과 get 방식의 차이점(cache)  (0) 2014.05.15
sql designer(web)  (0) 2014.05.11
Posted by 구차니
Programming/php2014. 7. 7. 13:27
php 책 펴놓고 공부하면서 찾아보는데..
객체지향은 php5 부터 지원한다고 한다.

[링크 :  http://php.net/manual/en/language.oop5.php]

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

xcache apc  (0) 2014.09.23
lighthttpd / php / FastCGI  (0) 2014.08.28
웹소켓 (websocket)  (0) 2014.07.03
php 로그인 예제  (0) 2014.05.19
php framework / 읽을꺼리  (0) 2014.04.09
Posted by 구차니
Programming/web 관련2014. 7. 7. 12:53
귀찮아서 대충 정리..

jsp
<%@ %> 
<% %>
${variable}

php
<? ?>
$variable

'Programming > web 관련' 카테고리의 다른 글

node.js  (0) 2014.07.07
부트스트랩 - 웹개발 프레임워크  (0) 2014.07.07
post 방식과 get 방식의 차이점(cache)  (0) 2014.05.15
sql designer(web)  (0) 2014.05.11
호스팅어 / 무료 웹 호스팅  (4) 2014.04.27
Posted by 구차니
Programming/openCV2014. 7. 4. 18:13
도서관에서 빌려와서 보는 책 정리중
OpenCV2를활용한컴퓨터비전프로그래밍
카테고리 컴퓨터/IT > 프로그래밍/언어
지은이 로버트 라가니에 (에이콘출판, 2012년)
상세보기

가장 많이 쓰일 클래스는 Mat인데 Matrix 답게 이미지를 행렬로 처리하는 클래스이다.

변수
rows , cols, step 은 이미지의 수직, 수평 해상도와 step은 실제 폭(색상이나 바이트 얼라인 포함한 data width)을 나타내며
data는 순수 이미지에 대한 포인터를 돌려준다.

메소드
row() col()은 해당 행/열에 대한 새로운 Matrix를 생성하고
channels()는 몇 채널인지를 알려준다. 만약 RGB라면 3개 채널(R,G,B) 흑백이라면 1채널을 돌려준다.
ptr()은 해당 데이터에 대한 포인터를
at()은 해당 데이터를 돌려준다.

class CV_EXPORTS Mat
{
public:
    //! returns a new matrix header for the specified row
    Mat row(int y) const;
    //! returns a new matrix header for the specified column
    Mat col(int x) const;

    /*! includes several bit-fields:
         - the magic signature
         - continuity flag
         - depth
         - number of channels
     */
    int flags;
    //! the matrix dimensionality, >= 2
    int dims;
    //! the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions
    int rows, cols;
    //! pointer to the data
    uchar* data;

    //! returns element type, similar to CV_MAT_TYPE(cvmat->type)
    int type() const;
    //! returns element type, similar to CV_MAT_DEPTH(cvmat->type)
    int depth() const;
    //! returns element type, similar to CV_MAT_CN(cvmat->type)
    int channels() const;

    //! returns pointer to (i0,i1) submatrix along the dimensions #0 and #1
    uchar* ptr(int i0, int i1);
    const uchar* ptr(int i0, int i1) const;

    //! template version of the above method
    template<typename _Tp> _Tp* ptr(int i0=0);

    //! the same as above, with the pointer dereferencing
    template<typename _Tp> _Tp& at(int i0=0);

    MSize size;
    MStep step;

}; 

Posted by 구차니
Programming/openCV2014. 7. 4. 13:23
openCV 2.3.1
디버그 모드로 하면 tbb_debug.dll 을 요구함
-> intel TBB 설치 하등가..
[링크 : http://stackoverflow.com/questions/7293160/c-tbb-debug-dll-missing]

크아아아앙 45MB에 2분이나 걸려 받았더니 여기에 두구둥!!!



openCV 2.4.7 / 2.4.9
라이브러리가 깨졌는지 메모리 침범하는 듯한 현상 발생
[링크 : http://stackoverflow.com/.../why-do-the-characters-iiii-get-stuck-onto-the-begining-of-my-strings]


걍 짜증나서 2.3.1에 릴리즈 모드 사용중 ㅠㅠ
일단 tbb 정도는 설치해 볼까나..

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

opencv2.. VideoCapture 클래스..  (0) 2015.09.25
openCV Mat Class  (0) 2014.07.04
opencv2 highgui  (0) 2014.07.03
opencv2 VideoCapture::get() / set() - 웹캠 설정 읽어오기  (2) 2014.07.03
opencv2 채널분리하기(split)  (0) 2014.07.03
Posted by 구차니
Programming/php2014. 7. 3. 15:48
웹소켓 조만간 쓸일이 있을것 같아서 조사중

[링크 : http://yoontaesub.egloos.com/2045579]
[링크 : http://tools.ietf.org/html/rfc6455]

웹소켓 php 적용 버전
[링크 : https://code.google.com/p/phpwebsocket/ ]


+
[링크 : http://dev.w3.org/html5/websockets/ ]

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

lighthttpd / php / FastCGI  (0) 2014.08.28
php5 class / object oriented programming  (4) 2014.07.07
php 로그인 예제  (0) 2014.05.19
php framework / 읽을꺼리  (0) 2014.04.09
php 메뉴얼  (0) 2014.03.28
Posted by 구차니
Programming/openCV2014. 7. 3. 15:02
highgui는 이미지를 불러오거나 GUI를 꾸미기 위한 기능을 지원한다.

크게는 윈도우 생성/조절/파괴 및 키 입력대기
CV_EXPORTS_W void namedWindow(const string& winname, int flags = WINDOW_AUTOSIZE);
CV_EXPORTS_W void destroyWindow(const string& winname);
CV_EXPORTS_W void destroyAllWindows();

CV_EXPORTS_W void resizeWindow(const string& winname, int width, int height);
CV_EXPORTS_W void moveWindow(const string& winname, int x, int y);

CV_EXPORTS_W int waitKey(int delay = 0);

이미지 불러오기/저장/출력
CV_EXPORTS_W void imshow(const string& winname, InputArray mat);
 
CV_EXPORTS_W Mat imread( const string& filename, int flags=1 );
CV_EXPORTS_W bool imwrite( const string& filename, InputArray img, const vector<int>& params=vector<int>());
CV_EXPORTS_W Mat imdecode( InputArray buf, int flags );
CV_EXPORTS Mat imdecode( InputArray buf, int flags, Mat* dst );
CV_EXPORTS_W bool imencode( const string& ext, InputArray img,
                            CV_OUT vector<uchar>& buf,
                            const vector<int>& params=vector<int>()); 

비디오 캡쳐(파일 및 웹캠 지원)
class CV_EXPORTS_W VideoCapture
{
public:
    CV_WRAP VideoCapture();
    CV_WRAP VideoCapture(const string& filename);
    CV_WRAP VideoCapture(int device);

    virtual ~VideoCapture();
    CV_WRAP virtual bool open(const string& filename);
    CV_WRAP virtual bool open(int device);
    CV_WRAP virtual bool isOpened() const;
    CV_WRAP virtual void release();

    CV_WRAP virtual bool grab();
    CV_WRAP virtual bool retrieve(CV_OUT Mat& image, int channel=0);
    virtual VideoCapture& operator >> (CV_OUT Mat& image);
    CV_WRAP virtual bool read(CV_OUT Mat& image);

    CV_WRAP virtual bool set(int propId, double value);
    CV_WRAP virtual double get(int propId);

protected:
    Ptr<CvCapture> cap;
};


class CV_EXPORTS_W VideoWriter
{
public:
    CV_WRAP VideoWriter();
    CV_WRAP VideoWriter(const string& filename, int fourcc, double fps,
                Size frameSize, bool isColor=true);

    virtual ~VideoWriter();
    CV_WRAP virtual bool open(const string& filename, int fourcc, double fps,
                      Size frameSize, bool isColor=true);
    CV_WRAP virtual bool isOpened() const;
    CV_WRAP virtual void release();
    virtual VideoWriter& operator << (const Mat& image);
    CV_WRAP virtual void write(const Mat& image);

protected:
    Ptr<CvVideoWriter> writer;
};  




Posted by 구차니