码迷,mamicode.com
首页 >  
搜索关键字:find grep    ( 34568个结果
运行jar文件时,出现“could not find the main class”的解决方法
想要在电脑上正常运行jar文件,应该确认电脑已安装好jdk和jre,并配置好环境变量。 如果安装与配置都没有问题却无法运行,则有可能是注册表的问题。 解决方法: 打开注册表,注册表项的路径为:\HKEY_CLASSES_ROOT\Aplications\javaw.exe\shell\open\command 在此路径下有一默认键值, 不正常的情况下, 键值是:"C:\Program ...
分类:其他好文   时间:2014-06-29 07:14:24    阅读次数:815
关于端口的关闭——Linux
本文出自:http://blog.csdn.net/svitter 引文出自:http://bbs.chinaunix.net/thread-775649-1-1.html 1.关闭服务 service 服务 stop netstat -ntlp kill -9 PID 2.使用两个方法 1. ps aux|grep 端口 kill -9 PID 2. iptables...
分类:系统相关   时间:2014-06-20 13:08:31    阅读次数:324
[ LeetCode ] Longest Common Prefix
题目 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
HLG 2113 Count (C++ --- map容器 基础题)
链接: 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
[cc150] Find all valid combinations of n-pairs of parentheses
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
Linux 内核 链表 的简单模拟
第零章:扯扯淡 出一个有意思的题目:用一个宏定义FIND求一个结构体struct里某个变量相对struc的编移量,如struct student{ int a; //FIND(struct student,a) 等于0 char b; //FIND(struct st...
分类:系统相关   时间:2014-06-11 10:23:14    阅读次数:361
perl 函数返回hash引用
my %h=%{foo()} #接收hashsub foo{ my %fh; $fh{a}=1; return \%fh; #返回hash引用}grep??在hash中,当检验一个元素值是否被定义是用defined,当检验一个key在hash中是否存在时,用exists。
分类:其他好文   时间:2014-06-11 09:40:45    阅读次数:440
Path Sum II
题目 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
uva 11987 Almost Union-Find (并查集)
题目大意: 三个操作。 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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!