Dungeon MasterDescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may...
分类:
其他好文 时间:
2015-08-05 22:10:25
阅读次数:
103
package com.leegh.function/** * @author Guohui Li */object PartiaAppliedFunction { def main(args: Array[String]): Unit = { val data = List(1, 2, 3...
分类:
其他好文 时间:
2015-08-05 08:51:23
阅读次数:
123
参考一些网上资料, 然后自己改了改......主要是为自己写的一个监视活动进程工具用的, 有需要可以参考参考unit ProcessInfos;interfaceuses Windows, TLHelp32, PsAPI, SysUtils;type TProcessInfo = record .....
分类:
系统相关 时间:
2015-08-04 18:45:38
阅读次数:
203
package com.leegh.oop/** * @author Guohui Li *//** * 正则表达式 */object RegExpressOps { def main(args: Array[String]): Unit = { val regex = """([0-9]+...
分类:
其他好文 时间:
2015-08-03 18:33:26
阅读次数:
170
Devour Magic
Time Limit: 2000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
In Warcraft III, Destroyer is a large flying unit that must consume magic to sustain its mana. Breaking fre...
分类:
其他好文 时间:
2015-08-03 11:39:00
阅读次数:
201
1 unit Unit1; 2 3 interface 4 5 uses 6 System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 FMX.Types, FMX....
分类:
移动开发 时间:
2015-08-02 19:52:11
阅读次数:
385
示例代码:
object For_Advanced {
def main(args: Array[String]): Unit = {
/**
* for循环内部调用的源码其实是:
*
* @inline override final
* def foreach[B](f: A=> B){
* var these ...
分类:
其他好文 时间:
2015-08-02 11:56:48
阅读次数:
199
学习了模式匹配下的For循环,用for循环遍历list中的所有元素,然后将其打印出来,应用foreach函数,应用index绑定flink,打印index;二元组,通过模式匹配打印,也可以通过类型进行模式匹配,例子如下Defmain(args:Array[string}):unit={For(i”s...
分类:
其他好文 时间:
2015-08-02 08:54:18
阅读次数:
178
本节主要内容
模式匹配的类型
for控制结构中的模式匹配
option类型模式匹配
1. 模式的类型1 常量模式object ConstantPattern{
def main(args: Array[String]): Unit = {
//注意,下面定义的是一个函数
//函数的返回值利用的是模式匹配后的结果作为其返回值
//还需要注意的是函数定义在main方法中...
分类:
其他好文 时间:
2015-08-01 23:41:16
阅读次数:
405
scala中的表达式是有值的, 所以可以把表达式当做参数来传递, 那么接受表达式的形参定义一般是: block: =>Unit , 没有形参,返回类型Unitspark中的这个代码很经典,可以传递一个代码块给函数: def tryOrIOException(block: =>Unit){ ...
分类:
其他好文 时间:
2015-08-01 23:24:12
阅读次数:
155