第七章 F# 库(五)
事件(Microsoft.FSharp.Control.Event)模块
可以把 F# 中的事件看做是函数的集合,能够通过函数调用来触发。其思想是,函数本身注册成事件,即函数的集合,等待事件发生的通知;然后,触发函数发出事件已经发生的通知,引发所有添加到事件中的函数被执行。
我们将讨论事件模块中的下列功能:
创建和处理事件:使用 create...
分类:
其他好文 时间:
2014-07-22 23:03:12
阅读次数:
314
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
427
有一个需要,给定一个数组,从中生成要求个数的随机数组,不重复,即getRandomArray(int[] originalArray,int number) 这样的一个函数。想了一下,可以这样做:
把数组元素放到一个List中从List中随机取一个数把取到的数从List中删除重复上述过程
代码如下:
import java.util.ArrayList;
import java.ut...
分类:
其他好文 时间:
2014-04-29 13:41:20
阅读次数:
295
JsonTools
package com.example.weather_json.tools;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import co...
分类:
Web程序 时间:
2014-04-29 13:37:21
阅读次数:
1039
环境:ubuntu14.04
1.打开 https://launchpad.net/~jon-severinsson/+archive/ffmpeg 这个网址。选择你的系统版本(ubuntu 14.04)
2.将源添加到/etc/apt/sources.list
3.更新源
sudo apt-get update
4.安装ffmpeg
sudo apt-...
分类:
其他好文 时间:
2014-04-29 13:35:21
阅读次数:
428
JSP页面:
listValue="name" key="name" cssStyle="width:130px">
后台:
private List navs;
navs=navservice.allNav();调用dao层取得所有的值集合。
注: listValue="name"通过设置这个属性显示所有的select内容...
分类:
其他好文 时间:
2014-04-29 13:32:23
阅读次数:
236
使用函数操作链表
1:计算链表中结点的个数:定义一个Length_list()函数用于计算链表中结点的个数
函数代码:
//计算链表中结点的个数
void Length_list(PNODE pHead)
{
PNODE p = pHead->pNext;
int len = 0;
while(NULL != p)
{
len++;
p = p->pNext;
...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
302
Build Tree View Structure for SharePoint List Data
将SharePoint中的数据树状显示...
分类:
其他好文 时间:
2014-04-29 13:26:20
阅读次数:
361
1 HDFS服务中,默认端口集合:
1. HDFS 端口
Service
Servers
Default Ports Used
Protocol
Description
Need End User Access?
Configuration Parameters
NameNode WebUI
Master Nodes (NameNo...
分类:
其他好文 时间:
2014-04-29 13:24:21
阅读次数:
492
1、
??
Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2...
分类:
其他好文 时间:
2014-04-29 13:16:21
阅读次数:
250