2.6内核
1>修改linux-source-2.6.31/kernel/sys.c文件,在文件末尾添加系统响应函数。函数实现如下:
asmlinkage int sys_mycall(int number)
{
printk("这是我添加的第一个系统调用");
return number;
}
2>在linux-source-2.6.31...
分类:
系统相关 时间:
2014-05-15 02:51:56
阅读次数:
382
http://blog.csdn.net/andymu077/article/details/6649812在try-catch-finally中,
当return遇到finally: 1.在try catch块里return的时候,finally也会被执行。 2.return 语句会把后面的值复制...
分类:
其他好文 时间:
2014-05-15 01:54:32
阅读次数:
354
1.在函数中用return将返回值传递给调用者。在全局作用域中使用return,则中止脚本运行。2.变量函数,实际上就是将函数名付给一个变量$func,之后变量后加一个括号就代表调用了原来的函数functioncome(){echo‘北京‘;}$func="come";$func();3.rand(min,max)生成在min和max之间的..
分类:
Web程序 时间:
2014-05-15 01:05:35
阅读次数:
375
[ 问题: ]
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the ta...
分类:
其他好文 时间:
2014-05-15 00:04:39
阅读次数:
377
Given two numbers represented as strings,
return multiplication of the numbers as a string.Note: The numbers can be
arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-05-14 23:11:14
阅读次数:
398
Binary Tree Preorder Traversal
Total Accepted: 18022 Total
Submissions: 51784My Submissions
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given b...
分类:
其他好文 时间:
2014-05-14 20:43:22
阅读次数:
242
【题目】
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
【题意】
反转int型整数,输出的也是int型的整数
【思路】
如要考虑两种特殊情况:
1. 类似100这样的整数翻转之后为1
2. 翻转之后的值溢出该如何处理,
本题的测试用例中似乎没有给出溢出的情况
...
分类:
其他好文 时间:
2014-05-14 20:41:19
阅读次数:
244
最基本的操作是:
1, 首先在一个java文件中设断点,然后运行,当程序走到断点处就会转到debug视图下,
2, F5键与F6键均为单步调试,F5是step into,也就是进入本行代码中执行,F6是step over,
也就是执行本行代码,跳到下一行,
3,F7是跳出函数 step return
4,F8是执行到最后。
========================...
分类:
编程语言 时间:
2014-05-14 20:26:02
阅读次数:
975
Java的简单类型不能够精确的对浮点数进行运算/***提供精确的加法运算。*@paramv1被加数*@paramv2加数*@return两个参数的和*/publicstaticdoubleadd(doublev1,doublev2){BigDecimalb1=newBigDecimal(Double.toString(v1));BigDecimalb2=newBigDecimal(Double.toString(v2));retu..
分类:
其他好文 时间:
2014-05-14 18:41:18
阅读次数:
241
staticint_osip_message_parse(osip_message_t*sip,constchar*buf,size_tlength,intsipfrag){inti;constchar*next_header_index;char*tmp;char*beg;tmp=osip_malloc(length+2);if(tmp==NULL){OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_ERROR,NULL,"Couldnotallocatememory..
分类:
其他好文 时间:
2014-05-14 16:06:25
阅读次数:
296