09 2013 档案

摘要:1 #include 2 #include 3 #include 4 5 #define MAX 20 6 7 8 typedef struct stack{ 9 char item; 10 struct stack *next; 11 }stack; 12 13 char gettop_s(stack *h) //得到栈顶元素 14 { 15 char ch; 16 17 ch = h->item; 18 19 return ch; 20 } 21 22 stack * out_s(sta... 阅读全文
posted @ 2013-09-26 11:16 net小伙 阅读(297) 评论(0) 推荐(0) 编辑
摘要:十进制转换八进制,二进制,十六进制: 1 #include 2 #include 3 #include 4 5 #define MAX 20 6 7 int bin_val[MAX]; //存放十进制转换成二进制的结果 8 9 int get_int() 10 { 11 int in; 12 while(scanf("%d",&in) == -1){ 13 printf("please input a num\n"); 14 while(getchar() != '\n') ; 15 } 1... 阅读全文
posted @ 2013-09-25 20:28 net小伙 阅读(578) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #define MAX 20 3 int main() 4 { 5 int a[4] = {3,5,8,11}; 6 int b[7] = {2,6,8,9,11,15,20}; 7 int i = 0,j = 0; 8 int c[MAX]; 9 int tmp = 0;10 11 while(i < 4 && j < 7){12 if(a[i] < b[j])13 c[tmp++] = a[i++];14 else15 c[tmp++]... 阅读全文
posted @ 2013-09-25 10:59 net小伙 阅读(354) 评论(0) 推荐(0) 编辑
摘要:答案是肯定的,可以一起用。 因为很多人误解了const的真正含义,很多初学者认为const修饰的就是常量,而常量不会改变,而既然不会改变,那volatile就没有意义。 但是实际上这正是对const的误读,const其实只是一种限制约定,也就是某个东西X不能由const修饰的变量来修改,但是这个X仍然可以被其他非const修饰的变量来修改,比如int x;int* p = &x;const int* q = &x;*p=0; //允许*q=0; //错误 虽然p和q指向同一块内存,但是q的const并不能限制p的写入,也就是说const只是限制了q的写入,... 阅读全文
posted @ 2013-09-22 13:05 net小伙 阅读(905) 评论(0) 推荐(1) 编辑
摘要:what do you do for living?一般用在问对方的工作。如果直接说“what is your job?”会显得有点生硬了。i was wondering if you can tell me how i could get to the somebody'house请问怎么去某人的家。is this your first time in somewhere?这是你第一次来到某个地方吗?somewhere 要有一个升调;do you like it here?你喜欢这里吗?how do you like it so far?你喜欢这里吗?how are you doin 阅读全文
posted @ 2013-09-15 10:15 net小伙 阅读(421) 评论(0) 推荐(0) 编辑
摘要:#include int creat(const char *pathname, mode_t mode); 若成功则返回为只写打开的文件描述符,若出错则返回-1; 有时候我们使用creat函数的时候可能会得不到我们想要的结果。例如:creat("foo",0666) 当我们使用次函数的目的创建一个文件——foo,foo的属性为 -rw-rw-rw-; 但是我们执行完creat函数之后可能会发生其他的结果,笔者的系统是REHL5.1,当我执行完creat函数之后foo的属性为:-rw-r--r--; 这是为什么呢? 如果你想知道为什么,就在命令行里执行umask看一下吧; 阅读全文
posted @ 2013-09-13 18:32 net小伙 阅读(5035) 评论(0) 推荐(0) 编辑
摘要:Cocktail 鸡尾酒 It is quite usual to drink cocktails before lunch and dinner in America and somewhat less usual, except in California, to drink wine with a meal. You can either have a cocktail in the bar, if there is one, while you wait for a table or for friends, or you can have one served before y... 阅读全文
posted @ 2013-09-13 11:00 net小伙 阅读(555) 评论(0) 推荐(0) 编辑
摘要:When you want to change something in your life, it can feel overwhelming. Whether it’s losing 50lbs or switching careers, starting a side business or spring cleaning the home, it might be a change you’re desperately keen to make … but getting started is really tough.You don’t have to take huge, swee 阅读全文
posted @ 2013-09-12 13:44 net小伙 阅读(667) 评论(0) 推荐(0) 编辑
摘要:相信大部分在Unix/Linux下编程的程序员手头上都有《Unix环境高级编程》(APUE)这本超级经典巨著。作者在该书中讲解dup/dup2之前曾经讲过“文件共享”,这对理解dup/dup2还是很有帮助的。这里做简单摘录以备在后面的分析中使用:Stevens said:(1) 每个进程在进程表中都有一个记录项,每个记录项中有一张打开文件描述符表,可将视为一个矢量,每个描述符占用一项。与每个文件描述符相关联的是: (a) 文件描述符标志。 (b) 指向一个文件表项的指针。(2) 内核为所有打开文件维持一张文件表。每个文件表项包含: (a) 文件状态标志(读、写、增写、同步、非阻塞等)。 (b) 阅读全文
posted @ 2013-09-11 16:11 net小伙 阅读(361) 评论(0) 推荐(0) 编辑
摘要:There used to be an old joke in America that people should take a bath once a week, whether they need one or not. In fact, though, Americans generally take a bath-or more commonly(通常地), a shower-every day. But in contrast to some cultures, most Americans get their shower in the morning, so they can. 阅读全文
posted @ 2013-09-11 10:20 net小伙 阅读(632) 评论(0) 推荐(0) 编辑
摘要:1,fread是带缓冲的,read不带缓冲.2,fopen是标准c里定义的,open是POSIX中定义的.3,fread可以读一个结构.read在linux/unix中读二进制与普通文件没有区别.4,fopen不能指定要创建文件的权限.open可以指定权限.5,fopen返回指针,open返回文件描述符(整数).6,linux/unix中任何设备都是文件,都可以用open,read.如果文件的大小是8k。你如果用read/write,且只分配了2k的缓存,则要将此文件读出需要做4次系统调用来实际从磁盘上读出。如果你用fread/fwrite,则系统自动分配缓存,则读出此文件只要一次系统调用从磁 阅读全文
posted @ 2013-09-10 16:21 net小伙 阅读(3635) 评论(0) 推荐(0) 编辑
摘要:To prevent SharePoint Online customers from feeling boxed in, Microsoft wants to improve the way they upload and store documents in the platform, Office 365's cloud collaboration server.Over the coming weeks, Microsoft will roll out a set of changes to Office 365 targeted at SharePoint Online us 阅读全文
posted @ 2013-09-06 14:47 net小伙 阅读(246) 评论(0) 推荐(0) 编辑
摘要:#define GPBCON (*(volatile unsigned long*)0x56000010)1:volatile 当计算机需要一个数值的时候,会先把内存中的值读取到寄存器,然后下次在使用该值的时候就直接读取寄存器中的值了。加上volatile之后,程序就会在每次需要该值的时候都读取一次内存。这是为了防止某些原因硬件会改变其值。2: (volatile unsigned long *)即为强制类型转换;(volatile unsigned long *)0x56000010 的意思就是把0x56000010强制转换为unsigned long类型的指针。这时(volatile .. 阅读全文
posted @ 2013-09-06 10:45 net小伙 阅读(2165) 评论(0) 推荐(0) 编辑
摘要:安装完ads的时候会出现错误,因为还要安装License Installation Wizard。 下一步会出现这个然后点击Browse...找到ads1.2下的CRACK(crack)文件夹的LICENSE.DAT(license.dat)文件。然后选择,一直下一步。ok,解决了!!! 阅读全文
posted @ 2013-09-04 22:48 net小伙 阅读(300) 评论(0) 推荐(0) 编辑
摘要:直接上例子:1.c1 #include2 int main()3 {4 extern int a;5 a += 10;6 printf("%d\n",a);7 text();8 text2();9 }2.c 1 int a = 10; 2 void text() 3 { 4 printf("%d\n",a); 5 } 6 7 void text2() 8 { 9 printf("%d\n",a);10 }输出的结果是202020 阅读全文
posted @ 2013-09-04 22:40 net小伙 阅读(198) 评论(0) 推荐(0) 编辑
摘要:You know Ian and Felton can be really boring sometimes. They're always arguing, like. like children. It drives me crazy. They even argue about music. Tastes differ!有时候伊恩和菲尔顿真的很无聊。他们经常像个孩子一样争吵。这让我们抓狂。他们甚至争论音乐。每个人的品味都是不同的。I particularly like hip-hop and rock. And Felton doesn't. Who cares? I u 阅读全文
posted @ 2013-09-04 09:11 net小伙 阅读(338) 评论(0) 推荐(0) 编辑
摘要:Nokia will focus on network infrastructure, mapping and locations services and technology development and licensingSeptember 03, 2013, 1:26 AM—Microsoft is to acquire Nokia's Devices & Services business, which includes the smartphone and mobile phones businesses, and license the Finnish comp 阅读全文
posted @ 2013-09-03 17:10 net小伙 阅读(298) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示