發表文章

Common Questions about GTK

Common Questions : "1.4. How does memory management work in GTK+? Should I free data returned from functions? See the documentation for GObject and GtkObject. For GObject note specifically g_object_ref() and g_object_unref(). GtkObject is a subclass of GObject so the same points apply, except that it has a 'floating' state (explained in its documentation). For strings returned from functions, they will be declared 'const' (using G_CONST_RETURN) if they should not be freed. Non-const strings should be freed with g_free(). Arrays follow the same rule. (If you find an exception to the rules, please report a bug to http://bugzilla.gnome.org.)"

何謂time granularity - Yahoo!奇摩知識+

圖片
何謂time granularity - Yahoo!奇摩知識+ : Time granularity 就是「時間粒度」,是指事情或現象發生的頻率、或發生時間之間的間隔。 時間粒度就是依所需把時間分解到不管是分、秒、日、月、甚至是毫秒等等時間單位,總之是儘量使分解程度到達對於該研究或作業來說適當的程度,因為分得太細會浪費不必要的人力與資源、分得太粗又會提高複雜性。 參考資料 * 2007-03-17 08:37:58 補充 關於時間粒度的解說有許多網頁: http://engine.cqvip.com/content/tp/92705x/2000/022/003/gc30_tp3_4823989.pdf 可自行輸入「時間粒度」查詢。

GtkListStore

圖片
GtkListStore : "Object Hierarchy GObject +----GtkListStore Implemented Interfaces GtkListStore implements GtkBuildable, GtkTreeModel, GtkTreeDragSource, GtkTreeDragDest and GtkTreeSortable."

GObject說明 The Base Object Type

圖片
The Base Object Type : "Description 主要是想要知道為什麼在宣告一個GObject A之後要先做g_object_ref(A)。 宣告跟g_object_ref(A)有什麼不同, 以及g_object_unref(A)跟g_object_ref_sink(A)分別是什麼意思。 GObject is the fundamental type providing the common attributes and methods for all object types in GTK+, Pango and other libraries based on GObject. The GObject class provides methods for object construction and destruction, property access methods, and signal support. Signals are described in detail in Signals(3). GInitiallyUnowned is derived from GObject. The only difference between the two is that the initial reference of a GInitiallyUnowned is flagged as a floating reference. This means that it is not specifically claimed to be 'owned' by any code portion. The main motivation for providing floating references is C convenience"

String Utility Functions : g_strsplit ()

圖片
String Utility Functions : "g_strsplit () gchar** g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens); Splits a string into a maximum of max_tokens pieces, using the given delimiter. If max_tokens is reached, the remainder of string is appended to the last token. As a special case, the result of splitting the empty string '' is an empty vector, not a vector containing a single string. The reason for this special case is that being able to represent a empty vector is typically more useful than consistent handling of empty elements. If you do need to represent empty elements, you'll need to check for the empty string before calling g_strsplit(). string : a string to split. delimiter : a string which specifies the places at which to split the string. The delimiter is not included in any of the resulting strings, unless max_tokens is reached. max_tokens : the maximum number of pieces to split string into. If thi...

什麼是GTK(GIMP ToolKit)

圖片
GTK Programming Zone : "GTK (GIMP ToolKit) 原本只是 GIMP 開發過程上管理圖型介面的一套工具程式庫. 由於它使用 LGPL 執照, 程式開發者可以免費使用它來發展公開程式碼的軟體, 免費軟體或甚至商用軟體. 隨著使用率及使用範圍的增加, 很快的 GTK 從只為了滿足 GIMP 需求而存在的印象中跳出, 發展成今日功能廣泛的一套程式庫. GTK 的穩定版已從 1.2 發行到現在的 2.0. 舊的 1.2 版基本上只有 GLIB 跟 GTK+ 兩個套件, 而 GTK 中另含有 GDK (GIMP Drawing Kit) 程式庫. 一般我們直接使用的是 GTK. 其中幾乎所有繪圖功能都是透過 GDK 來達成的. GDK 主要負責和 X Window 的程式庫做"

