上周五和周末,工作忙里偷闲,在看java cocurrent中也顺便再温故了一下Thread.interrupt和java 5之后的LockSupport的实现。
在介绍之前,先抛几个问题。
Thread.interrupt()方法和InterruptedException异常的关系?是由interrupt触发产生了InterruptedException异常?Th...
分类:
编程语言 时间:
2014-06-19 13:03:42
阅读次数:
733
取文件的大小 (KB,MB,GB...)
2种方式: VB 和 C#
1, VB
Public Function GetFileSize(ByVal iFileSizeKB As Long) As String
Dim iFileSizeMB As Integer
Dim iFileSizeGB As Integer
If (iFileSizeKB >= 1024) Th...
分类:
其他好文 时间:
2014-06-19 12:39:06
阅读次数:
310
1、需要准备的工具,eclipse,cdt(c++)插件,cygwin(unix)和
android ndk.
在cygwin的etc目录下将ndk的路径引入到profile文件中,可以在cygwin的任何目录都可以访问到ndk,不同的ndk路径PATH的写法不同. :
${ORIGINAL_P.....
分类:
移动开发 时间:
2014-06-16 08:52:50
阅读次数:
393
原题地址:https://oj.leetcode.com/problems/gray-code/题意:The
gray code is a binary numeral system where two successive values differ in only
one bit.Given a...
分类:
编程语言 时间:
2014-06-16 07:42:27
阅读次数:
242
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the...
分类:
其他好文 时间:
2014-06-15 19:28:54
阅读次数:
246
题目
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers
sums to T.
Each number in C may only be used once in...
分类:
其他好文 时间:
2014-06-15 19:24:21
阅读次数:
229
Humble Numbers
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 9396
Accepted: 4417
Description
A number whose only prime factors are 2,3,5 or 7 is called a...
分类:
其他好文 时间:
2014-06-15 19:04:15
阅读次数:
159
Cross the Wall
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 327680/327680 K (Java/Others)
Total Submission(s): 4176 Accepted Submission(s): 748
Problem Description
“Across th...
分类:
其他好文 时间:
2014-06-13 20:43:09
阅读次数:
280
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down or right at...
分类:
其他好文 时间:
2014-06-13 20:36:56
阅读次数:
280
Say you have an array for which theithelement
is the price of a given stock on dayi.If you were only permitted to complete at
most one transaction (ie...
分类:
其他好文 时间:
2014-06-13 15:55:47
阅读次数:
273