取文件的大小 (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
题目
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
...
分类:
其他好文 时间:
2014-06-19 11:46:47
阅读次数:
277
By Long Luo
## 字如其人
我个人是一直相信"字如其人"的,因为我相信一个人愿意去把字写的好看,一定是花了不少精力去学习,同时加以练习。TA至少具有以下几个特点:
强力的毅力:
想练好字一定是需要花费不少时间去分析一些好字,具体好在什么地方,结构,字的笔画,字形,连笔,分解。然后辅以大量的练习才能达到一定的成就。这就需要TA能够静下心来去练习。...
分类:
其他好文 时间:
2014-06-19 10:17:00
阅读次数:
308
题目
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
...
分类:
其他好文 时间:
2014-06-19 10:05:39
阅读次数:
278
相对于使用进程实现并发,用线程的实现更加轻量。每个线程都是独立的逻辑流。线程是CPU上独立调度运行的最小单位,而进程是资源分配的单位。当然这是在微内核的操作系统上说的,简言之这种操作系统的内核是只提供最基本的OS服务,更多参看点击打开链接
每个线程有它自己的线程上下文,包括一个唯一的线程ID(linux上实现为unsigned long),栈,栈指针,程序计数器、通用目的寄存器和条件码,...
分类:
编程语言 时间:
2014-06-16 12:28:38
阅读次数:
296
和这一题构造的矩阵的方法相同。
需要注意的是,题目中a0~a9 与矩阵相乘的顺序。
#include
#include
#include
#include
#include
#define N 10
using namespace std;
int mod;
typedef long long LL;
struct matrix
{
LL a[10][10];
}...
分类:
其他好文 时间:
2014-06-16 12:06:07
阅读次数:
231
题目
Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target i...
分类:
其他好文 时间:
2014-06-15 16:53:32
阅读次数:
177
题目
Given a sorted array of integers, find the starting and ending position of a given target value.
解题思路:
查找一个数出现的范围,给一个排好序的数组和一个数,找出这个数在数组中出现的范围。
这个题直接使用一次遍历就可以得到结果,这样的时间复杂度为O(n)。但是对于有序数组我们一般可以使用二分查找可以得到更好的O(logn)的时间复杂度。我们可以使用二分查找找到这个数第一次出现的位置和这个数最后一次出现的位...
分类:
其他好文 时间:
2014-06-15 16:19:16
阅读次数:
237
// enter any type data to show Binary.c
// 输入任意类型数据转换成二进制
// version: 1.0
// date: 2014.6.12
// BUG提交: yinjunwithu@outlook.com
// 缺陷: 请勿使用vc 6.0编译 因为不支持long long及unsigned long long类型
// #define _CRT_...
分类:
编程语言 时间:
2014-06-15 09:44:48
阅读次数:
414
求N^N最左边的一位1.转化为小数,快速幂2.数学公式************************************************#include#includeusing
namespace std;long long n;double n0;int cal(long long...
分类:
其他好文 时间:
2014-06-13 15:29:06
阅读次数:
224