自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

皮斯特劳沃

只有奋斗的现在,才是最好的状态。

  • 博客(28)
  • 资源 (1)
  • 收藏
  • 关注

原创 重构笔记——内联临时变量

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42167015        在上一篇文章中介绍了“ 内联函数“。本文将介绍“内联临时变量”这种重构手法。        下面让我们一起来学习该重构手法把。(PS:虽然某些重构手法看起很简单,但是和其它重构手法结合起来使用,会产生异曲同工的

2014-12-31 08:15:34 4995 2

原创 重构笔记——内联函数

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42261333 在上一篇文章中介绍了“提炼函数“。本文将介绍“内联函数”这种重构手法。 下面让我们一起来学习该重构手法把。

2014-12-30 08:10:04 6100 8

原创 重构笔记——提炼函数

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42214393 在前面的三篇文章中介绍了重构入门篇、代码的坏味道(上)、代码的坏味道(下)。本文将正式开启重构之旅。从本文开始在后续的文章中会陆续介绍92种重构手法,每一种重构手法都会对应于一种代码坏味道。在介绍的过程中,每一种重构手法也将对应一篇文章,可能有的重构手法比较简短,但是为了便于整理还是单独将其列为一篇。(PS:不管怎样,我都会坚持把这些

2014-12-28 15:45:05 5820 3

原创 重构笔记——构筑测试体系

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42167015 作为一名程序员,不知你是否在开发过程中也很少甚至不写测试程序,可能大多数人觉得这很正常,其实从个人角度来看也很正常,因为毕竟有测试人员专门进行测试的嘛!但是,如果能够认真观察程序员把最多时间耗在哪里,你就会发现,编写代码其实只占非常小的一部分。有些时间用来决定下一步干什么,另一些时间花在设计上,最多的时间则是用来调试。我敢肯定每一位读者

2014-12-26 08:06:51 4752 1

原创 JAVA中IO流总结

本文是在学习中的总结,欢迎转载但请注明出处:http://write.blog.csdn.net/postedit/42119261 我想你对JAVA的IO流有所了解,平时使用的也比较的多,但是对于其具体分类和继承体系可能知道的并不多,可能也很少去看相关的API文档,找出其中的关系和各自的应用情形。本文简单对常用的IO流进行分类整理,并简单举例说明其应用。希望本文对你有所帮助。

2014-12-24 08:12:18 5808 9

原创 重构笔记——代码的坏味道(下)

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42083495 在重构笔记——代码的坏味道(上)中介绍了22种坏味道中的11种,本文将介绍其余的11种坏味道。之所以将其分为两篇文章介绍,是因为一篇文章介绍22种方法显得篇幅太长,担心读者难以坚持看完。(PS:在对这些"代码的坏味道“了解和熟悉后,我们就要开始有针对性地进行重构了,但是在进行重构之前,我们似乎还缺少点什么!对了,我们还缺少测试环境!在开发的

2014-12-22 18:59:32 5213

原创 重构笔记——代码的坏味道(上)

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42041757 在重构入门篇中,简单地介绍了重构的定义、为何重构、何时重构等。我想对于重构是如何运作的,你已经有了较好的理解了。但是对于代码中的坏味道,你可能知道的并不多。坏味道可能是无形中产生的,也可能是开发人员偷懒造成的,还可能是其它某些因素导致的。不管怎么样,代码中的坏味道对程序没有半点好处,它会促使程序腐烂,甚至变质。对于开发人员,真的是很有必要

2014-12-20 11:51:53 13954 19

转载 谁能给你机会,让你如愿以偿

别总是抱怨自己怀才不遇,工资太少,先去想想怎么提高自己的能力,怎样让老板赏识吧。  近段时间,已经不止听到一个人对我抱怨:“公司给我这么点钱,我就干这么点事,凭什么多干,他又不给我涨工资。”我忍不住小声嘀咕:如果我是老板,我也不会重用你。反观,也难怪这些人做了一两年仍然原地踏步,先别说涨工资,哪怕你就是再干上十年,估计老板也不会给你涨,说不定哪天碰到经济不景气,就把你裁了,不是没可能的。

2014-12-20 09:29:08 3895 8

原创 重构笔记——入门篇

程序员经常会遇到晦涩难懂的代码,尤其是他人写的代码,可能是同事离职后转交给你维护的,也可能是项目遗留下来的。不管怎么样,当你被迫从一个2000行代码的类或一个500行代码的方法中去寻找并解决bug,我想大多数人都会头疼,对于没有一点注释的代码,甚至想死的心都有。这时候我们少不了会在心中默默诅咒写出这样代码的人。我想不管对于你还是我自己,当我们在开发的过程中,经常会抱以只要程序能正常运行就行,而不管代码是否整洁的心态。这样的做法其实是在坑自己,不要等到后续代码维护时再后悔当初没有把代码写好,那时再对代码进行修

2014-12-17 20:06:08 6102 5

原创 从"按层次输出二叉树"到"求解二叉树深度"的总结

本文是在学习中的总结,欢迎转载但请注明出处:http://write.blog.csdn.net/postedit/41964669最近在刷LettCode上的算法题,发现好多题目的解题思路大体是一致的,甚至会出现一解对多题的情形,可能一方面原因是我刷的都是简单题,另一方面原因可能是网站有意来提高我们的信心和联想能力。比如有求解二叉树最大深度和求解二叉树最小深度的题目,也有判断两颗树是否完全一致和判断两个树是否轴对称的题目,还有按层次从树根往下输出每层元素和按层次从下往树根输出每层元素的题目等。昨天

2014-12-16 19:31:16 5320 2

原创 Leetcode_112_Path Sum

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41910495Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.思路:(1)题意为给定一个(每个节点带有数值)二叉

2014-12-13 15:52:53 2513

原创 Leetcode_171_Excel Sheet Column Number

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42290079Given a column title as appear in an Excel sheet, return its corresponding column number.

2014-12-31 07:19:34 2079 3

原创 Leetcode_169_Majority Element

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42247887Given 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

2014-12-29 22:53:06 1785

原创 Leetcode_110_Balanced Binary Tree

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42218839Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees o

2014-12-28 21:35:16 2103

原创 Leetcode_101_Symmetric Tree

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42087039Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4

2014-12-22 21:57:23 1209

原创 Leetcode_100_Same Tree

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42061529Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same

2014-12-22 19:23:31 1266

原创 Leetcode_104_Maximum Depth of Binary Tree

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41964475Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.

2014-12-16 19:15:51 1645

原创 Leetcode_111_Minimum Depth of Binary Tree

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41964249Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.

2014-12-16 18:56:31 1298

原创 Leetcode_107_Binary Tree Level Order Traversal II

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41964067Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).

2014-12-16 18:36:28 1408

原创 Leetcode_102_Binary Tree Level Order Traversal

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41929059Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,#,15,7}, 3

2014-12-14 21:29:33 1503

原创 Leetcode_70_Climbing Stairs

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41851705You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?思路:(1)题

2014-12-10 20:51:41 1655

原创 Leetcode_119_Pascal's Triangle II

Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?

2014-12-10 20:26:49 1439

原创 Leetcode_118_Pascal's Triangle

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41827325Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]

2014-12-09 18:42:28 2905 1

原创 Leetcode_19_Remove Nth Node From End of List

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41778305Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second n

2014-12-06 20:21:09 1192

原创 Leetcode_21_Merge Two Sorted Lists

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41750865Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.For example,Given 1->2->3,4->5->6,

2014-12-05 22:01:53 1205

原创 Leetcode_83_Remove Duplicates from Sorted List

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41728739Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.思路:(1

2014-12-04 19:20:34 2019

原创 JAVA应用程序转换为Applet

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41673295将一个图形的JAVA应用程序转换为能够嵌入在网页中运行的applet很容易,从本质上来说,所有用户界面编码都是相同的,将应用程序转化为applet代码基本步骤为:(1)创建一个HTML页面,并用适当的标记加载applet代码。(2)创建一个JApplet类的子类。将这个子类标记为共有,否则,不能加载applet。(3)删除应用程序中的main方法

2014-12-02 08:06:48 3709

原创 Leetcode_66_Plus One

本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41652987Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the

2014-12-01 20:56:45 1301

决策的艺术思维导图精华整理

《决策的艺术》,简单地说,决策就是做决定、拿主意,无论是我们人生中的关键时刻,还是日常生活的大事小情,都需要我们做出各种决策。然而,不同的人做出的决定总是大相径庭,有的成功,有的失败。那么,如何做出一个英明的决策,就显得相当重要了。在这本书里,三位决策高手为你总结了,做出一个英明决策所需要的八个要素:分别是问题、目标、备选方案、结果、取舍、不确定性、风险承受力和相关联的决策。这八大要素中,前五个是重中之重,作者根据它们的英文单词首字母,把这5点缩写为 PROACT,本书讲的英明决策方法,就叫作PROACT法。决策的艺术读后感和决策的艺术读书笔记总结如下。

2020-10-24

空空如也

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

TA关注的人

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