<script>functiononlyNum(){ if(!(event.keyCode==46)&&!(event.keyCode==8)&&!(event.keyCode==37)&&!(event.keyCode==39)){ if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=1..
分类:
其他好文 时间:
2014-07-29 15:29:59
阅读次数:
193
importjava.awt.Color;
importjava.awt.Font;
importjava.awt.event.KeyEvent;
importjava.awt.event.KeyListener;
importjava.awt.event.MouseAdapter;
importjava.awt.event.MouseEvent;
importjava.util.Random;
importjavax.swing.JFrame;
importjavax.swing.JLabel;
imp..
分类:
其他好文 时间:
2014-07-29 15:26:19
阅读次数:
268
1.首先在usercontrol后台添加如下代码:public partial class MyControl: UserControl{ //添加事件代理 public event EventHandler AX; //在需要响应的事件中添加 private void MyControl_Mous...
分类:
其他好文 时间:
2014-07-28 19:11:34
阅读次数:
186
import?java.awt.event.*;
import?java.io.*;
import?java.util.Properties;
import?javax.swing.*;
/**
Properties的练习
*/
public?class?Sample?extends?JApplet
{
public?static?void?main(Stri...
分类:
其他好文 时间:
2014-07-28 16:58:14
阅读次数:
282
QTP默认录制方式无法录制下拉菜单,需修改设置后再录制修改设置如下:1、Record->webeventrecordingconfiguration-----customsettings...展开Webobjects2、选中webelement,点击event->add->。并确定在record栏内,状态是enabled3、重新录制你的脚本4、录制完成后,执..
分类:
其他好文 时间:
2014-07-28 16:47:04
阅读次数:
183
Description
You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able...
分类:
其他好文 时间:
2014-07-28 16:14:11
阅读次数:
257
处理新连接事件的回调函数是ngx_event_accept,原型如下:void ngx_event_accept(ngx_event_t *ev)具体流程如下:1)首先调用accept方法试图建立新连接,如果没有准备好的新连接事件,ngx_event_accept方法会直接返回2)设置负载均衡阀值n...
分类:
其他好文 时间:
2014-07-28 15:27:03
阅读次数:
173
http://acm.hdu.edu.cn/showproblem.php?pid=1171
题意:有n种物品,给出每种物品的价值和数目,要将这些物品尽可能的分成相等的两份A和B且A>=B ,输出A,B。
母函数可以过,但感觉最直接的方法应该是多重背包。
母函数的话,也是按总价值的一半求,从一半到小枚举,直到找到系数不为0的就是B。
#include
#include
...
分类:
其他好文 时间:
2014-07-27 23:55:09
阅读次数:
275
import java.awt.*;import java.awt.event.*;import javax.swing.*; public class jh extends JFrame implements ActionListener{ private JPanel jPanel1,jPa.....
分类:
其他好文 时间:
2014-07-27 23:21:09
阅读次数:
341
无意中在一段源码里看到event.currentTarget这个属性,这个与熟悉的event.target还是有所差别的。event.target是指事件发生的源,在哪个元素上发生的。event.currentTarget 就是通过addEventListener绑定的DOM元素。事件是可以通过冒泡...
分类:
其他好文 时间:
2014-07-27 09:57:52
阅读次数:
165