GTK字串處理 String Utility Functions

圖片
String Utility Functions g_ascii_strtod () Converts a string to a gdouble value. This function behaves like the standard strtod() function does in the C locale. It does this without actually changing the current locale, since that would not be thread-safe. This function is typically used when reading configuration files or other non-user input that should be locale independent. To handle input from the user you should normally use the locale-sensitive system strtod() function. To convert from a gdouble to a string in a locale-insensitive way, use g_ascii_dtostr(). If the correct value would cause overflow, plus or minus HUGE_VAL is returned (according to the sign of the value), and ERANGE is stored in errno. If the correct value would cause underflow, zero is returned and ERANGE is stored in errno. This function resets errno before calling strtod() so that you can reliably detect overflow and underflow.

gtk 如何debug

圖片
要檢查gtk程式除了手動gprintf, 還可以在程式中使用這個 function 來做一點簡單的檢查 : g_return_val_if_fail (expr) Logs a warning if the expression is not true. 其他參見 Message Output and Debugging Functions Message Output and Debugging Functions — functions to output messages and help debug applications

SQlite 簡單介紹 快速建立資料庫

SQlite 簡單介紹 介紹一下SQlite, 這套軟體就如同它的名字,是個lite 版本的sql :) 官方網站 http://www.sqlite.org/ 維基: SQlite 裡頭有介紹目前的支援的語言以及相關的應用套件。 像是: pysqlite - A Python Wrapper. Sqlite-ruby - Ruby 語言接口。 SQLiteManager - 管理 SQLite 數據庫的多語言的 PHP4 寫的 web 工具。 以下列一下常用的指令集: $ sqlite3 xxxx.db 打開某db sqlite> 創造系 sqlite> create table tbl1(one varchar(10), two smallint); sqlite> insert into tbl1 values('hello!',10); sqlite> insert into tbl1 values('goodbye', 20); sqlite> select * from tbl1; 或是 sqlite> CREATE TABLE tbl2 ( ...> f1 varchar(30) primary key, ...> f2 text, ...> f3 real ...> ); 觀察系 .databases List names and files of attached databases .schema ?TABLE? Show the CREATE statements .indices TABLE Show names of all indices on TABLE 輸入/輸出 .dump ?TABLE? ... Dump the database in an SQL text format .import FILE TABLE Import data from FILE into TABLE .load FILE ?ENTRY? Load an extension library ...

利用Linkedin 一步一步建立英文履歷

圖片
Linkedin算是一個很特別的"交友網站", 主要是想要利用社交網路累積人脈。  LinkedIn: Relationships Matter 先來個Linkedin簡單的介紹,利用google找到的一些中文介紹如下: 找工作?先到Linkedin挖人脈| 數位時代Beta2.0 當然還要看一下 Mr.6對Linkedin的發展過程介紹 Linkedin達2300萬會員且獲利創高峰,宣布起死回生(Mr. 6)

Google Search

推薦內容橫式

本月熱門文章

什麼是 OTA ?

馬英九稱「武漢防疫是對人類的貢獻」 中國國民黨前主席變成中國共產黨傳聲筒?

【淡北道路工安】淡水大停水72小時事件!時間線、責任歸屬與水費折減補償全解析

蔣萬安歷年公開英文介紹台北市演說整理(2023–2026)

什麼是GSM ?

日本旅行 去東京可以在哪邊買羽球相關用品? WEMBLEY/WINDSOR/梭家/Victoria/Alpen TOKYO

[新鮮人找工作] 職場名詞解釋 AE FAE Pre-sales Post-sales

Android 中文輸入法 官方版 ! Gboard - Google 鍵盤 開始支援注音輸入啦

民主防線的滲透危機:從徐春鶯案看藍白政黨的國家忠誠度

立法委員沈柏洋Puma 回應不實傳言 真是需要每天收看 持續跟進