码迷,mamicode.com
首页 >  
搜索关键字:python异常处理 try except assert    ( 20850个结果
第八章 线性时间排序 8.3 基数排序
package chap08_Linear_Time_Sort;import static org.junit.Assert.*;import java.util.Arrays;import org.junit.Test;public class CopyOfSortAlgorithms { /**...
分类:其他好文   时间:2014-06-12 20:32:16    阅读次数:231
第九章 中位数和顺序统计量 9.2 期望为线性时间的选择算法
package chap09_Medians_and_Order_Statistics;import static org.junit.Assert.*;import java.util.Random;import org.junit.Test;public class SearchAlorithm...
分类:其他好文   时间:2014-06-12 17:26:37    阅读次数:316
Java RandomAccessFile 文件写入
public void mouseDown(MouseEvent e) { try{ //指定目标文件 RandomAccessFile F = new RandomAccess...
分类:数据库   时间:2014-06-12 16:02:13    阅读次数:184
Java try、catch、finally及finally执行顺序详解(转)
1.为什么要用finally先看一个没有finally的异常处理try-catch语句:假设count为要使用到的资源,并且用完要求释放此资源。那么我们可以把释放资源的语句放到try-catch后执行,当前的程序不管是在执行完try语句块还是catch语句块,都会顺序执行到下面释放资源的语句。int...
分类:编程语言   时间:2014-06-10 21:40:53    阅读次数:349
[LeetCode] Single Number
Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complex...
分类:其他好文   时间:2014-06-10 21:27:22    阅读次数:284
[LeetCode] Single Number II
Given an array of integers, every element appears three times except for one. Find that single one.Note: Your algorithm should have a linear runtime c...
分类:其他好文   时间:2014-06-10 20:42:48    阅读次数:315
[LeetCode OJ] Single Number之二 ——Given an array of integers, every element appears THREE times except for one. Find that single one.
1 class Solution { 2 public: 3 int singleNumber(int A[], int n) { 4 int bits = sizeof(int)*8; 5 int result=0; 6 for(int i...
分类:移动开发   时间:2014-06-10 19:45:48    阅读次数:334
第六章 堆排序 6.5 优先队列
package chap06_Heap_Sort;import static org.junit.Assert.*;import java.util.ArrayList;import java.util.Arrays;import org.junit.Test;/** * 优先队列,二叉堆数组实现,...
分类:其他好文   时间:2014-06-10 16:40:14    阅读次数:347
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!