[iOS]好用的XCode快速鍵 - Work efficiency with xcode

https://developer.apple.com/videos/wwdc/2012/#402  關於 三欄式UI的打開跟關閉 [command + 0] -> 切換打開/關閉左邊欄 [command + option+ 0] -> 切換打開/關閉右邊欄 關於搜尋 [command + shift + O] -> 快速搜尋 [command + option + click]  functions -> 可以快速找到implement  或是找出caller 或是 callee  類似瀏覽器的Tab相關控制 [command + T] -> 新增tab 這個對我應該會相當的好用,原本是不知道有這樣的功能. 跟縮排有關 [command + “[“ ] 向左縮 [command + “]“ ] 向右縮 跟自動完成(auto complete)有關 [ctrl + “.”] 自動完成 [ctrl + “/“,  ctrl+shift+ “/“] 選擇自動完成
繼續閱讀

[coursera][Functional Programming Principles in Scala] 關於課程學習心得(1)

偶然的狀況下,知道其實coursera 有在教 scala 的課程,於是多花一點自己的時間來學習. 其實主要的課程時間並不會花很多,就如同他所講的,一個禮拜頂多一兩個小時看video leture 但是assignment 可就不是開玩笑的了,每一次的assignment 都花了我好幾個晚上熬夜慢慢地看 目前到了week4 的階段,大概算是剛剛進入FP的世界,有一些心得可以分享: 千萬要注意assignment 的 instruction 或許也只有我吧,每次拿到作業就打開來想寫.結果就發現沒parameter或是沒有variable.其實都是因為沒有好好的看instruction 產生的. 用Functional Programing 來思考 (Think with FP) 由於我很習慣邊寫測試程式邊寫程式 (TDD is dead? XD) 所以這邊很容易遇到困難點 幾個推薦的方式是回過頭去慢慢思考set 與 list 的本質,不要被  p => Boolean 搞破頭   這裡也記錄一些課程摘要,有興趣可以考慮修修看,畢竟是scala的創辦人開的課(法國人講英文沒那麼難懂) week 0 主要是sbt應用跟簡單的scala 程式架構 week 1  主要是recursive的programming有 Pascal’s Triangle,Parentheses Balancing 跟 Counting Change 我覺得主要是換回你對於recursive programming 的熟悉程度 week 2 一些關於set 的操作,不論是 union 還是 contains  這邊就開始考驗著Functional Programming 的概念了. 讓我相當痛苦…. 所以為了能夠更了解整個架構~我寫了很多的unit test case 並且把整個結果在main 裡面都印出來看.才能有點了解 week3 感覺這次的比較實用,利用Set 與 List 來完成 TweetReader來尋找目前趨勢 Trending ,算是相當有用的課程,但是也很難. 因為一開始整個程式碼架構相當的大,極度推薦把instruction 好好看完,再開始看要完成的部分.跟著instruction 一步步把需要完成的完成,會比較容易….  弄了兩個禮拜~總算搞懂 week3 接下來要繼續努力 … week4…
繼續閱讀

[live555][OpenRTSP][SDL][ffmpeg] 利用ffmpeg 與SDL 達成 streaming 筆記(1)

這邊記錄一下筆記,因為太多公司內部的運作就無法貼code 關於ffmpeg Streaming與 SDL ffmpeg本身就支援 RTSP streaming,只是你需要把資料用 SDL來render 這邊可以參考這段tutorial  http://dranger.com/ffmpeg/ 中文解釋(1) http://ycfu.blog.mypc.tw/2010/01/ffmpegsdl-1.html 從live555的 OpenRTSP 拿出 data buffer 丟到 ffmpeg 去decode 這邊大概是我最不熟悉的部分,也是花最久時間的部分.一開始是拿openRTSP.c 來改 由於我是接H264得source stream所以我拿 QuickTimeFileSink來用,選定MPEG4與MP4之後,其實檔案接下來都可以直接播放~這是沒有問題的. 那如何要把資料接出來,方法如下: 先到QuickTimeFileSink的 AfterGettingFrame 去implement 一個callback function 其中最重要的是把buffer data 接出來 ioState->fBuffer->dataStart 這是frame buffer資料的起頭 packageDataSize 是frame buffer的大小 由於資料是一個video frame 後面緊接著有數個audio frame,所以記得要先查看是哪一種格式好做相關的decode 準備 ioState->fOurSubsession.mediumName() 至於接出來要怎麼decode 就要參考第一段的tutorial 這裡要注意的是,由於拿到的frame data 是一張一張的,所以許多ffmpeg資料要填好 (SDL_AudioSpec) 在ffmpeg中audio decoder無法順利地打開 這個問題主要是在SDL_OpenAudio 可以正常開起,如果有把相關資料填對的話.但是卻無法開啟ffmpeg audio 的 avcodec_open2  原因是因為你需要把 audio Codec context 要填對,主要是: adoContext->sample_rate adoContext->channel 在ffmpeg 接到的時候,video frame 無法順利decode 這個狀況會很詭異的是,直接用ffmpeg 去接RTSP會成功,但是把一張張frame data接過來用ffmpeg去decode的話就會失敗. 回去觀察原來的h264 frame data會發現,其實在video frame data buffer 起始的四個data 分別是 0x00, 0x00, 0x00, 0x01 所以如果把這四個位元加在video frame buffer的前面,就可以正常decode   先寫到這裡,其實還有許多更多的相關處理.之後整理一下心得在寫….    參考: RTSP Client use OpenRTSP (live555) with H264/MJpeg http://blog.xuite.net/antony0604/blog/130505326-RTSP+Client+use+OpenRTSP+(live555)+with+H264%2FMJpeg%3E 這篇很有幫助,幫助我知道哪些地方開始修改,也知道哪些地雷可以避免踩到 ffmpeg(2):ffmpeg结合SDL2.0解码视频流 http://blog.csdn.net/oldmtn/article/details/20284721 這篇可以幫助你快速建立 ffmpeg + SDL 2.0 player也可幫助我看如何從 SDL 1.2 -> SDL 2.0 Live555官方文件  http://www.live555.com/liveMedia/#testProgs 最主要這邊是提醒我們可以如何開始把frame buffer 找出來,也提醒我們如何去結束一個session .主要都是參考  testRTSPClient.c Live555类结构  http://www.cppblog.com/tx7do/archive/2013/09/10/203134.html 把相關的結構整理了一下,其實很適合閱讀.不過呢~這種東西沒有真的下去碰過好像也是都看不懂. live555 livemedia库结构分析[原创]  http://blog.csdn.net/gjgsoft/article/details/7705349 有把 Medium,Sink與其他的關係作了一下說明,並且有把TestRSTPClient 做一個簡單的講解… 挺值得一看…
繼續閱讀

