概述Nucleus Plus内核(Kernel)的主要目的是管理实时任务的竞争执行(共享CPU),为应用提供各种便利,高速响应外部事件。Nucleus Plus的系统结构如图1所看到的,能够看出线程控制是整个内核的核心,通过邮箱、队列、管道来实现任务之间的通信,通过信号量、事件组和信号实现任务间的同...
分类:
其他好文 时间:
2014-07-06 18:49:16
阅读次数:
285
Max Points on a LineGivennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.点和方向确定一条直线。需要两重循环,第一重循环遍历起始点a,第二重...
分类:
其他好文 时间:
2014-07-06 18:21:01
阅读次数:
175
abractyeyt,dgdsaeactyey的最长子串为actyeyconst int maxSize = 100;char suffix[2][maxSize][maxSize];int max_sub(char* s1, int len1, char* s2, int len2){ fo...
分类:
其他好文 时间:
2014-07-06 18:13:00
阅读次数:
150
class Solution {public: vector plusOne(vector &digits) { int carry = 1; int len = digits.size(); vector res; ...
分类:
其他好文 时间:
2014-07-06 16:43:39
阅读次数:
104
5. 1 #include 2 3 int main() 4 { 5 float you_sec; 6 printf("请输入你的年龄:"); 7 scanf("%f", &you_sec); 8 printf("年龄合计:%e 秒!\n", you_sec * ...
分类:
其他好文 时间:
2014-07-06 16:24:54
阅读次数:
162
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:
其他好文 时间:
2014-07-06 16:11:35
阅读次数:
170
du-ah--max-depth=1 这个是我想要的结果 a表示显示目录下所有的文件和文件夹(不含子目录),h表示以人类能看懂的方式,max-depth表示目录的深度。du命令用来查看目录或文件所占用磁盘空间的大小。常用选项组合为:du-sh 一、du的功能:`du`reportstheamoun....
分类:
系统相关 时间:
2014-07-06 15:29:54
阅读次数:
341
找书中权值和最大的路径,至少包含一个点。有点类似LCA(最近公共祖先),树的问题关键是如何划分子问题,然后递归求解。想到了可以返回两种结果,一个是单独路径的最大和,一种是子树的最大和,然后在求解的过程中不断的更新答案。 1 /** 2 * Definition for binary tree 3 ....
分类:
其他好文 时间:
2014-07-06 14:16:47
阅读次数:
187
1. 使用Random类的nextInt方法:Random rand = new Random();rand.nextInt(max);, 此时输出[0,max),注意右边是开区间,如果需要设定最小值可通过 rand.nextInt(max-min+1)+min方式,此时的范围为[min,max]i...
分类:
编程语言 时间:
2014-07-06 14:14:11
阅读次数:
257
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-07-05 20:43:45
阅读次数:
246