- 博客(123)
- 资源 (4)
- 收藏
- 关注

原创 闭关修炼
每年 被 layoff 一次,多么强大的石头心。可能还是自己不够强大吧,每次都能被筛子 挑出来。我坚信 我会在磨练中 越来越强大的。闭关半年再出关了。在这半年内,我需要提高英语(痛中之痛),自己做一个项目,锻炼自己的算法。英语: 听说读写项目:结合系统设计的内容,初步计划(golang+aws), let's see ...算法:千年不变的,继续leetcode,这次会加上自己的学习和...
2019-09-18 06:11:56
778
转载 Apache & Servlet (卡车与桶的关系)
Apache是Web服务器,Tomcat是应用(Java)服务器,它只是一个Servlet(JSP也翻译成Servlet)容器,可以认为是Apache的扩展,但是可以独立于Apache运行。Apache是专门用了提供HTTP服务的,以及相关配置的(例如虚拟主机、URL转发等等)Tomcat是Apache组织在符合Java EE的JSP、Servlet标准下开发的一个JSP服务器.
2015-05-08 11:39:39
1055
转载 JAVA中的Math()
java.math.Math类常用的常量和方法:Math.PI 记录的圆周率Math.E记录e的常量Math.abs 求绝对值Math.sin 正弦函数 Math.asin 反正弦函数Math.cos 余弦函数 Math.acos 反余弦函数Math.tan 正切函数 Math.atan 反正切函数 Math.atan2 商的反正切函数Math.toDeg
2015-05-07 02:54:02
691
转载 DW
1> 在DW中,如何输入一个空格呢? 输入空格的问题,在DW似乎已成了一个老生常谈的问题,我们可能在许多介绍DW使用方面的书籍或文章中看到过N次。 DW中对空格输入的限制是针对“半角”文字状态而言的,因此通过将输入法调整到全角模式就可以避免了,方法是:打开中文输入法(以人工智能ABC为例),按Shift+Space切换到全角状态,现在应该没问题了。 此外,你还可以通过
2015-05-01 07:50:06
1851
原创 Jade学习笔记
1. controller 的部分都是直接写的,例子1:Hello, World!变成这样 : p Hello, World!例子2:变成这样:pdivh12. controller 里面的属性设置:id 用'#', class用'.' ,其他属性用‘()’包起来。例子1:变成这样p#header例子2:
2015-04-29 04:28:41
643
原创 Unit Test in Visual Studio
一直develop code, 突然有人要求写unit test.... 傻眼了。- Visual Studio 2013 里面已经有现成的unit test流程。1)新建unit test project (C#-> Unit Test Project) 2)右键项目,add reference, 在这里导入需要被测试的project(可以使用browser定位到相关的project
2015-04-27 10:34:48
749
原创 Node.Js + express, run "hello world " in windows 8.1
use sublime to edit project1) index.js中新加一个render2) 在views 目录下新建一个helloworld.jade3)运行http://localhost:3000/helloworld/
2015-04-26 13:43:48
506
转载 Node.js + Express 环境搭建和调试运行 (windows 8.1)
STEP 1 – INSTALL NODE.JSdownload Node.js from website and install it STEP 2 – INSTALL EXPRESSCOMMAND C:\NODE\C:\node>npm install -g expressCOMMAND C:\NODE>C:\node>npm insta
2015-04-26 13:04:55
673
转载 win8下的IIS启动配置(ASP.NET - WEB APP指定的参数已超出有效值的范围,参数名:site)
ASP.NET简介 ASP 是一项微软公司的技术,是一种使嵌入网页中的脚本可由因特网服务器执行的服务器端脚本技术。指 Active Server Pages(动态服务器页面) ,运行于IIS 之中的程序 。从定义中我们可以看到ASP.NET需要运行在IIS +.net framework 环境下。对于.net framenwork我们现在微软的VS平台会带有。而对于
2015-04-18 14:29:52
1779
原创 Windows8 中配置和开发Windows Phone 开发环境
https://msdn.microsoft.com/en-us/library/windows/apps/ff402529(v=vs.105).aspx下载模拟器,下载visual studio 2012+,跟着教程就好了。。。。问题是windows系统这里有一个权限问题,不在administrator 组里面的用户是无法正常运行windows phone
2015-04-18 05:59:29
557
原创 XML&XAML 理解
XMLXAMLMakeup Languagedeclarative application languageweb applicationsdesign controls for windows & web applications discribe other makeup languageobject definition
2015-04-18 05:56:43
1072
转载 PHP 安装配置教程, eclipse+xammp
http://blog.youkuaiyun.com/fjssharpsword/article/details/10352629
2015-04-13 11:10:56
622
原创 Integer to Roman - Leetcode
这个了解原理, 从大到小一点点测,然后相应的改变当前值,即可。public class Solution { public String intToRoman(int num) { int[] radix = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; String[] symbol = {"M","C
2015-03-03 13:52:21
471
原创 Same Tree - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-27 02:14:11
364
原创 Symmetric Tree - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-27 02:06:32
459
原创 Balanced Binary Tree - Leetcode
Given 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 of every node never diffe
2015-02-26 13:43:51
349
原创 Convert Sorted List to Binary Search Tree - Leetcode
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; next = null; } * } *//** * Definition for binary tree
2015-02-26 12:46:56
483
原创 Convert Sorted Array to Binary Search Tree - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-26 12:31:19
359
原创 知识补充
1.快乐数(Happy Number):该数字所有数位的平方和,得到的新数再次求所有数位的平方和,如此重复进行,最终结果必为1。比如28是一个快乐数,因为28 →2^2+8^2=68 → 6^2+8^2=100 → 1^2+0^2+0^2=1;2.哈沙德数(HarshadNumber):能被所有数位之和整除的正整数。比如18是一个哈沙德数,因为18可以被1+8=9整除;3.过剩数(
2015-02-26 12:27:44
816
原创 Unique Binary Search Trees II - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; left = null; right = null; } * } */public
2015-02-26 08:58:58
407
原创 Unique Binary Search Trees - Leetcode
public class Solution { public int numTrees(int n) { if(n==0 || n==1) return 1; int[] f = new int[n+1]; for(int i=0; i<n+1; i++){ if(i<2)
2015-02-26 08:32:29
410
原创 Binary Tree Postorder Traversal - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-24 12:41:54
409
原创 Binary Tree Preorder Traversal - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-24 12:37:36
359
原创 Binary Tree Inorder Traversal - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-24 12:14:31
335
原创 Validate Binary Search Tree - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-24 10:25:32
334
原创 Add Binary - Leetcode
public class Solution { public String addBinary(String a, String b) { StringBuilder sb = new StringBuilder(); int plus = 0; int ca,cb; int i=a.length()-1,j=b.length()-1;
2015-02-24 09:51:00
447
原创 *Sort List - Leetcode
/** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } */public class
2015-02-24 09:43:27
433
原创 Construct Binary Tree from Inorder and Postorder Traversal - Leetcoee
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-24 08:49:51
441
原创 Construct Binary Tree from Preorder and Inorder Traversal - Leetcode
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi
2015-02-24 08:28:59
430
原创 Largest Rectangle in Histogram - Leetcode
public class Solution { public int largestRectangleArea(int[] height) { int[] h = new int[height.length+1]; for(int x=0; x<height.length; x++){ h[x] = height[x]; } h[height.length
2015-02-24 07:24:09
367
原创 Longest Valid Parentheses - Leetcode
public class Solution { public int longestValidParentheses(String s) { int[] f = new int[s.length()]; int ret = 0; for(int i=1; i<s.length(); i++){ if(s.charAt(
2015-02-22 08:59:55
359
原创 Insertion Sort List - Leetcode
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } */public
2015-02-22 07:35:30
327
原创 First Missing Positive - Leetcode
public class Solution { public int firstMissingPositive(int[] A) { for(int i=0; i< A.length; i++){ while(A[i] != (i+1)){ if(A[i] || A[i]>A.length || A[A[i]-1] ==
2015-02-22 07:32:08
341
原创 Sort Colors - Leetcode
public class Solution { public void sortColors(int[] A) { int left=0, right=A.length-1, i=0; while(left<=right){ if(A[left] == 0){ swap(A,left,i);
2015-02-22 06:13:16
447
原创 Reorder List - Leetcode
分析:画个图出来:当开头节点始终连向尾巴,尾巴始终联接开头。开头后移,尾巴前移,直到开头遇到尾巴。但是这里尾巴前移增加了算法的复杂度,此方法不符合题目要求。还有一个,就是1,从中间切分;2,颠倒第二部分;3,一一连接两个部分的节点Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→
2015-02-20 04:26:31
430
原创 *Linked List Cycle II - Leetcode
/** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } */public class
2015-02-20 03:39:53
400
原创 Linked List Cycle - Leetcode
/** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } */public class
2015-02-20 03:20:58
431
原创 Search for a Range - Leetcode
public class Solution { public int[] searchRange(int[] A, int target) { int start=0, end=A.length-1, mid, pivot=0; while(start<=end){ mid = (start+end)/2; i
2015-02-19 15:55:46
408
原创 Search Insert Position - Leetcode
public class Solution { public int searchInsert(int[] A, int target) { int start = 0, end = A.length-1;int mid; while(start<=end){ mid = (start+end)/2; if(A
2015-02-19 15:45:02
384
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人