Thursday, June 28, 2007

德国化学博士靠大气阳光提供营养生活6年(图) - 新闻直通车 news.wenxuecity.com

信息时报6月29日综合报道 每天完成3英里晨跑之后,来自德国北部一个小城的迈克尔·沃纳都会和妻子一起坐到餐桌旁。不过,他什么也不吃,只是喝点咖啡;而且,这种情况已经持续了6年之久。

2001年开始“阳光生活”

今 年58岁的化学博士迈克尔一直对人不吃饭也能活得很好的想法很感兴趣,终于在2001年的一天,他决定亲自实践一下。他为自己开始了一个适应性计划,让自 己的身体逐渐适应只靠流体生活的状况。他说,这个适应期持续了三周。第一周最难熬,一点东西都不能下肚,食物和水都不行。

“自信就不会感到饿

这 听起来很难,要想达到目标还必须有坚定的信念。“这不是节食,而是尊重自己的身体。如果有了这种信念,就不会感到饿了。”“第8天,可以喝一些果汁,这等 于是对身体做一个清洁,对身体的系统进行一次净化。不过这时的果汁里边是掺了水的。”“第三周可以喝点浓度稍高的果汁,在最后的7天里,身体情况就会稳定 下来,适应新的生存环境。在此过程中,自信是至关重要的因素。有了自信,就不会向饥饿妥协。”

迈克尔把自己的经历写成了书,书名叫《阳光生活》

其实,迈克尔的前卫行为并非为天下先,在他之前,世界各地都曾有过这种“阳光与大气主义者”的各种传闻。

靠阳光大气提供营养

他说自己的情况与厌食症完全不同,“当然,我是出于爱自己的身体才这么做,不是因为讨厌身体(肥胖)。我的思想状况和减肥的女士们完全不同,对身体的影响也完全不同。”

那么,为什么21岁的模特安娜最后因节食而死,而迈克尔能够健康地生活呢?迈克尔说,“还有许多问题我们现在无法解答。但是,我确实知道,我的大部分能量来自阳光和大气,我从中吸取能量,有点像植物,而且吸取的能量足够维持正常的生活需要。也就是所谓的“光营养”。

“身体比以前更健康”

迈 克尔身高1.8米,在开始这项实验时,体重190多斤,后来逐渐稳定在160斤左右。他说,现在每天只需要睡五六个小时,就精力充沛,而且比以前更为健 康。迈克尔说,“我参加过两次研究,每次10天。期间,我测量了血压、尿以及心率,证明我是对的,可是我们也说不清到底是怎么回事。”

熟悉迈克尔的人都习惯了他的“非典型性”生活方式,他说,“我还是会和妻子、朋友或者已经长大成人的孩子们坐到餐桌旁。在那干坐着,对面前的食物一动不动确实挺奇怪的,可是大家都慢慢习惯了,不再为我准备食物了。”

据说,世界上有大约5000名“光和大气主义者”,迈克尔认识其中的30位。

迈克尔日常食谱

早餐:咖啡和牛奶

上午10点:浓咖啡

午餐:果汁或水再加咖啡

下午:浓咖啡

晚餐:果汁或水,有社交活动时会喝点酒。

Saturday, June 23, 2007

Linux Compatibility Configuration Note for MADWIFI on RedHat 9

KeyLabs
Linux Compatibility Tested
Linux Compatibility Configuration Note

Systems Affected: MADWIFI Drivers on RedHat 9
Date Created: 2-12-2004



MADWIFI on RedHat 9

The MADWIFI Driver is located at:
http://sourceforge.net/projects/madwifi/

FAQ (where much of this config note came from)
http://www.mattfoster.clara.co.uk/madwifi-faq.htm


Check the following before you start

The following commands should be accomplished as root or superuser. # su Check that you have installed the sharutils package, if not you will need to install them for your distribution.

# rpm -q sharutils
 I have sharutils-4.2.1-1.6.1

Your kernel should be linked to the kernel source

/lib/modules/{kernel_version}/build should be a symlink to /usr/src/{kernel_version}

Check this by performing the following command

# cd /lib/modules/{kernel_version}
# ls -al build

You should see something like this:

lrwxrwxrwx 1 root root 21 Sep 22 17:12 build -> /usr/src/linux-{kernel_version}

If not then perform the following steps as suggested by the madwifi-faq.htm

# cd /lib/modules/{kernel_version}
# ln -s /usr/src/linux-{kernel_version} build

You may also need to copy your built/configured kernel to the /boot directory.

# cp /boot/config-{kernel_version} /lib/mobules/{kernel_version}/build/.config


Download and Install the package

The MADWIFI package can be downloaded using the following command.

# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi

Specify the target platform

# export TARGET=i386-elf

Build the drivers and load them, wlan and ath_hal must be loaded first.
Change to the madwifi directory and do

# make
# insmod wlan/wlan.o
# insmod ath_hal/ath_hal.o
# insmod driver/ath_pci.o

or install the drivers where they can be loaded automatically using

# make install


Configure the card for access and loading a DHCP address


Check for available Access Points
{Note: I recommend disabling WEP on your access point until everything is working properly}
# ifconfig ath0 up
# iwlist ath0 scan

Assign required information to connect to your access point

# iwconfig ath0 essid ""
# iwconfig ath0 key ""

Create an /etc/sysconfig/network-scripts/ifcfg-ath0 file

STARTMODE=onboot
DEVICE=ath0
BOOTPROTO=dhcp
WIRELESS=yes
MODE=Managed
ESSID=your-essid
CHANNEL=your-channel
KEY=your-key-here-if-you-use-encryption or off

The setup above assumes you have a dhcp server running. If not, you could use something like this:

STARTMODE=onboot
DEVICE=ath0
BOOTPROTO=static
IPADDR=192.168.1.123
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
WIRELESS=yes
MODE=Managed
ESSID=your-essid
CHANNEL=your-channel
KEY=your-key-here-if-you-use-encryption or off

When changing from an access point that used a KEY and an access point that did not use a KEY I had to set the KEY value to off before the new connection would work.

Modify the /etc/modules.conf file and verify that it contains an alias for ath0. I had an issue where eth1 was listed instead of ath0.

 alias ath0 ath_pci

Test your settings by restarting the network services

# /etc/init.d/network restart
# ifconfig ath0

You should now have a valid IP address assigned to ath0

Reboot your system then run ifconfig ath0 to verify that an IP address is assigned on startup.

If you experience any problems or issues, refer to the information found on source forge concerning the madwifi drivers.

This document was written 2-12-04 using an IBM Thinkpad T41p 2373-GEU




385 South 520 West, Lindon, Utah, 84042
801.226.8200 -- 801.226.8205 (fax)
Linux Tested

Copyright © 1998-2004, KeyLabs ™

Wednesday, June 20, 2007

LWN: Porting device drivers to the 2.6 kernel

http://lwn.net/Articles/driver-porting/

Porting device drivers to the 2.6 kernel

[Posted February 11, 2003 by corbet]

The 2.6 kernel contains a long list of changes which affect device driver writers. As part of the task of porting the Linux Device Drivers sample code to 2.6, your humble LWN Kernel Page author is producing a set of articles describing the changes which must be made. The articles are Kernel Page as they are written; they will also be collected here. With luck, this page will be a useful reference for those who must port drivers to the new kernel.

The creation of these articles is funded by LWN.net subscribers. If you find this material useful, please consider subscribing to LWN to help ensure that more of it gets written.

Except when otherwise specified, all of the articles below are written by LWN editor Jonathan Corbet. The date and kernel version attached to each article notes when the article was last updated.

Recent changes

The most recent changes to this series are:

  • (April 28, 2004) The Workqueue Interface updated to include create_singlethread_workqueue(), which was merged in 2.6.6.

  • (January 6, 2004) Supporting mmap() and Dealing with interrupts have been updated to reflect API changes in 2.6.1.

  • (November 25, 2003) The entire set of articles has been updated to reflect the 2.6.0-test10 kernel.

Getting started

Porting 'hello world' (February, 2003); which covers the changes required to update the simplest possible module to the 2.5 kernel.

Compiling external modules (November, 2003; 2.6.0-test9); how to build modules with the new module loader and kernel build scheme.

More module changes (November, 2003, 2.6.0-test9) covers other changes to the module loading subsystem, including module parameters, use count management, exporting symbols, and more.

Miscellaneous changes is a collection point for changes which are too small to justify their own article. Currently covered topics include kdev_t, designated initializers, and min() and max(). It was last updated on November 3, 2003 (2.6.0-test9).

Support interfaces

Char drivers and large dev_t (November 2003, 2.6.0-test9); registration and management of char drivers in the new, large dev_t environment.

The seq_file interface (September 2003; 2.6.0-test6); the easy way to implement virtual files correctly. A standalone example module is provided to demonstrate the use of this interface.

Low-level memory allocation (November, 2003; 2.6.0-test9); changes to functions for allocating chunks of memory and pages, and a description of the new mempool interface.

Per-CPU variables (November, 2003; 2.6.0-test9); the 2.6 interface for maintaining per-CPU data structures.

