一循环语句(有两种): while 语句 for? ?语句while 语句: 问题:输入一个整数n,让程序输出n行的: hello 1 hello 2 ....... hell nwhile 语句: 作用:根据一定条件,重复的执行一条语句或多条语句 语法: while 真值表达式: 语句块1...... else: 语句块2...... 说明: 1
分类:
编程语言 时间:
2018-04-23 00:10:36
阅读次数:
183
我们经常会这么写 ? 1 2 3 4 5 6 7 8 function Person () { this.name = 'John'; } var person = new Person(); Person.prototype.say = function() { console.log('Hell ...
分类:
其他好文 时间:
2018-03-30 10:47:54
阅读次数:
167
1 Replace string sayHello = "Hello World!"; Console.WriteLine(sayHello); sayHello = sayHello.Replace("Hello", "张涛"); Console.WriteLine(sayHello); Hell ...
1. Struts2 的验证(note6,struts2-8) 1). 验证分为两种: > 声明式验证* >> 对哪个 Action 或 Model 的那个字段进行验证 >> 使用什么验证规则 >> 如果验证失败, 转向哪一个页面, 显示是什么错误消息 > 编程式验证 2). 声明式验证的 hell ...
分类:
其他好文 时间:
2018-03-26 00:37:24
阅读次数:
143
改struts.xml中的一句话,使得Hello.jsp页面的改动能实时更新,不需要每次都重新启动服务器。struts.devMode是struts的开发模式,value设置为true,可以做到更改下面action的name值之后,在浏览器能直接访问到。name是hello的时候:name是hell... ...
分类:
其他好文 时间:
2018-03-23 19:23:03
阅读次数:
208
当初在shell中, 看到">&1"和">&2"始终不明白什么意思.经过在网上的搜索得以解惑.其实这是两种输出. 一、linux重定向的设备代码 标准输入(stdin) 代码为 0 ,实际映射关系:/dev/stdin -> /proc/self/fd/0 标准输出(stdout)代码为 1 , 实 ...
分类:
其他好文 时间:
2018-03-21 11:41:57
阅读次数:
206
来源于:https://www.nowcoder.com/test/question/done?tid=14302398&qid=25373#summary 下列java程序的输出结果为____。 正确答案: B 你的答案: E (错误) hello and ab hello and cb hell ...
分类:
编程语言 时间:
2018-03-21 11:38:18
阅读次数:
196
字典的嵌套:>>>fromcollectionsimportdefaultdict>>>a=defaultdict(dict)>>>a[‘hell‘][‘good‘]=1>>>adefaultdict(<class‘dict‘>,{‘hell‘:{‘good‘:1}})
分类:
编程语言 时间:
2018-03-20 15:13:32
阅读次数:
166
1.添加pom <dependencies>
<!-- ... other dependency elements ... -->
分类:
编程语言 时间:
2018-03-19 15:27:04
阅读次数:
143
先说1双引号与3个双引号的区别,双引号所表示的字符串通常要写成一行 如: s1 = "hello,world" 如果要写成多行,那么就要使用\ (“连行符”)吧,如 s2 = "hello,\ world" s2与s1是一样的。如果你用3个双引号的话,就可以直接写了,如下: s3 = """hell ...
分类:
编程语言 时间:
2018-03-19 11:37:16
阅读次数:
152