xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init(event)">
import mx.core.IVisualElement;
import mx.core.IVisualElementContai...
分类:
其他好文 时间:
2014-07-22 23:05:55
阅读次数:
338
第七章 F# 库(五)
事件(Microsoft.FSharp.Control.Event)模块
可以把 F# 中的事件看做是函数的集合,能够通过函数调用来触发。其思想是,函数本身注册成事件,即函数的集合,等待事件发生的通知;然后,触发函数发出事件已经发生的通知,引发所有添加到事件中的函数被执行。
我们将讨论事件模块中的下列功能:
创建和处理事件:使用 create...
分类:
其他好文 时间:
2014-07-22 23:03:12
阅读次数:
314
如果要编写定制的Apache模块,最总需要编译成Apache包。
命令如下:
% ./buildconf
% ./configure --prefix=/usr/local/apache
> --with-layout=Apache --enable-modules=most --enable-mods-shared=all > --with-mpm=prefork
% make
#mak...
分类:
其他好文 时间:
2014-07-22 22:59:34
阅读次数:
243
一、先看看jdk提供的event包:public interface
EventListener:所有事件侦听器接口必须扩展的标记接口。package java.util;/** * A tagging interface
that all event listener interfaces mus...
分类:
编程语言 时间:
2014-05-02 00:25:21
阅读次数:
432
javafx.concurrency并发包是为方便javafx Application Thread也就是javafx的UI线程与后台线程安全交互的工具包。
接口:Worker.
Worker接口封装了Worker.State枚举作为Worker的状态:READY,SCHEDULED,RUNNING,SUCCEDED,FAILED,CANCELLED.
Worker拥有下面这些只读prope...
分类:
编程语言 时间:
2014-05-01 21:51:52
阅读次数:
691
package com.rgy.entity;
import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Bo...
分类:
编程语言 时间:
2014-05-01 17:24:12
阅读次数:
411
QPoint dragPosition;void
MainWindow::mousePressEvent(QMouseEvent
*event){if(event->button()==Qt::LeftButton){dragPosition=event->globalPos()-frameGeom...
分类:
移动开发 时间:
2014-05-01 04:14:18
阅读次数:
464
This article mainly introduces the process of
Memcached, libevent structure of the main thread and worker thread based on the
processing of the connec...
分类:
其他好文 时间:
2014-05-01 02:44:07
阅读次数:
571
void GameLayer::ccTouchEnded(CCTouch *touch,CCEvent *event){
CCLog("end %f,%f",touchStartP.x,touchStartP.y);
if (openTouch) {
CCPoint touchEndP=touch->getLocation();...
分类:
其他好文 时间:
2014-04-30 22:33:40
阅读次数:
359
题意:有n样物品,每样物品价值是v,件数是m。尽量把这些物品分成两堆使得两边总价值最接近。输出分得的两堆各自的价值。
利用母函数法来解决,因为分成两堆,而两堆中较小的一堆最大为所有物品总价值量的一半,所以母函数的组合数上下就可以设置成总价值量的一半。求出所有的组合后,可以利用贪心的思想来得到答案,因为要求两堆之差尽可能小,所以就可以从总价值量的一半开始向小的方向找,找到最大的价值量,则另一堆的价值量就是总价值量-此堆的价值量。因为组合数可能较大,这里不记录组合种数,而是用一个标记来表示该数能否组合出即可。...
分类:
其他好文 时间:
2014-04-29 13:42:20
阅读次数:
302