Timekeeping changes (November, 2003; 2.6.0-test9); changes to how the kernel manages time and time-related events.

The workqueue interface (April, 2004; 2.6.6-rc3); a description of the new deferred execution mechanism which replaces task queues (and bottom halves in general).

Creating virtual filesystems with libfs (November, 2003; 2.6.0-test9). This article, which looks at how a kernel module can create its own virtual filesystem, predates the driver porting series but fits in well with it.

DMA Changes (November, 2003, 2.6.0-test9); changes to the DMA support layer. There is also a quick reference page for the new generic DMA API.

Sleeping and mutual exclusion

Mutual exclusion with seqlocks (November, 2003, 2.6.0-test9); a description of how to use the seqlock (formerly frlock) capability which was merged into 2.5.60.

The preemptible kernel (November, 2003; 2.6.0-test9); a look at how kernel preemption affects driver code and what can be done to work safely in the preemptible environment.

Sleeping and waking up (November, 2003; 2.6.0-test9); new ways of putting processes to sleep with better performance and without race conditions.

Completion events (November, 2003; 2.6.0-test9); documentation for the completion event mechanism.

Using read-copy-update (November, 2003; 2.6.0-test9); working with the read-copy-update mutual exclusion scheme.

Advanced driver tasks

Dealing with interrupts (January, 2004; 2.6.1-rc2); interrupt handling changes which are visible to device drivers.

Supporting asynchronous I/O (November, 2003; 2.6.0-test9); how to write drivers which support the 2.6 asynchronous I/O interface.

Network drivers (November 2003, 2.6.0-test9); porting network drivers, with an emphasis on the new dynamic net_device allocation functions and NAPI support.

USB driver API changes (July 2003; 2.5.75); how USB drivers have changed in the 2.5 development series. This article was contributed by USB maintainer Greg Kroah-Hartman.

Block drivers

Block layer overview (November, 2003; 2.6.0-test9). The block layer has seen extensive changes in the 2.5 development series; this article gives an overview of what has been done while deferring the details for subsequent articles.

A simple block driver (November, 2003; 2.6.0-test9); this article presents the simplest possible block driver (a basic ramdisk implementation) with discussion of how the basic block interfaces have changed in 2.6. Full source to a working driver is included.

The gendisk interface (November, 2003; 2.6.0-test9); how to work with the new generic disk interface, which takes on a rather larger role in 2.6.

The BIO structure (November, 2003; 2.6.0-test9); the new low-level structure representing block I/O operations.

Request queues I (November, 2003; 2.6.0-test9); the basics of block request queues in 2.6, including request processing, request preparation control, and DMA support.

Request queues II (November, 2003, 2.6.0-test9); advanced request queue topics, including command preparation, tagged command queueing, and the "make request" mode of operation.

Memory management

Supporting mmap() (January, 2004 - 2.6.1-rc2); changes in how device drivers support the mmap() system call.

Zero-copy user-space access (November, 2003 - 2.6.0-test9); how to get direct-access to user space to perform zero-copy I/O. If you used the kiobuf interface for this purpose in 2.4, you'll want to look here for the 2.6 equivalent.

Atomic kmaps (November, 2003; 2.6.0-test9); quick access to high-memory via kmap_atomic().

Device model

A device model overview (November, 2003; 2.6.0-test10); an introductory look at the Linux device model and sysfs, with definitions of some commonly encountered terms.

The zen of kobjects (October, 2003; 2.6.0-test6); an attempt to demystify the kobject abstraction and its use in the kernel.

kobjects and sysfs (October, 2003; 2.6.0-test8); a description of the interaction between the kobject type and its representation in sysfs.

kobjects and hotplug events (October, 2003; 2.6.0-test6); an explanation of the kset hotplug operations and how they can be used to control how hotplug events are reported to user space. This article was written by Greg Kroah-Hartman.

Examining a kobject hierarchy (October, 2003; 2.6.0-test9); a visual exploration of the device model data structures behind /sys/block.

Device classes (November, 2003; 2.6.0-test10); how the device class mechanism works.


(Log in to post comments)

Porting device drivers to the 2.5 kernel
Posted Feb 12, 2003 1:55 UTC (Wed) by subscriber fdesloges [Link]

Wow!

This is highly valuable stuff. Are you certain you want to give this away
for free after only a few days ?

This alone would be a very good reason to subscribe. And as reference
stuff it will still be valuable many months down the road.

Maybe it could fit in a "available to non-subsciber 4 months later"
category ? Or make only a few articles available (and the index of course
to hook subscribers) ?

Whatever you do, thanks!

FD

Porting device drivers to the 2.5 kernel
Posted Feb 12, 2003 9:58 UTC (Wed) by subscriber KotH [Link]

I wouldnt do that. LWN has a very good reputation as information source
around the open source community. A "closed for all but subscribed ppl"
policy would surely destroy that reputation.

