第5天,今天的任务比较少,只做了一个页面的弹出展示。 ?????今天解决了一个ajax的返回值问题,在ajax的回调函数中,直接return的时候,其退出的仅仅是回调函数,而不会退出整个函数。同时ajax的异...
分类:
其他好文 时间:
2015-06-18 00:48:42
阅读次数:
134
// // GET: /Home/ TestTryEntities Db = new TestTryEntities(); public ActionResult Index() { return View...
分类:
Web程序 时间:
2015-06-18 00:39:19
阅读次数:
144
题目:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't ...
分类:
编程语言 时间:
2015-06-17 23:23:07
阅读次数:
216
题目: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...
分类:
其他好文 时间:
2015-06-17 22:56:23
阅读次数:
192
我们在使用cocoStudio工具时,按钮控件Button对应的资源有三种状态,
我们可以分别针对三种状态设置不同的图片。然后在程序中通过方法显示
为不同的状态。
1、初始状态:Normal状态
bool Widget::init()
{
if (CCNode::init())
{
setBright(true);
}
return false;
...
分类:
其他好文 时间:
2015-06-17 21:49:20
阅读次数:
247
一、定义:有特定功能的代码片段的集合体,我们成为 函数。二、返回值:1、函数的返回值称为 函数的值,只能通过 return 语句返回给主调函数;
2、一个函数只能有一个返回值;
3、函数即使没有返回值也可以使用 return 来结束函数的执行,回到 主调函数;
4、return 后面的语句 不再执行。三、形参、实参1、形参
出现在函数的定义中,以 假名字 来表示函数调用时需要提供的...
分类:
编程语言 时间:
2015-06-17 21:48:59
阅读次数:
135
--定义一个函数
function getNum(n)
if n==0 then
return 0
else
return 1
end
end
--接收输入
print("Please input:")
--接收数据后放在a中
a = io.read("*num")
--打印出函数的返回值
print(getNum(a))
调试截图:...
分类:
其他好文 时间:
2015-06-17 21:48:30
阅读次数:
216
try{} catch{} finally{} 语句注意事项:
如果有一个catch{}语句匹配上,其他catch{}分支就不会执行了try{}里面如果有return,也会先执行finally{}里面的语句,之后再return如果try{}和finally{}里面都与return语句,则try{}里面的return不会被执行finally{}部分什么情况下不会被执行?
在t...
分类:
其他好文 时间:
2015-06-17 21:38:28
阅读次数:
138
#include
//判断输入的年份是否是闰年
int IsLeap(int year)
{
if((year%400==0) || ((year%4==0)&&(year%100!=0)))
return 1;
else
return 0;
}
int Day[12]={31,28,31,30,31,30,31,31,30,31,30,31};
//计算一个月的最大天数(上...
分类:
编程语言 时间:
2015-06-17 21:30:20
阅读次数:
307
1. 引用命名空间 using System.Runtime.InteropServices; using System.Management; 2. 取机器名public string GetHostName(){ return System.Net.Dns.GetHostName(...