1:代码评审 发现某程序中一个子程序(函数)仅被一次外调用,该子程序是否需要保留,为什么?
目前没找到很好的答案
2:软件配置管理SCM,在项目中的作用和目的
软件配置管理,是关于软件资产的管理。什么是软件资产呢?源代码,设计文档,可以运行的程序,这些在软件研发过程中产生的有价值的东西,都是软件资产。软件配置管理就是关于这些内容的管理。那么,具体有什么要管理的呢?让我们把它和图书馆的图书管理做个对比。
软件配置管理就是软件配置管理。如果再多说几句,那就是:它是关于不断演进的软件资产的管理。这涉及到存储和安全;涉及到记录它演进的历史;涉及到让修改和变更井然有序,避免出现版本丢失、版本覆盖等混乱情况;涉及到保证软件代码集成在一起的质量……
没有配置管理,代码版本很混乱,这个大家都知道。配置如果能把代码的版本控制得很好,很有价值。
2。变更管理
软件开发过程中变更是不可避免的,如果配置管理能够通过管理,把变更所带来的影响降低到最小,还是很有价值的。
3。配置数据
配置管理的过程中如果能注意收集数据,并加以总结,对效率和质量的改进都有很重要的参考价值。
4。配置库的管理
开发或者任何工作开展都会有产出,如果配置管理能够将这些产出进行管理,能够组成组织的财富库,对组织非常有价值,尤其是人员变化的情况下。
5。发布管理
如果配置管理通过工作,能够提高发布的质量和效率,非常有效果的。
6。流程
配置管理工具只是方便工作,但很多工作还是需要进行流程的管理,所以形成1套配置的管理流程也非常重要。
3:如果在产品提交过程中。被客户发现了logo不是客户的。而是公司上个产品方的。最后发现是需求文档里面的logo错误。这个问题应该找谁负责。需求的?还是开发?测试。说说你的想法。然后说说如果是你怎么避免这样的事情发生
4:程序“自成文档”的要求。列举你讨厌的不良编程习惯
5:英语测试题
1:问题
Hi! PHP Team
I am facing a problem of apache hang up due to exec() function.
I am using PHP 5.2.5 and Apache 2.2 on MS Window 2000 SP4 & also on MS
Window XP.
The problem is that I have to execute a exe, for which I have use
exec(). Normally it works Fine, but sometime (randomly) it hang up. It
will lock the apache and if we call the same page or any other page of
php having exec(), it hang up at the line where exec() function is used.
If we commented the line having exec(), then the page run & loaded
correctly.
The problem also become critical because there is no error for this.
Also none of the error handling & logging mechanism works.
The only solution to this problem is to restart the Apache.
I am providing you as much as information as possible to catch the
problem correctly.
Reproduce code:
---------------
$exeFilePath = realpath("../sample.exe");
if (eregi("win", PHP_OS))
$command = "/"/"$exeFilePath/" argument1/"";
else
$command = "/"$exeFilePath/" argument1";
$output = null;
$returnVal = null;
$result = exec($command,$output,$returnVal);
if($returnVal !=0)
echo "Error";
else
echo $output[0];
echo "end of the program";
Expected result:
----------------
it will show the output of exe for particular argument.
Actual result:
--------------
Normally it works correctly as expected but sometime the the execution
of the page hang at line "$result = exec($command,$output,$returnVal);"
. After this has happen I am not able to run any script that will use
the exec(). In all scripts apache hangs at exec() function, do not
matter which exe will be called.
2:回答
We have been having the same issue for a long time on win2003 with php
version 5.2.X and apache 5.2.x calling both perl scripts and .exe with
the exec fuinction. We found that it mostly happens when php runs exec
concurrently on the same process. For example we would have ajax call
do an exec on the server to read some data and feed it back to the user
every 5 seconds. In addition the user could do an ajax call to do
something as well on this page. if the user call came at the same time
as the schdeduled call then php would hang and we would have to restart
apache. We found it also happens on pages where there are multiple
exec() calls. We find that all the scripts and programs we call run
fine its just that php hangs when they finish for some reason. We have
our max_execution_time set to 30 minutes so its not a timeout issue.
We found that calling
session_write_close();
before each exec call seemed to resolve this issue. But we are not
really sure why and what other effects session_write_close(); may have
on other processes.
Hope this helps resolve this issue. it is a major headache for us for
the past 2 years!!
3:题目
1:问题到底是什么(用中文回答)
2:下面的人到底给出解答没?他找出真正原因了没
3:修改代码让他能够运行
4:Linux平台有usleep函数是标准的休眠函数,如果系统没有这个函数我们就自己写个
fountion myusleep(n=0)
{
start = GetMicrosec();//取得时间的微妙部分
do
{
interval = GetMicrosec() - start;
if(interval<0)
{
interval += 1000000;
}
}while(interval <n);
}
1:这个函数能够替代usleep函数吗?如果不能,他们最大的区别
2:
if(interval<0)
{
interval += 1000000;
}
的作用
关于休眠函数的介绍
http://blog.sina.com.cn/s/blog_5378b283010007x8.html
sleep参数为秒
usleep的参数是毫秒
ountion myusleep(n=0) //n=10
{
start = GetMicrosec();//取得时间的微妙部分 //假设CPU的速度爆快.. 忽略时间
do
{
interval = GetMicrosec() - start; // 取得最小时间,第一次是0微妙,第二次是1000000
if(interval<0)
{
interval += 1000000;
}
}while(interval <n);//1000000<10 跳出循环
}
4:算法遍历一个无回路有向图的所有边,要求从每个节点看来必须是所有的“入边”都访问到后,才能够访问
该节点的“出边”
$ GraphID =图的所有节点ID清单 //清单为哈希数组(也可以为集合)
foreach($ GraphID as $n) //对$ Graph中的节点ID逐一赋给$n
{
Childs[$n]=节点$n的儿子数量; //节点入边的数量(儿子的数量)
access[$n]=0; //节点处理的入边的数量
}
$leaves = 图的所有叶子节点的清单;
foreach($leaves as $n)
{
SearchParent($n);
}
SearchParent($nodeID)//搜索节点所有父亲
{
$Plist = 节点$nodeID的的父亲节点ID清单;
foreach($Plist as $p)
{
访问$p的入边($nodeID,$p)//具体动作与算法无关
access[$p]++;
if(需要填写代码1)
{
SearchParent(需要写的代码2)
}
}
1:补充代码
2:递归算法中的递归结束的条件是什么
3:算法是需要依据输入的图为“无回路有向图”这一前提,如果输入的有向图出现回路,分析下是否可能出现无限
递归不止的情况
}
5:库存不足过去一年平均月消耗时候即要补充,到库的日期是2个月
库存中不能多余过去12个月平均用量的5倍