函数 一、格式 function fun_name($str1, $str2...$strn) //fun_name为函数名,$str1等传入函数的变量 { fun_body;//fun_body为函数的主体部分 } 二、传递参数 1.按值传递方式 将实参的值复制...
分类:
Web程序 时间:
2015-04-22 09:26:28
阅读次数:
157
Description
“Fat and docile, big and dumb, they look so stupid, they aren’t much
fun…”
- Cows with Guns by Dana LyonsThe cows want to prove to the public that they are both smart and fun. In order t...
分类:
其他好文 时间:
2015-04-21 22:51:44
阅读次数:
185
题目传送门 1 /* 2 题意:光线从 '*' 发射,遇到 '/' 或 '\' 进行反射,最后射到墙上,将 'x' 变成 '&' 3 模拟:仔细读题,搞清楚要做什么,就是i,j的移动,直到撞到墙,模拟一下一次AC,不要被题目吓怕了:) 4 */ 5 #include 6...
分类:
其他好文 时间:
2015-04-20 22:17:49
阅读次数:
143
#!/bin/bash
#shell脚本编程之快速排序的实现(以最右边为元点的思想)
a=(8 5 10 3 2 93 4 1 2 3 40 9 61 8 6 29)
temp=
buff=
#交换函数
swap()
{
buff=${a[$1]}
a[$1]=${a[$2]}
a[$2]=$buff
}
fun()
{
i=$(($1-1))
j=$1
temp=${a[$2]}...
分类:
编程语言 时间:
2015-04-20 20:57:19
阅读次数:
171
-module(exe5_2).
-export([start/2]).
%Points 是投掷点的个数 Cores是核数,为2的幂
start(Points,Cores)
->spawn(fun()->parent_proces(Points,Cores) end),
io:format("").parent_proces(Points,Cores) ->
Poin...
分类:
其他好文 时间:
2015-04-20 17:06:16
阅读次数:
155
有四种方式:1。使用堆空间,返回申请的堆地址,注意释放2。函数参数传递指针,返回该指针3。返回函数内定义的静态变量(共享)4。返回全局变量其实就是要返回一个有效的指针,尾部变量退出后就无效了。使用分配的内存,地址是有效char *fun(){ char* s = (char*)call...
分类:
编程语言 时间:
2015-04-19 00:58:10
阅读次数:
190
一、计时器setTimeout():注册在指定时间后单次调用的函数setInterval():注册在指定时间后重复调用的函数都会返回一个值,可以传递给clearInterval()用来取消函数的执行。function fun(){ // do something here.} // 第一个方法...
分类:
编程语言 时间:
2015-04-18 12:57:11
阅读次数:
177
1 #include "stdafx.h" 2 3 class A 4 { 5 public: 6 A(){m_a = 1; m_b = 2;} 7 void fun(){printf("%d %d\n", m_a, m_b);} 8 private: 9 int m_a...
分类:
其他好文 时间:
2015-04-18 01:04:18
阅读次数:
217
Let us have fun with CrunchBase API.What can CrunchBase API give us? They said: https://developer.crunchbase.com/docs ( By the way, their API web...
一个包内私有的方法不能能被另一个包中的某个方法直接覆写
package one
public class A extend B{
void fun(){//看似覆写了B中的fun方法
}
main(){
new A.doIt();
}
}
pac...
分类:
编程语言 时间:
2015-04-17 11:25:14
阅读次数:
148