学会对文件的记录锁定,及解锁。#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main() { int fd int i struct { char name[20] uint ID int age } myrec fd =open("name", O_RDWR|O_CREAT, 0755) if (fd == -1) return -1 printf("Input your name:") scanf("%s", myrec.name) printf("Inpute your ID :") scanf("%d", &myrec.ID) printf("Input your age :") scanf("%d", &myrec.age) lseek(fd, 0,SEEK_END) lockf(fd, 1, 0) write(fd, (void *)&myrec, sizeof(myrec)) lockf(fd, 0 ,0) return 0 } 执行命令cc lock.c –o lock.out Chmod +x lock.out ./lock.out
标签: 记录
上传时间: 2016-01-04
上传用户:亚亚娟娟123
ST7529液晶驱动 The ST7529 is a driver & controller LSI for 32 gray scale graphic dot-matrix liquid crystal display systems. It generates 255 Segment and 160 Common driver circuits. This chip is connected directly to a microprocessor, accepts Serial Peripheral Interface (SPI), 8-bit/16-bit parallel or IIC display data and stores in an on-chip display data RAM. It performs display data RAM read/write operation with no external operating clock to minimize power consumption. In addition, because it contains power supply circuits necessary to drive liquid crystal, it is possible to make a display system with the fewest components.
标签: 7529 controller dot-matrix graphic
上传时间: 2013-12-02
上传用户:奇奇奔奔
This directory contains code implementing the K-means algorithm. Source code may be found in KMEANS.CPP. Sample data isfound in KM2.DAT. The KMEANS program accepts input consisting of vectors and calculates the given number of cluster centers using the K-means algorithm. Output is directed to the screen.
标签: code implementing directory algorithm
上传时间: 2014-01-15
上传用户:woshini123456
This the second tutorial of the Writing Device Drivers series. There seems to be a lot of interest in the topic, so this article will pick up where the first left off. The main focus of these articles will be to build up little by little the knowledge needed to write device drivers. In this article, we will be building on the same example source code used in part one. In this article, we will expand on that code to include Read functionality, Handle Input/Ouput Controls also known as IOCTLs, and learn a bit more about IRPs.
标签: the interest tutorial Drivers
上传时间: 2016-01-28
上传用户:lmeeworm
This code implements the shortest path algorithm via the simple scheme and fibonacci heap data structure. It has 3 kinds of testing data input method : random input by computer, reading from the file, reading from the key board.
标签: implements algorithm fibonacci the
上传时间: 2013-12-23
上传用户:ynzfm
Easy-to-Use, Ultra-Tiny, Differential, 16-Bit Delta Sigma ADC With I2C Interface The LTC2453 is an ultra-tiny, fully differential, 16-bit, analog-to-digital converter. The LTC2453 uses a single 2.7V to 5.5V supply and communicates through an I2C interface. The ADC is available in an 8-pin, 3mm x 2mm DFN package. It includes an integrated oscillator that does not require any external components. It uses a delta-sigma modulator as a converter core and has no latency for multiplexed applications. The LTC2453 includes a proprietary input sampling scheme that reduces the average input sampling current several orders of magnitude lower than conventional delta-sigma converters. Additionally, due to its architecture, there is negligible current leakage between the input pins.
标签: Differential Easy-to-Use Ultra-Tiny Interface
上传时间: 2014-01-08
上传用户:凤临西北
Ideal for large low power (nanoWatt) and connectivity applications that benefit from the availability of four serial ports: double synchronous serial ports (I² C™ and SPI™ ) and double asynchronous (LIN capable) serial ports. Large amounts of RAM memory for buffering and FLASH program memory make it ideal for instrumentation panels, TCP/IP enabled embedded applications as well as metering and industrial control and monitoring applications. While operating up to 40 MHz, it is also backward software and hardware compatible with the PIC18F8720.
标签: connectivity applications availabilit nanoWatt
上传时间: 2016-02-04
上传用户:CHINA526
简单C编译器生成的目标代码是8086的汇编代码(16位),可以在一般的PC上被像MASM之类的汇编编译程序编译,生成可执行文件后,在DOS或Windows控制台下运行。 实现的语言定义如下: 语言类似于tiny语言,不支持过程调用,也就是只有一个main函数,无其他函数和全局变量 基本语句:注释语句(/*…*/),输入语句(int input(void) ),输出语句(void output(int) ),赋值语句。这里的输入输出语句实际上类似于函数调用,可以看作是本语言内部的函数 算术运算符:+、—、*、/ 数据类型:整数.
上传时间: 2016-02-06
上传用户:bakdesec
通用串行总线(USB)是一种新兴的计算机外围串行通信接口标准,与常用的计算机接口(如串口、并口等)相比,通用串行总线(Universal Serial Bus,USB)具有热插拔、即插即用、数据传输可靠、扩展方便、低成本等优点。从问世以来,它得到了广泛的应用,一方面已成为当前计算机必备的接口之一,同时也被广泛地应用于嵌入式系统设计中。 从1994年USB 0.7出现开始,USB实施者论坛(Implementation Forum)先后定义了USB 0.8、0.9、1.0、1.1、2.0以及USB OTG等规范,以及各种不同的设备类规范。其中USB1.1规范目前正逐步广泛应用,而USB2.0和USBOTG作为USB协议的更新和扩展,也将使USB占领更广的外设
上传时间: 2016-02-17
上传用户:王小奇
Windows Mobile平台的日文输入法,支持手写。A sample UI for Japanese handwriting input that works with IME 3.1 and with Pocket IME.
上传时间: 2016-02-20
上传用户:cxl274287265