'Programming > python(파이썬)' 카테고리의 다른 글
파이썬 print가 희한하네.. (0) | 2017.04.02 |
---|---|
파이썬 리스트(list)와 튜플(tuple) (0) | 2017.04.02 |
python sqlite3 (0) | 2017.03.30 |
python smtplib의 신비..? (0) | 2016.12.30 |
python이 인기라는데.. (0) | 2014.03.19 |
파이썬 print가 희한하네.. (0) | 2017.04.02 |
---|---|
파이썬 리스트(list)와 튜플(tuple) (0) | 2017.04.02 |
python sqlite3 (0) | 2017.03.30 |
python smtplib의 신비..? (0) | 2016.12.30 |
python이 인기라는데.. (0) | 2014.03.19 |
python에서 sqlite 파일을 접속해서 조작하는 방법
$ sudo apt-get install python-sqlite Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libsqlite0 Suggested packages: python-sqlite-dbg The following NEW packages will be installed: libsqlite0 python-sqlite 0 upgraded, 2 newly installed, 0 to remove and 7 not upgraded. Need to get 141 kB of archives. After this operation, 519 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libsqlite0 armhf 2.8.17-12 [119 kB] Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main python-sqlite armhf 1.0.1-11 [21.3 kB] Fetched 141 kB in 1s (95.8 kB/s) Selecting previously unselected package libsqlite0. (Reading database ... 137326 files and directories currently installed.) Preparing to unpack .../libsqlite0_2.8.17-12_armhf.deb ... Unpacking libsqlite0 (2.8.17-12) ... Selecting previously unselected package python-sqlite. Preparing to unpack .../python-sqlite_1.0.1-11_armhf.deb ... Unpacking python-sqlite (1.0.1-11) ... Setting up libsqlite0 (2.8.17-12) ... Setting up python-sqlite (1.0.1-11) ... Processing triggers for libc-bin (2.19-18+deb8u7) ... pi@raspberrypi:~ $ cd src pi@raspberrypi:~/src $ ll total 2060 drwxr-xr-x 2 pi pi 4096 Mar 30 14:40 . drwxr-xr-x 30 pi pi 4096 Mar 30 14:34 .. -rw-r--r-- 1 pi pi 2099200 Mar 29 12:29 sqlite.udb pi@raspberrypi:~/src $ python Python 2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> conn = sqlite3.connect('sqlite.udb') >>> c = conn.cursor() >>> c.execute("select * from tbl_recv") <sqlite3.Cursor object at 0x769eaa20> |
데이터가 유니코드로 나오나..
# we can also implement a custom text_factory ... # here we implement one that will ignore Unicode characters that cannot be # decoded from UTF-8 con.text_factory = lambda x: unicode(x, "utf-8", "ignore") |
파이썬 리스트(list)와 튜플(tuple) (0) | 2017.04.02 |
---|---|
파이썬 type 확인하기 (0) | 2017.04.02 |
python smtplib의 신비..? (0) | 2016.12.30 |
python이 인기라는데.. (0) | 2014.03.19 |
python2 vs python3 (0) | 2013.01.02 |
어라 이거 적은적이 없었나?
대개 비트 구조체라고 했었는데 원래는 비트 필드 인듯
[링크 : https://en.wikipedia.org/wiki/Bit_field]
[링크 : http://lab.cliel.com/entry/C-C-비트필드Bit-Field]
아무튼 얘를 x86에서 쓰려면 대개 아래의 선언문을 통해서 바이트 align을 맞춰야 하는데
컴파일러 별로 사용가능한 선언문이 다르다.
#pragma pack is a Microsoft syntax that has been ported to GCC for compatibility reasons. __attribute__((aligned)) is a GCC-specific syntax (unsupported by MSVC). |
[링크 : http://stackoverflow.com/.../whats-the-difference-between-pragma-pack-and-attribute-aligned]
MFC 라디오버튼 사용하기 (0) | 2017.04.05 |
---|---|
mfc cstring 문자열 관련(유니코드) (0) | 2017.04.04 |
MFC CButton 마우스 클릭시 작동하기 (0) | 2017.03.08 |
GetHttpConnection() (0) | 2017.03.03 |
만능의 tokenizer?! (0) | 2017.03.03 |
php 에서는 삽입후 해당 id값을 받을수 있는데
mysql에서 sql로 할때는 어떻게 해야 하려나?
[링크 : http://php.net/manual/kr/function.mysql-insert-id.php]
http://adgw.tistory.com/m/entry/%EA%B3%84%EC%B8%B5%ED%98%95-%EA%B2%8C%EC%8B%9C%ED%8C%90-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EB%8C%93%EA%B8%80-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98
5.20
http://stackoverflow.com/questions/15821532/get-current-auto-increment-value-for-any-table
php 세션주의사항(?) (0) | 2017.04.13 |
---|---|
php mvc 구현(+ PDO) (2) | 2017.04.07 |
php zend guard ? (2) | 2017.03.14 |
php -> exe (윈도우) (0) | 2017.03.14 |
php $_REQUEST (0) | 2017.01.25 |
외주 주었던 회사 홈페이지를
다른 경로에 올리면 작동하지 않아서 어떤 원리로 돌아가는지 분석해보려다 막혔었는데
다시 찾아 보니.. 매우 간단(?)한 원리인듯
index.html에서
include.inc.html을 include once로 불러오고
해당 파일은 zend guard로 난독화(?) 처리 되어 있는데
그 안에서 무언가 hostname이라던가 도메인을 확인 후 아니면 return false 해서
프로세싱을 멈춰버리는 듯?
$ file *.html include.inc.html: PHP script Zend Optimizer data |
[링크 : http://www.zend.com/en/products/zend-guard]
[링크 : http://stackoverflow.com/questions/4298001/decode-a-php-encoded-with-zend-guard]
[링크 : http://stackoverflow.com/questions/12226890/this-is-not-a-text-filezend-optimizer]
잘 찾아 보면 dezend도 있네
[링크 : http://jobdahan.net/language_php/1498450]
[링크 : http://ziumb.tistory.com/41] << dezend
[링크 : http://egloos.zum.com/zzong75/v/2813381]
[링크 : https://sir.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=24083]
zend 암호화 한걸 풀어서 보니 호스트를 비교하는게 맞았군!
$_SERVER['HTTP_HOST']
[링크 : http://php.net/manual/en/reserved.variables.server.php]
[링크 : http://pro.thinkangel.com/10]
+
자세한건 모르겠지만 호스팅 업체는 PHP5.2 + Zend Optimizer v3.3.9를 돌리고 있어서
별도의 Zend Loader 없이 돌리는것 같긴한데.. Zend Optimizer 조차도 없는 PHP 5.6에서는 작동하려나?
[링크 : http://www.zend.com/en/products/zend-guard#OptimizerL]
+
라즈베리에 올려서 해보니.. 얘가 그냥 뱉어내네?!
5.6이라 그런가 zend optimizer가 없어서 그런가?
+
5.6용으로 나왔는데 가입안하면 못 받음 크리
물론.. x86 linux용일거 같은데 arm용도 있을려나?
php mvc 구현(+ PDO) (2) | 2017.04.07 |
---|---|
php mysql 자동증가값 받기 (0) | 2017.03.14 |
php -> exe (윈도우) (0) | 2017.03.14 |
php $_REQUEST (0) | 2017.01.25 |
php global (0) | 2017.01.23 |
php mysql 자동증가값 받기 (0) | 2017.03.14 |
---|---|
php zend guard ? (2) | 2017.03.14 |
php $_REQUEST (0) | 2017.01.25 |
php global (0) | 2017.01.23 |
html+php login form (0) | 2017.01.18 |
av_opt_set() 으로 buffer_size 하려는데 안되길래 버전을 올리니.. 으헉?
1>cmdutils.obj : error LNK2001: _avcodec_default_release_buffer 외부 기호를 확인할 수 없습니다. 1>ffplaycore.obj : error LNK2001: _avcodec_alloc_frame 외부 기호를 확인할 수 없습니다. 1>ffplaycore.obj : error LNK2001: _avcodec_get_frame_defaults 외부 기호를 확인할 수 없습니다. 1>ffplaycore.obj : error LNK2001: _avcodec_free_frame 외부 기호를 확인할 수 없습니다. |
-void avcodec_free_frame(AVFrame **frame) -{ - av_frame_free(frame); -} |
[링크 : https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2015-September/093338.html]
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 45, 101) av_frame_alloc() #else avcodec_alloc_frame() #endif |
[링크 : https://www.bountysource.com/issues/6093496-replace-avcodec_alloc_frame-with-av_frame_alloc]
-void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic) -{ - av_frame_unref(pic); -} |
[링크 : https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2015-September/093320.html
The comment around the function declaration for avcodec_get_frame_defaults says that you should use av_frame_unref and the code seems to be doing just that: |
[링크 : http://stackoverflow.com/questions/27686064/ffmpeg-avcodec-get-frame-defaults-was-declared-deprecated
빌드는 어찌했는데 실행이 안되네 ㅠㅠ
dll 신버전 맞춰줘도 왜 안되니 ㅠㅠ
vlc "network-caching" / ffmpeg "buffer_size" 소스 검색 (0) | 2017.03.07 |
---|---|
ffplay.c (0) | 2017.03.06 |
ffmpeg 예제 소스 분석 (0) | 2017.02.10 |
ffmpeg 3.2 소스관련 (0) | 2017.02.10 |
ffmpeg - vlc cache 설정관련 (0) | 2017.02.10 |
MFC에서 버튼은 마우스 릴리즈 시에 이벤트가 발생하는데
버튼을 클릭하는 시점에서 실행하도록 하려면 또 애증의
PreTranslateMessage()를 쓸 수 밖에 없나...
[링크 : http://www.tipssoft.com/bulletin/tb.php/FAQ/648]
[링크 : http://blog.naver.com/1004kiwoo/60128691649]
+
2017.10.17
버튼에서 LBUTTON_DOWN 이벤트 발생시(왼쪽 버튼을 누르는 시점)
행동을 하도록 해보니.. Focus는 누른 이후에 이동하는 거라
버튼에 대해서 포커스로 하기에는 무리..
CButton *pButton; pButton = (CButton *)GetDlgItem(IDC_BUTTON3); pButton->GetWindowRect(rect); if(rect.PtInRect(pMsg->pt)) { // TODO } |
다만, 키 입력 자체는 이미 클릭하거나 탭키로 포커스를 바꾼 이후에 입력하는 거라 문제가 되지 않을 듯 하다.
if(pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE) { if(GetDlgItem(IDC_EDIT1) == GetFocus()) { // TODO } } |
mfc cstring 문자열 관련(유니코드) (0) | 2017.04.04 |
---|---|
bit field와 컴파일러별 byte align (0) | 2017.03.27 |
GetHttpConnection() (0) | 2017.03.03 |
만능의 tokenizer?! (0) | 2017.03.03 |
mfc md5 (2) | 2017.03.03 |
vlc
Search ""network-caching"" (23 hits in 21 files) D:\Download\ffmpeg\vlc-2.2.4\modules\access\avio.c (1 hit) Line 442: *delay = INT64_C(1000) * var_InheritInteger(access, "network-caching"); D:\Download\ffmpeg\vlc-2.2.4\modules\access\file.c (1 hit) Line 409: *pi_64 = var_InheritInteger (p_access, "network-caching"); D:\Download\ffmpeg\vlc-2.2.4\modules\access\ftp.c (1 hit) Line 899: * var_InheritInteger( p_access, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\access\http.c (1 hit) Line 995: * var_InheritInteger( p_access, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\access\live555.cpp (1 hit) Line 1683: * var_InheritInteger( p_demux, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\access\mms\mmsh.c (1 hit) Line 253: * var_InheritInteger( p_access, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\access\mms\mmstu.c (1 hit) Line 257: * var_InheritInteger( p_access, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\access\rtp\rtp.c (1 hit) Line 384: *v = INT64_C(1000) * var_InheritInteger (demux, "network-caching"); D:\Download\ffmpeg\vlc-2.2.4\modules\access\rtsp\access.c (1 hit) Line 325: * var_InheritInteger(p_access, "network-caching"); D:\Download\ffmpeg\vlc-2.2.4\modules\access\sftp.c (1 hit) Line 360: * var_InheritInteger( p_access, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\access\smb.c (1 hit) Line 329: * var_InheritInteger( p_access, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\access\tcp.c (1 hit) Line 178: * var_InheritInteger( p_access, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\access\udp.c (1 hit) Line 220: * var_InheritInteger(p_access, "network-caching"); D:\Download\ffmpeg\vlc-2.2.4\modules\access\vnc.c (1 hit) Line 301: * var_InheritInteger( p_demux, "network-caching" ); D:\Download\ffmpeg\vlc-2.2.4\modules\gui\macosx\simple_prefs.m (2 hits) Line 761: TestCaC("network-caching", 10/3); Line 1074: CaC("network-caching", 10/3); D:\Download\ffmpeg\vlc-2.2.4\modules\gui\qt4\components\open_panels.cpp (1 hit) Line 705: emit methodChanged( qfu( "network-caching" ) ); D:\Download\ffmpeg\vlc-2.2.4\modules\gui\qt4\components\simple_preferences.cpp (2 hits) Line 728: TestCaC( "network-caching", 10/3 ); Line 1074: CaC( "network-caching", 10/3 ); D:\Download\ffmpeg\vlc-2.2.4\modules\stream_filter\dash\dash.cpp (1 hit) Line 291: var_InheritInteger(p_stream, "network-caching"); D:\Download\ffmpeg\vlc-2.2.4\modules\stream_filter\httplive.c (1 hit) Line 2758: var_InheritInteger(s, "network-caching"); D:\Download\ffmpeg\vlc-2.2.4\modules\stream_filter\smooth\smooth.c (1 hit) Line 796: var_InheritInteger(s, "network-caching"); D:\Download\ffmpeg\vlc-2.2.4\src\libvlc-module.c (1 hit) Line 1823: add_integer( "network-caching", CLOCK_FREQ / 1000, |
ffmpeg
Search ""buffer_size"" (7 hits in 5 files) D:\Download\ffmpeg\ffmpeg-3.2.4\libavdevice\pulse_audio_enc.c (1 hit) Line 766: { "buffer_size", "set buffer size in bytes", OFFSET(buffer_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E }, D:\Download\ffmpeg\ffmpeg-3.2.4\libavformat\rtpproto.c (1 hit) Line 68: { "buffer_size", "Send/Receive buffer size (in bytes)", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, D:\Download\ffmpeg\ffmpeg-3.2.4\libavformat\rtsp.c (2 hits) Line 79: { "buffer_size", "Underlying protocol send/receive buffer size", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC|ENC } \ Line 125: av_dict_set(&opts, "buffer_size", buf, 0); D:\Download\ffmpeg\ffmpeg-3.2.4\libavformat\rtspdec.c (1 hit) Line 294: av_dict_set(&opts, "buffer_size", buf, 0); D:\Download\ffmpeg\ffmpeg-3.2.4\libavformat\udp.c (2 hits) Line 122: { "buffer_size", "System data size (in bytes)", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = D|E }, Line 750: if (av_find_info_tag(buf, sizeof(buf), "buffer_size", p)) { |
ffmpeg deprecated 수정 (0) | 2017.03.09 |
---|---|
ffplay.c (0) | 2017.03.06 |
ffmpeg 예제 소스 분석 (0) | 2017.02.10 |
ffmpeg 3.2 소스관련 (0) | 2017.02.10 |
ffmpeg - vlc cache 설정관련 (0) | 2017.02.10 |
비슷하면서도 많이 다르네..
옛날 소스와 요즘 소스의 차이일려나?
[링크 : https://www.ffmpeg.org/doxygen/0.6/ffplay_8c-source.html]
[링크 : https://www.ffmpeg.org/doxygen/0.6/ffplay_8c.html]
[링크 : http://blog.csdn.net/leixiaohua1020]
ffmpeg deprecated 수정 (0) | 2017.03.09 |
---|---|
vlc "network-caching" / ffmpeg "buffer_size" 소스 검색 (0) | 2017.03.07 |
ffmpeg 예제 소스 분석 (0) | 2017.02.10 |
ffmpeg 3.2 소스관련 (0) | 2017.02.10 |
ffmpeg - vlc cache 설정관련 (0) | 2017.02.10 |