發表文章

目前顯示的是 12月, 2008的文章

[太陽花學運] 2014年3月18日 台灣人民佔領立法院行動 反對黑箱服貿

圖片
繼台灣公民記者JO1YNN在美國有線電視新聞網CNN的 iReport ( Taiwan Parliament Occupied by protesters 1st time in History )上。報導台灣「318人民佔領立法院行動」首次佔領立法院議場世界各大重要外電媒體紛紛加以報導。 Arys Chien's status update .: 【 為何學生要佔領立法院,反對黑箱服貿?】 我知道有的朋友平常沒 留意,現在一時看不太懂;我試著用另一種方式簡單說明看看。   會計偷偷抱著公司所有的資產,要去抵押借高利貸。 老闆發現了,趕緊說:「不行啊那是高利貸!」 會計:「我是為公司好!」 老闆:「那起碼告訴我,是哪家高利貸、多少錢、利息怎麼算?」 會計:「我先去借,你之後會慢慢感受到!」 老闆:「那也讓我們開個會討論吧!」 會計:「我趁你不在的時候發開會通知,你沒來,所以就算通過了。 」 老闆要攔會計、會計把自己座位鎖起來,老闆只好請人來包圍會計的 座位,並且設法強行進入;進入後亂翻會計抽屜,想找到公司資產。   以上。   會計 = 政府 老闆 = 台灣人民 高利貸 = 服貿 (沒錯,政府是人民雇用來辦事的職員,看薪水哪裡來的就很清楚了 ) (高利貸不是不能借,只是不能這樣搞啊......)  ( 來源: 我是台灣人粉絲團  )

Android Porting Note

整理一些網路文章 安裝 Android 應用程式(apk)至 Neo FreeRunner 對Android啟動過程的進一步研究 Android Porting On Real Target Android on OMAP

什麼是RTOS ?

RTOS(Real-time operating system) 近來流行的 ARM + RTOS 幾乎已經變成 Embedded System 的代名詞。 來看一下他的相關介紹吧:) wiki : Real-time operating system A Real-Time Operating System (RTOS; generally pronounced as "R-toss") is a multitasking operating system intended for real-time applications. Such applications include embedded systems (programmable thermostats, household appliance controllers), industrial robots, spacecraft, industrial control (see SCADA), and scientific research equipment. 各種 RTOS 優劣 ? 學習 RTOS 和評估使用那一個 RTOS 是兩回事. 以學習 RTOS 來說, 初學者先得瞭解什麼是 real-time system, 她和 PC/Server 有何不同. 再瞭解 programming for RTOS 和一般 programming 的差異, 她的 multi-tasking scheduling 的方式, task 間彼此 synchronize/communication 的方式等等. 以鍛鍊上述基本功夫來說, uC/OS-II 確實是一個理想的學習工具. 她夠單純, 但 RTOS 該有的基本機制她都有. 她和藹可親, 初學者很快就可以與她打成一片. 她身材纖細苗條, 只要 32K bytes 的 flash 就可以存放了. 至於如何為產品選擇 RTOS, 則需要對專案有全局的瞭解才能挑出適用之材, 例如產品規格需求, 軟硬體發展時程, 預算多寡, 人員訓練等等. 因為許多時候 RTOS 是產品成敗的關鍵. 舉個例子, 如 linux, 有些公司只著眼在她是免費的, 忽略了客戶 real-time 的需求, 或是用了 uc/OS-II 才發現需要 file syst

extern 與 extern "C"

圖片
整理一下看網友blog的文章筆記: 關於 extern : 1. 在function外定義的變數就叫外部變數,相反的在function內就叫內部變數。 2. 外部變數的視野是從定義的開始那行到本身檔案結束的最後一行(此稱自然視野)。 3. 若外在變數要被其他的檔案所用,那就要在別的檔案那裡宣告extern,以表它定義在別的檔上(此稱視野擴展)。 1. extern的用法 想用外部變數的時候,在變數前面前面加extern。 2. C++ extern 全域變數正確用法 提到應該在.h檔內宣告變數為全域變數, extern int i; 但是還要在cpp檔中重新定義一次。 int i; 要注意的是一定要配合.h檔,在相同名稱的.cpp內重新定義,不然會出現linker error。 也可以這樣用, -- 關於 extern "C" {} extern "C"的用法 c 語言static與extern的用法

Memory Allocation

Memory Allocation : "g_new() #define g_new(struct_type, n_structs) Allocates n_structs elements of type struct_type. The returned pointer is cast to a pointer to the given type. If n_structs is 0 it returns NULL. Since the returned pointer is already casted to the right type, it is normally unnecessary to cast it explicitly, and doing so might hide memory allocation errors. struct_type : the type of the elements to allocate n_structs : the number of elements to allocate Returns : a pointer to the allocated memory, cast to a pointer to struct_type g_new0() #define g_new0(struct_type, n_structs) Allocates n_structs elements of type struct_type, initialized to 0's. The returned pointer is cast to a pointer to the given type. If n_structs is 0 it returns NULL. Since the returned pointer is already casted to the right type, it is normally unnecessary to cast it explicitly, and doing so might hide memory allocation errors. struct_type : the type of the el

Doubly-Linked Lists

Doubly-Linked Lists : "GList typedef struct { gpointer data; GList *next; GList *prev; } GList; The GList struct is used for each element in a doubly-linked list. gpointer data; holds the element's data, which can be a pointer to any kind of data, or any integer value using the Type Conversion Macros. GList *next; contains the link to the next element in the list. GList *prev; contains the link to the previous element in the list."

Shell-related Utilities

