apply函数(对一个数组按行或者按列进行计算):使用格式为:apply(X, MARGIN, FUN, ...)其中X为一个数组;MARGIN为一个向量(表示要将函数FUN应用到X的行还是列),若为1表示取行,为2表示取列,为c(1,2)表示行、列都计算。示例代码:> ma ma[,1] [,2....
分类:
移动开发 时间:
2015-05-05 11:52:59
阅读次数:
148
题目描述:参考代码: 1 #include 2 #include 3 #include 4 #include 5 #define M 300 6 using namespace std; 7 char a[M][M]; 8 void fun(int j,int k) 9 {10 ch...
分类:
编程语言 时间:
2015-05-04 21:43:33
阅读次数:
140
出现这个原因的问题汇总:1,相应的附加库没有包含进去,注意附加库的目录是 / 2,函数没有与之对应的类,却在main中以某一类的对象调用了该方法。 其实,当错误中显示fun()成为无法解析的外部命令的时候我F12追踪时出了两个选项待选择,可是我居然没有发现——本来是该类的函数,F12是却同时给出了....
分类:
编程语言 时间:
2015-05-04 20:05:48
阅读次数:
102
输入一个正整数,用递归的方式输出该数的各位数字,要求正序、逆序都要输出。嗯这个只是训练递归用的一个小程序。 1 #include 2 void fun(int n); 3 void fun2(int n); 4 int main(int argc, char *argv[]) 5 { 6 ...
分类:
其他好文 时间:
2015-05-04 19:53:10
阅读次数:
131
普通函数参数
下面程序试图改变main函数中a和b的值
#include
void fun(int x,int y)
{
int c;
c=a;
a=b;
b=c;
}
int main()
{
int a=1,b=2;
fun(a,b);
printf("a=%d b=%d\n",a,b);
retur...
分类:
其他好文 时间:
2015-05-03 12:04:57
阅读次数:
177
创建mysql函数 fun_Knowledge_child_url, 输入一个int类型节点chId,return一个url字符串 BEGIN
?DECLARE?sTemp?VARCHAR(1000);
?????????DECLARE?sTempChd?VARCHAR(1000);
?????????DEC...
分类:
数据库 时间:
2015-05-02 19:34:41
阅读次数:
307
>>>函数名:httpPost
功能:向$url POST $data数据
code:
/**
* [httpPost 向$url POST $data数据]
* @param [sting] $url [action url]
* @param [array] $data [数据数组 eg:$data = array('user'=>'myname','pwd'=>...
分类:
Web程序 时间:
2015-05-01 10:45:58
阅读次数:
164
Perl open source home automation program. It's fun, it's free, and it's entirely geeky. Active Development Repository - GitHub hollie/misterhouse
分类:
其他好文 时间:
2015-04-30 15:32:41
阅读次数:
118
1 local demo = {"demoValue"} 2 local function fun() 3 print"hello world" 4 end 5 local tableDemo = { 6 ["a3132t"] = "valide?", 7 ...
分类:
其他好文 时间:
2015-04-30 13:59:26
阅读次数:
120
By Greg Gage (Neuroscientist)Greg Gage is on a mission to make brain science accessible to all. In this fun, kind of creepy(令人毛骨悚然的,恐怖的) demo, the neu...
分类:
其他好文 时间:
2015-04-30 13:55:18
阅读次数:
140