kobject and parport 的一個例子

這一個簡單的驅動示範了如何使用parport來建立你自己的並口驅動。 /* Demenstration of how to build your parport related driver upon parport moudle.Author: Joseph Yang @ dslabMail: ganggexiongqi@gmail.comDate: 06-30-2011*/#include <linux/module.h>#include

預裝載庫函數

為了提高程式運行時的效率,對於關鍵區段代碼調用的動態庫中的函數需要預裝載。因為在運行時進行動態裝載會給程式帶來執行時間的不確定性。在可以藉助ldoepn, dlsym等函數完成此任務。執行個體代碼:標頭檔ld.h#ifndef __LD_H__#define __LD_H__/*** How to compile: $ gcc -o ld ld_init.c -ldl**/#include <stdint.h>#include <stdio.h>#include

kthread helpers — a good choice to replace complex completion interfaces

/*The kthread interface provides you free access to a built-in exitsynchronization mechanism implemented using the completion interface.You may directly call kthread_stop() to ask the corresponding taskto exit. And make a neat call to

EXT4新特性概要介紹

Ext4轉自:http://kernelnewbies.org/Ext4Ext4 is part of the Linux 2.6.28 kernel, read the previous link to know more details about that release.IntroductionEXT4 featuresCompatibilityBigger filesystem/file sizesSub directory scalabilityExtentsMultiblock

一個簡單的並口驅動

// parport.c/*Function: It implement parport read and write method. In this demon, interrupt is also respond.-------------------------------------------------------- How to useNOTE:In order to trigger a parport

從git倉庫中刪除誤提交的檔案

Tell Git not to track a file any more (remove from repo)By Alvin Alexander on January 21, 2012Git rm FAQ: How do I tell Git not to track a file (or files) any more? That is, I want to remove the file from the Git repo?While working on an application

mtime ctime atime …

 當你同熟練的UNIX使用者進行交談時,你經常會聽到他們傲慢地講出術語“改變時間(change time)”和“修改時間(modification time)”。對於許多人(和許多字典而言),改變和修改是相同的。這裡會有什麼不同那?    改變和修改之間的區別在於是改某個組件的標籤還是更改它的內容。如果有人說chmod a-w myfile,那麼這是一個改變;如果有人說echo foo >>

讓emacs完美顯示BMP檔案的辦法

首先感謝http://emacser.com/的ahei,這個想法是在和TA談話時想到,由於是邊試邊寫,程式中用到了本人以前寫的ppm-gen( http://www.emacswiki.org/emacs/ppm-gen.el ) 基本思路是使用emacs lisp強大的advice功能, 在.emacs中加入以下代碼: (require 'ppm-gen)(defadvice image-type (around image-type-bmp first (source

使用virtualbox的連接埠映射功能

服務端開發、演算法開發都要用到linux,無奈因為移動開發工作需要,個人電腦一直啟動並執行是windows。這對於區區來說不是很麻煩,因為很多時候,使用putty加虛擬機器就可以在一個CPU上全速運行兩個系統了,emacs讓這種雙開非常高效。 虛擬機器軟體中,區區最喜歡的是Sun

ext2 / ext3 結構分析

原文:ext2 / ext3 結構分析(第 1 部分)http://bbs.chinaunix.net/thread-3669811-1-1.html《ext2 / ext3

apt-get依賴庫版本過高問題的解決(如何處理libqt4-dev在ubuntu的安裝問題)

因為可能會在項目中應用到Qt的canvas,自然想在自己的VM上先裝上來試試,Nokia現在的SDK太能用了。 我的ubuntu偶而的會升級一下軟體包,結果今天裝libqt4-dev時遇到下面的問題,錯誤提示為:  apt-get install libqt4-devReading package lists... DoneBuilding dependency treeReading state information... DoneSome packages could not be

kobject, kset, ktype

 ============================== REF:                                                      == 1. Documentation/kobject.txt         == 2. http://lwn.net/Articles/51437/     ==============================1. A simple example2. Detail introduction of

page cache ,buffer cache,swap space

原文:http://blog.chinaunix.net/uid-8317394-id-1750963.html前幾天師兄問了一個問題,一個程式,需要讀入檔案,它第一次執行時間和第二次執行時間一樣嗎?將檔案改名後呢,umount檔案系統後再mount上呢?這裡實際上涉及到buffer cache ,page cache兩個概念。先解釋一下buffercache

emacs,強化版的eassist

在.cpp和.h中切換這一功能,最初在VC6的VA中用到,發覺是個不可替代的東西。eclipse中也有,emacs中的eassist也有提供,不過只能找同一目錄,或者已經開啟的單個buffer太弱了。 由於最近做symbian開發,src和inc分別放標頭檔,所以在不同目錄中找.cpp和.h就變得很重要。不過這裡更進一步:在所有開啟的檔案中,或者目錄中,找尋同目錄的.cpp或.h開啟。。 把這段代碼加到eassist.el中就可以了,要注意這裡改寫了函數eassist-switch-h-cpp 

百雞百元問題?天啊

 今天一個還在讀書的老同學拋了個問題給我: 一隻公雞5元,一隻母雞3元,三隻小雞1元,問100元買100隻雞,各多少,編程解決。。。。。 其實現在對幫人寫作業已經沒有興趣了,只不過同學後面那句比較奇怪: 老師說O(N³)太複雜,可以弄成O(N²),。。。。。。 我不明白這裡要什麼O(N³)、O(N²),這隻是簡單的小學二元方程啊,用emacs就可以演算一下,O(N)就可以: ;由方程;5 x + 3 y + 1/3 z = 100;x + y + z = 100;導成----->;2 y

LaTeX技巧189:LaTeX括弧總結

\begin{longtable}{l}  [1] 你好啊。 \\  [2] 吃了沒? \\\end{longtable}功能文法顯示不好看    (\frac{1}{2} )好一點\left( \frac{1}{2} \right)您可以使用\left和\right來顯示不同的括弧:功能文法顯示圓括弧,小括弧\left( \frac{a}{b}\right)方括弧,中括弧\left[ \frac{a}{b}\right]花括弧,大括弧\left\{

gnuplot繪製映像並儲存

文章目錄

Emacs、cedet、ecb

最近在玩Emacs(windows下),總覺得不順心。按照http://bbs.chinaunix.net/viewthread.php?tid=1014134想玩玩cedet、ecb。emacs的啟動速度明顯變慢了,聽說編譯一下el的lisp檔案會變快一些,所以就編譯了一下cedet、ecbcedet:目前的最新版是1.0pre6但這個版本是沒法通過編譯的,據說此版windows版本有bug,我試了好久確實不行,最後去官網下載CVS版的才搞定,我用cygwin的命令列工具 cvs -z3

Debian 7.0 “Wheezy” 快速鍵

1. 設定 Debian 7.0 "wheezy"的快速鍵。  Applications -> System Tools -> Preferences -> System Settings -> Keyboard  開啟Shortcuts選項卡 可以看到預設的設定為: Move window one worksparce to the left = Shift + Ctrl + Alt + Left Move window one worksparce to the

從ramfs分析檔案系統的設計和實現

作者:楊紅剛,蘭州大學郵箱:eagle.rtlinux@gmail.com / rtlinux@163.com--------------------------------------------------------------------REF:1. linux-3.6.9/fs/ramfs2. Documentation/filesystems/ramfs-rootfs-initramfs.txt目錄:0. 檔案系統各個資料結構之間的聯絡圖1.

總頁數: 61357 1 .... 15851 15852 15853 15854 15855 .... 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.