Shell-related Utilities : "g_shell_parse_argv () gboolean g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **error); Parses a command line into an argument vector, in much the same way the shell would, but without many of the expansions the shell would perform (variable expansion, globs, operators, filename expansion, etc. are not supported). The results are defined to be the same as those you would get from a UNIX98 /bin/sh, as long as the input contains none of the unsupported shell expansions. If the input does contain such expansions, they are passed through literally. Possible errors are those from the G_SHELL_ERROR domain. Free the returned vector with g_strfreev(). command_line : command line to parse argcp : return location for number of args

Spawning Processes

Spawning Processes : "g_spawn_async_with_pipes () gboolean g_spawn_async_with_pipes (const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, gpointer user_data, GPid *child_pid, gint *standard_input, gint *standard_output,"

Memory Allocation

Memory Allocation : "g_new0() #define g_new0(struct_type, n_structs) Allocates n_structs elements of type struct_type, initialized to 0's. The returned pointer is cast to a pointer to the given type. If n_structs is 0 it returns NULL. Since the returned pointer is already casted to the right type, it is normally unnecessary to cast it explicitly, and doing so might hide memory allocation errors. struct_type : the type of the elements to allocate. n_structs : the number of elements to allocate. Returns : a pointer to the allocated memory, cast to a pointer to struct_type."

好用的sprintf

sprintf - C++ Reference 但今天要介紹的是 g_sprintf 以及 g_strdup_printf g_sprintf () gint g_sprintf (gchar *string, gchar const *format, ...); An implementation of the standard sprintf() function which supports positional parameters, as specified in the Single Unix Specification. g_strdup_printf () gchar* g_strdup_printf (const gchar *format ...); Similar to the standard C sprintf() function but safer, since it calculates the maximum space required and allocates memory to hold the result. The returned string should be freed when no longer needed.

什麼是RAID ?

圖片
RAID中文叫作磁碟陣列。 比較簡單清楚的說明請看 Toshiba硬碟達人開講之RAID應用篇 要看完整專業可以參考 wiki : RAID 磁碟陣列

什麼是OpenGL ES ?

圖片
OpenGL ES (OpenGL for Embedded Systems) is a subset of the OpenGL 3D graphics API designed for embedded devices. OpenGL ES 官方網頁 簡單說明OpenGL ES - The Standard for Embedded Accelerated 3D Graphics wiki : OpenGL ES 新聞 : 次世代高階多媒體 API「OpenMAX」多家大廠研發中 「OpenGL ES」是以跨平台電腦繪圖 API「OpenGL」子集合為基礎,以應用於可攜式裝置、家電或遊樂器等嵌入式系統為主要訴求而制定的新一代 3D 繪圖 API,目前已發表 1.0 版,後續預計推出 1.1 版與 2.0 版。 「OpenGL ES」初期的 1.0 版將主要以手機等不具備硬體 3D 加速功能的系統應用為主,主要以軟體方式來執行各種 3D 繪圖所需運算,1.1 版預定拓展到具備硬體加速設計的平台上,最終目標是將目前應用於 PC 上的高階可程式化著色語言拓展到各種嵌入式系統產品之上,以單一的 API 統合各廠商不同硬體平台,達成高效率的程式開發與執行環境。 由於「OpenGL ES」與完全被微軟把持的 DirectX API 不同,是一個與作業系統平台無關的跨平台開放性標準,並承襲了目前最具影響力的跨平台 3D 繪圖 API「OpenGL」的優良設計,所以成功獲得全球各大行動通訊、電子電機資訊、3D 電腦繪圖以及家電廠商的支持,並由這些廠商分工進行相關標準的制定與對應產品的研發。除了「OpenGL ES」之外,Khronos Group 還制定了包括動態影像處理的「OpenML」與向量繪圖處理的「OpenVG」等標準。

什麼是OpenMAX ?

圖片
OpenMAX 官方網頁 上的介紹: OpenMAX - The Standard for Media Library Portability wiki : OpenMax OpenMAX is a royalty-free cross-platform set of C-language programming interfaces that provides abstractions for routines especially useful for audio, video, and still images. 沒看到什麼中文新聞 次世代高階多媒體 API「OpenMAX」多家大廠研發中 (2004)  美國 Khronos Group 主席 Neil Trevett,在國際電腦圖學的重要發表會「SIGGRAPH 2004」中,宣布由該集團所提倡的新一代多媒體應用程式介面(API)標準「OpenMAX」,正分為六大部門,由全球各大通訊電子資訊廠商進行標準制定與研發的工作。 --  而本次所發表的「OpenMAX」則是新一代的泛用多媒體 API,與專門針對 3D 繪圖處理的「OpenGL ES」標準不同,涵蓋了所有的多媒體處理需求,將統合所有多媒體所需運算處理的 API,架構一個高階的應用程式介面,簡化多媒體應用程式開發的工作,目前共分為六大部門進行研發: (1) 靜態圖像:包括 JPEG 與 JPEG2000 等格式的靜態影像處理 (2) 動態影像:包括 MPEG-4 與 H.264 等動態影像壓縮解壓縮處理 (3) 3D 繪圖:包括 3D 繪圖相關處理 (4) 音訊處理:包括語音與音樂音效等相關處理 (5) Java:包括 Java 應用程式執行所需的相關處理 (6) 統合層(Integration Layer):統合 OpenMAX 各種 API 介面

什麼是Open Embeded

圖片
Open Embeded (縮寫為 OE) Open Embeded官方網站 關網介紹 : Welcome to Openembedded, your best-in class cross-compile environment. Openembedded allows developers to create a complete Linux Distribution for embedded systems. Some of the OE advantages include: * support for many hardware architectures * multiple releases for those architectures * tools for speeding up the process of recreating the base after changes have been made * easy to customize * runs on any Linux distribution * cross-compiles 1000's of packages including GTK+, Xwindows, Mono, Java, and about anything else you might ever need