Yes, i know that LWN doesnt have as much subscribers as it should have :(
but this is IMHO not the right way to get more.

Porting device drivers to the 2.5 kernel
Posted Feb 12, 2003 11:00 UTC (Wed) by subscriber bruno [Link]

Do you work for nothing? Do you give all your time to other in exchange
of nothing? You can't pretend that other people do that, the people have
childrens, wives, mortgages... and work in exchange of money to pay their
bills. Sometimes you have a bussiness plan that lets you to give away
your work and get money from other sources, sometimes you need to put a
price or close the shop.

Porting device drivers to the 2.5 kernel
Posted Feb 12, 2003 14:14 UTC (Wed) by subscriber Webexcess [Link]

Do you work for nothing? Do you give all your time to other in exchange of nothing?

I think you're oversimplifying a bit. The excellent writing at lwn.net is both its product and its advertising. How will potential subscribers be enticed if they can't see what lwn.net has to offer?

Also, the target audience largely consists of enthusiasts, many of whom are students and/or live in parts of the world where american dollars are very expensive. These are the same people that helped to build Linux into what it is today -- are you suggesting that they should be excluded?

Porting device drivers to the 2.5 kernel
Posted Feb 12, 2003 15:27 UTC (Wed) by subscriber bruno [Link]

The excellent writing at lwn.net is only possible if there are someone that
works in it full time. I think is wonderfull if someone can (and want) to
work full time in something and give it away for nothing, but I don't think
that you can say to someone "You MUST give your work for free", at the end
of the day, with your work you have the right to make whatever you want:
Give if for free, sell, rent, lease or burn it, is your work and your
decision.

If KotH really thinks that is important that this information be free, he can
study the linux kernel, write a book and put it on the web for free, instead
of criticise the actitude of lwn.net

Porting device drivers to the 2.5 kernel
Posted Feb 12, 2003 17:17 UTC (Wed) by subscriber rknop [Link]

"You MUST give your work for free"... If KotH really thinks that is important that this information be free,

Be fair. That's not what KotH said. He said he thought it was in LWN.net's best interest to do what they've done, because of their good reputation in the community. He's not insisting that they must do what they've done, he's just congratulating them and saying he understands why they might think it's a good idea to do that.

-Rob

Re: Porting device drivers to the 2.5 kernel
Posted Feb 12, 2003 19:52 UTC (Wed) by subscriber Ross [Link]

Bruno,

I think you are mischaracterizing what other people are saying. Using the device driver documentation as an advertisement was only a suggestion. We all recognize that LWN can decide what to release and when to release it. You're point is also only a suggestion. If Jonathan felt he needed to say something, I'm sure he would. You don't need to speak for him.

Porting device drivers to the 2.5 kernel
Posted May 8, 2003 17:05 UTC (Thu) by guest LogicG8 [Link]

I would just like to say that the release of this material prompted
me to purchase a subscription. It is a delicate balance providing
open content and providing incentive to readers to subscribe. I think
that LWN has done a great job and will continue to do so in the future.

Releasing quality content for free has nabbed at least one
subscriber.

Porting device drivers to the 2.5 kernel
Posted Dec 14, 2004 14:06 UTC (Tue) by subscriber arafel [Link]

Make that two...

On whether this stuff should be free
Posted Feb 12, 2003 20:07 UTC (Wed) by subscriber corbet [Link]

Just as a response to all the comments here... I appreciate the input, and certainly do not feel criticized by any of the comments.

For what it's worth, I did consider keeping this material non-free for longer than the usual period. It is different from the usual news, and it has a slightly longer useful life. In the end, I decided against such a move; I would like these articles to be generally useful, and to serve as a contribution to the kernel project. Maintaining the same access policy also lets me fold some of the articles into the Kernel Page, which could use it - development news tends to slow down a lot during feature freezes.

So the driver porting articles go free after a week. We may yet do things differently for similar material in the future.

jon

On whether this stuff should be free
Posted Dec 24, 2003 15:19 UTC (Wed) by subscriber nhasan [Link]

How about releasing it as a book? It should provide additional revenue to LWN and give us a hard copy reference.

An idea that works elsewhere
Posted Feb 27, 2003 15:20 UTC (Thu) by guest materlik [Link]

You might think about adding a little, polite blurb asking for a small donation to the end of each article, similar to what tidbits (a free Macintosh newsletter) is doing with PayBits. Maybe one only visible to non-subscribers?
Their experiences so far have not been overwhelming, but there is some money being donated because of the constant reminders on the value of filtered, edited information.

Porting device drivers to the 2.5 kernel
Posted Feb 28, 2003 20:09 UTC (Fri) by subscriber vonbrand [Link]

I think this deserves a place in the head of the page (perhaps replacing Old Site or Weekly edition). It is not a "Recent feature" anymore...

One minor gripe is that the articles don't default to a printable page format (yes, I do promise to buy the next book of yours regardless ;-)

Porting device drivers to the 2.6 kernel
Posted Jun 14, 2004 22:31 UTC (Mon) by subscriber Marsclic [Link]

This is the material that made me subscribe to this site. Keep it coming Jonnathan!

Porting drivers from kernel 2.4 to kernel 2.6,where can I find the documents
Posted Oct 29, 2004 3:56 UTC (Fri) by guest dkotian [Link]

Porting drivers from kernel 2.4 to kernel 2.6,where can I find the documents

Porting drivers from kernel 2.4 to kernel 2.6,where can I find the documents
Posted Nov 8, 2004 18:49 UTC (Mon) by guest gXyZOd [Link]

I'm looking for some information too.
Seeing that devfs is obsolent I would have to port a module that implements a "Utime Calibration" (taken from the Kansas University Real Time patch) from the 2.4.18 to the 2.6.8/9 kernel.
Not using devfs any more in the 2.6 kernel the devfs_[register/unregister]_chrev functions are useless.

I'm a n00b and am trying hard to learn.

Thanks for any response.

Porting device drivers to the 2.6 kernel
Posted Nov 26, 2004 3:30 UTC (Fri) by guest prakash07 [Link]

I am using the function
alloc_chrdev_region(dev_t *dev,61,1,"prakash");
in module but while compilation it is giving the error.

***parse error before dev_t;

i also added the .
please any one help me .

char device drivers on the 2.6 kernel
Posted May 6, 2005 21:56 UTC (Fri) by guest prashy [Link]

I am new to Linux Kernel Programming. Trying to build a basic char driver (register, open, release, unregister). When I compile the source I get the following errors, (even on kernel - 2.4). I try to compile the char drivers provided with the source and even get errors and warnings with them, here is the error dump,

prcdd.c:6:1: warning: "__KERNEL__" redefined
prcdd.c:1:1: warning: this is the location of the previous definition
prcdd.c:7:1: warning: "MODULE" redefined
prcdd.c:1:1: warning: this is the location of the previous definition
In file included from /usr/include/linux/fs.h:23,
from prcdd.c:11:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in userland!
prcdd.c:12:25: asm/uaccess.h: No such file or directory
prcdd.c:17: warning: `struct file' declared inside parameter list
prcdd.c:17: warning: its scope is only this definition or declaration, which is probably not what you want
prcdd.c:17: warning: `struct inode' declared inside parameter list
prcdd.c:18: warning: `struct file' declared inside parameter list
prcdd.c:18: warning: `struct inode' declared inside parameter list
prcdd.c:26: variable `fops' has initializer but incomplete type
prcdd.c:27: unknown field `owner' specified in initializer
prcdd.c:27: warning: excess elements in struct initializer
prcdd.c:27: warning: (near initialization for `fops')
prcdd.c:28: unknown field `open' specified in initializer
prcdd.c:28: warning: excess elements in struct initializer
prcdd.c:28: warning: (near initialization for `fops')
prcdd.c:29: unknown field `release' specified in initializer
prcdd.c:29: warning: excess elements in struct initializer
prcdd.c:29: warning: (near initialization for `fops')
prcdd.c: In function `prcdd_init':
prcdd.c:34: warning: implicit declaration of function `register_chrdev'
prcdd.c:38: warning: implicit declaration of function `printk'
prcdd.c: In function `prcdd_exit':
prcdd.c:48: warning: implicit declaration of function `unregister_chrdev'
prcdd.c: At top level:
prcdd.c:55: warning: `struct file' declared inside parameter list
prcdd.c:55: warning: `struct inode' declared inside parameter list
prcdd.c:56: conflicting types for `prcdd_open'
prcdd.c:17: previous declaration of `prcdd_open'
prcdd.c: In function `prcdd_open':
prcdd.c:59: `EBUSY' undeclared (first use in this function)
prcdd.c:59: (Each undeclared identifier is reported only once
prcdd.c:59: for each function it appears in.)
prcdd.c:63: warning: implicit declaration of function `atomic_inc'
prcdd.c:63: union has no member named `usecount'
prcdd.c: At top level:
prcdd.c:67: warning: `struct file' declared inside parameter list
prcdd.c:67: warning: `struct inode' declared inside parameter list
prcdd.c:68: conflicting types for `prcdd_release'
prcdd.c:18: previous declaration of `prcdd_release'
prcdd.c: In function `prcdd_release':
prcdd.c:71: warning: implicit declaration of function `atomic_dec'
prcdd.c:71: union has no member named `usecount'
prcdd.c: At top level:
prcdd.c:26: storage size of `fops' isn't known

This is the source code,

#if defined(CONFIG_MODVERSIONS) && ! defined(MODVERSIONS)
#include
#define MODVERSIONS
#endif

#define _KERNEL_
#define MODULE

#include
#include
#include
#include

//static int module_init(void);
//static void module_exit(void);
static int prcdd_open(struct inode *,struct file *);
static int prcdd_release(struct inode *,struct file *);

#define SUCCESS 0
#define DEVICE_NAME "prcdd"

static int Major;
static int Device_open = 0;

static struct file_operations fops = {
.owner = THIS_MODULE,
.open = prcdd_open,
.release = prcdd_release,
};

static int prcdd_init(void)
{
Major = register_chrdev(0,DEVICE_NAME,&fops);
if (Major < 0)
{
printk("Registering the character device failed with %d \n",Major);
return Major;
}

printk("<1>The assigned major number is %d \n",Major);
return 0;
}

static void prcdd_exit(void)
{
int ret = unregister_chrdev(Major,DEVICE_NAME);
if (ret < 0)
{
printk("Error in unregister_chrdev: %d \n",ret);
}
}

static int prcdd_open(struct inode *inode, struct file *file)
{
if (Device_open)
{
return -EBUSY;
}
Device_open++;

MOD_INC_USE_COUNT;
return SUCCESS;
}

static int prcdd_release(struct inode *inode, struct file *file)
{
Device_open--;

MOD_DEC_USE_COUNT;
return 0;
}

module_init(prcdd_init);
module_exit(prcdd_exit);

Any pointers on how to proceed from here?

char device drivers on the 2.6 kernel
Posted Apr 23, 2007 4:15 UTC (Mon) by guest psh2001 [Link]

Hi,

Any one has any solutions for this ?
even i am facing the same issue ...

Thanks,
Shiv

char device drivers on the 2.6 kernel
Posted Jun 1, 2007 8:09 UTC (Fri) by guest hy71 [Link]

i am facing the same problem...
could anyone give some suggestion?

thanks a lot!

swearing in the linux kernel
Posted May 13, 2005 14:35 UTC (Fri) by guest tomek [Link]

graphs over swearing in the linux kernel: http://www.vidarholen.net/contents/wordcount/ Tom

Porting PCTel modem driver to the 2.6 kernel
Posted Jun 15, 2005 16:59 UTC (Wed) by guest DMXMusic [Link]

Here is our situation - we have a working 2.4 driver for the PCTel PCT789T chip/modem. I have been looking high and low for a 2.6 version of this driver, but nobody seems to have taken on the task of porting the driver. I'm wondering if anyone can give me a rough time estimate for porting this driver - (it's basically a serial port driver, the dsp code is in a proprietary lib file) - I have done a couple simple Unix / Linux drivers, and worked on windows display drivers for a couple years, although I have not worked on serial port drivers. Any help is very much appreciated!

Our company has something like 5000 of these modems on our devices in the field, and we need to support our customers.

Thanks - Phil Brooks, Philip.Brooks@DMXMusic.com

Porting modem drivers to the 2.6 kernel
Posted Aug 11, 2005 4:41 UTC (Thu) by guest dabenavidesd [Link]

Hi Phil.
A time ago, i tried to install a driver of my Intel 537 EP that is instaled on my ASUS board for AMD.
The driver was made for working on SuSE 9.1. However when trying to install in this OS, and compiling, following the specified steps, I've got 9 warnings.
The modem works perfectly under Windows XP (another company delivers the driver on CD besides the finished Intel chipset and other applications like “Classic Phone Tools” http://www.bvrp.com).
The driver is still hung in the Intel´s site, and this release supports 2.4.x and 2.6.x kernels.
Attached is my web site where is a historical record of the conversation between me and a support programmer from Intel Support Service; over all, we work in the makefile and correcting the files and dependencies of the used packages, although the trouble is still there.
Im interested in continue working about this kind of troubles. So let me know how can i help.
http://es.geocities.com/dabenavidesd/
email: dabenavidesd@unal.edu.co

Porting device drivers to the 2.6 kernel
Posted Aug 17, 2005 3:55 UTC (Wed) by guest johnlin [Link]

Hello,

I got a problem proting device driver from 2.4 to 2.6, i.e. the asm/smplocak.h seems not in 2.6 kernel/include/asm, so could anyone help ?

Thanks

John

Porting device drivers to the 2.6 kernel
Posted Mar 14, 2006 10:43 UTC (Tue) by guest Pype.Clicker [Link]

it looks like the "Big Kernel Lock" headers have been moved from to between 2.4 and 2.6 ... patching the #include directive did it for me, i guess it will do for you aswell.

Porting device drivers to the 2.6 kernel
Posted Jan 22, 2006 11:39 UTC (Sun) by guest LSM [Link]

This is the kind of stuff that made me subscribe to this community. Thanks Jonnathan!

LSM Networks Blog

Porting device drivers to the 2.6 kernel
Posted Feb 21, 2006 2:33 UTC (Tue) by guest York [Link]

Dear Jonnathan:
where are the differences between 2.4 and 2.6 about pci driver program?
How can I get the way to port a pci driver in 2.6?

Thank you!

Porting device drivers to the 2.6 kernel
Posted Feb 23, 2006 15:05 UTC (Thu) by guest agllno [Link]

Hi all,
I want a small information about interruptible_sleep_on .I want it to make compatible for kernel version 2.6 from 2.2.So What modification i have to do or any altenatives are there. Please reply and give some details
Thanks in advance
Agnello

Porting device drivers to the 2.6 kernel
Posted Mar 15, 2006 10:29 UTC (Wed) by guest vikramkg82 [Link]

hi

i am new to device driver can any body tell me how to access the device file...exactly i need to access the harddisk inforamation at block level..or else can u tell where i can get the information about this plz

Porting device drivers to the 2.6 kernel
Posted May 3, 2006 17:37 UTC (Wed) by subscriber vonbrand [Link]

Some random comments...

  • Have you thought of updating the articles (perhaps letting others do the (re)writing)? Some have comments indicating that updates are in order.
  • What about a cleanup of the comments? Most ones I see here aren't really about the subject matter, and are definitely useless for "longer term reference"...
Many thanks!

Compile 2.4 Kernel

http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/How_to_Compile_2_6_kernel_for_RedHat_9_8

STEP 1:

Download the latest version of the kernel and any patches.
This documentation is done with linux-2.6.3, but look for
later versions.
http://www.kernel.org/pub/linux/kernel/v2.6/

Also take a look at
http://www.codemonkey.org.uk/post-halloween-2.5.txt This has
some useful hints on some of the changes needed.



STEP 2:

Download the latest version of module-init-tools
"module-init-tools-3.0.tar.gz" and
"modutils-2.4.21-23.src.rpm"

http://www.kernel.org/pub/linux/kern...ols-3.0.tar.gz
http://www.kernel.org/pub/linux/kern....21-23.src.rpm



STEP 3:

Install module-init-tools. This will replace depmod
[/sbin/depmod] and other tools.

tar -zxvf module-init-tools-3.0.tar.gz
cd module-init-tools-3.0
./configure --prefix=/sbin
make
make install
./generate-modprobe.conf /etc/modprobe.conf



STEP 4:

Install modutils-2.4.21-23.src.rpm. You may get warnings
about user rusty and group rusty not existing. Also, yes,
you'll have to force the install. If you don't do these steps
for both Redhat 9 and Redhat 8, you'll have problems with the
make modules_install.

rpm -i modutils-2.4.21-23.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/modutils.spec
rpm -Fi /usr/src/redhat/RPMS/i386/modutils-2.4.21-23.i386.rpm



STEP 5:

Install and configure the kernel. Do NOT use the /usr/src/linux
area! Reference the README. I put my files in /home/src/kernel/

gunzip linux-2.6.3.tar.gz tar -xvf linux-2.6.3.tar cd
linux-2.6.3

If you have patches install these now:

bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1



STEP 6:

Copy the appropriate /usr/src/linux-2.4/configs
[kernel-2.4.20-i686.config, kernel-2.4.20-i686-smp.config]
to .config in whatever directory you are installing. In my
case it's /home/src/kernel/linux-2.6.3

cp /usr/src/linux-2.4/configs/kernel-2.4.20-i686.config \
/home/src/kernel/linux-2.6.3/.config

If you don't have the source configs, you can download them
from here:

https://sourceforge.net/project/show...kage_id=109944

I've also included a file config2.6-chirico which was a 2.6
version for some of my systems. This isn't a bad reference if
you run into trouble.



STEP 7:

Assuming you copied the appropriate kernel-2.4 config to
.config, run the following which will run through necessary
questions for the 2.6 kernel. Or, you might want to use the
config2.6-chirico...this has already been run through make
oldconfig on my system, and I've answered the necessary questions
for a general system.

make oldconfig



STEP 8:

This is very important. Make sure you're .config has the
following in it CONFIG_EXT3_FS=y You'll run into the following
error if you leave this =m instead of =y:

pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed

This is because Redhat 9.0 and 8.0 use the ext3 filesystem
for /boot ...



STEP 9:

Edit the Makefile and add changes to the Extraversion is needed.
Patches will update these values as well.

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 3
EXTRAVERSION = -skim-ch6



STEP 10:

make bzImage



STEP 11:

make modules



STEP 12:

make modules_install



STEP 13:

make install

If you come across errors here, what version of "depmod" is
being picked up in your path?

Also, if you get a module not found, say the following:
No module aic7xxx found for kernel 2.6.x
Then, in /lib/modules/2.6.x/kernel/drivers/scsi/aic7xxx/
cp aic7xxx.ko aic7xxx.o

insmod should look for aic7xxx.ko ;but , it looks for aic7xxx.o

If you still have trouble, make the following change in the
.config
CONFIG_BLK_DEV_SD=y
and go back to STEP 10.

You also may want to ref
kernel-2.6.3-i686-smp-chirico-aic7xxx.config
in
http://prdownloads.sourceforge.net/s...ar.gz?download



STEP 14:

mkdir /sys



STEP 15:

/etc/rc.sysinit needs to be modified. Look for the following
line:

action $"Mounting proc filesystem: " mount -n -t proc /proc /proc

and after this line enter the following:

action $"Mounting sysfs filesystem: " mount -t sysfs none /sys

Here's my /etc/rc.sysinit for reference:

http://prdownloads.sourceforge.net/s...t.txt?download



Be very careful at this step. Backup the /etc/rc.sysinit file.

Thomer [http://thomer.com/linux/migrate-to-2.6.html ] also added
changes to /etc/fstab. I only had to do STEP 16 below.



STEP 16:

Add the following to /etc/fstab for usb support.

/proc/bus/usb /proc/bus/usb usbdevfs defaults 0 0



STEP 17 (CHECKING EVERYTHING):

Check the following:

a. The new image file should be installed on boot and there
should be sym link to it. My latest kernel is 2.6.3-skim-ch6,
and I got the "-skim-ch6" from the values I put in the Makefile,
so I see the following:

/boot
vmlinuz -> vmlinuz-2.6.3-skim-ch6
System.map -> System.map-2.6.3-skim-ch6

/boot/grub/grub.conf Should have been automatically
updated from make.

In /boot/grub/grub.conf change "default=0" to boot
with the new kernel. Here's an example of my
grub.conf:


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/hda6
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Linux (2.6.3-skim-ch6)
root (hd0,2)
kernel /vmlinuz-2.6.3-skim-ch6 ro root=LABEL=/
initrd /initrd-2.6.3-skim-ch6.img


b. The directory /sys exists

c. You added the mount command for sys in /etc/rc.sysinit

d. CONFIG_EXT3_FS=y was used in the .config

e. Run /sbin/lsmod or cat /proc/modules to make
sure a 2.4 kernel module wasn't forgotten. Also
look at "$cat /proc/iomem"



STEP 18 (DEVELOP YOUR OWN 2.6 MODULES):

You're done with the 2.6 build. So learn how to develop
2.6 kernel modules. First, checkout the following article

http://lwn.net/Articles/driver-porting/

Then, take a look at the following sample code, which shows how
to create /proc entries for communicating with the kernel and writing
out to any available tty device.

http://prdownloads.sourceforge.net/s...ar.gz?download




REFERENCES:

http://www.codemonkey.org.uk/post-halloween-2.5.txt
http://kerneltrap.org/node/view/799
http://thomer.com/linux/migrate-to-2.6.html
http://www.kernel.org/

http://bugzilla.kernel.org/
http://groups.google.com/groups?hl=e...p=linux.kernel
http://linuxdevices.com/articles/AT3855888078.html

http://prdownloads.sourceforge.net/s...6.txt?download
http://prdownloads.sourceforge.net/s...t.txt?download
http://prdownloads.sourceforge.net/s...ar.gz?download
https://sourceforge.net/forum/forum.php?forum_id=353715

http://www.redhat.com/software/rhel/kernel26/
http://www.tldp.org/HOWTO/KernelAnalysis-HOWTO.html
http://www-124.ibm.com/linux/projects/?topic_id=2

KERNEL DRIVER DEVELOPMENT IN 2.6:

Excellent (series of articles):
http://lwn.net/Articles/driver-porting/

Here's my sample program:
http://prdownloads.sourceforge.net/c...ar.gz?download

Good but dated for 2.4 kernel:
http://www.oreilly.com/catalog/linuxdrive2/

http://linuxdevices.com/articles/AT4389927951.html
http://linuxdevices.com/articles/AT5793467888.html

摄入灵魂的终极摄影(Satoshi Matsuyama) - 文学城

大师Satoshi Matsuyama摄影展,

他的每一张作品都是摄影的精品,

如果说摄影拍摄的是美人和美景,

那我只能说他的摄影已经到了非凡的境界,

他摄出的是灵魂。。。。






































Thursday, June 14, 2007

强化摄影技能 初学摄影全程训练项目_Meteor's Blog_摄影博客

训练1、全景深练习
  被摄体:一般风景、花卉、城市建筑等冲击力较强的景物。
  要 求:画面全部实焦。
  建 议:首先使用广角镜头:24MM—35MM拍摄, 光 圈:F11—16,光圈优先AE模式。   

训练2、单体对焦练习
  要 求:只把焦点对在主要被摄体上,浅景深。
  建 议:中望远镜头:85MM以上,光圈F5.6或更大。光圈优先AE模式。

训练3、定格练习
  被摄体:体育运动项目、行走着的汽车、火车,流动着的水,瀑布等。
  要 求:将激烈运动着的被摄体的瞬间动作或瞬间表情记录下来。
  建 议:高速快门1/1000秒以上、快门速度优先AE模式。

训练4、动感练习
  被摄体:体育运动项目、动态的人、流动着的水,瀑布等。
  要 求: 运动员和动态人的身体的一部分虚化或动体实背景虚。流动着的水,瀑布等有流线感。
  建 议:慢速快门1/15秒-11秒。先从1/30秒开始练习,然后1/15、1/8、1/4、1/2、1秒逐段练习。使用三脚架。

训练5、取景练习
  要 求:突出主题,画面简练,能传达出被摄场景的气氛。 *此项训练是构图训练的基础
  建 议:望远镜头,大光圈。

训练6、特写练习
  被摄体:花卉、静物、昆虫等。
  要 求:被摄体占画面的比例尽量大,突出被摄体的形状和有趣的部分,高清晰度。
  建 议:使用微距镜头或微距功能及近摄接圈,最短摄影距离,镜头与被摄体保持平行。使用三脚架及快门线。

训练7、各种焦距镜头(镜头各焦段)的使用练习
  利用各种焦距镜头(镜头各焦段)进行拍摄练习,借此了解镜头各个焦距的特点,理解画角及透视关系,活用各焦距段的不同景深。
  标准镜头: 焦距50MM左右的镜头——极其自然,没有夸张。
  广角镜头: 焦距35MM以下的镜头——强调远近感。
  中望远镜头:焦距为85MM~135MM的镜头——与人眼最接近的透视(远近)感,能正确体现被摄体的形状,多用于人像摄影。
  望远镜头:焦距为200MM以上的镜头——很少远近感,有压缩效果。(易抖动,尽量使用三脚架)

练习8、横、纵位构图
  被摄体:景物、山河、建筑、人物等.
  要 求:用横位构图表现稳定感和宽阔感,用纵位构图表现纵深 感和高度感,画面不能有无用的空间.
  建 议:1、对同一被摄体分别用横、纵位构图法拍摄,比较作品的不同感受.
     2、横位构图表现安定感时使用标准焦点以上的镜头,表现宽阔感时使用广角镜头.
     3、纵位构图表现纵深感与高度感时使用广角镜头,注意画面中近景与远景的位置配置.
     4、构图时应特别注意水平与垂直,使用三脚架

练习9、三角形构图
  被摄体:三角形或类似三角形的景物,建筑,人物造型等.
  要 求: 利用三角形在画面中不同的位置配置,表现稳定感、跃动感、高度感和宽阔感.
  建 议:1、画面中有容易识别的三角形造型,三角形构成的复数物体焦点要实,要有平衡感.
     2、高楼大厦和道路等高大细长的景物时使用20MM以下的广角镜头.
     3、使用景深预测功能.

练习10、对称形构图
  被摄体:所有具有对称构图性质的景物、人物造型、建筑等.
  要 求:利用上下左右对称构图,表现稳定感和超现实意境.
  建 议:1、选择优美的对称形,对称形的两边焦点都要实,每个对称形表现要明显.
     2、尽量使用标准焦点以上的镜头,使用广角镜头时要注意相机与被摄体保持平行.
     3、拍摄岸边与水中的对称构图景物时使用偏光镜,
     4、求全景深不得不用小光圈时使用三脚架.

练习11、垂直、水平构图
  被摄体:风景、建筑等.
  要 求:画面中表现由多条平行或垂直线条构成的单纯美.
  建 议:画面构成的线条要保持水平或垂直,线条要美, 水平或垂直线条造型要布满全画面. 使用三脚架

练习12、S形、斜线构图
  被摄物:具有S形或斜线构成的道路、河流、山峦、都市内的桥梁和道路等.
  要 求:用S形表现纵深感,用斜线表现外延的广阔感和动感.S形要通达画面的两端,中途断了的话前面要有空间构成.
  建 议:S形及斜线的配置要有平衡感,要仔细感觉作品是否有纵深感和广阔感,被摄体是否清晰. 主题要突出.

练习13、黄金分割法构图
  被摄提示:任何均可.
  要 求:被表现的主体要处在分割点、线上或附近,构图要平衡,被摄体要突出,画面中不能有多余的部分存在。
  建 议:首先按自己的想法构图,然后再活用黄金分割法.

第三单元:用光训练[1]
练习14、昼间闪光灯曝光补偿
  被摄体:人物、花卉、宠物、小范围自然景色、静物等近距离小范围景物。
  要求:当以上被摄体处于逆光、侧逆光并周围光线强于被摄体时或被摄体处于昼间阴暗处时使用。
  建议:1、用闪光灯同步速度测光(平均测光)取得光圈值,然后用闪光灯的指数除以光圈值得到拍摄距离,就能得到曝光准确的照片。
  例如:相机的闪光同步是1/125秒,用相机的自动测光得到的F值16,闪光灯的指数(GN)是40,即40/16(F)=2.5M,这时的拍摄距离为2.5米。
     2、已知闪光指数(GN)和距离求光圈(F)时用闪光灯指数除以距离求得光圈(F)。 即:GN/距离=F。

练习15、利用闪光灯体现作品的立体感
  被摄体:人物、花卉、、宠物、静物等。
  要求:使用外置闪光灯并利用连线使闪光灯离开相机,从斜上方或背后投光制造立体感,也可以投到天花板或利用反光板制造折射的柔光,具体投光方法与方向按自己意图具体安排。但是要尽量避免重阴影。
  建 议:可能的情况下尽量尝试各种投光方式及曝光补偿所制造出来的立体感觉。

练习16、室内及夜晚灯光摄影
  被摄体:室内灯光下的集会以及城市灯光夜景等。
  要求:利用色温在室内及夜灯下制造肉眼见不到的独特(泛红)氛围。
  建议:画面内的光线布置尽量均匀,镜头附近最好没有强光源并不能有强光射进镜头,拍静物时使用三脚架,抓拍时最好使用ISO400的胶卷。如果希望得到忠实于原色的作品,使用80A滤镜矫正色温。曝光不能有过。

练习17、朝阳、夕阳、夜景
  被摄体:朝阳、夕阳下的山峦、海岸线、自然风光及夜景。
  要求:要充分体现朝夕的氛围,再现朝夕夜景的绚丽景色,不能有多余的物体进入画面,最好没有晕光。
  建议:使用手动,基本上光圈为F8~11左右,AE光圈优先,远景时焦点调到无限远,10M以内对点光源等最容易看清楚的物体上对蕉,使用三脚架,可以考虑多次曝光。

练习18、白色物体
  被摄体:雪景、白色沙滩、白色花卉等白色物体。
  要求:清晰再现白色物体的质感与色调。
  建议:根据实测曝光量适当曝光补偿,补偿量根据白色物体占画面的比例和你要表现作品的意图一般为0.5~1.5EV之间,画面中黑白物体相间时根据各占比例调整。

第四单元:用光训练[2]
练习19、逆光(透射光)的运用
  被摄体:光线从背后照射的人物、风景、花卉、静物及抓拍等.
  要 求:充分利用逆光的特点制造透明感和立体感.注意被摄体与背景的亮度平衡及不能有创作意图以外的光晕产生.
  建 议:使用曝光补偿以及反光板. 曝光补偿量有+0.5、+1.0、+1.5、+2.0EV等,补偿越大,被摄主体越亮,如果把握不好曝光补偿量,可以分段补偿各拍一张以上以保证拍摄成功。

练习20、侧光的运用
  被摄体:与此种光线有关的人物、风景、花卉、植物、宠物以及抓拍.
  要 求:充分活用阴影的效果,使画面的氛围符合自己的拍摄意图,通过练习提高对光的敏感性.
  建 议:拍摄时从顺光、侧光、斜侧光、半逆光、逆光的顺序去观察被摄体,并注意侧光与逆光所制造出的物体立体感之差别.如利用强侧光可塑造男人的刚毅和弱侧光可营造女人的温柔等.使用遮光罩。

练习21、林中点光与泻光的运用
  被摄体:具有泻光特点的林中、阴天下的风景如山峦、江和湖海的水面等.
  要 求:充分利用点、泻光的特点营造出印象深刻和感动人的氛围.
  建 议:注意光比范围及曝光量的掌握,明暗差要适当,用点测光方式测得明处与暗处的曝光量后取中间值进行最后的曝光。

练习22、极端曝光的应用
  被摄体:想要高调表现(阴影淡的)或低调表现(反差大的)的一切被摄体材.
  要 求:摄影意图以及主题要鲜明,要考虑采用高调或低调的必要性,被摄体的所具有的氛围要协调.
  建 议:高调的曝光补偿从0~+2.0,低调的曝光补偿从0~-2.0,通过分段曝光,掌握在各种条件下的曝光补偿所带来的效果。

练习23、光的轨迹
  被摄体:夜间流动的车、船、星空、焰火等.
  要 求:流畅地表现光的流动,光的流线色彩、形状、大小与周围的气氛要协调, 曝光要适当.
  建 议:利用平均测光与中央部分重点测光模式。也可以把光圈设定为F4或F5.6, 曝光为30秒至2分钟(可用B门)。焰火一般使用ISO100胶片,光圈在F5.6~F11之间.星空的曝光时间最长可到1~2小时。以上均使三脚架。

练习24、有灯光照明的物体
  被摄体:都市内夜间被灯光照亮的建筑以及植物等.
  要 求:取景角度要体现被摄体的魅力,选择能够充分表现气氛的曝光,画面中主体的所占比例要适当。
  建 议:使用三脚架、快门线,使用手动模式,B门或T门,使用曝光补偿+0.5—1.5EV。注意构图时画面中最亮部分与最暗部分,避免亮度相差悬殊,长时间曝光时注意倒易失律问题。使用广角镜头。

第五单元:强调色彩的训练
练习25、26、27、28、29、30
  分别以红色、蓝色、黄色、绿色、白色、黑色为主要特征的被摄体做表现主题的练习。
  被摄体:具有以上颜色的各类物体及颜色着装的人物、花卉等。
  要 求:要表现出以上个种颜色的鲜明特征,把握好色调、明亮度、饱和度这色彩的三要素。
  建 议:注意冷暖色的表现,可能的话使用滤色镜,使用包围式摄影法体验曝光补偿对色彩表现的作于用。

练习31、表现水的透明感
  被摄体:与水有关的任何物体。
  要 求:在表现水透明感的同时注意作品的整体表现。
  建 议:注意水面的光反射,使用PL镜,使用是旋转PL镜找到最佳表现。

练习32、色彩对比
  被摄体:各种颜色掺杂形成对比的田野、公园、建筑群等。
  要 求:利用色彩对比增强作品的感染力。
  建 议:不要使太多的色彩进入画面,形成对比色彩的亮度差越大对比度越强,明亮色与形成对比的暗色容易醒目,同一颜色的实焦点处与虚焦点处可以形成对比。

练习33、黑白摄影
  被摄体:任何物体、人物等。
  要 求:主题与背景的关系性,理解黑白摄影作品的特性。
  建 议:有必要了解彩色变成黑白后的具体变化,既把红色当做浓黑、黄色当做灰色考虑等,并了解与灰阶的关系。

练习34、单色调的表现
  被摄体:大自然中的群生植物,大面积单色花卉,色调统一的室内房厅等。
  要 求:有效使用统一的色调,构图平衡,充分掌握色彩的浓淡度。
  建 议:注意色彩的饱和度,使画面内的色彩表现有张有弛,使用色温滤镜。

第六单元:表现动感与感情的训练
练习35、动感的表现
  被摄体:体育运动、动物、纪念活动、花草、河流等。
  要 求:充分记录并表现运动的物体或人,表现出运动着的力量感和动态美,合理构图,掌握适合被摄场景的快门和按快门的时机。
  建 议:如果条件允许,尽量使用快门优先模式,定格高速运动时使用快门速度为1/500-1/1000秒,表现流动感时使用1/15-1/4秒,追拍时可使用1/15或1/30秒。

练习36、临场感的表现
  被摄体:火灾及事故现场,祭祀活动,仪式,自然气象状况等。
  要 求:尽量表现临场感,使人身临其境。即使是较平凡的被摄体,也要利用技术与器材制造出临场感。
  建 议:尽量接近被摄体使用超广角或望远镜头,光圈使用F11、F16、F22求大景深。表现自然气象状况如台风、大雨、雾、急流时使用三脚架,快门1/8、1/4、1/2秒优先,并可使用包围式拍摄法。

练习37、寂静感的表现
  被摄体:自然风光。
  要 求:摄影者自身要宁静安稳,选择最佳的拍摄时间和天气,选择稳定简洁且容易传达静感的构图方式。
  建 议:拍摄时间最好在黎明、傍晚、明月夜、雨天、雾、雪天等。选择对称、三角形等增加寂静感,构图要横平竖直,不能有倾斜以强调集中感和稳定感。使用三脚架。

练习38、感情的表现
  被摄体:人、动物的脸部特写与身体(动作的瞬间抓拍)。
  要 求:掌握最佳快门时机,做到与被摄人或动物心感相通,除脸部外也要注意其他肢体的表现与主题相吻合,注意构图的各个细节。
  建 议:先从身边的人特别是小孩和宠物开始练习,平时多多注意他们(它们)的喜怒哀乐,并找出有趣的特点,然后利用望远镜头在被摄人或动物不注意的时候抓拍。开始练习时尽量利用自动模式

Thursday, June 7, 2007

专家:咖啡一日两杯 罹患肝癌的风险降43% - 文学城

根据“肠胃病学”期刊刊出的研究报告,喝咖啡似乎能降低罹患肝癌的风险,每天喝两杯可使风险降低百分之四十三。

  瑞典斯德哥尔摩卡洛林斯卡研究所的苏珊娜.拉森及艾丽西雅.沃克两位博士在该刊撰文说:“咖啡对肝功能及肝脏疾病的潜在好处,相关资料过去廿年来不断增加。”许多研究发现,喝咖啡和肝酵素值呈反向关系。肝酵素值显示慢性肝病及肝硬化的风险。

  研究人员因此大规模分析已发表的传染病学研究报告,观察喝咖啡和肝癌风险之间的关系。他们所分析的报告,包括涉及两千两百六十名肝癌患者及廿三万九千一百四十六名对照组的十一项研究。这些报告都发现喝咖啡和肝癌风险呈反向关系,且在六项研究中具有统计学意义。

  研究人员发现,每天喝两杯咖啡,罹患肝癌的风险降低百分之四十三。

  拉森及沃克指出,喝咖啡对肝癌防治有保护性效果,这在生物学上是似乎可信的说法。他们表示,咖啡含有大量绿原酸等抗氧化剂,能对抗氧化压力并抑制致癌原的形成。此外,动物实验研究也明确显示,咖啡以及绿原酸对肝癌有抑制效果

Wednesday, June 6, 2007

十大科学谜题本世纪有望解开 - 文学城

生命从何而来?我们为什么会死?

  生命从何时开 始?受精卵如何变成人?为什么我们需要睡眠?冰河时代是如何出现的?为什么我们会死亡?科学已经有了飞跃式发展,但直到今天,我们仍有许多重要的难题没有 找到答案。2月号《连线》杂志为我们挑选了10个目前仍然找不到答案的科学问题,以及科学家在这些领域的探索和发现。科学家相信,在21世纪这些问题也许 有望破解。

  1.时间是一种幻觉么?

  柏拉图认为时间是持续不断的,伽利略对这种观念表示怀疑,并计算出如何用图表 进行表示,所以他能够在物理学领域做出重要的贡献。艾伯特·爱因斯坦说时间只是另一种尺度,是除了上下、左右、前后之外的第四维。爱因斯坦说,我们对于时 间的理解是基于它与环境的关系。古怪之处在于,你行进的越快,时间就过的越慢。他的理论能够做出最根本的解释:过去、现在和将来仅仅是想象构成的,任何事 都是由大脑创立的,并不会立即发生。

  爱因斯坦统一的时空概念理论上行得通,但实际却很难办到。时间作为第四维,不像其他维那样———其中一个原因,我们只能沿着时间轴朝一个方向走。

  2.受精卵如何变成人?

   想象一下,你将1英寸宽的黑色方块放在一块空地上,突然这个方块开始自我复制,1变2,2变4,4变8,8变16……这些增殖扩散的方块开始形成一些建 筑———围栏、拱门、墙壁、管道等。一些方块变成了电线、聚氯乙烯管道、钢筋建材、木头柱子,一些变成了墙板、镶板面、地毯和玻璃窗。电线开始自动连接成 一张复杂无边的网络。最后,一幢100层高的摩天大楼拔地而起。

  这就是受精卵变成人的一个形象比喻,但是,小方块怎么知道如何建造大 楼呢?细胞怎么知道如何造人(或哺乳动物)呢?生物学家过去认为细胞的蛋白质以某种方式携带着造人的说明书,但现在看来,蛋白质更像建造人体大厦的砖砖瓦 瓦,或是没有任何建造计划的泥瓦匠,不像携带着建造图纸的设计师。如何形成组织器官的方法一定被写在细胞的DNA上,但是还没有人知道如何将这些信息读取 出来。




  3.为什么我们需要睡眠?

  “如果你偷懒打瞌睡,你就会失去很多”,这是一个容易记住的习语,但是如果生命中没有睡眠的话,将是一件十分恐怖的事情。所有的哺乳动物都需要睡觉,如果剥夺睡眠,它们将会很快死去,比禁食死得更快。这是为什么呢?没有人知道答案。

   显而易见,睡眠可以使身体得到休息,但是看电视不是也可以使身体得到休息么?看来这不能解释睡眠的必要性。一种主要的理论认为,我们清醒的时候,大脑中 会不断产生某种致命的物质,越积越多,只有睡眠才能够将它们打扫干净;或者也能这么解释,大脑中有某种生存必须的物质,清醒时会逐渐被消耗掉,只有睡眠才 能补充这种物质。这么解释的话,睡眠就有意义了。以第一种解释来分析,夜间,大脑进入休息状态,逐渐恢复能量,进入慢波睡眠状态。这时,大脑没有什么负 担,可以集中进行垃圾清理工作。


< language="java">
4.为什么安慰剂会起作用?

   托·韦格是哥伦比亚大学神经科学家,为了研究安慰剂的功效(现代医学最为神秘的一种现象),他用短促的电脉冲对实验者进行刺激。最近的一次实验中,韦格 及其同事用刺激的方法对腕关节进行了24项测试。研究员将一种惰性奶油涂于实验者手腕上,告诉他们里面含有止痛剂,当科学家发出下一组脉冲时,8项测试结 果表明疼痛得到显著减少。平淡无奇的奶油就可以使强烈的电刺激效果变得缓和许多,那安慰剂作为现代医学最好的药物,又是怎么产生作用的呢?研究表明,在对 因高血压和帕金森病引起的精神不振病人的实验中,30%到40%的病人在服用了假的安慰剂后称感觉良好。假安慰剂都能产生如此神效,真是另人难以相信。

   最近一次研究,休斯敦退役军人医疗中心的医生们对一组患有关节炎的病人做了膝关节内窥镜手术,需要削去一些膝盖骨并去除膝关节积水;另一组假装做膝盖并 进行包扎。结果疼痛报告显示结果一样。霍华德·波迪是得克萨斯州大学医学院的教授,并发表过相关方面的著作,他说:“据我看,安慰剂虽然不能起死回生,但 大量的实验表明,安慰剂至少可以在一定程度上起作用。”

  5.森林是减缓还是加速全球变暖的速度?

  每个人都知道森 林有助于环境的改善。树木在生长的过程中会吸收导致全球变暖的罪魁祸首二氧化碳,树木越大,数量越多其吸收二 氧化碳的数量也就越多。所以森林是 防止全球变暖的一个很好的调节剂。但尽管植物在大量吸收二氧化碳,但地球仍在不断升温。于是产生了这样一个悖论,未来,森林并不能减缓气候的变化,但随着 森林不断遭受毁坏,全球变暖形式将变得更为严峻。




  我们不知道以后将会怎样,因为我们对森林本身了解的太少。科学家估计,在所有物种中,有一半的物种生活于森林的这个三维迷宫的树冠层,其中的绝大部分在我们的视线之外。实际上没有说清楚在地球的任何一个地方,指定任何一个高度的1立方米的树冠层中生活有哪些物种。

   佛罗里达州新学院的树冠科学家马格瑞特·罗曼说:“在你至少知道森林中生活有哪些物种后,你才能有可能知道更多有关森林的一般性问题。这不仅仅是给它们 命名的问题。我们需要知道哪些是常见物种,哪些是稀有物种,这些物种在做什么,在弄清楚这些后我们才能进入下一阶段的研究,弄清森林和地球气候之间的交互 关系。”

  6.生命从何而来?

  物竞天择,适者生存,自然选择学说解释了生物体为了适应环境的改变,是如何进化来 而的。但达尔文的理论却不能解释第一个生物体是如何产生的,这在他看来是一个深深的谜团。是死气沉沉的,没有任何生命迹象的化合物最初创造了生命么?没有 人知道。第一个生命体是如何被装配起来的呢?大自然甚至连一点点微小的暗示都没有给出。

  随着时间的流逝,这个谜团越藏越深。毕竟,如 果原始的自然条件就可以创造生命的话,那么如今先进的实验室环境应该也能,或者应该非常容易地创造出生命,但是迄今为止所有的实验都以失败告终。国际殊荣 诺贝尔奖和来自国际基因工程的100万美元的奖励正在等待研究员在实验室环境下创造生命,但至今仍无人问津。

  一些研究人员认为,早期的地球环境存在某种神秘的物质,可以将化合物变成生命,但现在这种物质已经永远的消失了。也有一些研究员提出了与RNA有关的解释,一些含有RNA的物质先形成,再以其为模板制造DNA,但这不能解释第一个RNA是哪里来的。

  是上帝或其他高等生物创造了生命么?我们起源于另外的星球,是被外星人运到地球的么?除非生命起源的问题完全被搞清楚,不然这些问题很难得到解答。




  7.冰河时代是如何出现的?

   科学家称,小规模的冰河时期每2—4万年发生一次,大规模的每10万年左右发生一次。但他们并不知道其中原因。现行的1920年由塞尔维亚工程师米兰柯 维奇提出的理论认为,地球轨道的不规则性改变了它所吸收能量的多少,导致地球突然冷却。虽然这个理论与短期冰河期发生的时间相吻合,但仍旧存在一个很大的 不足。在过去的数十年中,研究表明地球轨道的不规则性对地球所吸收太阳能的影响只占其中的1%或更少,这个微小的影响不可能使地球的气候产生重大突变。密 歇根大学的地质和气候学家亨利·伯拉克说:“令人不解的是,是什么在扮演着放大这一作用的角色,是什么以一小数量的太阳能的变化产生了巨大的冰河作用?”

   对冰层和海床岩石的研究表明,温度的升降与温室气体的浓度密切相关。但这是一个鸡和鸡蛋的问题。二氧化碳含量的增多和减少是气候变化的原因还是气候变化 的结果?如果是气候变化的原因,是什么导致了这种变化?如果能弄清这一点,就可大大帮助我们搞清目前全球变暖问题以及如何解决这一问题。但正如俄亥俄州的 地质学家马修·萨兹曼所指出的那样,“我们需要知道温室气体在史前时代波动的原因,但我们并不知道这一点。”

< language="java">

8.为什么一些疾病会流行起来?

   一种流行性疾病———全国性暴发的疾病———实际上只是一种病原体鸿运当头的外在表现。毕竟细菌想要我们人类所想要的一切。细菌世界的成功意味着要使许 许多多的人受到它的感染,它们不断生殖,然后使更多人受到感染。细菌如何实现感染的效率取决于它们是怎样工作以及它们的攻击对象———我们人类———抵抗 能力如何。例如,HIV病毒喜欢(性关系)滥交,却又装正经的人群,人类喜欢性交,但却不喜欢谈论安全套。另一方面,那些性滥交的人却不会受到埃伯拉病毒 的感染。所以文化的改变就像是乘坐喷气式飞机旅行,会使一些人 群更容易受到某种之前所含有的疾病的攻击。

  细菌中的变化,比如说如果禽流感病毒H5N1从人类基因中获得正确的基因就好像菠菜之于大力水手。但是没有人知道如何预测何时那些细菌会在人群中暴发,所以不要忘记经常洗手。




  9.为什么我们会死亡?

   当物理学家被问到事物为何死亡这种问题时,他们会毫不犹豫的回答说这符合热力学第二定律。任何事物无论它是矿物质、植物或动物,也不管它是一辆凌志汽 车、礼冠上的一个贝壳还是细胞壁上的一个蛋白质分子最终都会分解消亡。这种现象发生在人类身上就是使人变老,这也是生物学家的一个研究课题。人变老的原因 可能因为DNA遭到了自由基的损害,也可能是因为染色体端粒发生萎缩。就像科学家所称的那样,染色体端粒会随着每次细胞分裂而变小。当染色体缩小到一定长 度,细胞就会开始凋衰甚至死亡。

  但是若想获得生命何时终结的最佳解释,我们还要求助于生态学家,但他们也只是有一种粗略地计算寿命的 办法。基本上说,物种的体形越大,它们体内的能量转换就会越慢,新陈代谢的速率就会越低,而生命也会越长。动物的新陈代谢速度很快,也可以很慢。亚利桑那 州立大学的布瑞恩·安奎斯特教授说:“如果你捡起过一只小老鼠的话,就会发现它的身体晃动得很厉害,而且它的心脏跳得也很快。蓝鲸的心脏就像一个缓慢的音 乐节拍器,跳动的声音就像教堂钟声响起的时候那样慢。”

  然而二者生命过程中心脏的跳动总次数却是差不多,都是1亿次,但是老鼠用两年 时间就完成了这个跳动任务,而蓝鲸却要用大约80年的时间。安奎斯特说:“有一种不变的东西:所有生物的能量生命指数几乎都是相同的。”虽然很多动物的体 形比人类要大,但是寿命比我们长的动物却很少。为什么重量较轻的我们可以有这么长的寿命?

  10.为什么不能十分准确地预报天气?

   数年前,几天后的天气预报是完全不可信的,但现今更为先进的计算机模型使得预报一周后的天气变得精确起来。这对计划如何制定一个商业旅行计划或是否租用 一个大帐篷来举行一个婚宴招待会是一个好消息。但是当你想建造一个计算机模型来预报数十年后或数世纪后的天气时,问题出现了。

   1961年,气象学家爱沃德·劳伦兹(在进行一项计算机天气模拟,决定对其中的一个参量采用四舍五入进行计算。这个小小的变化完全改变了天气模型。这成为 后来著名的蝴蝶效应:一只蝴蝶在巴西扇动翅膀会在美国得克萨斯州引起一场风暴。劳伦兹的这种做法创立了混沌理论,启发气象学家将尽可能精确的数据输入计算 机模型以增长他们的预测区间。但是即使极为精确的数据也不能使我们获得精确的长期性预测结果。

美刊评选06至07年度十大发明 奇思妙想让人叹服(图) - 文学城

中新网6月6日电 美国著名科学杂志《大众科学》(PopularScience)6月号评选出2006至2007年度十大发明。这些发明涉及领域广泛,从救命手套到用煤灰制成的环保砖,无不流露出设计者们的奇思妙想。

神奇环形鼠标

可套在手指上的这种鼠标,能发出超声波信号,控制计算机屏幕上的光标。

可调松紧疗伤塑料搭扣

每条塑料搭扣带上都有许多交替排列的小孔和凸点,将一条带子上的凸点与另一条带子上的小孔扣在一起,两条带子就黏在一起了。具有这种搭扣的绷带可使伤口的边缘相互紧贴,从而容易愈合。

可防身的眩晕棒

按下一个按钮后,眩晕棒会放出高压但强度较低的电流,歹徒身体的某部位在被如此电击后,会变得“不听使唤”。

火箭弹防护网

当直升机上的传感器发觉有火箭弹来袭时,直升机会发射1到8颗防护弹,每颗防护弹都能抛出一张用芳纶纤维和钢丝编成的网,可以拦住来袭的火箭弹。

电动上升绳索

将绳索缠绕在马达驱动的绕线杆上,随着绕线杆的转动,绳索会紧紧地缠在绕线杆上,不会滑落,从而帮助人们快速安全地升上高空。

六冲程引擎

这种引擎在完成四冲程工作后,会把水注入汽缸,使水瞬间变成水蒸气,从而带动活塞运动,产生第五冲程,为汽车提供动力。第六冲程是让水蒸气进入冷凝器,变成可再次注入汽缸的水。

救命手套

手套里面装有电路和传感器,戴着这种手套为患者做人工心肺复苏时,与手套内装置相连的外部仪器会及时显示患者的心率、心脏按压的最佳时机、按压力度是否得当等信息。

使箭悬浮的射箭辅助装置

该装置内的磁铁与箭身填充的磁性物质发生作用,让箭处于悬浮状态,等待射手把它射出去。这样可以降低常规射箭动作的声响,避免惊扰猎物。

充气式天线

在质地类似船帆的一个可充气圆球中,有一个可折迭的抛物线形塑料天线,这种天线能随时随地充气以收发卫星信号。

“出身”煤灰的环保砖

用煤灰做的这种砖是通过按压而不是高温成形,因此在制造时至少节省了近20%的能源和费用。此外,制砖的模具使砖头更平整,从而节省了砌砖的时间和人力。

Friday, June 1, 2007

佛故事2 - 文学城

一块好肉

某日,宝积禅师行于闹市.

听到一顾客对屠户说:"给我一块好肉!"

屠户放下刀,说:"请问,哪一块不是好肉?"

顾客还愣在当场,宝积禅师却顿悟了.

是否有时候,你发现周围的人都不够可爱?设身处地地替别人想想吧,睁大眼睛仔细看看,到底"哪一块不是好肉"?

面壁成佛

弟子通宵达旦面壁,怀让禅师问:"成壁为何?"

答曰:"破壁成佛."

怀让随手拈起一块砖,用力地磨.

弟子忙问:"磨砖为何?"

答曰:"成玉!"

弟子问:"磨砖岂能成玉?"

对曰:"磨砖不能成玉, 成壁岂能成佛?"

很多时候,失败了,并非我们不够努力,而是努力的方向错了.

还没有赢

师父与弟子下棋.

师父说:"这盘你又输了."

弟子说:"不,是我还没有赢你!"

汉武帝刘彻说:"盖有非常之功,必待非常之人."但凡事业有成者,无不经历了别人难以想象的艰难困苦,不言放弃.想想那个谚语吧:"让你失败了,并非上帝抛弃了你,他只是为你做了更好的安排!"

失即是得

师你问弟子:"你有3个苹果,吃掉1个,还剩几个?"
答曰:"3个.肚子外面2个,肚子里1个."

"失即是得",我们常这样说,其实内心里却未必相信.事实上,这个道理如此简单.

佛曰:"有爱帮生忧,有爱帮生怖."

并非佛不谈爱,恰恰相反,佛往往将它一语道破.

佛曰:"因地而倒,因地而起."

绊倒你的,正是通往成功的阶梯.只是,跌倒后,你能否及时地爬起.

佛曰:"迷时师度,悟时自度."

某一阶段,"老师"可能会在你的生命中会起到难以替代的作用,但最终能够度化你的,只有你自己!

佛曰:"爱出者爱返,福往者福来."

付出了,或许并不能得到成正比的回报.但至少,送人玫瑰,手有余香.

佛故事 - 文学城

佛故事

从前有个书生,和未婚妻约好在某年某月某日结婚。到那一天,未婚妻却嫁给了别
人。书生受此打击,一病不起。家人用尽各种办法都无能为力,眼看奄奄一息。
>
>这时,路过一游方僧人,得知情况,决定点化一下他。
>
>僧人到他床前,从怀里摸出一面镜子叫书生看。
>
>书生看到茫茫大海,一名遇害的女子一丝不挂地躺在海滩上。
>
>路过一人,看一眼,摇摇头,走了....
>
>又路过一人,将衣服脱下,给女尸盖上,走了....
>
>再路过一人,过去,挖个坑,小心翼翼把尸体掩埋了............
>
>疑惑间,画面切换。书生看到自己的未婚妻。洞房花烛,被她丈夫掀起盖头的瞬间
...,书生不明所以。
>
>僧人解释道: 那具海滩上的女尸吗,就是你未婚妻的前世,你是第2个路过的人,曾
给过他一件衣服。她今生和你相恋,只为还你一个情。但是她最终要报答一生一世的
人,是最後那个把她掩埋的人,那人就是他现在的丈夫。
>
>书生大悟,唰地从床上做起,病愈!
>
>几年前, 初恋的爱人去世时, 我痛不欲生,有朋友就找来这故事开导我,让我释怀不
少。也许,她来到这个世界上,就是为了还我一片情吧。她做完了她想做的事, 就走
了。
>
>以後,我都用这个故事开导身边的朋友。
>
>缘这个东西,是最不可思议的。电影"不见不散"的主题歌。这样唱道"这世界说大就
大,说小就小。就算是我们今生的约定,也要用一生去寻找......"
>
>我们都在参加一场宏大的化装舞会,熙熙攘攘的人群里,我们寻觅着,渴望着....那
指间,相触时被电击的感觉。那一刻,面具摘下了,显现出真实的面目。
>
>这之前,我们都惶惑着,惶惑得甚至不知道自己需要的究竟是什麽。直到你遇到一个
人,
才恍然间了解了自己。真正想要的,并非当初以为的。你惊讶于自己在对方面前表现出
来的,竟然是和过去截然不同的你!皆因你过去戴着面具。
>
>缘分这东西不可强求。该你的,早晚是你的:不该你的,怎麽努力也得不到。
>
>但无论任何时候,我们都不要绝望.不要放弃自己对真,善,美的爱情追求。
>
>人生的价值,在某种意义上讲,就是爱和被爱的成熟。
>
>当真爱来临,如果也就成熟了。
>
>
>
>随缘............
>
>随意............
>
>随遇..........
>
>随喜..........

如何发掘出更多退休的钱?

如何发掘出更多退休的钱? http://bbs.wenxuecity.com/bbs/tzlc/1328415.html 按照常规的说法,退休的收入必须得有退休前的80%,或者是4% withdrawal rule,而且每年还得要加2-3%对付通胀,这是一个很大...