[研討會心得]PyCon APAC 2014 05/18 Day2 Note

Keynote: Jessica McKellar Python is everywhere -1000 meter (deep ocean) to 80000 meter space center  OpenData for UK open.gov.uk Government will use Good tool Need to improve user using Python in Windows Hard to use in Windows for lots step Write python Mobile app is big challenge but it is doable iOS SDK for Python Kivy http://kivy.org/ Pyzia http://pyzia.com/technology.html Write Python in Chinese? https://code.google.com/p/zhpy/ 周蟒 但周蟒已不再維護… 官網說請參考 https://blockly-demo.appspot.com/static/apps/code/index.html?lang=zh-hant PypyJS  Python with JS PyPy http://pypy.org/features.html PyPi Python in Respberry Pi Do a thing with python you never done before 2015 Resource: robonaut: http://www.i-programmer.info/news/169-robotics/4527-robonaut-2-simulator.html http://www.w3schools.com/browsers/browsers_os.asp https://docs.python.org/3/using/windows.html http://interactivepython.org/ https://github.com/bnmnetp/runestone http://pythonsprints.com/ https://www.python.org/psf/grants/ zhpy: https://code.google.com/p/zhpy/ kivy: http://kivy.org/#home pypy.js: https://github.com/rfk/pypyjs   (PyPy.js: PyPy compiled into JavaScript) R2 What Is Async, How Does It Work, and When Should I Use It? A. Jesse Jiryu Davis http://emptysqua.re/blog/ https://twitter.com/jessejiryudavis Non-Async Sub process in NYC, it is non-async Way to speed it up, add more cooker Async Pizza in NYC All food need wait the microwave to make pizza No way...
繼續閱讀

[研討會心得]PyCon APAC 2014 05/17 Lighting Talk

MOOC or MOOCs Moocs.org eDX Open edX Receive high education Show-and-Tell code A ideal to show your code to other Pros You need make your code readability Bring your idea to other one. Mosky 漸進式郵遞區號 http://zipcode.mosky.tw/ Pelican  static clean Blog system Support RSS markdown Install pip install pelican Very extended 用NetworkX 找 台灣公司網絡中心 https://networkx.github.io/   pure python 如何判斷端點是重要的 (closeness) 某一個點離各個點距離是最短的 ciphers 密碼學 pip install classical_ciphers 三種加密 mono poly trans CAPTCHA is hard for mobile touch device Using drag image to other. 
繼續閱讀

[研討會心得][PyCon APAC 2014] 05/17 Day 1 note

Python-powered Analysts @WesMackinn Author for “Python for Data Analysis” Python’s role in 2014 for analysis BI Query  Report ordinary Alert when trend change ETL (Extract Transform Load) moving data between storage format Normalization How did we get here? Good develop tool —  iPython Learning resource: nbviewer.ipython.org static html share space The libraries packaging tech become more maturing. Why did pandas succeed? tasteful and consistent solutions passionate user base An API optimized for  terminal-freindliness composability   Tools before Data Analysis Cython NumPy matplotlib ipython Python might not best language for Data Analysis, but everyone can using python to discussion. Scikit-learn http://scikit-learn.org/stable/ Machine learning in python. Pandas: The good and bad Ecosystem compatibility Design for broad appeal The big data problem. Big Data Trend Python/R/Julia growing  JVM-base big data ecosystem Concurrent / multicore programming challenges Staying competitive “Enterprise money” is still stay in JVM-Ecpsystem A bit about DataPad http://www.datapad.io/ Exploratory analytics and report-building environment Powerful analysis tool No...
繼續閱讀