private void gridView1_DoubleClick(object sender,
EventArgs e) { try { DataRow dradd =
gridView1.GetDataRow(gridView1.FocusedRowHandle); //params obje...
分类:
其他好文 时间:
2014-06-11 23:14:11
阅读次数:
2192
python海明距离 - 5IVI4I_I_60Y的日志 - 网易博客python海明距离
2009-10-01 09:50:41|分类: Python |标签: |举报 |字号大中小订阅def hammingDist(s1, s2): assert
len(s1) == len(s2) retur...
分类:
编程语言 时间:
2014-06-11 22:02:15
阅读次数:
316
文件: 备注:
上传到/WEB-INF/upload之后,文件名是乱码解决办法:UploadForm.reset()中添加代码: try {
request.setCharacterEncoding("U...
分类:
Web程序 时间:
2014-06-11 21:58:55
阅读次数:
222
java IO
是以文件相对程序的流向定义的javaIO流可分为三类1、输入流,输出流2、字节流,字符流3、节点流,处理流(这里用到了装饰着模式)public class
IOtest { public static void main(String[] args) throws Except...
分类:
编程语言 时间:
2014-06-11 11:41:53
阅读次数:
371
快捷键 功能 备注
Ctrl+1 快速修复 最经典的
Alt+/ 提供内容的帮助 记不全方法 类 属性 最常用
输入try 按alt / 自动出现代码try catch 一般很容易出现异常的代码或者是很容易出错误的代码放在try...catch中
Ctrl+O 显示类中 方法 属性和大纲 查找bug时非常有用(函数列表) 多按一次Ctrl+O 列出更多的内部变量
...
分类:
系统相关 时间:
2014-06-07 16:28:36
阅读次数:
319
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Y...
分类:
其他好文 时间:
2014-06-07 14:55:47
阅读次数:
249
var age=100
//如果年龄不大于50的就会在这里断言,和之前的OC一样的
assert(age>50,"age must >50")
//可以用a..b标识a到b之间的范围,
//我们循环打印五次hello World
var helloWorld="hello world"
for i in 0..5
{
//这个循环的i从0开始到4结束,是不包括范围的最后一个的。
...
分类:
其他好文 时间:
2014-06-07 14:52:38
阅读次数:
218
需求
输入密码字符串,与设定的密码“1234567”进行比较,两者相符则输出"congratulations!”,不符则输出“try again!”。程序bug
实际运行过程中发现,输入某些8位字符串,如33333333,也会得到"congratulations!”,这与预期功能不符。出现bug.....
分类:
其他好文 时间:
2014-06-07 11:21:46
阅读次数:
215
1 package chap02; 2 3 import static
org.junit.Assert.*; 4 5 import java.util.Arrays; 6 7 import org.junit.Test; 8 9
public class ques2_4...
分类:
其他好文 时间:
2014-06-07 10:46:08
阅读次数:
274
情况是这样的,我在写一个类似于Online-Judge的系统,用python很容易实现,编译源程序,运行程序,最后比较程序输出与标准输出得出成绩。现在有个问题,万一程序运行时崩溃,比如出现除0异常,assert失败等等,则在windows下会出现恼人的crash
window。我想要避免它,因为我一...
分类:
其他好文 时间:
2014-06-07 07:11:28
阅读次数:
253