想要在电脑上正常运行jar文件,应该确认电脑已安装好jdk和jre,并配置好环境变量。
如果安装与配置都没有问题却无法运行,则有可能是注册表的问题。
解决方法:
打开注册表,注册表项的路径为:\HKEY_CLASSES_ROOT\Aplications\javaw.exe\shell\open\command
在此路径下有一默认键值, 不正常的情况下, 键值是:"C:\Program ...
分类:
其他好文 时间:
2014-06-29 07:14:24
阅读次数:
815
题目
Write a function to find the longest common prefix string amongst an array of strings.
原题链接
解题思想
给一个字符串数组,求这些字符串的最长公共前缀。
这个题应该是比较简单的,直接写代码,一次AC。解题思想是依次对数组中的字符串求最长公共前缀。
代码实现
class Sol...
分类:
其他好文 时间:
2014-06-20 12:25:09
阅读次数:
247
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2113
Description
Given a number of strings, can you find how many strings that appears T times?
Input
The input conta...
分类:
编程语言 时间:
2014-06-20 09:00:14
阅读次数:
344
安装Git, 到项目目录下右击->Git Bash, 输入命令:find . -name
"*.cs" | xargs wc -l效果如下, 还是挺简便的.
分类:
其他好文 时间:
2014-06-13 14:02:58
阅读次数:
221
Implement an algorithm to print all valid (
properly opened and closed) combinations of n-pairs of parentheses.思路:比如 n = 3,
((())) 就是一个valid combinati...
分类:
其他好文 时间:
2014-06-11 13:19:00
阅读次数:
306
第零章:扯扯淡
出一个有意思的题目:用一个宏定义FIND求一个结构体struct里某个变量相对struc的编移量,如struct student{ int a;
//FIND(struct student,a) 等于0 char b; //FIND(struct st...
分类:
系统相关 时间:
2014-06-11 10:23:14
阅读次数:
361
原题地址:https://oj.leetcode.com/problems/edit-distance/题意:Given
two wordsword1andword2, find the minimum number of steps required to
convertword1toword2....
分类:
编程语言 时间:
2014-06-11 08:58:49
阅读次数:
293
题目
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum
= 22,
5
...
分类:
其他好文 时间:
2014-06-07 13:47:22
阅读次数:
191
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.
3
7 4
2 4 6
8 5 9 3
That is, 3 + 7 + 4 + 9 = 23.
Find th...
分类:
其他好文 时间:
2014-06-07 13:45:25
阅读次数:
189
题目大意:
三个操作。
1. 合并两个集合
2.把第一个元素放到第二个集合里
3.输出集合的数量和和。。
思路分析:
要用p记录这个元素所在集合编号,然后用编号建立并查集。
#include
#include
#include
#include
using namespace std;
typedef long long LL;
int set[111111...
分类:
其他好文 时间:
2014-06-07 12:52:40
阅读次数:
267