自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(163)
  • 收藏
  • 关注

原创 重新安装win7后的java开发环境eclipse and postgresql

重新做系统后,eclipse和postgresql 都无需重新安装,eclipse可以直接使用,本质上是一个绿色版本,而postgresql,只需要以下步骤:pg_ctl register -N postgresql-9.1_example -D "W:\Program Files (x86)\PostgreSQL\9.1\data"net start postgresql

2017-10-18 15:23:02 338

原创 reason about thread is blocked

sometimes thread is blocked and process  freeze, usually two conditions result in this, one reason is dead lock, the other is free memory twice or multi-times.

2017-04-29 07:10:42 410

原创 UI 相关配置 包含wtl 和mfc

1.  动态改变对话框大小   rc Appearance->Border->Resizing2. List Ctrl文字   View->report3. resource 对话框 中文 问号: http://blog.csdn.net/zhangxinrun/article/details/5797136

2015-12-25 14:31:33 392

转载 C/C++ 字符串的UTF-8与GBK(或GB2312)编码转换

点击打开链接C/C++:GBK(或GB2312)转UTF-8实现:string GBKToUTF8(const char* strGBK){ int len = MultiByteToWideChar(CP_ACP, 0, strGBK, -1, NULL, 0); wchar_t* wstr = new wchar_t[len+1]; m

2015-12-23 13:51:16 645

原创 install wtl9.1 and .lib of debug

1 download wtl9.1 need unblock the zip first then run the js, otherwise will have js error. 2.when install vs2013 or 2015, had better not inherit the parent properties.3. when compile .lib of debu

2015-12-11 17:16:46 559

转载 How to Set Classpath for Java on Windows and Linux

http://javarevisited.blogspot.com/2011/01/how-classpath-work-in-java.htmlWhat is CLASSPATH in Java Classpath in Java is path to directory or list of directory which is used by ClassLoaders to

2015-05-19 15:24:33 402

转载 3 ways to solve java.lang.NoClassDefFoundError in Java J2EE

fromI know how frustrating is to see Exception in thread "main" java.lang.NoClassDefFoundError,  which is a manifestation of NoClassDefFoundError in Java. I have seen it couple of times and sp

2015-05-19 15:23:07 792

原创 关于 eclipse 和 tomcat under ubuntu14.04

refer below articlesHow should I install Apache Tomcat 7 for use with Eclipse?`/usr/share/tomcat7/logs/catalina.out': No such file or directoryHow should I install Apache Tomcat 7 fo

2015-05-11 16:31:39 360

转载 How To Install Apache Tomcat 7 on Ubuntu 14.04 via Apt-Get

原址Tags: Apache, Java Distribution: UbuntuAbout Apache TomcatApache Tomcat is an application server that is used to serve Java applications to the web. Tomcat is an open source implementati

2015-05-11 15:32:18 796

转载 Linux GCC常用命令

简介2简单编译2.1预处理2.2编译为汇编代码(Compilation)2.3汇编(Assembly)2.4连接(Linking)3多个程序文件的编译4检错5库文件连接5.1编译成可执行文件5.2链接5.3强制链接时使用静态链接库1简介GCC 的意思也只是 GNU C Compiler 而已。经过了这么多年的发展,GCC 已经不仅仅能支持 C 语

2015-04-22 15:49:32 321

转载 Linux添加环境变量与GCC编译器添加INCLUDE与LIB环境变量

Linux添加环境变量与GCC编译器添加INCLUDE与LIB环境变量对所有用户有效在/etc/profile增加以下内容。只对当前用户有效在Home目录下的.bashrc或.bash_profile里增加下面的内容:(注意:等号前面不要加空格,否则可能出现 command not found)#在PATH中找到可执行文件程序的路径。export PATH =$PATH:$

2015-04-19 07:40:55 455

原创 如何在eclipse cdt环境下 导入一个含makefile的工程文件

原文Tutorial: Importing an existing projectThe following tutorial takes you though the process of importing a 'legacy' application using the CDT.Step 1: You want to create a single project t

2015-04-16 10:12:39 3108

转载 一个极好的hash map实现-字符串hash

Note: You are looking at a static copy of the former PineWiki site, used for class notes by James Aspnes from 2003 to 2012. Many mathematical formulas are broken, and there are likely to be other bu

2015-04-16 10:09:18 883

转载 time.h Field tv_sec could not be resolved time.h

You can manually add the time.h to the indexer, go to Preferences -> C/C++ -> Indexer and put it in front of the existing "Files to be indexed up-front" like this:time.h, cstdarg, ...Then it sho

2015-04-13 10:57:37 661

原创 strok and strok_r parse parameters

char ** parseargs(char *s, int * argc){    char *token = 0;    char **array = 0;    char * temp = NULL;    int index = 0;    int length = (int) strlen(s);    if (0 == argc || length   

2015-04-13 09:48:40 376

转载 vs 设置dll、lib库的输出路径

vs2008中,有些项目上的功能是要生产库文件给其他项目调用的,以下是一些设置库文件(x.dll和x.lib)输出路径的方法.设置x.dll 输出路径方法是在右键项目的"属性"->连接器->常规, 然后在常规属性界面中的 "输出文件" 中填入自己想要x.dll文件的输出路径. 设置x.lib 输出路径方法是在右键项目的"属性"->连接器->高级, 然后在高级属性界面中的 "

2015-04-03 20:29:33 11439 4

转载 Linux GCC常用命令

15个常用的gcc 命令选项GCC常用命令详解 Linux GCC常用命令1简介2简单编译2.1预处理2.2编译为汇编代码(Compilation)2.3汇编(Assembly)2.4连接(Linking)3多个程序文件的编译4检错5库文件连接5.1编译成可执行文件5.2链接5.3强制链接时

2015-03-20 16:26:00 356

转载 ubuntu中apt-get的默认安装路径。安装、卸载以及查看的方法总结

apt-get 下载后,软件所在路径是什么??/var/cache/apt/archivesubuntu 默认的PATH为PATH=/home/brightman/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gamesapt-get install安装目录是包的维护者确定

2015-03-20 15:32:51 78616

转载 “make: *** No rule to make target `all'. Stop”的解决方案

make: *** No rule to make target `all'. Stop. 网上搜了半天的英文资料,都无法解决。最后在论坛里找到了解决方案,在这里整理了下mac和windows的解决方案,给需要的童鞋:cocos2dx  eclipse       解决方式:右键项目-->properties-C/C++Build-->Builder settings

2015-03-18 15:45:35 7842 1

转载 eclipse c++ 添加 library

点击打开链接Eclipse + CDT:pthread_create函数编译时报错:undefined reference to `pthread_create’undefined reference to `pthread_create’undefined reference to `MD5′由于pthread 库不是 Linux 系统默认的库,连接时需要使用静态库 li

2015-03-18 15:31:41 3114

原创 1285 山峰和分段

题目来源: Codility基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 关注用一个长度为N的整数数组A,描述山峰和山谷的高度。山峰需要满足如下条件, 0 A[P + 1]。以上图为例,高度为:1 5 3 4 3 4 1 2 3 4 6 2。现在要将整个山分为K段,

2015-01-28 11:16:11 693

转载 XOR 异或的性质及应用

异或的性质及运用 异或是一种基于二进制的位运算,用符号XOR或者 ^ 表示,其运算法则是对运算符两侧数的每一个二进制位,同值取0,异值取1。它与布尔运算的区别在于,当运算符两侧均为1时,布尔运算的结果为1,异或运算的结果为0。简单理解就是不进位加法,如1+1=0,,0+0=0,1+0=1。性质1、交换律2、结合律(即(a^b)^c == a^(b^c))

2015-01-23 12:18:51 3190

原创 Binary Tree Upside Down

Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it upside down and turn it into a tree where the or

2015-01-22 10:44:52 486

原创 Maximum Gap

Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 if the array contains less than 2 elements

2015-01-21 15:57:25 330

原创 Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element

2015-01-21 11:13:52 268

原创 Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest

2015-01-20 18:31:34 257

原创 Excel Sheet Column Number

Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 class Solut

2015-01-19 17:29:50 253

原创 Excel Sheet Column Number

Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 class Soluti

2015-01-19 17:26:09 258

原创 Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity. class Solution { public: int trailingZeroes(int n) { long

2015-01-19 17:16:03 237

原创 Binary Search Tree Iterator

Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: next()

2015-01-19 16:15:37 306

原创 Largest Number

Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result may be ve

2015-01-17 00:39:33 321

原创 Excel Sheet Column Title

Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB class Sol

2015-01-16 22:38:01 377

原创 Dungeon Game

The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially pos

2015-01-15 17:30:46 367

原创 Intersection of Two Linked Lists

Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a2 ↘

2015-01-09 10:43:37 243

原创 Visio 2010 UML作图

今天试着用visio 2010画java uml图,真心不好用,所有的java数据结构需要自己构造,这个还好说,连接线种类很少,generalization线有,没有implement interface的线,没有include的线。generalization线在我试着换了一个样板后竟然不好用了不能调整线位置和拐角,最后换回纯白色图案才又活过来了。以后不考虑visio作uml了,反正

2014-12-12 18:40:24 750

转载 [C/C++][经典探讨]类继承中,通过基类指针delete释放,是否会造成内存泄漏

[序言]很久不写C/C++技术贴了,算一下自己用C++也有7~8年了,虽然现在用Delphi比较多,但是对C++还是有一份热情.前段时间在CSDN看到一个帖子,让我感到非常失落, 很多人都没有引用权威文献来针对这个问题进行讨论,如果没有全文文献的引用,那么讨论将会是一个持久战.要结束这种情况,还是以书为准。如果大家都喜欢探讨技术,可以加入我的QQ:643439947一起学习[建议]

2014-12-10 16:58:16 781

原创 关于 debug能过而release编译不过的问题

ATL_MIN_CRT

2014-10-22 18:42:16 1896

原创 eclipse build error----UnsupportedClassVersionError

Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .cl

2014-10-16 17:44:49 294

原创 Palindrome Partitioning II

Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.For example, given s = "aab",Return

2014-08-14 15:45:30 307

原创 Wildcard Matching

Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover t

2014-08-13 17:59:57 251

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除