以下代码中有Xcode中常见的3种注释/**
* 阴影 注释(1)这种注释在饮用cover时会出现在解释中
*/
@property (weak,nonatomic) IBOutlet UIButton *cover;
/**
* 控制状态栏的样式
* 注释(2)
* @return UIStatusBarStyleLightContent
*/
5. (UIStatusB...
分类:
其他好文 时间:
2015-06-22 06:29:48
阅读次数:
134
python 中注释有两种第一种,文档注释第二种,一般的注释下面是例子:class MyClass: '这个是文档注释' def __repr__(self): return "repr"; def __str__(self): ...
分类:
编程语言 时间:
2015-06-22 01:03:57
阅读次数:
166
在IOS开发中,经常会使用到textField,在使用它时,对键盘的处理又对用户体验有着很大的影响,让用户使用方便,是软件设计的重要部分.下面就简单的说明一下,在结束编辑后退出键盘这一小动作.首先,如果要退出键盘,就必须要失去第一响应者的身份,键盘就会退出当textField处于输入状态时,就是第一...
分类:
其他好文 时间:
2015-06-22 01:01:04
阅读次数:
234
from flask import Flask, render_template, gapp = Flask(__name__)@app.route("/")def index(): return render_template("index.html")# run in under twis...
分类:
其他好文 时间:
2015-06-21 23:42:16
阅读次数:
244
编写一个程序,求输入数的平方根。设置异常处理,当输入负数时采用异常处理机制给出提示。
代码
#include
#include
using namespace std;
double sqrt1(double n)
{
if(n<0)
throw n;
else
return sqrt(n);
}
int main()
{
doubl...
分类:
其他好文 时间:
2015-06-21 18:32:48
阅读次数:
128
分析下面程序出现的编译错误,给出解决的方案。#include
using namespace std;
//定义函数模板
template
T max(T a, T b)
{
return (a>b)?a:b;
}int main()
{
int x=2,y=6;
double x1=9.123,y1=12.6543;
cout<...
分类:
其他好文 时间:
2015-06-21 18:30:40
阅读次数:
123
Description:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Code: 1 void re...
分类:
其他好文 时间:
2015-06-21 18:21:31
阅读次数:
113
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 20
...
分类:
其他好文 时间:
2015-06-21 15:49:22
阅读次数:
131
#include using namespace std;class common{public: virtual void hello(){couthello(); return 0;}
分类:
编程语言 时间:
2015-06-21 15:48:53
阅读次数:
158
1 --递归求阶乘 2 function func(n) 3 if n ~= 1 then 4 return n * func(n - 1) 5 else 6 return 1 7 end 8 end 9 10 print("输入整数:")1...
分类:
其他好文 时间:
2015-06-21 15:45:28
阅读次数:
118