PNG格式分析

前言我們都知道,在進行J2ME的手機應用程式開發的時候,在圖片的使用上,我們可以使用PNG格式的圖片(甚至於在有的手機上,我們只可以使用PNG格式的圖片),儘管使用圖片可以為我們的應用程式增加不少亮點,然而,只支援PNG格式的圖片卻又限制了我們進一步發揮的可能性(其實,應該說是由於手機平台上的處理能力有限)。

Use nocase string as g_hash_table’s key

/* ghashtabledemo.c -- GHashTable demo */#include <glib.h>#include <string.h>void print_entry(gpointer key, gpointer data, gpointer user_data){  /* user_data not used */  g_print("key: %-10s     value: %-10s/n", (gchar *)key, (gchar

How to debug shared librarys with gdb?

The simplest method (maybe the only method) is:1. set a break point in main()2. list the source code or symbol name of the shared library, and set the break point. You could use add-symbol-file to load the symbols of the shared library. Use ldd, you

Ubuntu下apt-get錯誤

運行sudo apt-get update或其它apt-get命令都給出以下錯誤資訊:E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)E: Unable to lock directory /var/lib/apt/lists/E: Could not get lock /var/lib/dpkg/lock - open (11: Resource

How to select the full row in DataGrid

How to select the full row in DataGrid? As a multifunctional data display control, DataGrid is used frequently in practice. Sometimes, you want to select full row in datagrid which seems as follows:   Follow me, I will tell you how to present it

GtkHTML programming guide

http://primates.ximian.com/~rodo/programing_with_gtkhtml_tutorial/guadec.htmlSome useful functions of gtkhtml:1. gtk_html_begin_content(), then gtk_html_write(), at last gtk_html_end().2. gtk_html_set_base(), gtk_html_jump_to_anchor(), gtk_html_load_

Connection reset by peer原因分析

我用C語言寫了一段程式,在用戶端運行,去請求伺服器端的檔案。發現有時候會出現send命令發出去後,read得到的傳回值為-1,errno值為Connection reset by

[zt] Xft編程文檔

http://www.linuxfans.org/nuke/modules.php?name=News&file=article&op=view&sid=1981 cjacker寫著 'Xft 編程技術一、首先有幾點要說明的:1,字型技術已經越發的使用者透明。兩大UI及其衍生套間都已經還好的徹底封裝了字型技術比如,GTK2 採用了pango字型引擎,Qt也很好的封裝了Xft及X核心字型實現,所以,使用者進行gtk2或者Qt以上等級的程式開發時不需要考慮任何字型實現的問題。

不重複隨機數的實現方法

如何產生不重複的隨機數?最容易想到的方法,是逐個產生這些隨機數,每產生一個,都跟前面的隨機 數比較,如果重複,就重新產生。這是個很笨的方法,且比較次數呈線性增長,越往後次數越多。其實這些比較是多餘的,完全可以不進行比較,只要反過來,按順序產生這些數,但隨機產生它們的位置。例如下面產生100個100以內不重複隨機數的代碼:int a[100];for(i=0; i<=99; ++i) a[i]=i;for(i=99; i>=1; --i) swap(a[i], a[rand()%i])

Stand alone的Spring樣本 (IoC)

Reference:1. 60秒入門教程: http://gabriel.jarchitect.org/spring/index.html 必需的jar檔案包括: spring-core.jar, common-logging.jar, 在IDEA中, 運行Java虛擬機器的目錄並不是classes目錄, 因此它在目前的目錄中無法找到"bean.xml"檔案, 使用下面的代碼: import org.springframework.core.io.*;   /* Read the

[zt] cglib2 proxy tutorial

http://alexwinston.com/blog/2004/03/23/1080068110000.html  for those that are familiar with aop will have most certainly heard of cglib. for those that have not, cglib provides the ability instrument bytecode programmatically. it uses asm for the

靜態庫和共用庫

建立和使用靜態庫1. 建立目錄 mkdir –p test/sub2. 在子目錄sub/下編寫hello.c和hello.h /*****hello.c*****/ #include <stdio.h> #include “hello.h” void hello() { printf(“Hello!/n”); }  /*****hello.h*****/ #include <stdio.h> void hello();3. 編譯連結/打包 gcc –c hello.c –

Add library (classpath) in IDEA 4

Right click the java module item in the project view, the popup menu shows, and click the “Module Settings ...”, then select “Library (Classpath)” tab, then click “Jar/Dir...” button. But you can only add jar files, but not add a dir which contains

X RECORD extension example

 /*  * To enable record extension in Xorg/XFree86, add the following  line in * Section "Module" *     Load         "record" */#include <stdio.h>#include <stdlib.h>#include <X11/Xlibint.h>#include <X11/Xlib.h>#include <X11/

hibernate最佳化設定

mutable=false  相當於屬性裡面的元素整個執行個體不能更新XML配置<class name="User" table="USER" dynamic-insert="true" dynamic-update="true">JAVA 注釋@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true) 對於dynamic-insert dynamic-update mutable="false"

J2EE without EJB 讀書筆記 — Light weight Container & IoC

容器所應提供的服務包括:1. 生命週期管理2. 尋找: 尋找被管理對象的引用3. 配置: 使用一致的方法, 來配置被管理的對象4. 依賴性解析: IoC的策略有兩種:1. 依賴性尋找: 傳統的類似JNDI的方法2. 依賴性注入: 使用JavaBean property的方法叫做Setter注入或者type 2,                使用建構函式參數的叫做建構函式注入或者type 3.Setter注入: JavaBean的setter方法在對象執行個體被容器構造之後立即執行,

Stand alone的Spring樣本 (AOP)

Referneces:1. An Introduction to Aspect-Oriented Programming with the Spring Framework, Part 1: http://www.onjava.com/lpt/a/49942. http://www.springframework.org/docs/wiki/Spring_AOP_Framework.html3. SpringFrameWork中AOP的簡單使用:

Gnome-vfs MIME type example

#include <string.h> /* for strlen() */#include <time.h> /* for ctime() */#include <libgnome/libgnome.h>#include <libgnomevfs/gnome-vfs.h>#include <libgnomevfs/gnome-vfs-mime.h>#ifdef LINUX# include <linux/fs.h> /*

程式員的激情與衝動.

程式員的激情與衝動.  編程的工作是一個字母一個字母寫出來的,你不得不保持極大的耐性.時刻調整自已的心態.你得左思右想,你得想想會不會有沒考慮到的地方?因為沒想到就會成為一個BUG,儘管你100種可能性中已經想到99種了,別人總是能準確地第一次就激發第一百種情形...別人會笑你,這是多很簡單的錯誤啊,你混了多少年了,還....如果你不想被人罵,你得小心地控制好了,用一個字母一個字母控制好了..於是做事變得小心,變得極有耐性.  更可怕的事情卻是被人強姦意志,由於軟體的不易描述性及不易量度性,當做

How to add a menuitem in Nautilus context menu.

1. In src/file-manager/ directory, add command section and menuitem section in nautilus-directory-view-ui.xml.<commands>    ...    <cmd name=”Name Convert”         _label=”Name _Convert”        _tip=”Convert the file

總頁數: 61357 1 .... 16404 16405 16406 16407 16408 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.